[DebianGIS-dev] r1125 - in packages/libhdf4/trunk: . config debian hdf hdf/fmpool hdf/src hdf/src/fort_ps hdf/test hdf/test/fort_ps hdf/util hdf/util/testfiles man mfhdf mfhdf/c++ mfhdf/dumper mfhdf/dumper/testfiles mfhdf/fortran mfhdf/fortran/config mfhdf/fortran/fort_ps mfhdf/fortran/msoft mfhdf/fortran/vms mfhdf/libsrc mfhdf/libsrc/config mfhdf/ncdump mfhdf/ncgen mfhdf/nctest mfhdf/port mfhdf/xdr release_notes

frankie at alioth.debian.org frankie at alioth.debian.org
Fri Sep 28 21:58:17 UTC 2007


Author: frankie
Date: 2007-09-28 21:58:13 +0000 (Fri, 28 Sep 2007)
New Revision: 1125

Added:
   packages/libhdf4/trunk/INSTALL_WINDOWS.txt
   packages/libhdf4/trunk/MANIFEST
   packages/libhdf4/trunk/Makefile.am
   packages/libhdf4/trunk/aclocal.m4
   packages/libhdf4/trunk/bin/
   packages/libhdf4/trunk/config/BlankForm
   packages/libhdf4/trunk/config/freebsd
   packages/libhdf4/trunk/config/hpux11.00
   packages/libhdf4/trunk/config/ia64-linux-gnu
   packages/libhdf4/trunk/config/irix6.x
   packages/libhdf4/trunk/config/linux-gnu
   packages/libhdf4/trunk/config/osf5.x
   packages/libhdf4/trunk/config/powerpc-apple
   packages/libhdf4/trunk/config/powerpc-ibm-aix5.x
   packages/libhdf4/trunk/config/solaris2.x
   packages/libhdf4/trunk/config/sv1-cray
   packages/libhdf4/trunk/config/unicos10.0.X
   packages/libhdf4/trunk/config/unicosmk2.0.6.X
   packages/libhdf4/trunk/configure.ac
   packages/libhdf4/trunk/hdf/COPYING
   packages/libhdf4/trunk/hdf/COPYRIGHT
   packages/libhdf4/trunk/hdf/Makefile.am
   packages/libhdf4/trunk/hdf/README.33r4
   packages/libhdf4/trunk/hdf/src/INSTALL
   packages/libhdf4/trunk/hdf/src/Makefile.am
   packages/libhdf4/trunk/hdf/src/cszip.c
   packages/libhdf4/trunk/hdf/src/cszip.h
   packages/libhdf4/trunk/hdf/src/h4config.h.in
   packages/libhdf4/trunk/hdf/test/MAKECOM.OLD
   packages/libhdf4/trunk/hdf/test/Makefile.am
   packages/libhdf4/trunk/hdf/test/tdupimgs.c
   packages/libhdf4/trunk/hdf/test/tszip.c
   packages/libhdf4/trunk/hdf/util/Makefile.am
   packages/libhdf4/trunk/hdf/util/README.fp2hdf
   packages/libhdf4/trunk/hdf/util/README.fp2hdf.test
   packages/libhdf4/trunk/hdf/util/fp2hdf.test
   packages/libhdf4/trunk/hdf/util/h4cc.in
   packages/libhdf4/trunk/hdf/util/h4fc.in
   packages/libhdf4/trunk/hdf/util/h4redeploy.in
   packages/libhdf4/trunk/hdf/util/testfiles/fp2hdf/
   packages/libhdf4/trunk/hdf/util/testfiles/head.r24.gz
   packages/libhdf4/trunk/hdf/util/testfiles/head.r8.gz
   packages/libhdf4/trunk/hdf/util/testutil.sh.in
   packages/libhdf4/trunk/man/Makefile.am
   packages/libhdf4/trunk/mfhdf/Makefile.am
   packages/libhdf4/trunk/mfhdf/README.HDF.33
   packages/libhdf4/trunk/mfhdf/dumper/Makefile.am
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/Example6.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/Image_with_Palette.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/LongDataset.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/ctxtr2r.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-19.out
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-10.out
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-11.out
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfi322.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui162.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui82.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui83.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui84.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/star.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/swf32.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/swf32_fileattr.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/swi16.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/swi8.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdata.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdf24.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdfr8f.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/test.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/tvattr.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/tvset.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh.in
   packages/libhdf4/trunk/mfhdf/fortran/Makefile.am
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-apple.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris64.f
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-apple.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris64.c
   packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-apple.inc
   packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-solaris64.inc
   packages/libhdf4/trunk/mfhdf/fortran/test_nc.cdl
   packages/libhdf4/trunk/mfhdf/fortran/test_nc.nc
   packages/libhdf4/trunk/mfhdf/hdfimport/
   packages/libhdf4/trunk/mfhdf/hdiff/
   packages/libhdf4/trunk/mfhdf/hrepack/
   packages/libhdf4/trunk/mfhdf/libsrc/Makefile.am
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-apple.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris64.h
   packages/libhdf4/trunk/mfhdf/libsrc/hdftest.h
   packages/libhdf4/trunk/mfhdf/libsrc/temptySDSs.c
   packages/libhdf4/trunk/mfhdf/libsrc/tidtypes.c
   packages/libhdf4/trunk/mfhdf/libsrc/trank0.c
   packages/libhdf4/trunk/mfhdf/libsrc/tsd.c
   packages/libhdf4/trunk/mfhdf/libsrc/tszip.c
   packages/libhdf4/trunk/mfhdf/ncdump/Makefile.am
   packages/libhdf4/trunk/mfhdf/ncgen/Makefile.am
   packages/libhdf4/trunk/mfhdf/nctest/Makefile.am
   packages/libhdf4/trunk/mfhdf/nctest/test_unlim.cdl
   packages/libhdf4/trunk/mfhdf/nctest/test_unlim.nc
   packages/libhdf4/trunk/mfhdf/nctest/varget_unlim.c
   packages/libhdf4/trunk/mfhdf/port/Makefile.am
   packages/libhdf4/trunk/mfhdf/xdr/Makefile.am
   packages/libhdf4/trunk/release_notes/HISTORY.txt
   packages/libhdf4/trunk/release_notes/RELEASE.txt
   packages/libhdf4/trunk/release_notes/misc_docs.txt
Removed:
   packages/libhdf4/trunk/config.guess
   packages/libhdf4/trunk/config.sub
   packages/libhdf4/trunk/config/mh-aix
   packages/libhdf4/trunk/config/mh-alpha
   packages/libhdf4/trunk/config/mh-decstation
   packages/libhdf4/trunk/config/mh-fbsd
   packages/libhdf4/trunk/config/mh-fujivp
   packages/libhdf4/trunk/config/mh-hpux
   packages/libhdf4/trunk/config/mh-hpux11
   packages/libhdf4/trunk/config/mh-ia64
   packages/libhdf4/trunk/config/mh-irix32
   packages/libhdf4/trunk/config/mh-irix5
   packages/libhdf4/trunk/config/mh-irix6
   packages/libhdf4/trunk/config/mh-linux
   packages/libhdf4/trunk/config/mh-mac
   packages/libhdf4/trunk/config/mh-solaris
   packages/libhdf4/trunk/config/mh-solarisx86
   packages/libhdf4/trunk/config/mh-sun
   packages/libhdf4/trunk/config/mh-t3e
   packages/libhdf4/trunk/config/mh-unicos
   packages/libhdf4/trunk/configure.in
   packages/libhdf4/trunk/hdf/MAKE.COM
   packages/libhdf4/trunk/hdf/build.inc
   packages/libhdf4/trunk/hdf/jpeg/
   packages/libhdf4/trunk/hdf/pablo/
   packages/libhdf4/trunk/hdf/util/testfiles/head.r24.Z
   packages/libhdf4/trunk/hdf/util/testfiles/head.r8.Z
   packages/libhdf4/trunk/hdf/util/testutil.sh
   packages/libhdf4/trunk/hdf/zlib/
   packages/libhdf4/trunk/install-sh
   packages/libhdf4/trunk/mfhdf/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/aclocal.m4
   packages/libhdf4/trunk/mfhdf/configure
   packages/libhdf4/trunk/mfhdf/configure.in
   packages/libhdf4/trunk/mfhdf/doc/
   packages/libhdf4/trunk/mfhdf/dumper/Example6.hdf
   packages/libhdf4/trunk/mfhdf/dumper/Image_with_Palette.hdf
   packages/libhdf4/trunk/mfhdf/dumper/LongDataset.hdf
   packages/libhdf4/trunk/mfhdf/dumper/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/dumper/ctxtr2r.hdf
   packages/libhdf4/trunk/mfhdf/dumper/depend
   packages/libhdf4/trunk/mfhdf/dumper/grtdfi322.hdf
   packages/libhdf4/trunk/mfhdf/dumper/grtdfui162.hdf
   packages/libhdf4/trunk/mfhdf/dumper/grtdfui82.hdf
   packages/libhdf4/trunk/mfhdf/dumper/grtdfui83.hdf
   packages/libhdf4/trunk/mfhdf/dumper/grtdfui84.hdf
   packages/libhdf4/trunk/mfhdf/dumper/star.hdf
   packages/libhdf4/trunk/mfhdf/dumper/swf32.hdf
   packages/libhdf4/trunk/mfhdf/dumper/swf32_fileattr.hdf
   packages/libhdf4/trunk/mfhdf/dumper/swi16.hdf
   packages/libhdf4/trunk/mfhdf/dumper/swi8.hdf
   packages/libhdf4/trunk/mfhdf/dumper/tdata.hdf
   packages/libhdf4/trunk/mfhdf/dumper/tdf24.hdf
   packages/libhdf4/trunk/mfhdf/dumper/tdfr8f.hdf
   packages/libhdf4/trunk/mfhdf/dumper/test.hdf
   packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh
   packages/libhdf4/trunk/mfhdf/dumper/tvattr.hdf
   packages/libhdf4/trunk/mfhdf/dumper/tvset.hdf
   packages/libhdf4/trunk/mfhdf/fortran/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/nctest/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/pablo/
   packages/libhdf4/trunk/mfhdf/port/Makefile.in_orig
   packages/libhdf4/trunk/mfhdf/xdr/Makefile.in_orig
   packages/libhdf4/trunk/mkinstalldirs
   packages/libhdf4/trunk/release_notes/ABOUT_4.1r4
   packages/libhdf4/trunk/release_notes/compile.txt
Modified:
   packages/libhdf4/trunk/COPYING
   packages/libhdf4/trunk/INSTALL
   packages/libhdf4/trunk/Makefile.in
   packages/libhdf4/trunk/README
   packages/libhdf4/trunk/Win32.nofortran.zip
   packages/libhdf4/trunk/Win32.zip
   packages/libhdf4/trunk/configure
   packages/libhdf4/trunk/debian/changelog
   packages/libhdf4/trunk/debian/control
   packages/libhdf4/trunk/hdf/Makefile.in
   packages/libhdf4/trunk/hdf/fmpool/Makefile.in
   packages/libhdf4/trunk/hdf/src/Makefile.in
   packages/libhdf4/trunk/hdf/src/atom.c
   packages/libhdf4/trunk/hdf/src/df24.c
   packages/libhdf4/trunk/hdf/src/dfan.c
   packages/libhdf4/trunk/hdf/src/dfan.h
   packages/libhdf4/trunk/hdf/src/dffunc.inc
   packages/libhdf4/trunk/hdf/src/dfp.c
   packages/libhdf4/trunk/hdf/src/dfr8.c
   packages/libhdf4/trunk/hdf/src/dfsd.c
   packages/libhdf4/trunk/hdf/src/dynarray.c
   packages/libhdf4/trunk/hdf/src/fort_ps/herrpf.c
   packages/libhdf4/trunk/hdf/src/fort_ps/herrpff.f
   packages/libhdf4/trunk/hdf/src/fort_ps/hfilepf.c
   packages/libhdf4/trunk/hdf/src/fort_ps/hfilepff.f
   packages/libhdf4/trunk/hdf/src/fort_ps/hprotop.h
   packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpf.c
   packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpff.f
   packages/libhdf4/trunk/hdf/src/fort_ps/vgpf.c
   packages/libhdf4/trunk/hdf/src/fort_ps/vgpff.f
   packages/libhdf4/trunk/hdf/src/hbitio.c
   packages/libhdf4/trunk/hdf/src/hblocks.c
   packages/libhdf4/trunk/hdf/src/hbuffer.c
   packages/libhdf4/trunk/hdf/src/hchunks.c
   packages/libhdf4/trunk/hdf/src/hchunks.h
   packages/libhdf4/trunk/hdf/src/hcomp.c
   packages/libhdf4/trunk/hdf/src/hcomp.h
   packages/libhdf4/trunk/hdf/src/hcompi.h
   packages/libhdf4/trunk/hdf/src/hcompri.c
   packages/libhdf4/trunk/hdf/src/hconv.h
   packages/libhdf4/trunk/hdf/src/hdf.h
   packages/libhdf4/trunk/hdf/src/hdfi.h
   packages/libhdf4/trunk/hdf/src/herr.c
   packages/libhdf4/trunk/hdf/src/herr.h
   packages/libhdf4/trunk/hdf/src/herrf.c
   packages/libhdf4/trunk/hdf/src/hextelt.c
   packages/libhdf4/trunk/hdf/src/hfile.c
   packages/libhdf4/trunk/hdf/src/hfile.h
   packages/libhdf4/trunk/hdf/src/hfiledd.c
   packages/libhdf4/trunk/hdf/src/hfileff.f
   packages/libhdf4/trunk/hdf/src/hlimits.h
   packages/libhdf4/trunk/hdf/src/hproto.h
   packages/libhdf4/trunk/hdf/src/linklist.c
   packages/libhdf4/trunk/hdf/src/mcache.c
   packages/libhdf4/trunk/hdf/src/mfan.c
   packages/libhdf4/trunk/hdf/src/mfgr.c
   packages/libhdf4/trunk/hdf/src/mfgr.h
   packages/libhdf4/trunk/hdf/src/mfgrf.c
   packages/libhdf4/trunk/hdf/src/mfgrff.f
   packages/libhdf4/trunk/hdf/src/src.inc
   packages/libhdf4/trunk/hdf/src/trace.h
   packages/libhdf4/trunk/hdf/src/vattr.c
   packages/libhdf4/trunk/hdf/src/vg.c
   packages/libhdf4/trunk/hdf/src/vgf.c
   packages/libhdf4/trunk/hdf/src/vgff.f
   packages/libhdf4/trunk/hdf/src/vgp.c
   packages/libhdf4/trunk/hdf/src/vhi.c
   packages/libhdf4/trunk/hdf/src/vio.c
   packages/libhdf4/trunk/hdf/src/vrw.c
   packages/libhdf4/trunk/hdf/src/vsfld.c
   packages/libhdf4/trunk/hdf/test/Makefile.in
   packages/libhdf4/trunk/hdf/test/an.c
   packages/libhdf4/trunk/hdf/test/bitio.c
   packages/libhdf4/trunk/hdf/test/extelt.c
   packages/libhdf4/trunk/hdf/test/forsupf.c
   packages/libhdf4/trunk/hdf/test/forsupff.f
   packages/libhdf4/trunk/hdf/test/fort_ps/forsupffp.f
   packages/libhdf4/trunk/hdf/test/fort_ps/fortest.arg
   packages/libhdf4/trunk/hdf/test/fort_ps/fortestFp.f
   packages/libhdf4/trunk/hdf/test/fort_ps/manpf.f
   packages/libhdf4/trunk/hdf/test/fortest.c
   packages/libhdf4/trunk/hdf/test/fortest.h
   packages/libhdf4/trunk/hdf/test/fortestF.f
   packages/libhdf4/trunk/hdf/test/litend.c
   packages/libhdf4/trunk/hdf/test/manf.f
   packages/libhdf4/trunk/hdf/test/mgr.c
   packages/libhdf4/trunk/hdf/test/mgrf.f
   packages/libhdf4/trunk/hdf/test/nbit.c
   packages/libhdf4/trunk/hdf/test/t24f.f
   packages/libhdf4/trunk/hdf/test/testhdf.c
   packages/libhdf4/trunk/hdf/test/tproto.h
   packages/libhdf4/trunk/hdf/test/tvattr.c
   packages/libhdf4/trunk/hdf/test/tvattrf.f
   packages/libhdf4/trunk/hdf/test/tvset.c
   packages/libhdf4/trunk/hdf/test/tvsetf.f
   packages/libhdf4/trunk/hdf/util/Makefile.in
   packages/libhdf4/trunk/hdf/util/fp2hdf.c
   packages/libhdf4/trunk/hdf/util/fptest.c
   packages/libhdf4/trunk/hdf/util/gif2mem.c
   packages/libhdf4/trunk/hdf/util/hdf2gif.c
   packages/libhdf4/trunk/hdf/util/hdfcomp.c
   packages/libhdf4/trunk/hdf/util/hdfpack.c
   packages/libhdf4/trunk/hdf/util/vshow.c
   packages/libhdf4/trunk/man/Makefile.in
   packages/libhdf4/trunk/mfhdf/Makefile.in
   packages/libhdf4/trunk/mfhdf/c++/ncvalues.cc
   packages/libhdf4/trunk/mfhdf/c++/ncvalues.hh
   packages/libhdf4/trunk/mfhdf/c++/netcdf.cc
   packages/libhdf4/trunk/mfhdf/c++/netcdf.hh
   packages/libhdf4/trunk/mfhdf/dumper/Makefile.in
   packages/libhdf4/trunk/mfhdf/dumper/TEST.COM
   packages/libhdf4/trunk/mfhdf/dumper/hdp.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp.h
   packages/libhdf4/trunk/mfhdf/dumper/hdp_dump.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp_gr.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp_list.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp_sds.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp_vd.c
   packages/libhdf4/trunk/mfhdf/dumper/hdp_vg.c
   packages/libhdf4/trunk/mfhdf/dumper/show.c
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-13.out
   packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-15.out
   packages/libhdf4/trunk/mfhdf/fortran/Makefile.in
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-aix.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-alpha.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-convex.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-dec.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fbsd.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fujivp.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-hpux.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-ia64.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix32.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix4.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix5.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix6.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-linux.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-mac.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solarisx86.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-sun.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-t3e.f
   packages/libhdf4/trunk/mfhdf/fortran/config/ftest-unicos.f
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-aix.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-alpha.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-convex.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-dec.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fbsd.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fujivp.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-hpux.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-ia64.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix32.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix4.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix5.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix6.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-linux.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-mac.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solarisx86.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-sun.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-t3e.c
   packages/libhdf4/trunk/mfhdf/fortran/config/jackets-unicos.c
   packages/libhdf4/trunk/mfhdf/fortran/fort_ps/hdftestp.f
   packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpf.c
   packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpff.f
   packages/libhdf4/trunk/mfhdf/fortran/hdftest.f
   packages/libhdf4/trunk/mfhdf/fortran/mfsdf.c
   packages/libhdf4/trunk/mfhdf/fortran/mfsdff.f
   packages/libhdf4/trunk/mfhdf/fortran/msoft/ftest.for
   packages/libhdf4/trunk/mfhdf/fortran/msoft/jackets.c
   packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.for
   packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.m4
   packages/libhdf4/trunk/mfhdf/fortran/vms/jackets.c
   packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in
   packages/libhdf4/trunk/mfhdf/libsrc/array.c
   packages/libhdf4/trunk/mfhdf/libsrc/cdf.c
   packages/libhdf4/trunk/mfhdf/libsrc/cdftest.c
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-aix.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-alpha.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-convex.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-dec.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fbsd.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fujivp.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-hpux.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-ia64.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix32.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix4.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix5.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix6.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-linux.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-mac.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solarisx86.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-sun.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-t3e.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-unicos.h
   packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-vms.h
   packages/libhdf4/trunk/mfhdf/libsrc/hdf2netcdf.h
   packages/libhdf4/trunk/mfhdf/libsrc/hdftest.c
   packages/libhdf4/trunk/mfhdf/libsrc/mfhdf.h
   packages/libhdf4/trunk/mfhdf/libsrc/mfsd.c
   packages/libhdf4/trunk/mfhdf/libsrc/netcdf.h.in
   packages/libhdf4/trunk/mfhdf/libsrc/putget.c
   packages/libhdf4/trunk/mfhdf/libsrc/var.c
   packages/libhdf4/trunk/mfhdf/libsrc/xdrposix.c
   packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in
   packages/libhdf4/trunk/mfhdf/ncdump/ncdump.c
   packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in
   packages/libhdf4/trunk/mfhdf/ncgen/make.com
   packages/libhdf4/trunk/mfhdf/ncgen/ncgen.l
   packages/libhdf4/trunk/mfhdf/nctest/Makefile.in
   packages/libhdf4/trunk/mfhdf/nctest/driver.c
   packages/libhdf4/trunk/mfhdf/nctest/slabs.c
   packages/libhdf4/trunk/mfhdf/nctest/tests.h
   packages/libhdf4/trunk/mfhdf/port/Makefile.in
   packages/libhdf4/trunk/mfhdf/xdr/Makefile.in
   packages/libhdf4/trunk/release_notes/bugs_fixed.txt
Log:
Moving to new upstream version


Modified: packages/libhdf4/trunk/COPYING
===================================================================
--- packages/libhdf4/trunk/COPYING	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/COPYING	2007-09-28 21:58:13 UTC (rev 1125)
@@ -3,7 +3,7 @@
 Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF) 
 Software Library and Utilities
 
-Copyright 1988-2000 The Board of Trustees of the University of Illinois
+Copyright 1988-2005 The Board of Trustees of the University of Illinois
 
 All rights reserved.
 

Modified: packages/libhdf4/trunk/INSTALL
===================================================================
--- packages/libhdf4/trunk/INSTALL	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/INSTALL	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,1176 +1,158 @@
-***************************************************************************
-  CONTENTS
-  --------
 
-  1. Obtaining the latest version
+    Installation instructions for HDF4.2r1 on UNIX and MacOSX platforms
+    ====================================================================
+                          February 2005
 
-  2. Installing HDF
-  2.1 Supported Platforms
-  2.2 Third Party Software Requirements
-  2.3 System Requirements
 
-  2.4 General Configuration/Installation - Unix
-  2.4.1 Overview
-  2.4.2 Layout of configuration files
+CONTENTS
 
-  2.4.3 Changing default values(CC,CFLAGS,..) and Setting Options
-  2.4.3.1 Changing default values(CC,CFLAGS,..)
-  2.4.3.2 Using HDF/MFHDF libraries w/ original netCDF library
-  2.4.3.3 Setting other Options
+0. Third Party Software Requirements
+1. Optional SZIP compression Library
+2. HDF4 Source code and precompiled binaries 
+3. UNIX and MacOSX configuration and build
+4. Using HDF/MFHDF libraries w/ original netCDF library
 
-  2.4.4 Running configure
-  2.4.5 Dealing with Configure Problems
-  2.4.6 Compiling, Testing and Installing
 
-  2.5 Platform-specific Notes
-  2.5.1 Solaris on Sparc
-  2.5.2 Solaris on INTEL(x86)
-  2.5.3 OpenVMS AXP on DEC Alpha
-  2.5.4 Windows 98/NT/2000
-  2.5.5 Macintosh OS - Power PC    ** Not Supported **
-  2.5.6 Exemplar 
-  2.5.7 SP2 Single node
-  2.5.8 T3E Single node
-  2.5.9a SGI IRIX 6.x
-  2.5.9b SGI IRIX64
-  2.5.10 DEC Alpha
+0. Third Party Software Requirements
+   =================================
 
-  2.6 Pablo Instrumentation
-  2.7 File Cache(Beta release)
-  2.8 Installation Location
-  2.9 Specifying the System Type
-  2.10 Configure Options 
+   x JPEG distribution release 6b(libjpeg.a). The "official" site
+     for this is ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
 
-  3. Man pages
+   x ZLIB 1.1.4(libz.a) Source code and binaries may be downloaded from
+     http://www.gzip.org/ or from the NCSA ftp server  
+     ftp://hdf.ncsa.uiuc.edu/lib-external/gzip/
+     Newest ZLIB 1.2 may also be used.
 
-  4. Release Notes
 
-  5. Documentation
+1. Optional SZIP compression Library
+   ==================================
 
-  6. FAQ
+   x HDF4.2r1 may be configured to use the SZIP compression Library.
+     For more information about the SZIP library, see
 
-  7. Java Products
+               http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/ 
 
-  8. HELP
+     The SZIP compression library is free for non-commercial use; 
+     see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html
+     for information regarding commercial use.
+     
+2. HDF4 Source code and precompiled binaries
+   ==========================================
+     HDF provides "tar source ball" and precompiled binaries from 
+     the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directories:
 
-*****************************************************************************
+         ftp://hdf.ncsa.uiuc.edu/HDF/HDF_Current/src
+         ftp://hdf.ncsa.uiuc.edu/HDF/HDF_Current/bin 
 
-1. Obtaining the latest version
-   ============================
+   IMPORTANT:
+   ==========
+   HDF4 prebuilt binaries come with the SZIP compression. In order to use
+   the binaries install SZIP Library on your system. You may download SZIP
+   precompiled binaries from 
+         http://hdf.ncsa.uiuc.edu/doc_resource/SZIP
 
-    The most recent version of the distribution can be obtained from
-    the NCSA ftp archive site at:
 
-       ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/
+3. UNIX and MacOSX configuration and build
+   =======================================
 
-    The HDF home page is at:   
-       http://hdf.ncsa.uiuc.edu/ 
+   0)  The HDF4.2r1 Library was tested on the following platforms
 
-    The distribution can be downloaded from the HDF Home page at:
-       http://hdf.ncsa.uiuc.edu/obtain.html
-    
+       AIX 5.1, 5.2 (32 and 64-bit versions)
+       SunOs 5.7 (32 and 64-bit versions) 
+       SunOS 5.8 (32 and 64-bit versions) 
+       SunOS 5.9 (32 and 64-bit versions) 
+       HPUX 11.00
+       Linux 2.4 
+       IRIX64-6.5 (32 and 64-bit versions)
+       MacOSX
+       Crays SV1 and T90
+       True64 (OSF1 V5.1)
+       Windows 2000 and XP
+       FeeBSD
+       IA32 and IA64
+       Altix
+       AMD Opteron
 
-2. Installing HDF	
-   ==============
-
-    For compiling and installing the HDF libraries, tests and
-    utilities on a system, please follow these instructions. 
-
-2.1 Supported Platforms
-    ===================
-
-    For PLATFORM specific NOTES see Section 2.5 called
-    'Platform-specific Notes'.
-
-
-  Platform(OS)                    C-Compiler       Fortran-Compiler   
-  ------------                    ----------       ---------------- 
-  Sun4(Solaris 2.7)               WorkShop         WorkShop Compilers 5.0
-                                  Compilers C 5.0  FORTRAN 77 5.0         
-  Sun4(Solaris 2.6)               WorkShop         WorkShop Compilers 5.0
-                                  Compilers C 5.0  FORTRAN 77 5.0             
-  SGI-Indy(IRIX v6.5)             CC 7.30          f77 7.30
-  SGI-Origin(IRIX64 v6.5-n32)     CC 7.3.1m        f77 7.3.1m 
-  SGI-Origin(IRIX64 v6.5-64)      CC 7.3.1m        f77 7.3.1m    
-  HP9000/755(HP-UX B.11.00)       CC A.11.00.13    f77 B.11.00.01
-  Exemplar(HP-UX B.10.01)         CC V2.0          f77 V1.2.6
-  Cray J90 (bob.1 10.0.0.7)       CC 6.3.0.2       Cray Fortran 3.4.0.1.0 
-  IBM SP (single node, v4.3)      XLC 5.0.1.0      f77 07.01.0000.0002 
-  DEC Alpha/Digital Unix v4.0     DEC C v5.2-040   Digital Fortran v4.1-92 
-  DEC Alpha/OpenVMS AXP v7.1      DEC C v5.6-003   Digital Fortran 77 X7.1-156  
-  IBM PC - Intel Pentium
-       Solarisx86 (2.5.1)         GCC 2.7.2          -                
-       Linux      (2.2.16)        GCC 2.95.2       g77  0.5.25    
-       FreeBSD    (4.1.1)         GCC 2.95.2       GNU f77 V0.5.25
-  Windows NT/98/2000              MSVC++ 6.0       DEC Visual Fortran 6.0
-  T3E (sn6711 2.0.539b)           Cray CC 6.3.0.2  Cray Fortran 3.4.0.1.0
-
-
-  NOTE:  Platforms listed with compiler information entered, are 
-  platforms that HDF was tested on and for which we provide 
-  pre-compiled binaries.  
-
- 
-2.2  Third Party Software Requirements:
-     ==================================
-
-     1. IJPEG distribution release 6b(libjpeg.a). The "official" site
-        for this is ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
-
-     2. ZLIB 1.1.3(libz.a) distribution.
-
-     Both of these distributions are included with this distribution
-     in 'hdf/jpeg' and 'hdf/zlib'. The HDF/mfhdf base distribution
-     is known to work with these versions only.
-
-2.3 System Requirements
-    ===================
-
-    To build HDF from source, you need:
-
-      * an ANSI C compiler. The native ANSI compilers on the above 
-        platforms are supported. On platforms where no ANSI compiler
-        was available the free GNU ANSI compiler GCC was used.
-
-      * a Fortran 77 compiler (F90 on Crays) if you want Fortran support. 
-        See above table for platforms where Fortran is supported. You 
-        can compile both libraries without Fortran support by setting 
-        the Fortran compiler variable 'FC = NONE' in the respective
-        makefile fragment(mh-<os>) found in the top-level 'config'
-        directory: 
-
-                $(toplevel)/config/mh-<os>.
-
-        See below for further details of configuration and installation.
-        
-
-2.4 General Configuration/Installation - Unix
-    =========================================
-
-    2.4.1 Overview
-    --------------        
-    In this distribution there are two types of 'configure'
-    scripts. One is the Cygnus 'configure' script and the other is the
-    'configure' script created by the GNU autoconf package. The Cygnus
-    'configure' script is used at the top level to configure the overall
-    distribution and the HDF/MFHDF/IJPEG/ZLIB libraries. The GNU 'configure' 
-    script is used by the netCDF/IJPEG distributions to configure themselves. 
-    However, these gnu configure scripts are not used in configuring this 
-    distribution.
- 
-    The Cygnus 'configure' script attempts to guess the correct
-    platform you are configuring the distribution for by calling the shell
-    script 'config.guess'. It outputs a unique string based on information
-    obtained from the UNIX command 'uname' consisting of CPU-VENDOR-OS
-    e.g. 'hppa1.1-hp-hpux9.03' for an  HP9000/735 running HPUX-9.03.
-
-    2.4.2 Layout of configuration files
-    -----------------------------------
-    The following shows the layout of the files used in the configuration
-    of the HDF distribution.
-
-    NOTE: The $(toplevel)/mfhdf/CUSTOMIZE and 
-          $(toplevel)/mfhdf/configure(autoconf) files are no longer used 
-          in the configuration of the distribution.
-  
-    $(toplevel)/Makefile.in
-                config.guess
-                config.sub
-                configure (cygnus)
-                configure.in (cygnus)
-                config/mh-hpux, mh-sun,.....(host makefile fragments)
-
-                man/Makefile.in
-
-                mfhdf/CUSTOMIZE(not used)
-                mfhdf/configure(autoconf - not used)
-                mfhdf/libsrc/config/netcdf-aix.h,...  -> copied to netcdf.h
-                mfhdf/fortran/config/ftest-aix.f,...  -> copied to ftest.f
-                mfhdf/fortran/config/jackets-aix.c,.. -> copied to jackets.c
-                mfhdf/fortran/config/netcdf-aix.inc,..-> copied to netcdf.inc
-
-                hdf/Makefile.in
-                hdf/src/Makefile.in
-                hdf/test/Makefile.in
-                hdf/util/Makefile.in
-                hdf/zlib/Makefile.in
-                hdf/pablo/Makefile.in
-
-                hdf/jpeg/configure.in (cygnus)
-                hdf/jpeg/Makefile.in
-                hdf/jpeg/configure.gnu(autoconf - not used)
-                hdf/jpeg/config/mh-hpux, mh-sun,... (host makefile fragments)
-                hdf/jpeg/config/jhpux.h, jsun.h,...   -> copied to jconfig.h
-
-                hdf/fmpool/configure, configure.in config.guess, config.sub,
-                           Makefile.in (all cygnus)
-                hdf/fmpool/config/mh-hpux, mh-sun,...(host makefile fragments)
-                hdf/fmpool/config/fmpsolaris.h,...    -> copied to fmpconf.h
-
-    2.4.3 Changing default values(CC,CFLAGS,..) and Setting Options
-    ---------------------------------------------------------------
-    To change any of the default values or set any of the options 
-    edit the makefile fragment: 
-
-             $(toplevel)/config/mh-<os>
-
-    for your particular operating system. After changing the values you must 
-    re-run the top-level 'configure' script. Make sure you start from
-    a clean distribution if you are rebuilding after a previous make
-    (i.e. 'make distclean') before re-running 'configure'.
-
-      2.4.3.1 Changing default values(CC,CFLAGS,..)
-      ********************************************
-      To change any of the default values for CC, FC, CFLAGS, FFLAGS,..etc
-      edit the top part of the makefile fragment: $(toplevel)/config/mh-<os>
-      It is also a good idea to look at the other system variables to make sure 
-      they are set correctly for your system.
-
-      2.4.3.2 Using HDF/MFHDF libraries w/ original netCDF library
-      ************************************************************
-      To use the HDF/MFHDF libraries(libdf.a, libmfhdf.a) with the
-      original netCDF library(libnetcdf.a) the HDF/MFHDF distribution
-      must be compiled with the option '-DHAVE_NETCDF'. This will
-      rename the HDF version of the C-interface(ncxxx) of the netCDF API
-      to sd_ncxxx to avoid clashing with the original netCDF API from
-      libnetcdf.a. Currently there is no support for renaming the 
-      netCDF Fortran interface stubs. As such the HDF/MFHDF distribution 
-      must be compiled without fortran support. HDF Users can still access
-      HDF/netCDF files through the SDxxx interface but not through the
-      ncxxx interface unless the renamed interface is used(sd_ncxxx).
-
-      2.4.3.3 Setting other Options
-      *****************************
-      The makefile fragment must also be modified to enable the features 
-      mentioned in sections 2.6) and 2.7) below.
-
-    2.4.4 Running configure
-    -----------------------
-    To build both of the libraries contained in this directory,
-    run the ``configure'' script in $(toplevel), e.g.:
-
-	./configure -v --prefix=/usr/local/hdf
-
-    If you're using `csh' on an old version of System V, you might need 
-    to type `sh ./configure -v --prefix=/usr/local/hdf' instead to prevent 
-    `csh' from trying to execute `configure' itself.
-
-    This will configure the distribution to install the libraries, utilities,
-    include and man files in '/usr/local/hdf/lib','/usr/local/hdf/bin',
-    '/usr/local/hdf/include' and '/usr/local/hdf/man' respectively. The
-    default 'prefix' is '/usr/local'. It is advisable to use something
-    like the above to avoid overwriting say another 'libjpeg.a' that might be
-    installed in '/usr/local/lib'. The '-v' option is for verbose output.
-
-    Note that both 'libz.a' and 'libjpeg.a' and their respective
-    include files are installed along with the base HDF(libdf.a) 
-    and netCDF(libmfhdf.a) libraries.
-
-    If the configure script can't determine your type of computer
-    then it probably is a platfrom that is no longer supported.
-    If you want to be adventurous see the section 'Dealing with
-    Configure Problems' below. Otherwise send an email to 
-    'hdfhelp at ncsa.uiuc.edu' for further help. 
-
-    2.4.5 Dealing with Configure Problems
-    *************************************
-    If you want to be adventurous you can try the following.
-
-    Configure basically calls either of the two shell scripts 'config.guess' 
-    or 'config.sub' depending upon whether a target platform was supplied 
-    on the command line to configure. If you don't provide a target on
-    the command line configure calls 'config.guess' to guess what platfrom
-    it is configuring for. The shell script 'config.guess' uses the unix
-    command 'uname' to figure out the CPU, vendor, and OS of the
-    platform. If you do provide a target on the command line, configure
-    calls the shell script 'config.sub' to build the triplet specifying
-    CPU, vendor, and OS from the full or partial target provided.
-
-    If the configure script can't determine your type of computer, give it
-    a general name that the computer is generally referred to as an argument, 
-    for instance './configure sun4'.  You can use the script 'config.sub' 
-    to test whether a general name is recognized; if it is, config.sub 
-    translates it to a triplet specifying CPU, vendor, and OS.
-    (e.g hppa1.1-hp-hpux9.03 for an HP900/735 running HPUX9.03).
-
-    If this still fails all is not lost. All the configure script really
-    needs is one of the supported targets mentioned above(except NT).
-    If you think your platform is close to one of the above platforms
-    mentioned in the 'Supported Platforms' sections you can pass configure
-    this target and it will configure the distribution for that target.
-
-    For possible mappings you will need to look inside the shell script
-    'config.sub' and look at the partial to full mappings and pick one
-    that satisfies the triplet mappings found in 'configure.in' below
-    the section "# per-host:'. Note that if you try a mapping and it
-    does not work this means that 'config.sub' needs to be edited to
-    provide the proper mapping from your target to a full mapping that
-    is supported. 
-
-    There are currently NO instructions for porting the distribution to a 
-    new platform.
-
-    2.4.6 Compiling, Testing and Installing
-    ---------------------------------------
-    To compile the library and utilities type:
-
-        make 
-
-    To find out the available make targets type:
-
-        make help
-
-    To test the libraries and utilities type:
-
-        make test 
-
-    It is a good idea to save the output of the tests and view it later 
-    for errors.
-    e.g. 
-
-        make test >& make.test.out
-
-    To install the libraries, utilities, includes and man pages type: e.g.
-
-        make install
-
-2.5 Platform-specific Notes
-    ========================
-
-
-    2.5.1 Solaris on Sparc
-    ----------------------
-    The distribution has been compiled/tested with the native
-    ANSI-C compiler and native fortran compiler. The binary 
-    distribution was compiled using the native compilers.
-
-    When compiling your programs on Solaris, you must include the 
-    the nsl library, to resolve calls to the xdr* routines.
-    For example,
-
-      cc -Xc -xO2 -o <your program> <your program>.c  \
-         -I<path for hdf include directory>\
-         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-         -L/usr/lib -lnsl
-
-
-    2.5.2 Solaris on INTEL(x86)
-    ---------------------------
-
-    The distribution has been compiled/tested with GCC 2.7.2 with
-    *NO* FORTRAN support.
-
-    When compiling your programs on Solaris_x86, you must include the 
-    the nsl library, to resolve calls to the xdr* routines.
-    For example,
-
-       gcc -ansi -O -o <your program> <your program>.c \
-           -I<path for hdf include directory> \
-           -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
-           -L/usr/lib -lnsl
-
-    2.5.3 OpenVMS AXP on DEC Alpha
-    ------------------------------
-   
-   To build the HDF Library on Alpha OpenVMS systems use
-    MAKEVMS.COM file in the top level directory of the VMS Library source.
-                                                       -------------------
-
-    To build the library in interactive mode run
-
-    @MAKEVMS.COM
-
-    To build the library in the background:
-
-    1. Check that the first command in MAKEVMS.COM sets default directory
-       to the top level directory in the HDF Library source tree (just
-       edit the first command line:  $  set def.... ).
-
-    2. Submit MAKEVMS.COM to the appropriate batch queue on your system
-       For example:
-
-    $ submit/log=buildhdf.log/noprint/notify/restart/que=batch$queue MAKEVMS.COM
-
-
-    MAKEVMS.COM file
-
-    1.  Creates three directories in the top level directory:
-        [...tophdf.include]
-        [...tophdf.bin]
-        [...tophdf.lib]
-
-    2.  Builds four libraries LIBJPEG.OLB, LIBZ.OLB, DF.OLB, and MFHDF.OLB,
-        and copies them into the [...tophdf.bin] directory.
-
-    3.  Builds the HDF utilities and copies them into the [...tophdf.bin]
-        directory.
-
-    4.  Copies the header files to the [...tophdf.include] directory.
-
-    5.  Runs the library tests after building each library and the tests for the
-
-        ncdump, ncgen and hdp utilities.
-
-    We recommend building the library in background and then checking log file
-    for test results. Output of the hdp test is written to the
-    [...tophdf.mfhdf.dumper]hdp.out file.
-
-    See MAKEVMS.COM for more information.
-
-    NOTE: If you are building from UNIX source perform the following steps
-          before you run MAKEVMS.COM:
-
-          1. Make sure that files in the directory [.mfhdf.fortran.vms] are
-             up to date.
-          2. In the directory [.hdf.test] change the files
-             forsupff.f
-             tsdmmsf.f
-             tsdnmmsf.f
-             tsdntf.f
-             tsdnnt.f
-             tvsetf.f
-             slabwf.f
-                      following the instructions given in the comments,
-             which start with 'For VMS', in these files.
-
-
-    2.5.4 Windows 98/NT/2000
-    ------------------------
-
-      Install HDF4.1 Release 4 on Windows NT, Windows 2000 and Windows 98
-
-The instructions which follow assume that you will be using one of 
-the 'zip' files that we provide, either the binary code release
-(HDF41r4.zip) or the source code release (HDF41r4s.zip).
-
-In building HDF from source code you may select between 
-two build environment options ( with Fortran or without Fortran support
-depending on your application and environment needs ).  
-
-The following sections discuss in details installation procedures. 
-
-
-Building from Binary Code Release (HDF41r4.zip)
-===============================================
-To install the HDFand MFHDF libraries and utilities, 
-it is assumed that you have done the following:
+       For more information, see the release_notes/RELEASE.txt file, "Platforms
+       tested" section.
       
-
-      1. Create a directory structure to unpack the library. For 
-      example: 
-
-	    c:\					(any drive)
-           MyHDFstuff\				(any folder name)
-
-      2. Copy the binary archive (HDF41r4.zip) 
-      to that directory 
-      and unpack it by running WinZip on HDF41r4.zip (the binary archive).
-      This should create a directory called 'HDF41r4' which 
-      contains the following files and directories.
-
-            c:\MyHDFstuff\HDF41r4\lib             ( Single-threaded static
-                                                    versions of HDF and MFHDF
-                                                    libraries  with Fortran
-                                                    or without Fortran support )
-            c:\MyHDFstuff\HDF41r4\dlllib          ( Multi-threaded DLL import
-                                                    HDF and MFHDF  libraries 
-                                                    and DLL files with Fortran
-                                                    or no Fortran support )
-            c:\MyHDFstuff\HDF41r4\include         ( include files )
-            c:\MyHDFstuff\HDF41r4\bin             ( utilities )
-            c:\MyHDFstuff\HDF41r4\release_notes   ( release notes )
-            c:\MyHDFstuff\HDF41r4\install_NT_98   ( this file)
-
-      
-      3. If you are building an application that uses the HDF libraries 
-         the following locations will need to be specified for locating
-         header files and linking in the HDF libraries:
+   Before you start:
  
-            C:\MyHDFstuff\HDF41r4\lib or C:\MyHDFstuff\HDF41r4\dlllib
-            C:\MyHDFstuff\HDF41r4\include
+   1)  Make sure that the ZLIB and JPEG Libraries are installed on your
+       system.
+   2)  Optional: install the SZIP version 2.0 Library. 
+   3)  Extract the source from the hdf4.2r1.tar file and change
+       directory to hdf4.2r1
 
+   To Configure:
 
+   4)  Use the configure command in the top level HDF4 directory hdf4.2r1
 
-Note: The ws2_32.lib needs to linked with your executable if using the static 
-      mfhdf library.  The ws2_32.lib can be found in your Microsoft Visual C++
-      directory under the lib folder.
+       ./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
 
+       * Please note that when szlib option is not used, SZIP Library will not
+         be configured in and SZIP compression will not be enabled.
+       * If your system has ZLIB and/or JPEG libraries installed under a
+         system library directory (such as /usr/lib), configure will
+         automatically find the library. In this case, the corresponding
+         configure flag may be ommitted.
+       * Note that --prefix defines where the installation path is.
+         The default is set as <hdf4_build_directory>/NewHDF 
 
-Building from Source Code Release (HDF41r4s.zip)
-================================================
+    To Build and Test:
 
-STEP I:  Preconditions
+    5)  To build the library
 
-To build the HDF and MFHDF libraries ( single-threaded static or
-multi-threaded DLL import libraries) and utilities, 
-it is assumed that you have done the following:
-      
-      1. Installed MicroSoft Developer Studio, and Visual C++ 6.0.
-         Visual Fortran 6.0 is needed if you are going to build the
-         full HDF Library with Fortran support.
+        gmake >& gmake.out
 
-      2. Set up a directory structure to unpack the library. For 
-      example: 
+    6)  To build and run the tests
 
-	    c:\					(any drive)
-           MyHDFstuff\				(any folder name)
+        gmake check >& check.out
 
-      3. Copy the source distribution archive to that directory 
-      and unpack it using the appropriate archiver options to
-      create a directory  hierarchy.
-         
-      Run WinZip on HDF41r4s.zip (the entire source tree).
-      This should create a directory called 'HDF41r4' which 
-      contains several files and directories.
-      
-Note: If you are building from the UNIX source code, then you will
-      need to replace the jconfig.h and netcdf.h file as follows
-      ( this assumes that the HDF Library tree resides 
-      under HDF41r4 directory ):
- 
-      copy C:\MyHDFstuff\HDF41r4\hdf\jpeg\config\jwin32.h
-                                 C:\MyHDFstuff\HDF41r4\hdf\jpeg\jconfig.h
-      copy C:\MyHDFstuff\HDF41r4\mfhdf\libsrc\win32cdf.h
-                                 C:\MyHDFstuff\HDF41r4\mfhdf\libsrc\netcdf.h
+    To Install:
 
-You do not need to do this if you are using the HDF41r4s.zip file! 
+    7)  To install the HDF4 library and tools
 
-STEP II: Select Installation type and Build.
+        gmake install
 
-You may select one of 2 ways to build the HDF libraries and 
-utilities, depending on your environment and application needs.
-
-Option I, (select Win32.nofortran.zip)
-This is the "NOFORTRAN" configuration : It builds debug and release single-threaded
-and multi-threaded versions of the HDF libraries, tests, and utilities. 
-There is no Fortran support.
-
-
-Option II, (select Win32.zip)
-This is "WITH FORTRAN support" configuration : it is the same as above but with
-Fortran support. 
-
-
-
-STEP III: Building the Libraries, tests and utilities.
-Note that the instructions are the same for both Options I and II. 
-
-
-	1. Unpack Win32.nofortran.zip or Win32.zip in 
-           directory HDF41r4\. 
-         
-        2. Invoke Microsoft Visial C++ 6.0, go to "File" and select
-           the "Open Workspace" option. 
-           Then open the c:\myHDFstuff\HDF41r4\all.dsw workspace. 
-
-        3. Select "Build", then Select "Set Active Configuration".
-
-           On Windows platform select as the active configuration
-
-           "all -- Win32 Debug" to build debug versions of single-threaded
-                                static libraries, tests and utilities and
-                                multi-threaded libraries and tests.
-            or
+    8)  By default the current configuration uses vendor compilers; to use
+        another compiler run the following commands before running
+        configure: 
  
-           "all -- Win32 Release" to build release versions of single-threaded
-                                static libraries, tests and utilities and
-                                multi-threaded libraries and tests.
-
-
-           Select "Build" and "Build all.exe" to
-           build the corresponding version of the HDF41r4 library.
-           If you are building from the Win32.zip archive, 
-           you will see that the Digital Visual Fortran compiler is invoked
-           by the Visual C++ Development environment in compiling the fortran code.
-
-           NOTE: "all" is a dummy target. You will get a link error when   
-           "all.exe." is built : 
-                 LINK: error LNK2001: unresolved external symbol _WinMainCRTStartup.....
-                 all.exe - 2 error(s), ....
-
-           Warning messages can be ignored. The "all.exe" is never created, 
-           so it is OK.
-
-           When the debug build is done the directories listed 
-           below will contain the following files:
-
-           c:\MyHDFstuff\HDF41r4\Windows\bin\debug - 
-
-             utilities, statically linked with the single-threaded libraries.
-
-           c:\MyHDFstuff\HDF41r4\Windows\lib\debug\singlethreaded -
-
-              HD414d.lib - HDF static library (inludes JPEG and GZIP libraries) 
-              HM414d.lib - MFHDF static library
-
-           c:\MyHDFstuff\HDF41r4\Windows\lib\debug\multithreaded -
-
-              HD414md.lib - HDF multi-threaded DLL import library 
-                            (inludes JPEG and GZIP libraries)
-              HM414md.lib - MFHDF multi-threaded DLL import library 
-
-           c:\MyHDFstuff\HDF41r4\Windows\DLL\debug
-
-               HD414md.DLL - HDF DLL
-               HM414md.DLL - MFHDF DLL
-
-           When the release build is done the directories listed
-           below will contain the following files:
+        setenv CC   "foo -flags"
+        setenv F77  "fffoo -flags"
  
-           c:\MyHDFstuff\HDF41r4\Windows\bin\release - 
- 
-             utilities, statically linked with the single-threaded libraries.
- 
-           c:\MyHDFstuff\HDF41r4\Windows\lib\release\singlethreaded - 
- 
-              HD414.lib - HDF static library (inludes JPEG and GZIP libraries)
-              HM414.lib - MFHDF static library
+        See the configure help page (configure --help) for a list of
+        environment variables that have an affect on building the
+        library.
 
-           c:\MyHDFstuff\HDF41r4\Windows\lib\release\multithreaded - 
- 
-              HD414m.lib - HDF multi-threaded DLL import library 
-                            (inludes JPEG and GZIP libraries)
-              HM414m.lib - MFHDF multi-threaded DLL import library
- 
-           c:\MyHDFstuff\HDF41r4\Windows\DLL\release 
+    9)  You may build HDF4 in a directory other than hdf4.2r1 by
+        using the "srcdir" option. Simply create a build directory and
+        type:
 
-               HD414m.DLL - HDF DLL
-               HM414m.DLL - MFHDF DLL
+        <path_to_hdf4.2r1>/configure ...
 
-
-Note: The ws2_32.lib needs to linked with your executable if using the static 
-      mfhdf library.  The ws2_32.lib can be found in your Microsoft Visual C++
-      directory under the lib folder.
-
-		
-STEP IV:   TESTING THE BUILD
-
-       In a command prompt window run the test batch file which
-       resides in the HDF41r4 directory to make sure that the libraries
-       were built correctly.
-
-       Set the path to include the DLL files or copy the files to the system
-       directory.
-
-       Then run Win32debugtst.bat to test debug version or
-       Win32releasetst.bat to test release version.  
-        
-
-STEP V:  INSTALLATION
-
-       In the command prompt window run the install_debug.bat file to install
-       the debug version. This file will create four directories under 
-       the HDF41r4 directory and copy over corresponding files:
-
-           bindbg     - utilties 
-           libdbg     - static libraries
-           dlllibdbg  - multi-threaded libraries and DLLs
-           include    - include files 
-
-       In the command prompt window run install_release.bat file to install 
-       release version. This file will create four directories under HDF41r4 
-       directory and copy corresponding files: 
+        where "..." are your configuration options.
  
-           bin     - utilties 
-           lib     - static libraries 
-           dlllib  - multi-threaded libraries and DLLs 
-           include - include files
- 
-Note:  There is an error in the debug version of the hdp tool.  It will show an
-       alert box with the error and 3 buttons.  This is a known problem.  The release
-       version is fine.
+4. Using HDF/MFHDF libraries w/ original netCDF library 
+   ====================================================
 
-STEP VI:  
+        To use the HDF/MFHDF libraries(libdf.a, libmfhdf.a) with the
+        original netCDF library(libnetcdf.a) the HDF/MFHDF distribution
+        must be compiled with the option '-DHAVE_NETCDF'. This will
+        rename the HDF version of the C-interface(ncxxx) of the netCDF API
+        to sd_ncxxx to avoid clashing with the original netCDF API from
+        libnetcdf.a. Currently there is no support for renaming the 
+        netCDF Fortran interface stubs. As such the HDF/MFHDF distribution 
+        must be compiled without fortran support. HDF Users can still access
+        HDF/netCDF files through the SDxxx interface but not through the
+        ncxxx interface unless the renamed interface is used(sd_ncxxx).
 
-BUILDING AN APPLICATION USING THE HDF LIBRARY - SOME HELPFUL POINTERS
-=====================================================================
 
-If you are building an application that uses the HDF library 
-the following locations will need to be specified for locating
-header files and linking in the HDF libraries:
- 
-            <top-level HDF directory>\lib
-            <top-level HDF directory>\dlllib
-            <top-level HDF directory>\include
 
-where <top-level HDF directory> may be C:\myHDFstuff\dev or C:\MyHDFstuff\HDF41r4\
+   Report all problems to hdfhelp at ncsa.uiuc.edu
 
-
-Using Microsoft Visual C++ version 6.x:
-
-Under Tools->Options, select the folder, Directories:
-   Under "Show directories for", select "Include files".
-   Add the following directories:
-      C:<path to HDF includes>\include  
-
-Under "Show directories for", select "Library files":
-   Add the following directories:
-      C:<path to HDF libs>\lib        
-
-Under Project->Settings, select folder, Link:
-   Add the following libraries to the beginning of the list of
-   Object/Library Modules:
-         HD414.lib HM414.lib (single-threaded release version)
-         HD414d.lib HM414d.lib (single-threaded debug version)
-
-         HD414m.lib HM414m.lib (multi-threaded release version)
-         HD414md.lib HM414md.lib (multi-threaded debug version)
-
-
-MORE HELPFUL POINTERS
-=====================
-(as described in terms of installing the  nofortran configuration)
-
-Here are some notes that may be of help if you are not familiar
-with using the Visual C++ Development Environment.
-
-Project name and location issues: 
-         The files in Win32.zip  and Win32.nofortran.zip must end up 
-         in the HDF41r4\ directory installed by HDF41r4s.zip
-
-         If you must install all.dsw and all.dsp in 
-         another directory, relative to HDF41r4\ , you will be asked to
-	 locate the above 5 sub-project files, when you open the
-	 project all.dsw.
-	 
-	 If you want to rename all (the entire project),
-	 you will need to modify two files
-	 all.dsw and all.dsp as text
-	 (contrary to the explicit warnings in the files).
-
-	 You can also modify all.dsw and all.dsp
-	 as text, to allow these 2 files to be installed
-	 in another directory.
-
-
-
-  Settings... details:
-  If you create your own project, the necessary settings can be
-  read from the all.dsp file(as text), or from the
-  Project Settings in the Developer Studio project settings 
-dialog.
-
-    Project
-	  Settings
-	      C/C++
-		  Category
-		     PreProcessor
-			 Code Generation
-			    Use run-time Library
-				   These are all set to use 
-                                      Single-Threaded
-				   or Single-Threaded debug
-                                   or Multi-Threaded
-                                   or Multi-Threaded debug
-
-
-
-
-
-    2.5.5 Macintosh OS - Power PC - 
-    -------------------------------
-    **** NOT SUPPORTED WITH HDF 4.1r4 ****
-
-    The distribution was compiled/tested with MetroWerks Codewarrior(CW Pro1).
-    Only the base libraries {jpeg.PPC.lib, z.PPC.lib, hdflib.PPC.lib,
-    xdr.PPC.lib and mfhdf.PPC.lib} were compiled and tested on the
-    PowerPC without Fortran support.
-
-    *NO* Fortran support is included in this distribution.
-
-    Codewarrior Projects can be found with this distribution.
-    They have been run through the Macintosh BinHex utility program. 
-    You need to compile the libraries before you can compile the test 
-    programs 'testhdf', 'xdrtest', 'cdftest', 'hdftest' and  'nctest'.
-
-    2.5.5.1 Special Notes
-    *********************
-    1. The test programs are SIOUX applications.
-    
-    2. When testing 'testhdf' in the 'hdf/test' directory make sure
-       that a directory called 'testdir' exists in 'hdf/test'.
-       This directory is used in the external element test.
-
-    3. You need at least 8MB of memory to run most of the test programs.
- 
-    4. Distribution also contains projects files to build utilities,
-       but utilities were not tested.
-
-    2.5.5.2 Building the Distribution
-    *********************************
-    The distribution  and tests need to be built in the order specified below.
-    Codewarrior Projects with the targets for Power PC and 68K can be 
-    found in the following directories:
- 
-    $(toplevel)/
-                hdf/zlib/zlib.project.hqx
-
-                hdf/jpeg/jpeglib.project.hqx
-
-                hdf/src/hdflib.project.hqx
-
-                hdf/test/testhdf.project.hqx
-
-                hdf/test/testdir(need to create this if it does not exist)
-    
-                mfhdf/xdr/xdrlib.project.hqx
-                mfhdf/xdr/xdrtest.project.hqx
-
-                mfhdf/libsrc/mfhdflib.project.hqx
-                             cdftest.project.hqx
-                             hdftest.project.hqx
-
-                mfhdf/nctest/nctest.project.hqx
-
-    Note that only the PPC version of the libraries and tests are supported.
-
-    2.5.5.3 Testing the Distribution
-    ********************************
-    Run the tests in the following order:
-      
-       1. hdf/test/testhdf
-          Note:
-           When testing 'testhdf' in the 'hdf/test' directory make sure
-           that a directory called 'testdir' exists in the 'hdf/test'.
-           This directory is used in the external element test.
-
-       2. mfhdf/xdr/xdrtest
-           After running this test compare the output to that shown in
-           the file mfhdf/xdr/testout.sav
-
-       3. mfhdf/libsrc/hdftest
-           After running this test compare the output to that shown in
-           the file mfhdf/libsrc/hdfout.sav
-
-       4. mfhdf/libsrc/cdftest
-           After running this test compare the output to that shown in
-           the file mfhdf/libsrc/testout.sav
-
-       5. mfhdf/nctest/nctest
-
-    2.5.5.4 Building utilities  
-    ********************************
-
-    Codewarrior Projects for utilities can be found in the following
-    directories:
- 
-           
-    $(toplevel)/
-                mfhdf/dumper/hdp/hdp.project.hqx
-
-                hdf/util/fp2hdf/fp2hdf.project.hqx
-                         hdf24to8/hdf24to8.project.hqx
-                         hdfcomp/hdfcomp.project.hqx
-                         hdfed/hdfed.project.hqx
-                         hdfls/hdfls.project.hqx
-                         hdfls/hdfls.project.hqx
-                         hdfpack/hdfpack.project.hqx
-                         hdftoPal/hdftopal.project.hqx
-                         hdftoR8/hdftoR8.project.hqx
-                         vshow/vshow.project.hqx
-                         PalToHDF/PalToHDF.project.hqx
-                         R8ToHDF/R8ToHDF.project.hqx 
-                         RISToHDF/RISToHDF.project.hqx
-
-    2.5.6 Exemplar
-    --------------
-    HP Exemplar (Convex) machines running version 10.x of HP-UX are now only
-    able to be configured for HP-UX.  If you are running an Exemplar with an
-    earlier version of the software, you must configure the machine as
-    follows:
-
-        ./configure -v --host=c2-convex-bsd
-
-    Otherwise, the machine will be configured for HP-UX.
-        
-
-    2.5.7 SP2 Single node
-    ----------------------
-    HDF has been compiled and tested to run in a single node of the
-    SP2 system.  You can make the library the same way you would on an
-    AIX system.  To use it in the parallel processing environment, we
-    advise you to execute the HDF code in only one designated process
-    since HDF code does not support concurrent access to the same file.
-
-
-    2.5.8 T3E Single node
-    ---------------------
-    HDF has been compiled and tested to run in a single node of the
-    T3E system.  It is compiled with the '-X m' to produce malleable
-    code which can be executed with multiple processing elements (PEs).
-    The code has not been tested run with multiple PEs.  To use it in
-    the parallel processing environment, we advise you to execute the
-    HDF code in only one designated process since HDF code does not
-    support concurrent access to the same file.
-
-
-    NOTE: HDF is compiled with the f90 compiler starting release 4.1r2.
-    Cray has phased out the cf77 compiler.  The f90 compiler issues
-    numerous warnings during the compiling of the Fortran API test
-    programs.  They can be safely ignored.  One warning is about the
-    unsupported DOUBLE PRECISION being replaced by REAL.  That works fine
-    for the purpose of the test programs since T3E REAL is 8 bytes in
-    size which is the same size as DOUBLE PRECISION in other machines.
-    Another warning is by the loader complaining about many SYMBOLS
-    referenced but not defined.  Those SYMBOLS are actually HDF Fortran
-    function names declared in dffunc.inc file and they are not used in
-    the testing.
-
-
-    2.5.9a SGI IRIX 6.x
-    -------------------
-    IRIX is the traditional SGI 32-bit OS.  Starting in version 6.x,
-    it supports two classes of 32 bit compilers, the old 32 (-o32)
-    and the new 32-bits (-n32).  SGI is phasing out the -o32 compilers.
-    Continued maintenance is available on the -n32 class of compilers only.
-    The HDF library configures to use the -n32 class of C and F77 compilers.
-    If you want to use different compiler options, you need to edit
-    config/mh-irix32 and then run configure.  Consult the section
-    of "General Configuration/Installation" for more information.
-
-
-    2.5.9b SGI IRIX64
-    -----------------
-    IRIX64 supports multiple combinations of ABI (-64, -n32, -o32) and
-    instruction sets (-mips2, -mips3, -mips4).  Previous HDF
-    library releases had hard coded the MIPS settings by guessing what
-    might be the most reasonable combination.  This release no longer
-    sets the MIPS option but leaves it up to the local or user's
-    default.  The configure still generates -64 code by default on
-    an IRIX64 system.  If -n32 code is desired, one may override it
-    by specifying 'irix6_32' during the configure step.
-
-    Configure command	    Code produced
-    -----------------	    -------------
-    ./configure                 -64
-    ./configure irix6_32        -n32
-
-    If you want to use different compiler options, you need to edit
-    config/mh-irix6 (for just configure) or config/mh-irix32 (for
-    configure irix6_32) and then run configure.  Consult the section
-    of "General Configuration/Installation" for more information.
-
-
-    2.5.10 DEC Alpha
-    ----------------
-    The distribution has been compiled/tested with the native Digital 
-    Unix C and FORTRAN compilers.
-
-    During the testing of the library the test 'mfhdf/libsrc/hdftest' 
-    will report "Unaligned access ..." messages which can be ignored.
-
-
-2.6 Pablo Instrumentation
-    =====================
-
-    This version of the distribution has support to create an instrumented 
-    version of the HDF libraries(libdf-inst.a and libmfhdf-inst.a). This 
-    library along with the Pablo performance data capture libraries can be 
-    used to gather data about I/O behavior and procedure execution times.  
-    Version 5.1 or higher of the trace library is required.
-
-    More detailed documentation on how to use the instrumented version of
-    the HDF library with Pablo can be found in the Pablo directory: 
-
-       $(toplevel)/hdf/pablo 
-
-    See the provided '$(toplevel)/hdf/pablo/README.Pablo' and the PostScript 
-    file '$(toplevel)/hdf/pablo/Pablo.ps' or Microsoft Word Document file
-    '$(toplevel)/hdf/pablo/Pablo.doc' or the PDF document file
-    /$(toplevel)/hdf/pablo/Pablo.pdf'.  
-
-    In this version both an instrumented version of the core HDF library 
-    libdf.a and the library libmfhdf.a can be created.  Current interfaces 
-    supported are ANxx, GRxx, DFSDxx, DFANxx, DFPxx, DFR8xx, DF24xx, Hxx, 
-    SDxx, Vxx, and VSxx.
-
-    To enable the creation of an instrumented library the following section
-    in the makefile fragment($(toplevel)/config/mh-<os>) must be uncommented 
-    and set.
-
-    # ------------ Macros for Pablo Instrumentation  --------------------
-    # Uncomment the following lines to create a Pablo Instrumentation
-    # version of the HDF core library called 'libdf-inst.a'
-    # See the documentation in the directory 'hdf/pablo' for further 
-    # information about Pablo and what platforms it is supported on
-    # before enabling. 
-    # You need to set 'PABLO_INCDIR' to the Pablo distribution 
-    # include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-    #PABLO_FLAGS  = -DHAVE_PABLO
-    #PABLO_INCDIR = /usr/local/include/pablo-5.1
-    #PABLO_INCLUDE = -I$(PABLO_INCDIR)
-    After setting these values you must re-run the toplevel 'configure' script.
-    Make sure that you start from a clean re-build(i.e. 'make clean') after
-    re-running the toplevel 'configure' script and then run 'make'.
-    Details on running configure can be found above in the section
-    'General Configuration/Installation - Unix'.
-
-2.7 File Cache(Beta release)
-    =================================
-    This version of the distribution has preliminary support for file caching.
-
-*NOTE*: This version is NOT officially supported on all platforms
-        and has not been extensively tested. As such it is provided as is.
-        It will be supported officially in a later release.
-
-    The file cache allows the file to be mapped to user memory on 
-    a per page basis i.e a memory pool of the file. With regards to the 
-    file system, page sizes can be allocated based on the file system 
-    page-size or if the user wants in some multiple of the file system 
-    page-size. This allows for fewer pages to be managed along with 
-    accommodating the users file usage pattern.
-
-    The current version supports setting the page-size and number of pages
-    in the memory pool through user C-routines(Fortran will be added in a 
-    future release). The default is 8192 bytes for page-size and 1 for number 
-    of pages in the pool.
-
-    Routines:(The names may change in the future...)
-    -------------------------------------------------
-    Hmpset(int pagesize, int maxcache, int flags)
-    --------------------------------------------
-    o  Set the pagesize and maximum number of pages to cache on the next
-       open/create of a file. A pagesize that is a power of 2 is recommended.
-       'pagesize' must be greater than MIN_PAGESIZE(512) bytes and 
-       'maxcache' must be greater than or equal to 1. Valid values
-       for both arguments are required when using this call.
-
-       The values set here only affect the next open/creation of a file and
-       do not change a particular file's paging behavior after it has been
-       opened or created. This may change in a later release.
-
-       Use flags argument of 'MP_PAGEALL' if the whole file is to be cached
-       in memory otherwise pass in zero. In this case the value for 'maxcache'
-       is ignored. You must pass in a valid value for 'pagesize' when
-       using the flag 'MP_PAGEALL'. 
- 
-    Hmpget(int *pagesize, int *maxcache, int flags)
-    ----------------------------------------------
-    o   This gets the last pagesize and maximum number of pages cached for
-        the last open/create of a file. The 'flags' variable is not used.
-    
-    In this version a new file memory pool is created for every file that is
-    created/opened and can not be shared. Future versions will allow sharing 
-    of the file memory pool with other threads/processes.
-
-    To enable the creation of a library using page caching the following 
-    section in the makefile fragment($(toplevel)/config/mh-<os>) must be 
-    uncommented and set.
-
-    # ------------ Macros for Shared Memory File Buffer Pool(fmpool) ------
-    # Uncomment the following lines to enable shared memory file buffer pool
-    # version of the HDF core library libdf.a. Please read the
-    # documentation before enabling this feature.
-    #FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-    After setting these values you must re-run the toplevel 'configure' script.
-    Make sure that you start from a clean re-build(i.e. 'make clean') after
-    re-running the toplevel 'configure' script and then run 'make'.
-    Details on running configure can be found above in the section
-    'General Configuration/Installation - Unix'.
-
-    The file caching version of libdf.a is automatically tested
-    when the regular HDF and netCDF tests are run. The page caching
-    version has been tested only on a few UNIX platforms and is NOT
-    available for the Macintosh ,IBM-PC(Windows NT/95) or VMS.
-
-2.8 Installation Location
-    =====================
-
-    By default, `make install' will install the HDF/mfhdf files in
-    `$(toplevel)/NewHDF/bin', '$(toplevel)/NewHDF/lib', etc.  You may
-    then copy the files to the appropriate directories on your system.
-    If you prefer, you can specify the directory so that `make install'
-    will install the files directly in it.  This is done by giving
-    `configure' the option `--prefix=PATH'.
-
-    eg.  ./configure -v --prefix=/usr/local/hdf
-
-    This will configure the distribution to install the libraries,
-    utilities, include and man files in '/usr/local/hdf/lib',
-    '/usr/local/hdf/bin', '/usr/local/hdf/include' and
-    '/usr/local/hdf/man' respectively.
-
-2.9 Specifying the System Type
-    ==========================
-
-    There may be some features `configure' can not figure out
-    automatically, but needs to determine by the type of host HDF/mfhdf
-    will run on.  Usually `configure' can figure that out, but if it prints
-    a message saying it can not guess the host type, give it the
-    `--host=TYPE' option.  TYPE can either be a short name for the system
-    type, such as `sun4', or a canonical name with three fields:
-
-         CPU-COMPANY-SYSTEM
-
-    e.g. hppa1.1-hp-hpux9.03
-
-    See the file `config.sub' for the possible values of each field.
-
-
-2.10 Configure Options 
-    ==================
-
-    Usage: configure [OPTIONS] [HOST]
-
-    Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5",etc.
-
-    `configure' recognizes the following options to control how it
-    operates. 
-
-    NOTE: not all options are currently supported by this
-          distribution. The following are the only ones supported.
-
-    `--help'
-         Print a summary of the options to `configure', and exit.
-
-     `--prefix=MYDIR`          install into MYDIR [$(toplevel)/NewHDF]
-
-
-3. Man pages
-   =============
-
-    Man pages can be found in:
-
-         $(toplevel)/man
-
-4. Release notes
-   =============
-    The files in sub-directory $(toplevel)/release_notes are detailed 
-    descriptions for the new features and changes in this release.
-    They can be used as supplemental documentation. These files are also 
-    available on the NCSA ftp server (ftp.ncsa.uiuc.edu) in:
- 
-         /HDF/HDF/HDF_Current/release_notes/.
-
-5. Documentation
-   =============
-
-   The HDF documentation can be found on the NCSA ftp server
-   in the directory /HDF/HDF/Documentation/.  The
-   HDF home page is at:
-
-      http://hdf.ncsa.uiuc.edu/
-
-6. FAQ
-   ===
-   An FAQ is available on our ftp server, as well as at:
-      http://hdf.ncsa.uiuc.edu/HDF-FAQ.html 
-   
-
-7. HDF Java Products
-   =================
-   The HDF Java Interface and Java HDF Viewer are built 
-   separately after the library.  See:
-      http://hdf.ncsa.uiuc.edu/java-hdf-html/ 
-
-
-8. HELP
-   ====
-   If you have any questions or comments, or would like to be
-   added to or removed from our hdfnews email list, contact us
-   at:
-
-      hdfhelp at ncsa.uiuc.edu
-
-

Copied: packages/libhdf4/trunk/INSTALL_WINDOWS.txt (from rev 832, packages/libhdf4/branches/upstream/current/INSTALL_WINDOWS.txt)
===================================================================
--- packages/libhdf4/trunk/INSTALL_WINDOWS.txt	                        (rev 0)
+++ packages/libhdf4/trunk/INSTALL_WINDOWS.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1159 @@
+      Installation Instructions for HDF4.2r1 on Windows 2000/XP
+========================================================================
+
+The instructions which follow assume that you will be using the HDF4
+source code archive from HDF website (http://hdf.ncsa.uiuc.edu).
+
+In building HDF4 from source code you may select between two build
+environment options ( with Fortran or without Fortran).  
+
+***************************WARNINGS*************************************
+Please read CAREFULLY about the following preconditions first.
+
+Preconditions
+
+To build the HDF4 and MFHDF libraries ( single-threaded static or
+multi-threaded DLL) and utilities, it is assumed that you have done
+the following:
+      
+   1. Installed MicroSoft Visual Studio or Intel C compiler and WinZip.
+
+      1.1 Installed DEC Visual Fortran compiler(6.0 or higher version)
+          or Intel Fortran compiler if you want to build the full HDF4
+          library with Fortran support.
+
+   2. Set up a directory structure to unpack the source code archive.
+      For example: 
+
+         c:\                             (any drive)
+         MyHDFstuff\                     (any folder name)
+
+   3. Download the HDF4.2r1 source code archive HDF4.2r1.tar.gz from
+      ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/ and use WinZip
+      to extract HDF4 source code into c:\MyHDFstuff.  This creates a 
+      directory called 'HDF4.2r1' under MyHDFstuff which contains 
+      several files and directories.  Rename "HDF4.2r1" to "HDF42r1".  
+
+   4. HDF4 provides options to do in-memory compress within HDF4
+      library.  Currently, three external compression libraries ZLIB,
+      JPEG, and SZIP can be used with HDF4.
+
+      4.1 HDF4 uses Zlib version 1.2.2 for compression.  To use Zlib
+          library, you have to install your own Zlib DLL library or go
+          to ftp://hdf.ncsa.uiuc.edu/lib-external/zlib/bin/windows 
+          to download the Zlib library.
+
+          Zlib compression feature inside HDF4 is required.
+
+          Note: Zlib 1.2.2 DLL library can also be downloaded from
+          http://www.zlib.net/zlib122-dll.zip
+      
+      4.2 HDF4 uses JPEG release 6b for compression.  To use JPEG
+          library, you have to install your own JPEG library or go to
+          ftp://hdf.ncsa.uiuc.edu/lib-external/jpeg/bin to download
+          the JPEG library archive file jpeg-6b.exe.
+
+          JPEG compression feature inside HDF4 is required.
+
+      4.3 HDF4 uses Szip version 2.0 for compression. To use Szip
+          library, you can download Szip source codes and binaries
+          from ftp://hdf.ncsa.uiuc.edu/szip/2.0/bin/windows/
+
+          Please note that Szip is not a totally open-source free
+          software.  For licensing issue of Szip, please check 
+          "Licensing terms" at
+          http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/index.html.
+
+          Szip compression feature inside HDF4 is optional. 
+      
+   5. Define the following environment variables: 
+
+          HDF4_EXT_ZLIB
+          HDF4_EXT_JPEG
+          HDF4_EXT_SZIP
+      
+      In this section, Szip compression software is assumed to be used.
+      Please read section VI as well as this section if you do not
+      want to use Szip compression feature inside HDF4.
+      
+      To define these environment variables:
+      
+      Click "Start", click "Control Panel", and then double-click
+      "System".  On the "Advanced" tab, click "Environment Variables".
+      
+      If you are logged on as administrator to the local computer AND
+      want to let all other users use these three environment variables,
+      click "New" under "System Variables" box; otherwise, click "New"
+      under "User Variables" box.
+      
+      In the New Variable window, set "Variable name" as HDF4_EXT_ZLIB
+      and "Variable value" as zdll.lib, then click OK.
+      
+      Similarly, you can set:
+
+      HDF4_EXT_JPEG environment variable as libjpeg.lib
+      HDF4_EXT_SZIP environment variable as szlibdll.lib
+
+      Notes:
+
+         a. You might have to close and reopen running programs for the
+            new environment variable settings to take effect. 
+
+         b. c:\zlib122\zlib1.dll and c:\szlib\dll\szlibdll.dll should
+            be copied into the location that the application can find,
+            one suggestion is to use the c:\WINNT\system or
+            c:\WINDOWS\system
+      
+   6. Set up paths for external libraries and headers
+ 
+      Invoke Microsoft Visual C++ and go to "Tools" and select
+      "Options", find "Directories";
+      
+      6.1 Find the box "Show directories for", choose "Include files",
+          If you cannot find your Zlib, JPEG, and Szip header path
+          (for example, c:\zlib122\include, c:\jpeg-6b, 
+          c:\szip\include) from the directory list, add the header
+          path (c:\zlib122\include, c:\jpeg-6b, c:\szip\include) to
+          the included directories.
+      
+      6.2 Find the box "Show directories for", choose "Library files",
+          If you cannot find your Zlib, JPEG, and Szip library path
+          (for example, c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll)
+          from the directory list, add the library path
+          (c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll) to the library
+          directories.
+
+************************************************************************
+
+The following sections discuss installation procedures in detail:
+
+   Section I:    Build and Test HDF4 Libraries and Utilities
+   Section II:   Build an Application Using the HDF4 Library
+   Section III:  Build HDF4 in VS 7.0(.NET)
+   Section IV:   Build HDF4 with Intel Compiler
+   Section V:    Some Helpful Pointers
+   Section VI:   Disable Szip Compression Feature inside HDF4
+   Section VII:  Build and Test HDF4 Library on the Command Line
+   Section VIII: Build HDF4 Multithreaded Static Library
+
+************************************************************************
+
+      
+Section I: Build and Test HDF4 Libraries and Utilities
+======================================================================
+
+Step 1: Select Installation Type
+
+You may select one of 2 ways to build the HDF4 libraries and utilities,
+depending on your environment and application needs.
+
+Option A, (select Win32.nofortran.zip)
+This is the "NOFORTRAN" configuration: it builds debug and release
+single-threaded and multi-threaded DLL versions of the HDF libraries,
+tests, and utilities.  There is no Fortran support.
+
+Option B, (select Win32.zip)
+This is "WITH FORTRAN SUPPORT" configuration: it is the same as above
+but with Fortran support. 
+
+
+Step 2: Build HDF4 Libraries and Utilities
+
+Notes:
+
+   a. The instructions are the same for both options A and B.
+
+   b. These instructions are written for MicroSoft Visual Studio 6.0
+      and DEC Visual Fortran users.  For .NET users, please also read
+      section III.  For Intel compiler users, please aslo read
+      section IV. 
+
+   c. For Microsoft Visual C++ 6.0 and DEC Visual Fortran 6.0(or
+      higher versions) users, we support building HDF4 libraries and
+      utilities from the HDF4 source code archive on command line.
+      To build HDF4 on the command line, please read section VII.
+
+   d. To build HDF4 Multithreaded static library, please read
+      section VIII.
+
+Building Instructions:
+
+   1. Unpack Win32.nofortran.zip or Win32.zip in directory HDF42r1\. 
+
+      Note: Please select "Yes to All" when you are asked to confirm
+            file overwrite by WinZip.
+
+   2. Invoke Microsoft Visual C++ 6.0, go to "File" and select the
+      "Open Workspace" option. 
+
+      Then open the c:\MyHDFstuff\HDF42r1\all.dsw workspace. 
+
+   3. Select "Build", then Select "Set Active Configuration".
+
+      On Windows platform select as the active configuration
+
+         "all -- Win32 Debug" to build debug versions of
+                              single-threaded static libraries, tests
+                              and utilities and multi-threaded libraries
+                              and tests.
+         or
+ 
+         "all -- Win32 Release" to build release versions of
+                                single-threaded static libraries, tests
+                                and utilities and multi-threaded
+                                libraries and tests.
+
+      Select "Build" and "Build all.exe" to build the corresponding
+      version of the HDF42r1 library.
+
+      You should see 0 error at the end of building.
+
+      Warning messages can be ignored.
+
+      When the debug build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded -
+
+            hd421d.lib - HDF static library 
+            hm421d.lib - MFHDF static library
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\multithreaded -
+
+            hd421md.lib - HDF multi-threaded DLL export library 
+            hm421md.lib - MFHDF multi-threaded DLL export library 
+
+         c:\MyHDFstuff\HDF42r1\windows\dll\debug
+
+            hd421md.dll - HDF DLL
+            hm421md.dll - MFHDF DLL
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug - 
+
+            utilities, statically linked with the single-threaded
+            libraries.
+
+      When the release build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded - 
+ 
+            hd421.lib - HDF static library 
+            hm421.lib - MFHDF static library
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\multithreaded - 
+ 
+            hd421m.lib - HDF multi-threaded DLL export library 
+            hm421m.lib - MFHDF multi-threaded DLL export library
+ 
+         c:\MyHDFstuff\HDF42r1\windows\dll\release 
+
+            hd421m.dll - HDF DLL
+            hm421m.dll - MFHDF DLL
+ 
+         c:\MyHDFstuff\HDF42r1\Windows\bin\release - 
+ 
+            utilities, statically linked with the single-threaded
+            libraries.
+ 
+Note: The ws2_32.lib needs to be linked with your executable if using
+      the static mfhdf library.  The ws2_32.lib can be found in your
+      Microsoft Visual C++ directory under the lib folder.
+
+		
+Step 3: Test HDF4 Libraries and Utilities
+
+HDF4 libraries and utilities should be tested to make sure that they
+were built correctly.
+
+We provide 2 options for users to test HDF4 libraries and utilities.  
+
+   Option 1: Automatic testings
+
+   HDF4 comes with various test suites, all of which can be tested
+   with hdf4check.bat batch file in c:\MyHDFstuff\HDF42r1\ directory.
+
+   Invoke a command prompt window and run hdf4check.bat.
+
+   Test results are saved in:
+
+      c:\MyHDFstuff\HDF42r1\check_results.txt.
+
+   Use either Notepad or WordPad or whatever other windows word
+   processor to check the results.  You should not find any FAILED
+   marks in check_results.txt.
+
+   Option 2: Step-by-step HDF4 libraries and utilities testings
+
+   You can also test debug and release versions of HDF4 libraries
+   and utilities separately.
+
+   DLLs listed below should be placed into the Windows system directory.
+   A batch file named install_dll.bat is included in
+   c:\MyHDFstuff\HDF42r1 directory.  Run this batch file and the
+   following HDF4 DLLs will be copied to the system directory.
+
+      HDF42r1\windows\dll\release\hd421m.dll
+      HDF42r1\windows\dll\release\hm421m.dll
+      HDF42r1\windows\dll\debug\hd421md.dll
+      HDF42r1\windows\dll\debug\hm421md.dll
+
+   Then run Win32debugtst.bat to test debug version or
+   Win32releasetst.bat to test release version.  
+
+   We strongly suggest you to redirect your testing results into an
+   output file so that you can easily check the testing results.  You
+   may use either Notepad or WordPad or whatever other windows word
+   processor to check the results.  You should not find any FAILED
+   marks in your output files.
+        
+
+Step 4: ncgen -c test (Optional)
+
+ncgen is a netCDF utility that converts a CDL description of a netCDF
+file into an HDF file, or that generates the C or Fortran source
+code required to create a netCDF file.
+
+HDF4 includes "ncgen -c test" to test whether ncgen can generate the
+C source code required to create a netCDF file.
+
+Note:
+     Currently, ncgen can not generate the Fortran source code
+     required to create a netCDF file by HDF4 on Windows.
+  
+     So "ncgen -f test" is not supported by HDF4 on Windows.
+ 
+ncgen project should have been built in step 2 before you can run
+"ncgen -c test" on Windows.
+
+Follow the instructions below to run "ncgen -c test" on Windows.
+
+   1. Open all.dsw Workspace
+
+      Invoke Microsoft Visual C++ 6.0, go to "File" and select the
+      "Open Workspace" option. 
+
+      Then open the c:\MyHDFstuff\HDF42r1\all.dsw workspace. 
+
+   2. Manually generate test0.c
+
+      A batch file named ctest0_gen.bat under c:\MyHDFstuff\HDF42r1\
+      directory is provided to create the C source code test0.c.
+
+      ctest0_gen.bat has 2 options:
+
+         ctest0_gen debug    -- generate test0.c with debug ncgen 
+
+         ctest0_gen release  -- generate test0.c with release ncgen
+
+      Invoke a command prompt windows and run ctest0_gen.bat with
+      appropriate options, you should get test0.c under
+      c:\MyHDFstuff\HDF42r1\mfhdf directory.
+
+   Note: We suggest that users should use the test0.c generated by
+         debug version ncgen (by running ctest0_gen debug) to build
+         the debug version ctest0.exe.
+
+         Similarly, test0.c generated by release version ncgen (by
+         running ctest0_gen release) should be used to build the
+         release version ctest0.exe.
+
+   3. Build ctest0.exe
+
+      Select "Build", then Select "Set Active Configuration".
+
+      On Windows platform select as the active configuration
+
+         "ctest0 -- Win32 Debug" to build debug versions ctest0
+
+         or
+ 
+         "ctest0 -- Win32 Release" to build release versions of ctest0
+
+
+      Select "Build ctest0.exe" to build the corresponding version of
+      ctest0.exe.
+
+      You should see 0 error at the end of building.
+
+      Warning messages can be ignored.
+
+      When the debug build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug
+
+               ctest0.exe - Debug version
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug
+
+               ctest0.exe - Release version
+
+   4. Run ncgen -c Test
+
+      A batch file named ncgen_ctest.bat under c:\MyHDFstuff\HDF42r1\
+      is provided to run "ncgen -c test".
+
+      ncgen_ctest.bat has 2 options:
+
+         ncgen_ctest debug    -- debug version ncgen -c test 
+
+         ncgen_ctest release  -- release version ncgen -c test
+
+      Invoke a command prompt windows and run ncgen_ctest.bat with
+      appropriate options, you should get the following messages:
+
+         =========================
+         ncgen -c test
+         =========================
+         *** ncgen -c test successful ***
+
+
+Step 5:  Install HDF4 Library
+
+We provide a batch file for users to relocate all HDF4 libraries in one
+folder.  The file is called installhdf4lib.bat under
+c:\MyHDFstuff\HDF42r1 directory.  Run the batch file, you may see a
+folder called hdf4lib under c:\MyHDFstuff\HDF42r1.  
+    
+The <release> layout of <hdf4lib> should be:
+    
+   release\include   --  HDF4 header files
+   release\bin       --  HDF4 static utility executables
+   release\lib       --  HDF4 static libraries
+   release\dll       --  HDF4 multi-threaded libraries and DLLs
+       
+You may also find the similar layout for the <debug>.
+
+
+Step 6: Building HDF4 C/Fortran examples (Optional)
+
+Simple examples have been provided for users to test HDF4 C/Fortran
+library and utilities.
+
+Note: 
+      To build HDF4 Fortran examples, Win32.zip must have been
+      chosen in step 1.
+
+To build and test HDF4 C examples:
+
+   1. Invoke Microsoft Visual Studio 6.0, go to "File" and select
+      the "Open Workspace" option. 
+      
+      Then open the workspace
+      c:\MyHDFstuff\HDF42r1\examples\allexamples\allexamples.dsw.
+
+   2. Select "Build", then Select "Set Active Configuration".
+
+      In "Project configurations", select the active configuration
+
+          "allexamples -- Win32 Debug" to build debug versions of the
+                                       C examples.
+
+                          or
+	
+          "allexamples -- Win32 Release" to build release versions the 
+                                         C examples.
+
+      When the debug build or release build is done, there should be the 
+      following subdirectories in c:\MyHDFstuff\HDF42r1\examples\
+
+          chgnamtest
+          createtest
+          dimtest
+          gittest
+          rattrtest
+          readtest 
+          sattrest 
+          sds2grouptest
+          sh_dimtest
+          unltest
+
+   3. Invoke a command prompt window and run the batch file 
+      InstallExamples.bat which resides in the top level directory
+      (c:\MyHDFstuff\HDF42r1\).  This file creates 2 new directories, 
+      examplesREL and examplesDBG in the c:\MyHDFstuff\HDF42r1\examples
+      directory and places all the executables in it.  Both the release
+      and debug versions of the examples should be built before this
+      step is done.  The examples should be tested in these 2 new
+      directories due to some dependencies between the examples.
+      Especially createtest.exe should be executed before gitest.exe
+      and sattrtest.exe, and rattrtest should be executed immediately
+      after sattrtest.exe due to the dependencies among these files.
+
+
+To build and test HDF4 Fortran example:
+
+   1. Invoke Compaq Visual Fortran or Intel Fortran under Microsoft 
+      Visual Studio development environment, go to "File" and select
+      the "Open Workspace" option.
+
+      Then open the workspace
+      c:\MyHDFstuff\HDF42r1\fortran\examples\allf90examples\allf90examples.dsw.
+
+   2. Select "Build", then Select "Set Active Configuration".
+
+      In "Project configurations", select the active configuration
+
+          "allf90examples -- Win32 Debug" to build debug versions of the
+                                          Fortran examples.
+
+                             or
+	
+          "allf90examples -- Win32 Release" to build release versions the 
+                                            Fortran examples.
+
+      When the debug build or release build is done, there should be the 
+      following subdirectories in c:\MyHDFstuff\HDF42r1\fortran\examples\
+
+          createtest
+          gittest
+          rattrtest
+          readtest 
+          sattrest 
+          sds2grouptest
+          sh_dimtest
+          unltest
+
+   3. Invoke a command prompt window and run the batch file 
+      Installf90Examples.bat which resides in the top level directory
+      (c:\MyHDFstuff\HDF42r1\).  This file creates 2 new directories, 
+      f90examplesREL and f90examplesDBG in the
+      c:\MyHDFstuff\HDF42r1\fortran\examples directory and places all
+      the executables in it.  Both the release and debug versions of
+      the examples should be built before this step is done.  The
+      examples should be tested in these 2 new directories due to
+      some dependencies between the examples.  Especially createtest.exe
+      should be executed before gitest.exe and sattrtest.exe, and
+      rattrtest should be executed immediately after sattrtest.exe due
+      to the dependencies among these files.
+
+
+Note: Please read to Sections III and IV on how to build HDF4
+      C/Fortran examples with .NET and with Intel Compilers on .NET.
+
+   
+Section II. Build an Application Using the HDF4 Library or DLLs
+======================================================================
+
+If you are building an application that uses the HDF4 library, the
+following locations will need to be specified for locating header files
+and linking in the HDF4 libraries:
+ 
+   <top-level HDF directory>\lib
+   <top-level HDF directory>\dll
+   <top-level HDF directory>\include
+
+where <top-level HDF directory> may be
+c:\MyHDFstuff\HDF42r1\hdf4lib\release or
+c:\MyHDFstuff\HDF42r1\hdf4lib\debug
+
+if you have installed HDF4 library in Section I, Step 5.
+
+We assume that you will use the Szip compression with HDF4 library.
+
+To specify these locations in the settings for your VC++ project with
+Microsoft Visual C++ 6.0:
+
+Under Tools->Options, select the folder, Directories:
+   Under "Show directories for", select "Include files".
+   Add the following directories:
+      c:<path to HDF includes>\include  
+
+Under "Show directories for", select "Library files":
+   Add the following directories:
+      c:<path to HDF libs>\lib
+      c:<path to HDF libs>\dll
+
+Under Project->Settings, select folder, Link:
+   Add the following libraries to the beginning of the list of
+   Object/Library Modules:
+      hd421.lib hm421.lib (single-threaded release version)
+      hd421d.lib hm421d.lib (single-threaded debug version)
+
+      hd421m.lib hm421m.lib (multi-threaded release version)
+      hd421md.lib hm421md.lib (multi-threaded debug version)
+
+      HDF4_EXT_ZLIB
+      HDF4_EXT_JPEG
+      HDF4_EXT_SZIP
+
+Note: The above three environment variables should have been defined in
+      the preconditions.  Paths for these external libraries and
+      headers should also have been set up in preconditions.
+
+      Follow the instructions in preconditions to define these three
+      environment variables and set up path for these external libraries
+      and headers if you can not find them.
+
+HDF4 DLLs should also be copied to the directory(for example,
+Windows system directory) where the application can find. 
+
+Note: You can also follow the above instructions in this section if
+      want to build an application using the HDF42r1 binary
+      distributions available from
+      ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/bin/windows.
+
+      Make sure to download appropriate binary distribution based on
+      your Windows platforms and compilers.
+
+      If you can not find the binary distribution matching with your
+      Windows platforms and compilers, you will have to build HDF4
+      libraries and utilities from the source codes.
+
+      Also, these binary distributions were pre-compiled with Szip
+      compression feature inside HDF4 library.  If you do not want
+      to use the Szip compression feature, you will have to build HDF4
+      libraries and utilities from the source code following the
+      instructions in Section VI.
+     
+
+Section III. Build HDF4 in VS 7.0(.NET)    
+======================================================================
+
+In this section, we just briefly introduce some extra/different points
+when building HDF4 in VS 7.0(.NET).  For other parts, you should still
+follow the instructions in Section I. 
+
+1. Invoke MicroSoft Visual Studio .NET, go to "File" and select the
+"Open Solution" option.  Choose "Compatible Workspace Files (*.dsw)"
+in the "Files of type:" text box and open the Visual Studio 6.0
+workspace c:\MyHDFstuff\HDF42r1\all.dsw.
+
+2. Select "Yes To All" when you are asked whether to convert and open
+project.  .NET will automatically convert the workspace file to
+solution file.
+
+3. Find "Build" and go to "Configuration Manager"; choose
+"Release" or "Debug", then choose "Build all".
+
+4. If you want to change some project setting, select the project and
+right click the button to choose Properties; find the similar menu
+there as in 6.0.
+
+5. You need to specify the ZLIB, JPEG, and SZIP include header files
+and libraries under Tools->Options->Projects->VC++ Directories and
+choose Include and Libraries under the category of
+"show directories for" to add the corresponding path.
+
+6. To build HDF4 C examples on .NET, HDF4 C examples workspace files
+should be converted to solution files.
+
+Notes:
+
+   a. Currently we only build and test HDF4 with .NET on Windows XP.
+
+   b. To build HDF4 with Fortran support on .NET, Intel Fortran
+      compiler must also be installed in your computer.  Please
+      read Section IV to build HDF4 with Fortran support on .NET.
+
+
+Section IV. Build HDF4 with Intel Compiler    
+======================================================================
+
+Currently, HDF4 is supported with Intel compilers version 7.1 and
+version 8.1 on .NET.
+
+In this section, we just briefly introduce some extra/different points
+when building HDF4 with Inel compiler 7.1 or 8.1 on .NET.  For other
+parts, you should still follow the instructions in Sections I and IIV.
+
+To use Intel compilers, all HDF4 workspace files must be converted
+to solution files as instructed in Section III.
+
+Part 1. Intel 7.1 Compiler
+
+For Intel 7.1 compiler users, Intel compiler should be selected before
+building HDF4 library and utilities.  Follow the instructions below to
+select Intel C/Fortran compilers.
+
+1. Intel 7.1 C Compiler
+   Go to Tools-->Select Compiler
+   Check Intel box and click OK button
+
+2. Intel 7.1 Fortran Compiler
+   Go to Tools-->Select Compiler
+   Check Intel box and click OK button
+   Go to Tools-->Customize-->Add-ins and Macro Files
+   and check Intel Fortran Compiler Build Tool
+
+Part 2. Intel 8.1 Compiler
+
+Preconditions:
+
+a. Set up paths for Intel 8.1 libraries and DLLS
+
+   c:\Program Files\Intel\CPP\Compiler80\Is32\LIB and
+   c:\Program Files\Intel\FORTRAN\Compiler80\Is32\LIB should
+   be added into environment variable "PATH" so applications
+   can find Intel 8.1 libraries and DLLs.
+
+b. Set up external libraries and headers paths for Intel 8.1
+   Fortran compiler (only required if you want to use Intel
+   8.1 Fortran compiler)
+ 
+   Invoke Microsoft Visual Studio .NET and go to Tools-->Options,
+   select "Intel(R) Fortran";
+      
+   1) Go to "Project Directories" and choose "Includes:",
+      If you cannot find your Zlib, JPEG, and Szip header paths
+      (for example, c:\zlib122\include, c:\jpeg-6b, c:\szip\include)
+      from the directory list, add the header path (c:\zlib122\include,
+      c:\jpeg-6b, c:\szip\include) to the included directories.
+      
+   2) Go to "Project Directories" and choose "Libraries:",
+      If you cannot find your Zlib, JPEG, and Szip library paths
+      (for example, c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll)
+      from the directory list, add the library path (c:\zlib122\lib,
+      c:\jpeg-6b, c:\szip\dll) to the library directories.
+
+
+1. Build HDF4 without Fortran support
+
+   To build HDF4 without Fortran support with Intel 8.1 C++ compiler,
+   HDF4 solution files must be converted to use Intel(R) C++ project
+   system.
+
+   To make the conversion, choose all the project files in solution
+   "all" except the "all" dummy project (totally 49 projects)
+   Go to Project-->Convert to use Intel(R) C++ Project System
+
+   After the converion, HDF4 without Fortran support can be built
+   and tested following instrctions in Sections I and III.
+
+   Notes: 
+
+      a. The "all" dummy project could not be converted to use
+         Intel(R) C++ project system, which will not affect
+         building HDF4 with Intel compilers.
+
+      b. When building "test" and "util" projects, you will get a
+         link error:
+
+         LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
+
+         This error message can be ignored.  "test.exe" and 
+         "util.exe" are never created, so it is OK. 
+         
+      c. You need to unpack Win32.nofortran.zip in directory HDF42r1\ again
+         if you rebuild or clean any project as Intel compiler will
+         delete all *.bat and *.out files during the cleaning process.
+   
+      d. HDF4 C examples should also be converted to use Intel(R) C++
+         project system if HDF4 C libraries are built with Intel 8.1
+         compiler.
+
+   
+2. Build HDF4 with Fortran support
+
+   To build HDF4 with Fortran support with Intel 8.1 C++/Fortran  
+   compilers, HDF4 sulution files must be converted to use Intel(R)
+   C++/Fortran project system.
+
+   1) Extract Compaq Visual Fortran Projects Items from the
+      following 8 projects:
+
+         dllfortestf
+         dllhdftestf
+         fortestf
+         hdf
+         hdf_dll
+         hdftestf
+         mfhdf
+         mfhdf_dll
+
+      To make the extraction, right click appropriate projects and
+      select Extract Compaq Visual Fortran Projects Items on the
+      right-click menu.
+
+
+      Notes:
+
+         a. Above projects should not be converted into Intel(R) C++
+            project system.  Otherwise, you could not extract Fortran
+            projects items from converted Intel(R) C++ projects
+            anymore and Fortran source codes in those projects will
+            not be compiled.
+
+         b. As dllfortestf, fortestf, hdf, hdf_dll, mfhdf, and
+            mfhdf_dll projects contains both Fortran and C/C++
+            project files.  The Intel(R) Fortran project converter
+            will split each of the above project into 2 Visual Studio
+            projects - a Visual C++ project and an Intel(R) Fortran
+            project.
+
+            Please choose the Intel(R) Fortran project as the main
+            project before splitting.
+
+            Meanwhile, the following projects will be created by the
+            Intel(R) Fortran project converter after the splitting:
+
+               dllfortestf_lib
+               fortestf_lib
+               hdf_dll_lib
+               hdf_lib
+               mfhdf_dll_lib
+               mfhdf_lib
+
+   2) Convert the rest projects (including the six projects created
+      in the above step and except the "all" dummy project) into
+      Intel(R) C++ project system.
+
+   3) Right clik project "hdf", go to Properties,
+      in the "Configuration:" text box, select "Debug",
+      go to Librarian-->Output Files, rename the output from
+      $(OutDir)/$(ProjectName).lib to
+      $(OutDir)/$(ProjectName)d.lib, then press "OK".
+
+   4) Right clik project "mfhdf", go to Properties,
+      in the "Configuration:" text box, select "Debug",
+      go to Librarian-->Output Files, rename the output from
+      $(OutDir)/$(ProjectName).lib to
+      $(OutDir)/$(ProjectName)d.lib, then press "OK".
+
+   5) Right clik project "hdf_dll", go to Properties,
+      in the "Configuration:" text box, select "Release",
+      go to Linker-->Advanced, rename the "Import Library" from
+      $(OutDir)/hdf_dll.lib to $(OutDir)/hd421m.lib,
+      then press "OK".
+
+   6) Right clik project "mfhdf_dll", go to Properties,
+      in the "Configuration:" text box, select "Release",
+      go to Linker-->Advanced, rename the "Import Library" from
+      $(OutDir)/mfhdf_dll.lib to $(OutDir)/hm421m.lib,
+      then press "OK".
+
+   After the above converion and modifications, HDF4 with Fortran
+   support can be built and tested following instrctions in
+   Sections I and III.
+
+   Notes: 
+
+      a. "dlltesthdf" project can not be built with Intel 8.1 Fortran
+         compiler.  Please ignore this failure.
+
+      b. The "all" dummy project could not be converted to use
+         Intel(R) C++ project system, which will not affect
+         building HDF4 with Intel compilers.
+
+      c. When building "test" and "util" projects, you will get a
+         link error:
+
+         LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
+
+         This error message can be ignored.  "test.exe" and 
+         "util.exe" are never created, so it is OK. 
+ 
+      d. You need to unpack Win32.zip in directory HDF42r1\ again
+         if you rebuild or clean any project as Intel compiler will
+         delete all *.bat and *.out files during the cleaning process.
+
+      e. HDF4 C examples should also be converted t use Intel(R) C++
+         project system if HDF4 C libraries are built with Intel 8.1
+         compiler.
+
+      f. You should extract Compaq Visual Fortran Project Items from 
+         HDF4 Fortran examples if HDF4 Fortran libraries are built with
+         Intel 8.1 compiler.
+
+      g. For all HDF4 Fortran examples projects, right click
+         Properties, in "Configuration:" text box, choose "Debug",
+         Go to Linker-->Input-->Additional Dependencies,
+         replace hm421d.lib and hd421d.lib with hdfd.lib and mfhdfd.lib.
+
+      h. For all HDF4 Fortran examples projects, right click
+         Properties, in "Configuration:" text box, choose "Release",
+         Go to Linker-->Input-->Additional Dependencies,
+         replace hm421.lib and hd421.lib with hdf.lib and mfhdf.lib.
+
+      i. To use HDF4 fortran libraries built with Intel 8.1 compiler,
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded\hdf.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded\mfhdf.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded\hdfd.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded\mfhdfd.lib
+         should also be installed to appropriate directories.
+
+
+Section V: Some Helpful Pointers
+======================================================================
+
+(as described in terms of installing the nofortran configuration)
+
+Here are some notes that may be of help if you are not familiar
+with using the Visual C++ Development Environment.
+
+Project name and location issues: 
+
+   The files in Win32.zip  and Win32.nofortran.zip must end up in the
+   HDF42r1\ directory installed by HDF4.2r1.tar.gz.
+
+   If you must install all.dsw and all.dsp in another directory,
+   relative to HDF42r1\ , you will be asked to locate all sub-project
+   files, when you open the project all.dsw.
+	 
+   If you want to rename all (the entire project), you will need to
+   modify two files all.dsw and all.dsp as text (contrary to the
+   explicit warnings in the files).
+
+   You can also modify all.dsw and all.dsp as text, to allow these 2
+   files to be installed in another directory.
+
+Settings... details:
+   If you create your own project, the necessary settings can be
+   read from the all.dsp file(as text), or from the Project Settings
+   in the Developer Studio project settings dialog.
+
+
+   Project
+      Settings
+         C/C++
+            Category
+               Code Generation
+                  Use run-time Library
+                     These are all set to use Single-Threaded
+                                           or Single-Threaded debug
+                                           or Multi-Threaded DLL
+                                           or Multi-Threaded debug DLL
+
+
+Section VI. Disable Szip Compression Feature inside HDF4
+======================================================================
+
+Warning: When you modify the h4config.h file as described below,
+         DO NOT just change the values of these macros from 1 to 0.
+         Please DO remove(or comment out) appropriate lines.
+
+If you would like to remove Szip compression from the HDF4 library,
+follow the steps below.
+
+   1. Open the H4config.h file from the c:\MyHDFstuff\HDF42r1\hdf\src
+      directory and remove(or comment out) the following two lines: 
+
+         #define H4_HAVE_LIBSZ 1
+         #define H4_HAVE_SZLIB_H 1
+
+      then save the file.
+	
+   2. Delete HDF4_EXT_SZIP environment variable if you have set it in
+      preconditions.
+   
+   3. Run-compile HDF4 library according to section I.
+
+      When you disable Szip, you may get the following message 
+      when building HDF4 libraries:
+
+      The following environment variables were not found
+      $(HDF4_EXT_SZIP)
+
+      This message can be ignored.
+
+      When you run HDF4 testing batch file Win32debugtst.bat or
+      Win32releasetst.bat, you should get the following failed messages
+      for HDF-SD c interfaces tests:
+
+         ============================
+         HDF-SD C interfaces tests
+         ============================
+         *** HDF fails formatted test ***
+         Comparing files hdfout.new and ..\..\MFHDF\LIBSRC\HDFOUT.SAV
+         ***** hdfout.new
+         9 := 0
+         ****** SD Szip test skipped *****
+         num_err == 0
+         ***** ..\..\MFHDF\LIBSRC\HDFOUT.SAV
+         9 := 0
+         num_err == 0
+         *****
+
+      This means that actually the HDF-SD C interfaces tests passed.
+      The expected output file HDFOUT.SAV was generated for HDF4
+      testings with Szip compression feature.  As you disabled the
+      Szip compression feature in HDF4, SD Szip test should be skipped.
+
+
+Section VII. Build and Test HDF4 Library on the Command Line    
+======================================================================
+
+For Microsoft Visual C++ 6.0 and DEC Visual Fortran 6.0(or higher
+versions) users, we support building HDF4 libraries and utilities from
+the HDF4 source code archive on command line.
+      
+For all other Windows development tools, HDF4 should be built in the
+development environment following the instructions in Section I.
+
+Step 1. Set path for Microsoft Visual C++ 6.0 and Visual Fortran 6.0
+        (or higher version):
+   
+   Open "System" in Control Panel.
+   
+   On the "Advanced" tab, click "Environment Variables", click "Path"
+   in the "System variables" box, then click "Edit" and add your Visual
+   C++ 6.0 path (For example, 
+   C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\)
+   and Visual Fortran 6.0 path (For example, 
+   C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\)
+   into "Variable Value" and click "OK".
+  
+Step 2. Unpack Win32.nofortran.zip or Win32.zip
+
+   Unpack Win32.nofortran.zip or Win32.zip with WinZip into HDF42r1\
+   directory. 
+
+   Note: Please select "Yes" or "Yes to All" when you are asked
+         to confirm file overwrite by WinZip.
+
+Step 3. Build and Test
+
+   We provide 2 options for users to build test HDF4 libraries 
+   and utilities.
+      
+   Options A: Build and test in one step 
+      
+      A batch file named hdf4bt.bat in c:\MyHDFstuff\HDF42r1 directory
+      is provided for users to build and test HDF4 library and tools
+      together from the command line.
+
+      Run hdf4bt.bat in a command prompt window.
+
+      Test results are saved in
+
+         c:\MyHDFstuff\HDF42r1\hdf4_results.txt   
+
+
+   Options B: Build and test in two steps 
+
+      We also provide users with the option to build and test HDF4
+      libraries and utilities separately from the command line.
+   
+      Step 1) Build HDF4 Libraries and Utilities
+
+         A batch file named hdf4build.bat in c:\MyHDFstuff\HDF42r1 
+         directory is provided for users to build HDF4 libraries and 
+         utilities from command line.
+
+         Run hdf4build.bat in a command prompt window.
+
+         Compiling outputs are saved in
+
+            c:\MyHDFstuff\HDF42r1\build_results.txt.
+
+         You can check the output file to find out whether there
+         are any compilation errors.
+
+      Step 2) Test HDF4 Libraries and Utilities
+   
+         A batch file named hdf4check.bat in c:\MyHDFstuff\HDF42r1
+         directory is provided for users to test HDF4 libraries and 
+         utilities from command line.
+
+         Run hdf4check.bat in a command prompt window.
+
+         Test results are saved in:
+
+            c:\MyHDFstuff\HDF42r1\check_results.txt.
+
+
+Having built and tested HDF4 libraries and utilities successfully 
+on the command line, you can install HDF4 libraries following the
+instruction in Section I, Step 4.
+
+
+Section VIII: Build HDF4 Multithreaded Static Library
+======================================================================
+
+In this section, we just briefly introduce how to build HDF4
+multithreaded static library.
+
+Step I: The following codes (lines 112~115 in the header file) in
+        hdf4/hdf/src/hdfi.h should be removed or commented out:
+
+#	if defined(_MT) && !defined(_HDFDLL_)
+#		error To use the HDF libraries from a multithreaded project, you must use the HDF DLLs
+#		error Use the Mutlithreaded DLL runtime libraries (prefered), or define the macro "_HDFDLL_"
+#	endif
+
+
+Step II: The "Runtime library" settings for static projects should be
+         modified as multithreaded.  Please following the instructions
+         below to modify the "Runtime library" settings.
+
+
+For Microsoft Visual C++ 6.0 Users:
+
+1. Right click project "hdf", go to Settings->C/C++;
+   In the "Settings For:" text box, select "Win32 Debug";
+   In the "Category:" text box, select "Code Generation";
+   In the "Use run-time library:" text box, select "Debug
+   Multithreaded";
+   In the "Settings For:" text box, select "Win32 Release"; 
+   In the "Use run-time library:" text box, select "Multithreaded";
+   Then press "OK".
+
+2. Repeat step 1  to set the settings for "Use run-time library"
+   for all the left static projects as "Debug Multithreaded" for
+   debug version and "Multithreaded" for release version.
+
+3. (Optional, only for HDF4 with Fortran support)
+
+   Right click project "hdftestf", go to Settings->Link;
+   In the "Settings For:" text box, select "Win32 Debug";
+   In the "Category:" text box, select "Input";
+   In the "Ignore libraries:" text box, add "libcmtd.lib";
+   In the "Settings For:" text box, select "Win32 Rlease";
+   In the "Ignore libraries:" text box, add "libcmt.lib";
+   Then press "OK".
+
+4. (Optional, only for HDF4 with Fortran support)
+
+   Repeat step 3 to add "libcmtd.lib" to the "Ignore libraries:"
+   for project "fortestf" debug version, and add "libcmt.lib"
+   to the "Ignore libraryies:" for project "fortestf" release version.
+
+
+For Microsoft Visual .NET and Intel C++ 8.1 Compiler Users:
+(HDF4 without Fortran support)
+
+1. Right click project "hdf", go to Properties->C/C++->Code Generation;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Multi-threaded Debug (/MTD)";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multi-threaded (/MT)";
+   Then press "OK".
+
+2. Repeat step 1 to set the settings for "Runtime Library"
+   for all the left static projects (except project hdf_ap, mfhdf_ap,
+   test, and util) as "Multi-threaded Debug (/MTD)" for
+   debug version and "Multithreaded (/MT)" for release version.
+
+(Note: For .NET users without Intel Fortran Compiler, HDF4 Fortran
+       support is not available.)
+
+
+For Intel 8.1 Fortran Compiler Users: (HDF4 with Fortran support)
+
+1. Right click project "hdf_lib", go to Properties->C/C++->Code Generation;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Multi-threaded Debug (/MTD)";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multi-threaded (/MT)";
+   Then press "OK".
+
+2. Repeat step 1 to set the settings for "Runtime Library"
+   for all the left static projects (except project hdf_ap, mfhdf_ap,
+   test, and util) as "Multi-threaded Debug (/MTD)" for
+   debug version and "Multithreaded (/MT)" for release version.
+
+3. Right click project "hdf", go to Properties->Fortran->Libraries;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Debug Multithreaded";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multithreaded";
+   Then press "OK".
+
+4. Repeat step 1  to set the settings for "Runtime Library" for fortestf,
+   hdftestf, and mfhdf projects as "Debug Multithreaded" for
+   debug version and "Multithreaded" for release version.
+
+
+
+Please send email to hdfhelp at ncsa.uiuc.edu for further assistance.

Copied: packages/libhdf4/trunk/MANIFEST (from rev 832, packages/libhdf4/branches/upstream/current/MANIFEST)
===================================================================
--- packages/libhdf4/trunk/MANIFEST	                        (rev 0)
+++ packages/libhdf4/trunk/MANIFEST	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1099 @@
+#------------------------------------------------------------------------------
+# This is the list of files that are part of HDF4 source distribution.
+# All files have a `./' prefix and appear in lexicographic order.
+# Lines that end with _DO_NOT_DISTRIBUTE_ will not be included in a
+# release.  Blank lines and comments are ignored.  Comments must start
+# in column one with a '#'.
+#------------------------------------------------------------------------------
+
+./COPYING
+./INSTALL
+./INSTALL_WINDOWS.txt
+./Makefile.am
+./Makefile.in
+./MAKEVMS.COM
+./README
+./Win32.nofortran.zip
+./Win32.zip
+./aclocal.m4
+./configure
+./configure.ac
+./move-if-change
+
+./bin/chkmanifest
+./bin/compile
+./bin/config.guess
+./bin/config.sub
+./bin/depcomp
+./bin/install-sh
+./bin/locate_sw
+./bin/missing
+./bin/mkinstalldirs
+./bin/regenerate.sh
+./bin/runtest
+./bin/snapshot
+
+./config/BlankForm
+./config/freebsd
+./config/hpux11.00
+./config/ia64-linux-gnu
+./config/irix6.x
+./config/linux-gnu
+./config/osf5.x
+./config/powerpc-apple
+./config/powerpc-ibm-aix5.x
+./config/solaris2.x
+./config/sv1-cray
+./config/unicos10.0.X
+./config/unicosmk2.0.6.X
+
+./hdf/COPYING
+./hdf/COPYRIGHT
+./hdf/Makefile.am
+./hdf/Makefile.in
+./hdf/README
+./hdf/README.33r4
+
+./hdf/fmpool/Makefile.in
+./hdf/fmpool/README
+./hdf/fmpool/cdefs.h
+./hdf/fmpool/compat.h
+./hdf/fmpool/config.guess
+./hdf/fmpool/config.sub
+./hdf/fmpool/configure
+./hdf/fmpool/configure.in
+./hdf/fmpool/fmpio.3
+./hdf/fmpool/fmpio.c
+./hdf/fmpool/fmpio.h
+./hdf/fmpool/fmpool.3
+./hdf/fmpool/fmpool.c
+./hdf/fmpool/fmpool.h
+./hdf/fmpool/fmptypes.h
+./hdf/fmpool/move-if-change
+./hdf/fmpool/queue.h
+./hdf/fmpool/test_fmpio.c
+./hdf/fmpool/tfmpio_read.c
+./hdf/fmpool/tfmpio_write.c
+
+./hdf/fmpool/config/fmpaix.h
+./hdf/fmpool/config/fmpalpha.h
+./hdf/fmpool/config/fmpconvex.h
+./hdf/fmpool/config/fmpdec.h
+./hdf/fmpool/config/fmpfbsd.h
+./hdf/fmpool/config/fmpfujivp.h
+./hdf/fmpool/config/fmphpux.h
+./hdf/fmpool/config/fmpia64.h
+./hdf/fmpool/config/fmpirix32.h
+./hdf/fmpool/config/fmpirix4.h
+./hdf/fmpool/config/fmpirix5.h
+./hdf/fmpool/config/fmpirix6.h
+./hdf/fmpool/config/fmplinux.h
+./hdf/fmpool/config/fmpmac.h
+./hdf/fmpool/config/fmpsolaris.h
+./hdf/fmpool/config/fmpsun.h
+./hdf/fmpool/config/fmpt3e.h
+./hdf/fmpool/config/fmpunicos.h
+./hdf/fmpool/config/mh-aix
+./hdf/fmpool/config/mh-alpha
+./hdf/fmpool/config/mh-convex
+./hdf/fmpool/config/mh-decstation
+./hdf/fmpool/config/mh-fbsd
+./hdf/fmpool/config/mh-fujivp
+./hdf/fmpool/config/mh-hpux
+./hdf/fmpool/config/mh-ia64
+./hdf/fmpool/config/mh-irix32
+./hdf/fmpool/config/mh-irix4
+./hdf/fmpool/config/mh-irix5
+./hdf/fmpool/config/mh-irix6
+./hdf/fmpool/config/mh-linux
+./hdf/fmpool/config/mh-mac
+./hdf/fmpool/config/mh-solaris
+./hdf/fmpool/config/mh-sun
+./hdf/fmpool/config/mh-t3e
+./hdf/fmpool/config/mh-unicos
+
+./hdf/src/INSTALL
+./hdf/src/Makefile.am
+./hdf/src/Makefile.in
+./hdf/src/MAKEFS.COM
+./hdf/src/MAKENOF.COM
+./hdf/src/atom.c
+./hdf/src/atom.h
+./hdf/src/bitvect.c
+./hdf/src/bitvect.h
+./hdf/src/cdeflate.c
+./hdf/src/cdeflate.h
+./hdf/src/cnbit.c
+./hdf/src/cnbit.h
+./hdf/src/cnone.c
+./hdf/src/cnone.h
+./hdf/src/crle.c
+./hdf/src/crle.h
+./hdf/src/cskphuff.c
+./hdf/src/cskphuff.h
+./hdf/src/cszip.c
+./hdf/src/cszip.h
+./hdf/src/df24.c
+./hdf/src/df24f.c
+./hdf/src/df24ff.f
+./hdf/src/dfan.c
+./hdf/src/dfanf.c
+./hdf/src/dfanff.f
+./hdf/src/dfan.h
+./hdf/src/dfcomp.c
+./hdf/src/dfconv.c
+./hdf/src/dfconvrt.h
+./hdf/src/dff.c
+./hdf/src/dfff.f
+./hdf/src/dffunc.inc
+./hdf/src/dfgr.c
+./hdf/src/dfgr.h
+./hdf/src/dfgroup.c
+./hdf/src/df.h
+./hdf/src/dfi.h
+./hdf/src/dfimcomp.c
+./hdf/src/dfivms.h
+./hdf/src/dfjpeg.c
+./hdf/src/dfkconv.c
+./hdf/src/dfkcray.c
+./hdf/src/dfkfuji.c
+./hdf/src/dfknat.c
+./hdf/src/dfkswap.c
+./hdf/src/dfkvms.c
+./hdf/src/dfp.c
+./hdf/src/dfpf.c
+./hdf/src/dfpff.f
+./hdf/src/dfr8.c
+./hdf/src/dfr8f.c
+./hdf/src/dfr8ff.f
+./hdf/src/dfrig.h
+./hdf/src/dfrle.c
+./hdf/src/dfsd.c
+./hdf/src/dfsdf.c
+./hdf/src/dfsdff.f
+./hdf/src/dfsd.h
+./hdf/src/dfstubs.c
+./hdf/src/dfstubs.h
+./hdf/src/dfufp2i.c
+./hdf/src/dfufp2if.f
+./hdf/src/dfufp2i.h
+./hdf/src/dfunjpeg.c
+./hdf/src/dfutil.c
+./hdf/src/dfutilf.c
+./hdf/src/dir_mac.c
+./hdf/src/dir_mac.h
+./hdf/src/dynarray.c
+./hdf/src/dynarray.h
+./hdf/src/glist.c
+./hdf/src/glist.h
+./hdf/src/h4config.h.in
+./hdf/src/hbitio.c
+./hdf/src/hbitio.h
+./hdf/src/hblocks.c
+./hdf/src/hbuffer.c
+./hdf/src/hchunks.c
+./hdf/src/hchunks.h
+./hdf/src/hcomp.c
+./hdf/src/hcomp.h
+./hdf/src/hcompi.h
+./hdf/src/hcompri.c
+./hdf/src/hconv.h
+./hdf/src/hdfalloc.c
+./hdf/src/hdf.bld
+./hdf/src/hdf.h
+./hdf/src/hdfi.h
+./hdf/src/hdf.inc
+./hdf/src/hdflib.project.hqx
+./hdf/src/hdfnof.bld
+./hdf/src/hdfnofw3.lbc
+./hdf/src/hdfnofwc.lbc
+./hdf/src/hdfw386.lbc
+./hdf/src/hdfwcc.lbc
+./hdf/src/herr.c
+./hdf/src/herrf.c
+./hdf/src/herr.h
+./hdf/src/hextelt.c
+./hdf/src/hfile.c
+./hdf/src/hfiledd.c
+./hdf/src/hfilef.c
+./hdf/src/hfileff.f
+./hdf/src/hfile.h
+./hdf/src/hkit.c
+./hdf/src/hkit.h
+./hdf/src/hlimits.h
+./hdf/src/hntdefs.h
+./hdf/src/hproto.h
+./hdf/src/hqueue.h
+./hdf/src/htags.h
+./hdf/src/.indent.pro
+./hdf/src/linklist.c
+./hdf/src/linklist.h
+./hdf/src/makepc.386
+./hdf/src/makepc.msc
+./hdf/src/makepc.wcc
+./hdf/src/makewin.msc
+./hdf/src/maldebug.c
+./hdf/src/maldebug.h
+./hdf/src/mcache.c
+./hdf/src/mcache.h
+./hdf/src/mfan.c
+./hdf/src/mfanf.c
+./hdf/src/mfan.h
+./hdf/src/mfgr.c
+./hdf/src/mfgrf.c
+./hdf/src/mfgrff.f
+./hdf/src/mfgr.h
+./hdf/src/mstdio.c
+./hdf/src/mstdio.h
+./hdf/src/patchlevel.h
+./hdf/src/src.inc
+./hdf/src/sys_dir_mac.h
+./hdf/src/tbbt.c
+./hdf/src/tbbt.h
+./hdf/src/trace.h
+./hdf/src/vattr.c
+./hdf/src/vattrf.c
+./hdf/src/vattrff.f
+./hdf/src/vattr.h
+./hdf/src/vconv.c
+./hdf/src/vg.c
+./hdf/src/vgf.c
+./hdf/src/vgff.f
+./hdf/src/vg.h
+./hdf/src/vgint.h
+./hdf/src/vgp.c
+./hdf/src/vhi.c
+./hdf/src/vio.c
+./hdf/src/vparse.c
+./hdf/src/vrw.c
+./hdf/src/vsfld.c
+./hdf/src/win32hdf.mak
+
+./hdf/src/fort_ps/herrpf.c
+./hdf/src/fort_ps/herrpff.f
+./hdf/src/fort_ps/hfilepf.c
+./hdf/src/fort_ps/hfilepff.f
+./hdf/src/fort_ps/hprotop.h
+./hdf/src/fort_ps/mfanpf.c
+./hdf/src/fort_ps/mfanpff.f
+./hdf/src/fort_ps/mfgrpf.c
+./hdf/src/fort_ps/mfgrpff.f
+./hdf/src/fort_ps/vattrpf.c
+./hdf/src/fort_ps/vattrpff.f
+./hdf/src/fort_ps/vgpf.c
+./hdf/src/fort_ps/vgpff.f
+
+./hdf/test/MAKE.COM
+./hdf/test/MAKECOM.OLD
+./hdf/test/Makefile.am
+./hdf/test/Makefile.in
+./hdf/test/MAKENOF.COM
+./hdf/test/README
+./hdf/test/SETUPTEST.COM
+./hdf/test/8bit.dat
+./hdf/test/an.c
+./hdf/test/anfile.c
+./hdf/test/bitio.c
+./hdf/test/bitio.dat
+./hdf/test/blocks.c
+./hdf/test/buffer.c
+./hdf/test/chunks.c
+./hdf/test/comp.c
+./hdf/test/conv.c
+./hdf/test/egchi.res
+./hdf/test/egfhi.f
+./hdf/test/egfhi.res
+./hdf/test/extelt.c
+./hdf/test/file1.c
+./hdf/test/file.c
+./hdf/test/forsupf.c
+./hdf/test/forsupff.f
+./hdf/test/fortest.c
+./hdf/test/fortestF.f
+./hdf/test/fortest.h
+./hdf/test/fortest.inc
+./hdf/test/fortest.sav
+./hdf/test/gentest.c
+./hdf/test/greyjpeg.dat
+./hdf/test/gr_r24.dat
+./hdf/test/jpeg.dat
+./hdf/test/litend.c
+./hdf/test/litend.dat
+./hdf/test/macros.c
+./hdf/test/makepc.386
+./hdf/test/makepc.msc
+./hdf/test/makewin.msc
+./hdf/test/makewin.new
+./hdf/test/man.c
+./hdf/test/manf.f
+./hdf/test/mgr.c
+./hdf/test/mgrf.f
+./hdf/test/mgrf_sunOS.f
+./hdf/test/nbit.c
+./hdf/test/nbit.dat
+./hdf/test/rig.c
+./hdf/test/sdmms.c
+./hdf/test/sdnmms.c
+./hdf/test/sdstr.c
+./hdf/test/slab.c
+./hdf/test/slabwf.f
+./hdf/test/t24f.f
+./hdf/test/tanf.f
+./hdf/test/tanfilef.f
+./hdf/test/tbv.c
+./hdf/test/tdupimgs.c
+./hdf/test/testhdf.386
+./hdf/test/testhdf.c
+./hdf/test/testhdf.def
+./hdf/test/testhdf.lnk
+./hdf/test/testhdf.pc
+./hdf/test/testhdf.project.hqx
+./hdf/test/tmgr.dat
+./hdf/test/tpf.f
+./hdf/test/tproto.h
+./hdf/test/tr8f.f
+./hdf/test/tree.c
+./hdf/test/tsdmmsf.f
+./hdf/test/tsdnmmsf.f
+./hdf/test/tsdnntf.f
+./hdf/test/tsdntf.f
+./hdf/test/tsdstrf.f
+./hdf/test/tstubsf.f
+./hdf/test/tszip.c
+./hdf/test/tutils.h
+./hdf/test/tv1.res
+./hdf/test/tv2.res
+./hdf/test/tvattr.c
+./hdf/test/tvattr.dat
+./hdf/test/tvattrf.f
+./hdf/test/tvset.c
+./hdf/test/tvsetf.f
+./hdf/test/tvsfpack.c
+./hdf/test/vers.c
+./hdf/test/win32tst.mak
+
+./hdf/test/fort_ps/forsupffp.f
+./hdf/test/fort_ps/fortest.arg
+./hdf/test/fort_ps/fortestFp.f
+./hdf/test/fort_ps/fortestp.c
+./hdf/test/fort_ps/manpf.f
+
+./hdf/util/HELINK.OPT
+./hdf/util/Makefile.am
+./hdf/util/Makefile.in
+./hdf/util/MAKEUTIL.COM
+./hdf/util/README
+./hdf/util/README.fp2hdf
+./hdf/util/README.fp2hdf.test
+./hdf/util/README.TST
+./hdf/util/SETUPUTILS.COM
+./hdf/util/decompress.c
+./hdf/util/fp2hdf.c
+./hdf/util/fp2hdf.input1
+./hdf/util/fp2hdf.input1-32
+./hdf/util/fp2hdf.mak
+./hdf/util/fp2hdf.out1
+./hdf/util/fp2hdf.out1-32
+./hdf/util/fp2hdf.out2
+./hdf/util/fp2hdf.out2-32
+./hdf/util/fp2hdf.test
+./hdf/util/fp2hdf.test.result
+./hdf/util/fptest.c
+./hdf/util/fptestf.f
+./hdf/util/getopt1.c
+./hdf/util/getopt.c
+./hdf/util/gif2hdf.c
+./hdf/util/gif2mem.c
+./hdf/util/gif.h
+./hdf/util/gifread.c
+./hdf/util/h4cc.in
+./hdf/util/h4fc.in
+./hdf/util/h4redeploy.in
+./hdf/util/hdf24to8.c
+./hdf/util/hdf24to8.mak
+./hdf/util/hdf2gif.c
+./hdf/util/hdf2jpeg.c
+./hdf/util/hdf2jpeg.mak
+./hdf/util/hdf8to24.c
+./hdf/util/hdf8to24.mak
+./hdf/util/hdfcomp.c
+./hdf/util/hdfcomp.mak
+./hdf/util/hdfcomp.out1
+./hdf/util/hdfed.input1
+./hdf/util/hdfed.mak
+./hdf/util/hdfed.out1
+./hdf/util/hdfgifwr.c
+./hdf/util/hdfls.c
+./hdf/util/hdfls.mak
+./hdf/util/hdfpack.c
+./hdf/util/hdfpack.mak
+./hdf/util/hdfpack.out1
+./hdf/util/hdfrseq.c
+./hdf/util/hdftopal.c
+./hdf/util/hdftopal.mak
+./hdf/util/hdftor8.c
+./hdf/util/hdftor8.mak
+./hdf/util/hdftor8.out1
+./hdf/util/hdfunpac.c
+./hdf/util/hdfunpac.mak
+./hdf/util/he_cntrl.c
+./hdf/util/he_disp.c
+./hdf/util/he_file.c
+./hdf/util/he.h
+./hdf/util/he_main.c
+./hdf/util/he_proto.h
+./hdf/util/jpeg2hdf.c
+./hdf/util/jpeg2hdf.mak
+./hdf/util/jpeg2hdf.out1
+./hdf/util/makepc.386
+./hdf/util/makepc.msc
+./hdf/util/paltohdf.c
+./hdf/util/paltohdf.mak
+./hdf/util/r8tohdf.c
+./hdf/util/r8tohdf.mak
+./hdf/util/ristosds.c
+./hdf/util/ristosds.input1
+./hdf/util/ristosds.mak
+./hdf/util/ristosds.out1
+./hdf/util/testutil.sh.in
+./hdf/util/vcompat.c
+./hdf/util/vcompat.mak
+./hdf/util/vmake.c
+./hdf/util/vmake.mak
+./hdf/util/vshow.c
+./hdf/util/vshow.mak
+./hdf/util/writehdf.c
+
+./hdf/util/MacProjects/PalToHDF.project.hqx
+./hdf/util/MacProjects/R8ToHDF.project.hqx
+./hdf/util/MacProjects/RISToHDF.project.hqx
+./hdf/util/MacProjects/fp2hdf.project.hqx
+./hdf/util/MacProjects/hdf24to8.project.hqx
+./hdf/util/MacProjects/hdfcomp.project.hqx
+./hdf/util/MacProjects/hdfed.project.hqx
+./hdf/util/MacProjects/hdfls.project.hqx
+./hdf/util/MacProjects/hdfpack.project.hqx
+./hdf/util/MacProjects/hdftopal.project.hqx
+./hdf/util/MacProjects/hdftoR8.project.hqx
+./hdf/util/MacProjects/vshow.project.hqx
+
+./hdf/util/fixatr/README
+./hdf/util/fixatr/command.for
+./hdf/util/fixatr/common.for
+./hdf/util/fixatr/fixatr.cld
+./hdf/util/fixatr/fixatr.hlp
+./hdf/util/fixatr/makefix.com
+./hdf/util/fixatr/parse.mar
+./hdf/util/fixatr/rformat.for
+
+./hdf/util/testfiles/README
+./hdf/util/testfiles/SunWheel.gif
+./hdf/util/testfiles/bttrfly.gif
+./hdf/util/testfiles/head.r24.gz
+./hdf/util/testfiles/head.r8.gz
+./hdf/util/testfiles/jet2.hdf
+./hdf/util/testfiles/jpeg_img.jpg
+./hdf/util/testfiles/ntcheck.hdf
+./hdf/util/testfiles/palette.raw
+./hdf/util/testfiles/skull.hdf
+./hdf/util/testfiles/storm110.hdf
+./hdf/util/testfiles/storm110.raw
+./hdf/util/testfiles/storm120.hdf
+./hdf/util/testfiles/storm120.raw
+./hdf/util/testfiles/storm130.hdf
+./hdf/util/testfiles/storm130.raw
+./hdf/util/testfiles/storm140.raw
+./hdf/util/testfiles/test.cdf
+./hdf/util/testfiles/test.hdf
+./hdf/util/testfiles/tvattr.hdf
+
+./hdf/util/testfiles/fp2hdf/h100x100
+./hdf/util/testfiles/fp2hdf/h100x100h
+./hdf/util/testfiles/fp2hdf/h100x100hv
+./hdf/util/testfiles/fp2hdf/h60x75
+./hdf/util/testfiles/fp2hdf/h60x75n
+./hdf/util/testfiles/fp2hdf/h60x75v
+./hdf/util/testfiles/fp2hdf/pal.hdf
+./hdf/util/testfiles/fp2hdf/t100x100
+
+./man/Makefile.am
+./man/Makefile.in
+./man/gr_chunk.3
+./man/hdf.1
+./man/hdfunpac.1
+
+./mfhdf/CHANGES
+./mfhdf/COPYRIGHT
+./mfhdf/CUSTOMIZE
+./mfhdf/FAQ
+./mfhdf/INSTALL
+./mfhdf/Makefile.am
+./mfhdf/Makefile.in
+./mfhdf/MANIFEST
+./mfhdf/ORIGIN
+./mfhdf/README
+./mfhdf/README.HDF
+./mfhdf/README.HDF.33
+./mfhdf/THANKS
+./mfhdf/VERSION
+./mfhdf/build.bat
+./mfhdf/macros.mk
+./mfhdf/make.com
+./mfhdf/mfhdf.mak
+./mfhdf/msoft.mk
+
+./mfhdf/c++/Makefile
+./mfhdf/c++/README
+./mfhdf/c++/example.c
+./mfhdf/c++/example.cc
+./mfhdf/c++/example.cdl
+./mfhdf/c++/expected
+./mfhdf/c++/nc.info
+./mfhdf/c++/nctst.cc
+./mfhdf/c++/nc.txn
+./mfhdf/c++/ncvalues.cc
+./mfhdf/c++/ncvalues.hh
+./mfhdf/c++/netcdf.cc
+./mfhdf/c++/netcdf.hh
+
+./mfhdf/dumper/Makefile.am
+./mfhdf/dumper/Makefile.in
+./mfhdf/dumper/README
+./mfhdf/dumper/TEST
+./mfhdf/dumper/TEST.COM
+./mfhdf/dumper/hdp.c
+./mfhdf/dumper/hdp_dump.c
+./mfhdf/dumper/hdp_gr.c
+./mfhdf/dumper/hdp.h
+./mfhdf/dumper/hdp_list.c
+./mfhdf/dumper/hdp.mak
+./mfhdf/dumper/hdp_rig.c
+./mfhdf/dumper/hdp_sds.c
+./mfhdf/dumper/hdp.txt
+./mfhdf/dumper/hdp_util.c
+./mfhdf/dumper/hdp_vd.c
+./mfhdf/dumper/hdp_vg.c
+./mfhdf/dumper/make.com
+./mfhdf/dumper/show.c
+./mfhdf/dumper/testhdp.sh.in
+
+./mfhdf/dumper/testfiles/Example6.hdf
+./mfhdf/dumper/testfiles/Image_with_Palette.hdf
+./mfhdf/dumper/testfiles/LongDataset.hdf
+./mfhdf/dumper/testfiles/ctxtr2r.hdf
+./mfhdf/dumper/testfiles/dumpgr-10.out
+./mfhdf/dumper/testfiles/dumpgr-11.out
+./mfhdf/dumper/testfiles/dumpgr-12.out
+./mfhdf/dumper/testfiles/dumpgr-13.out
+./mfhdf/dumper/testfiles/dumpgr-14.out
+./mfhdf/dumper/testfiles/dumpgr-15.out
+./mfhdf/dumper/testfiles/dumpgr-16.out
+./mfhdf/dumper/testfiles/dumpgr-17.out
+./mfhdf/dumper/testfiles/dumpgr-18.out
+./mfhdf/dumper/testfiles/dumpgr-19.out
+./mfhdf/dumper/testfiles/dumpgr-1.out
+./mfhdf/dumper/testfiles/dumpgr-2.out
+./mfhdf/dumper/testfiles/dumpgr-3.out
+./mfhdf/dumper/testfiles/dumpgr-4.out
+./mfhdf/dumper/testfiles/dumpgr-5.out
+./mfhdf/dumper/testfiles/dumpgr-6.out
+./mfhdf/dumper/testfiles/dumpgr-7.out
+./mfhdf/dumper/testfiles/dumpgr-8.out
+./mfhdf/dumper/testfiles/dumpgr-9.out
+./mfhdf/dumper/testfiles/dumprig-1.out
+./mfhdf/dumper/testfiles/dumprig-2.out
+./mfhdf/dumper/testfiles/dumprig-3.out
+./mfhdf/dumper/testfiles/dumprig-4.out
+./mfhdf/dumper/testfiles/dumprig-5.out
+./mfhdf/dumper/testfiles/dumprig-6.out
+./mfhdf/dumper/testfiles/dumpsds-1.out
+./mfhdf/dumper/testfiles/dumpsds-2.out
+./mfhdf/dumper/testfiles/dumpsds-3.out
+./mfhdf/dumper/testfiles/dumpsds-4.out
+./mfhdf/dumper/testfiles/dumpsds-5.out
+./mfhdf/dumper/testfiles/dumpsds-6.out
+./mfhdf/dumper/testfiles/dumpsds-7.out
+./mfhdf/dumper/testfiles/dumpsds-8.out
+./mfhdf/dumper/testfiles/dumpsds-9.out
+./mfhdf/dumper/testfiles/dumpsds-10.out
+./mfhdf/dumper/testfiles/dumpsds-11.out
+./mfhdf/dumper/testfiles/dumpvd-10.out
+./mfhdf/dumper/testfiles/dumpvd-1.out
+./mfhdf/dumper/testfiles/dumpvd-2.out
+./mfhdf/dumper/testfiles/dumpvd-3.out
+./mfhdf/dumper/testfiles/dumpvd-4.out
+./mfhdf/dumper/testfiles/dumpvd-5.out
+./mfhdf/dumper/testfiles/dumpvd-6.out
+./mfhdf/dumper/testfiles/dumpvd-7.out
+./mfhdf/dumper/testfiles/dumpvd-8.out
+./mfhdf/dumper/testfiles/dumpvd-9.out
+./mfhdf/dumper/testfiles/dumpvg-10.out
+./mfhdf/dumper/testfiles/dumpvg-11.out
+./mfhdf/dumper/testfiles/dumpvg-12.out
+./mfhdf/dumper/testfiles/dumpvg-1.out
+./mfhdf/dumper/testfiles/dumpvg-2.out
+./mfhdf/dumper/testfiles/dumpvg-3.out
+./mfhdf/dumper/testfiles/dumpvg-4.out
+./mfhdf/dumper/testfiles/dumpvg-5.out
+./mfhdf/dumper/testfiles/dumpvg-6.out
+./mfhdf/dumper/testfiles/dumpvg-7.out
+./mfhdf/dumper/testfiles/dumpvg-8.out
+./mfhdf/dumper/testfiles/dumpvg-9.out
+./mfhdf/dumper/testfiles/grtdfi322.hdf
+./mfhdf/dumper/testfiles/grtdfui162.hdf
+./mfhdf/dumper/testfiles/grtdfui82.hdf
+./mfhdf/dumper/testfiles/grtdfui83.hdf
+./mfhdf/dumper/testfiles/grtdfui84.hdf
+./mfhdf/dumper/testfiles/list-10.out
+./mfhdf/dumper/testfiles/list-1.out
+./mfhdf/dumper/testfiles/list-2.out
+./mfhdf/dumper/testfiles/list-3.out
+./mfhdf/dumper/testfiles/list-4.out
+./mfhdf/dumper/testfiles/list-5.out
+./mfhdf/dumper/testfiles/list-6.out
+./mfhdf/dumper/testfiles/list-7.out
+./mfhdf/dumper/testfiles/list-8.out
+./mfhdf/dumper/testfiles/list-9.out
+./mfhdf/dumper/testfiles/swf32.hdf
+./mfhdf/dumper/testfiles/swi16.hdf
+./mfhdf/dumper/testfiles/swi8.hdf
+./mfhdf/dumper/testfiles/tdf24.hdf
+./mfhdf/dumper/testfiles/test.hdf
+./mfhdf/dumper/testfiles/tvattr.hdf
+./mfhdf/dumper/testfiles/star.hdf
+./mfhdf/dumper/testfiles/swf32_fileattr.hdf
+./mfhdf/dumper/testfiles/tdata.hdf
+./mfhdf/dumper/testfiles/tdfr8f.hdf
+./mfhdf/dumper/testfiles/tvset.hdf
+
+./mfhdf/fortran/Linux.m4
+./mfhdf/fortran/Makefile.am
+./mfhdf/fortran/Makefile.in
+./mfhdf/fortran/README
+./mfhdf/fortran/aix.m4
+./mfhdf/fortran/common.inc
+./mfhdf/fortran/common.m4
+./mfhdf/fortran/convex.m4
+./mfhdf/fortran/craympp.m4
+./mfhdf/fortran/depend
+./mfhdf/fortran/descrip.mms
+./mfhdf/fortran/fortc
+./mfhdf/fortran/fortc1.sed
+./mfhdf/fortran/fortc2.sed
+./mfhdf/fortran/freebsd.m4
+./mfhdf/fortran/ftest.lnk
+./mfhdf/fortran/ftest.src
+./mfhdf/fortran/fujivp.m4
+./mfhdf/fortran/hdftest.f
+./mfhdf/fortran/hdftst.sav
+./mfhdf/fortran/hpux.m4
+./mfhdf/fortran/irix.m4
+./mfhdf/fortran/jackets.src
+./mfhdf/fortran/mfsdf.c
+./mfhdf/fortran/mfsdff.f
+./mfhdf/fortran/msoft.m4
+./mfhdf/fortran/msoft.mk
+./mfhdf/fortran/osf.m4
+./mfhdf/fortran/solaris.m4
+./mfhdf/fortran/sunos.m4
+./mfhdf/fortran/test_nc.cdl
+./mfhdf/fortran/test_nc.nc
+./mfhdf/fortran/ultrix.m4
+./mfhdf/fortran/unicos.m4
+./mfhdf/fortran/vax-ultrix.m4
+./mfhdf/fortran/vms.m4
+
+./mfhdf/fortran/config/ftest-aix.f
+./mfhdf/fortran/config/ftest-alpha.f
+./mfhdf/fortran/config/ftest-apple.f
+./mfhdf/fortran/config/ftest-convex.f
+./mfhdf/fortran/config/ftest-dec.f
+./mfhdf/fortran/config/ftest-fbsd.f
+./mfhdf/fortran/config/ftest-fujivp.f
+./mfhdf/fortran/config/ftest-hpux.f
+./mfhdf/fortran/config/ftest-ia64.f
+./mfhdf/fortran/config/ftest-irix32.f
+./mfhdf/fortran/config/ftest-irix4.f
+./mfhdf/fortran/config/ftest-irix5.f
+./mfhdf/fortran/config/ftest-irix6.f
+./mfhdf/fortran/config/ftest-linux.f
+./mfhdf/fortran/config/ftest-mac.f
+./mfhdf/fortran/config/ftest-solaris64.f
+./mfhdf/fortran/config/ftest-solaris.f
+./mfhdf/fortran/config/ftest-solarisx86.f
+./mfhdf/fortran/config/ftest-sun.f
+./mfhdf/fortran/config/ftest-t3e.f
+./mfhdf/fortran/config/ftest-unicos.f
+./mfhdf/fortran/config/jackets-aix.c
+./mfhdf/fortran/config/jackets-alpha.c
+./mfhdf/fortran/config/jackets-apple.c
+./mfhdf/fortran/config/jackets-convex.c
+./mfhdf/fortran/config/jackets-dec.c
+./mfhdf/fortran/config/jackets-fbsd.c
+./mfhdf/fortran/config/jackets-fujivp.c
+./mfhdf/fortran/config/jackets-hpux.c
+./mfhdf/fortran/config/jackets-ia64.c
+./mfhdf/fortran/config/jackets-irix32.c
+./mfhdf/fortran/config/jackets-irix4.c
+./mfhdf/fortran/config/jackets-irix5.c
+./mfhdf/fortran/config/jackets-irix6.c
+./mfhdf/fortran/config/jackets-linux.c
+./mfhdf/fortran/config/jackets-mac.c
+./mfhdf/fortran/config/jackets-solaris64.c
+./mfhdf/fortran/config/jackets-solaris.c
+./mfhdf/fortran/config/jackets-solarisx86.c
+./mfhdf/fortran/config/jackets-sun.c
+./mfhdf/fortran/config/jackets-t3e.c
+./mfhdf/fortran/config/jackets-unicos.c
+./mfhdf/fortran/config/netcdf-aix.inc
+./mfhdf/fortran/config/netcdf-alpha.inc
+./mfhdf/fortran/config/netcdf-apple.inc
+./mfhdf/fortran/config/netcdf-convex.inc
+./mfhdf/fortran/config/netcdf-dec.inc
+./mfhdf/fortran/config/netcdf-fbsd.inc
+./mfhdf/fortran/config/netcdf-fujivp.inc
+./mfhdf/fortran/config/netcdf-hpux.inc
+./mfhdf/fortran/config/netcdf-ia64.inc
+./mfhdf/fortran/config/netcdf-irix32.inc
+./mfhdf/fortran/config/netcdf-irix4.inc
+./mfhdf/fortran/config/netcdf-irix5.inc
+./mfhdf/fortran/config/netcdf-irix6.inc
+./mfhdf/fortran/config/netcdf-linux.inc
+./mfhdf/fortran/config/netcdf-mac.inc
+./mfhdf/fortran/config/netcdf-solaris64.inc
+./mfhdf/fortran/config/netcdf-solaris.inc
+./mfhdf/fortran/config/netcdf-solarisx86.inc
+./mfhdf/fortran/config/netcdf-sun.inc
+./mfhdf/fortran/config/netcdf-t3e.inc
+./mfhdf/fortran/config/netcdf-unicos.inc
+
+./mfhdf/fortran/fort_ps/hdftestp.f
+./mfhdf/fortran/fort_ps/mfhdfp.h
+./mfhdf/fortran/fort_ps/mfsdpf.c
+./mfhdf/fortran/fort_ps/mfsdpff.f
+
+./mfhdf/fortran/msoft/NOTES
+./mfhdf/fortran/msoft/fslen.asm
+./mfhdf/fortran/msoft/ftest.for
+./mfhdf/fortran/msoft/jackets.c
+./mfhdf/fortran/msoft/msoft.int
+./mfhdf/fortran/msoft/netcdf.inc
+
+./mfhdf/fortran/vms/ftest.for
+./mfhdf/fortran/vms/ftest.m4
+./mfhdf/fortran/vms/hdftest.for
+./mfhdf/fortran/vms/jackets.c
+./mfhdf/fortran/vms/make.com
+./mfhdf/fortran/vms/mfsdf.c
+./mfhdf/fortran/vms/mfsdff.for
+./mfhdf/fortran/vms/netcdf.inc
+
+./mfhdf/hdfimport/Makefile.am
+./mfhdf/hdfimport/Makefile.in
+./mfhdf/hdfimport/hdfimport.c
+./mfhdf/hdfimport/hdfimport.input1
+./mfhdf/hdfimport/hdfimport.out1
+./mfhdf/hdfimport/hdfimport.out2
+./mfhdf/hdfimport/hdfimporttest.c
+./mfhdf/hdfimport/testutil.sh.in
+
+./mfhdf/hdiff/Makefile.am
+./mfhdf/hdiff/Makefile.in
+./mfhdf/hdiff/hdiff.c
+./mfhdf/hdiff/hdiff.h
+./mfhdf/hdiff/hdiff_array.c
+./mfhdf/hdiff/hdiff_gattr.c
+./mfhdf/hdiff/hdiff_gr.c
+./mfhdf/hdiff/hdiff_list.c
+./mfhdf/hdiff/hdiff_list.h
+./mfhdf/hdiff/hdiff_main.c
+./mfhdf/hdiff/hdiff_mattbl.c
+./mfhdf/hdiff/hdiff_mattbl.h
+./mfhdf/hdiff/hdiff_misc.c
+./mfhdf/hdiff/hdiff_sds.c
+./mfhdf/hdiff/hdiff_table.c
+./mfhdf/hdiff/hdiff_table.h
+./mfhdf/hdiff/hdiff_vs.c
+./mfhdf/hdiff/hdifftst.c
+./mfhdf/hdiff/testhdiff.sh
+
+./mfhdf/hdiff/testfiles/hdiff_01.txt
+./mfhdf/hdiff/testfiles/hdiff_02.txt
+./mfhdf/hdiff/testfiles/hdiff_03.txt
+./mfhdf/hdiff/testfiles/hdiff_04.txt
+./mfhdf/hdiff/testfiles/hdiff_05.txt
+./mfhdf/hdiff/testfiles/hdiff_06.txt
+./mfhdf/hdiff/testfiles/hdiff_07.txt
+./mfhdf/hdiff/testfiles/hdiff_08.txt
+./mfhdf/hdiff/testfiles/hdiff_09.txt
+./mfhdf/hdiff/testfiles/hdiff_10.txt
+./mfhdf/hdiff/testfiles/hdiff_11.txt
+./mfhdf/hdiff/testfiles/hdifftst1.hdf
+./mfhdf/hdiff/testfiles/hdifftst2.hdf
+
+
+./mfhdf/hrepack/Makefile.am
+./mfhdf/hrepack/Makefile.in
+./mfhdf/hrepack/hrepack.c
+./mfhdf/hrepack/hrepack.h
+./mfhdf/hrepack/hrepack_all.sh
+./mfhdf/hrepack/hrepack_an.c
+./mfhdf/hrepack/hrepack_an.h
+./mfhdf/hrepack/hrepack_check.c
+./mfhdf/hrepack/hrepack_cmp.c
+./mfhdf/hrepack/hrepack_gr.c
+./mfhdf/hrepack/hrepack_gr.h
+./mfhdf/hrepack/hrepack_list.c
+./mfhdf/hrepack/hrepack_lsttable.c
+./mfhdf/hrepack/hrepack_lsttable.h
+./mfhdf/hrepack/hrepack_main.c
+./mfhdf/hrepack/hrepack_opttable.c
+./mfhdf/hrepack/hrepack_opttable.h
+./mfhdf/hrepack/hrepack_pal.c
+./mfhdf/hrepack/hrepack_pal.h
+./mfhdf/hrepack/hrepack_parse.c
+./mfhdf/hrepack/hrepack_parse.h
+./mfhdf/hrepack/hrepack_sds.c
+./mfhdf/hrepack/hrepack_sds.h
+./mfhdf/hrepack/hrepack_sdutil.c
+./mfhdf/hrepack/hrepack_sdutil.h
+./mfhdf/hrepack/hrepack_utils.c
+./mfhdf/hrepack/hrepack_utils.h
+./mfhdf/hrepack/hrepack_vg.c
+./mfhdf/hrepack/hrepack_vg.h
+./mfhdf/hrepack/hrepack_vs.c
+./mfhdf/hrepack/hrepack_vs.h
+./mfhdf/hrepack/image24pixel.txt
+./mfhdf/hrepack/image24plane.txt
+./mfhdf/hrepack/image8.txt
+./mfhdf/hrepack/info.txt
+./mfhdf/hrepack/pal_rgb.h
+./mfhdf/hrepack/test_hrepack_add.c
+./mfhdf/hrepack/test_hrepack_add.h
+./mfhdf/hrepack/test_hrepack_main.c
+./mfhdf/hrepack/test_hrepack.sh
+./mfhdf/hrepack/test_hrepack_verify.c
+./mfhdf/hrepack/test_hrepack_verify.h
+
+./mfhdf/libsrc/Makefile.am
+./mfhdf/libsrc/Makefile.in
+./mfhdf/libsrc/README
+./mfhdf/libsrc/alloc.h
+./mfhdf/libsrc/array.c
+./mfhdf/libsrc/attr.c
+./mfhdf/libsrc/cdf.c
+./mfhdf/libsrc/cdftest.c
+./mfhdf/libsrc/cdftest.mak
+./mfhdf/libsrc/cdftest.project.hqx
+./mfhdf/libsrc/depend
+./mfhdf/libsrc/descrip.mms
+./mfhdf/libsrc/dim.c
+./mfhdf/libsrc/error.c
+./mfhdf/libsrc/error.h
+./mfhdf/libsrc/file.c
+./mfhdf/libsrc/globdef.c
+./mfhdf/libsrc/hdf2netcdf.h
+./mfhdf/libsrc/hdfout.sav
+./mfhdf/libsrc/hdfsds.c
+./mfhdf/libsrc/hdftest.c
+./mfhdf/libsrc/hdftest.h
+./mfhdf/libsrc/hdftest.mak
+./mfhdf/libsrc/hdftest.project.hqx
+./mfhdf/libsrc/htons.mar
+./mfhdf/libsrc/iarray.c
+./mfhdf/libsrc/local_nc.h
+./mfhdf/libsrc/make.com
+./mfhdf/libsrc/mfhdf.h
+./mfhdf/libsrc/mfhdflib.project.hqx
+./mfhdf/libsrc/mfsd.c
+./mfhdf/libsrc/msoft.mk
+./mfhdf/libsrc/netcdf.h.in
+./mfhdf/libsrc/nssdc.c
+./mfhdf/libsrc/ntohs.mar
+./mfhdf/libsrc/putget.c
+./mfhdf/libsrc/putgetg.c
+./mfhdf/libsrc/sharray.c
+./mfhdf/libsrc/string.c
+./mfhdf/libsrc/temptySDSs.c
+./mfhdf/libsrc/tidtypes.c
+./mfhdf/libsrc/test1.nc
+./mfhdf/libsrc/test_cdf.sav
+./mfhdf/libsrc/testout.sav
+./mfhdf/libsrc/trank0.c
+./mfhdf/libsrc/tszip.c
+./mfhdf/libsrc/tsd.c
+./mfhdf/libsrc/var.c
+./mfhdf/libsrc/win32cdf.h
+./mfhdf/libsrc/win32cdf.mak
+./mfhdf/libsrc/xdrposix.c
+./mfhdf/libsrc/xdrstdio.c
+
+./mfhdf/libsrc/config/netcdf-aix.h
+./mfhdf/libsrc/config/netcdf-alpha.h
+./mfhdf/libsrc/config/netcdf-apple.h
+./mfhdf/libsrc/config/netcdf-convex.h
+./mfhdf/libsrc/config/netcdf-dec.h
+./mfhdf/libsrc/config/netcdf-fbsd.h
+./mfhdf/libsrc/config/netcdf-fujivp.h
+./mfhdf/libsrc/config/netcdf-hpux.h
+./mfhdf/libsrc/config/netcdf-ia64.h
+./mfhdf/libsrc/config/netcdf-irix32.h
+./mfhdf/libsrc/config/netcdf-irix4.h
+./mfhdf/libsrc/config/netcdf-irix5.h
+./mfhdf/libsrc/config/netcdf-irix6.h
+./mfhdf/libsrc/config/netcdf-linux.h
+./mfhdf/libsrc/config/netcdf-mac.h
+./mfhdf/libsrc/config/netcdf-solaris64.h
+./mfhdf/libsrc/config/netcdf-solaris.h
+./mfhdf/libsrc/config/netcdf-solarisx86.h
+./mfhdf/libsrc/config/netcdf-sun.h
+./mfhdf/libsrc/config/netcdf-t3e.h
+./mfhdf/libsrc/config/netcdf-unicos.h
+./mfhdf/libsrc/config/netcdf-vms.h
+
+./mfhdf/ncdump/Makefile.am
+./mfhdf/ncdump/Makefile.in
+./mfhdf/ncdump/SETUPNCDUMP.COM
+./mfhdf/ncdump/ctest0.mak
+./mfhdf/ncdump/depend
+./mfhdf/ncdump/dumplib.c
+./mfhdf/ncdump/dumplib.h
+./mfhdf/ncdump/make.com
+./mfhdf/ncdump/msoft.mk
+./mfhdf/ncdump/msofttab.c
+./mfhdf/ncdump/ncdump.1
+./mfhdf/ncdump/ncdump.c
+./mfhdf/ncdump/ncdump.h
+./mfhdf/ncdump/ncdump.lnk
+./mfhdf/ncdump/ncdump.mak
+./mfhdf/ncdump/test0.cdl
+./mfhdf/ncdump/vardata.c
+./mfhdf/ncdump/vardata.h
+
+./mfhdf/ncgen/Makefile.am
+./mfhdf/ncgen/Makefile.in
+./mfhdf/ncgen/README
+./mfhdf/ncgen/close.c
+./mfhdf/ncgen/ctest0.mak
+./mfhdf/ncgen/depend
+./mfhdf/ncgen/descrip.mms
+./mfhdf/ncgen/escapes.c
+./mfhdf/ncgen/generate.c
+./mfhdf/ncgen/generic.h
+./mfhdf/ncgen/genlib.c
+./mfhdf/ncgen/genlib.h
+./mfhdf/ncgen/getfill.c
+./mfhdf/ncgen/init.c
+./mfhdf/ncgen/lexyacc.com
+./mfhdf/ncgen/load.c
+./mfhdf/ncgen/main.c
+./mfhdf/ncgen/make.com
+./mfhdf/ncgen/msoft.mk
+./mfhdf/ncgen/msofttab.c
+./mfhdf/ncgen/msofttab.h
+./mfhdf/ncgen/msoftyy.c
+./mfhdf/ncgen/ncgen.1
+./mfhdf/ncgen/ncgen.h
+./mfhdf/ncgen/ncgen.l
+./mfhdf/ncgen/ncgen.lnk
+./mfhdf/ncgen/ncgen.mak
+./mfhdf/ncgen/ncgen.opt
+./mfhdf/ncgen/ncgen.y
+./mfhdf/ncgen/test0.cdl
+./mfhdf/ncgen/test0.lnk
+./mfhdf/ncgen/test.com
+./mfhdf/ncgen/vmstab.c
+./mfhdf/ncgen/vmstab.h
+./mfhdf/ncgen/vms_yy.c
+
+./mfhdf/nctest/Makefile.am
+./mfhdf/nctest/Makefile.in
+./mfhdf/nctest/README
+./mfhdf/nctest/add.c
+./mfhdf/nctest/add.h
+./mfhdf/nctest/atttests.c
+./mfhdf/nctest/cdftests.c
+./mfhdf/nctest/depend
+./mfhdf/nctest/dimtests.c
+./mfhdf/nctest/driver.c
+./mfhdf/nctest/emalloc.c
+./mfhdf/nctest/emalloc.h
+./mfhdf/nctest/error.c
+./mfhdf/nctest/error.h
+./mfhdf/nctest/make.com
+./mfhdf/nctest/misctest.c
+./mfhdf/nctest/msoft.mk
+./mfhdf/nctest/nctest.def
+./mfhdf/nctest/nctest.lnk
+./mfhdf/nctest/nctest.mak
+./mfhdf/nctest/nctest.project.hqx
+./mfhdf/nctest/rec.c
+./mfhdf/nctest/slabs.c
+./mfhdf/nctest/test_unlim.cdl
+./mfhdf/nctest/test_unlim.nc
+./mfhdf/nctest/testcdf.h
+./mfhdf/nctest/tests.h
+./mfhdf/nctest/val.c
+./mfhdf/nctest/val.h
+./mfhdf/nctest/vardef.c
+./mfhdf/nctest/varget_unlim.c
+./mfhdf/nctest/varget.c
+./mfhdf/nctest/vargetg.c
+./mfhdf/nctest/varput.c
+./mfhdf/nctest/varputg.c
+./mfhdf/nctest/vartests.c
+./mfhdf/nctest/vputget.c
+./mfhdf/nctest/vputgetg.c
+
+./mfhdf/port/COPYRIGHT
+./mfhdf/port/CUSTOMIZE
+./mfhdf/port/HISTORY
+./mfhdf/port/Makefile.am
+./mfhdf/port/Makefile.in
+./mfhdf/port/VERSION
+./mfhdf/port/aclocal.m4
+./mfhdf/port/configure
+./mfhdf/port/configure.in
+./mfhdf/port/depend
+./mfhdf/port/master.mk.in
+./mfhdf/port/mast_mk.in
+./mfhdf/port/uddummy.c
+./mfhdf/port/udposix.h.in
+./mfhdf/port/udposixh.in
+./mfhdf/port/which
+
+./mfhdf/util/getopt.c
+./mfhdf/util/make.com
+./mfhdf/util/msoft.mk
+./mfhdf/util/win32utl.mak
+
+./mfhdf/xdr/Makefile.am
+./mfhdf/xdr/Makefile.in
+./mfhdf/xdr/NOTICE.h
+./mfhdf/xdr/README
+./mfhdf/xdr/byteordr.c
+./mfhdf/xdr/depend
+./mfhdf/xdr/descrip.mms
+./mfhdf/xdr/htonl.mar
+./mfhdf/xdr/make.com
+./mfhdf/xdr/msoft.mk
+./mfhdf/xdr/ntohl.mar
+./mfhdf/xdr/testout.sav
+./mfhdf/xdr/test_xdr.sav
+./mfhdf/xdr/types.h
+./mfhdf/xdr/win32xdr.mak
+./mfhdf/xdr/xdrarray.c
+./mfhdf/xdr/xdr.c
+./mfhdf/xdr/xdrfloat.c
+./mfhdf/xdr/xdr.h
+./mfhdf/xdr/xdrlib.project.hqx
+./mfhdf/xdr/xdrstdio.c
+./mfhdf/xdr/xdrtest.c
+./mfhdf/xdr/xdrtest.mak
+./mfhdf/xdr/xdrtest.opt
+./mfhdf/xdr/xdrtest.project.hqx
+
+./release_notes/HISTORY.txt
+./release_notes/RELEASE.txt
+./release_notes/bugs_fixed.txt
+./release_notes/misc_docs.txt

Copied: packages/libhdf4/trunk/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,5 @@
+#############################################################################
+##                      Subdirectories to build in                         ##
+#############################################################################
+
+SUBDIRS=hdf mfhdf man

Modified: packages/libhdf4/trunk/Makefile.in
===================================================================
--- packages/libhdf4/trunk/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,536 +1,535 @@
-# $Id: Makefile.in,v 1.40 1999/06/20 01:40:35 acheng Exp $
-#
-# Makefile to build HDF & netcdf libraries and utilities...etc
-#
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = .
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+SUBDIRS = hdf mfhdf man
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \
+	INSTALL Makefile.am aclocal.m4 bin/compile bin/config.guess \
+	bin/config.sub bin/depcomp bin/install-sh bin/missing \
+	bin/mkinstalldirs configure configure.ac
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+.SUFFIXES:
 
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac 
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+uninstall-info-am:
 
-AS = as
-CC = gcc
-CFLAGS = -ansi -O
-FC = f77
-FFLAGS= -O
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+ETAGS = etags
+ETAGSFLAGS =
 
-# Directory in which to install header files.
-includedir = $(prefix)/include
+CTAGS = ctags
+CTAGSFLAGS =
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+tags: TAGS
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	else \
+	  include_option=--include; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# ############# End of system configuration section. ###############
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-PACKAGE	 = HDF
-VERSION  = 4.0
-MANIFEST = $(DISTFILES)
-DISTFILES = INSTALL README \
-	Makefile.in configure configure.in config.guess config.sub \
-	install-sh mkinstalldirs move-if-change \
-	config/mh-aix config/mh-alpha config/mh-convex \
-	config/mh-decstation config/mh-fbsd config/mh-hpux config/mh-irix32 \
-	config/mh-irix4 config/mh-irix5 config/mh-irix6 config/mh-linux \
-	config/mh-solaris config/mh-solarisx86 config/mh-sun config/mh-unicos
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-HDFDIR    = hdf
-NETCDFDIR = mfhdf
-MANDIR = man
-SUBDIRS= $(HDFDIR) $(NETCDFDIR) $(MANDIR)
-OTHERDIRS= config
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# Location where the HDF include files are located
-HDFINC= `pwd`/hdf/src
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
 
-# Location where the HDF library is located
-HDFLIB= `pwd`/hdf/src
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
 
-# ==> where is your PABLO include files
-PABLO_HINC= `pwd`/hdf/pablo
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 
-# ==> where is your FMPOOL include files
-FMPOOL_INC= `pwd`/hdf/fmpool
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkinstalldirs) $(distdir)/bin $(distdir)/hdf/util $(distdir)/mfhdf/dumper $(distdir)/mfhdf/hdfimport
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
 
-#
-# Flags to recursively send to make to overide ones inserted by Configure
-#
+dist dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        ACDEFS="$(ACDEFS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        PABLO_FLAGS="$(PABLO_FLAGS)" \
-        PABLO_INCLUDE="$(PABLO_INCLUDE)" \
-        MACHINE="$(MACHINE)" \
-        HDFINC="$(HDFINC)" \
-        HDFLIB="$(HDFLIB)" 
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	$(am__remove_distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-NETCDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        ACDEFS="$(ACDEFS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        MACHINE="$(MACHINE)" \
-        HDFINC="$(HDFINC)" \
-        HDFLIB="$(HDFLIB)" 
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-#
-#General rules
-#
+clean-generic:
 
-all:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-HDF:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="all" \
-          SUBDIRS="$(HDFDIR)" subd
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
 
-NETCDF:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="all" \
-          SUBDIRS="$(NETCDFDIR)" subdn
+clean-am: clean-generic mostlyclean-am
 
-test:
-	@LD_LIBRARY_PATH=`pwd`/hdf/src:`pwd`/mfhdf/libsrc:$$LD_LIBRARY_PATH \
-	$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="test-hdf" \
-          SUBDIRS="$(HDFDIR)" subd
-	@LD_LIBRARY_PATH=`pwd`/hdf/src:`pwd`/mfhdf/libsrc:$$LD_LIBRARY_PATH \
-	$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
-	@LD_LIBRARY_PATH=`pwd`/hdf/src:`pwd`/mfhdf/libsrc:$$LD_LIBRARY_PATH \
-	$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=allnofortran \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) FC=NONE TARG=all \
-          SUBDIRS="$(NETCDFDIR)" subdn
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdfnofortran \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) FC=NONE TARG=test \
-          SUBDIRS="$(NETCDFDIR)" subdn
+dvi: dvi-recursive
 
-test-hdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
+dvi-am:
 
-test-hdf-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
+info: info-recursive
 
-test-hdf-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
+info-am:
 
-test-mfhdf:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=test \
-          SUBDIRS="$(NETCDFDIR)" subd
+install-data-am:
 
-hdf-test:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
+install-exec-am:
 
-mfhdf-test:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
+install-info: install-info-recursive
 
-hdf-allnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="allnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-libnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-test-hdfnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="test-hdfnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="testnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-libnostub: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libnostub" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-allnostub: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="allnostub" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-utilities: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="utilities" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-debug: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="debug" \
-          SUBDIRS="$(HDFDIR)" subd
-
-libs: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="libmfhdf" \
-          SUBDIRS="$(NETCDFDIR)" subdn
-
-hdf-libs: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libs" \
-          SUBDIRS="$(HDFDIR)" subd
-
-libdf: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-
-# libjpeg: 
-# 	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-#           SUBDIRS="$(HDFDIR)" subd
-
-# libz: 
-# 	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-#           SUBDIRS="$(HDFDIR)" subd
-
-libmfhdf:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
-
-install:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-libs:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-includes:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-utils:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-hdf:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-hdf-libs:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-libs \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-hdf-utils:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-utils \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-mfhdf:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-mfhdf-libs:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install-libs \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-mfhdf-utils:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install-utils \
-          SUBDIRS="$(NETCDFDIR)" subd
-
 install-man:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
 
-install-hdf-man:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
+installcheck-am:
 
-install-mfhdf-man:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-hdfclean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="clean" \
-          SUBDIRS="$(HDFDIR)" subd
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
 
-mfhdfclean:		
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="clean" \
-          SUBDIRS="$(NETCDFDIR)" subd
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-clean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+mostlyclean: mostlyclean-recursive
 
-hdfdistclean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="distclean" \
-          SUBDIRS="$(HDFDIR)" subd
+mostlyclean-am: mostlyclean-generic
 
-mfhdfdistclean:		
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="distclean" \
-          SUBDIRS="$(NETCDFDIR)" subd
+pdf: pdf-recursive
 
-distclean:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
-	-$(RM) $(RMFLAGS) config.status Makefile
+pdf-am:
 
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "   (Use FC=NONE to exclude fortran support.)"
-	@echo "   (E.g., make FC=NONE all )"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes both HDF and netCDF packages"
-	@echo "make HDF     - makes HDF library,utilities, and tests"
-	@echo "make NETCDF  - makes NETCDF package"
-	@echo "make hdf-test          - makes HDF library and tests" 
-	@echo "make hdf-utilities     - makes HDF library and utilities"
-	@echo "make libs              - makes HDF,  and mfhdf libraries only"
-	@echo "make hdf-libs          - makes HDF libraries only"
-	@echo "make libdf             - makes HDF library"
-	@echo "make libmfhdf          - makes mfhdf library"
-	@echo "make test              - run both HDF and NETCDF tests"
-	@echo "make test-mfhdf        - run NETCDF tests" 
-	@echo "make test-hdf          - run HDF library and utilities tests" 
-	@echo "make test-hdf-libs     - run HDF library tests" 
-	@echo "make test-hdf-utils    - run HDF utilities test" 
-	@echo "make install           - install HDF,netCDF libraries,"
-	@echo "                         utilites, and includes" 
-	@echo "make install-libs      - install HDF,netCDF libraries and includes"
-	@echo "make install-includes  - install HDF,netCDF includes"
-	@echo "make install-utils     - install HDF,netCDF utilities"
-	@echo "make install-man       - install HDF and netCDF man pages"
-	@echo "make install-hdf       - install HDF library, utilities and includes"
-	@echo "make install-hdf-libs  - install HDF library and includes"
-	@echo "make install-hdf-utils - install utilities"
-	@echo "make install-hdf-man   - install HDF man pages"
-	@echo "make install-mfhdf     - install netCDF library, utilities and includes"
-	@echo "make install-mfhdf-libs - install netCDF library and includes"
-	@echo "make install-mfhdf-utils - install netCDF utilities"
-	@echo "make install-mfhdf-man   - install netCDF man pages"
-	@echo "make clean        - cleans up HDF and NETCDF packages(*.o,libdf.a,..)"
-	@echo "make distclean    - cleans up HDF and NETCDF packages including"
-	@echo "                    configuration(Makefiles,config.status,..)"
-	@echo "make hdfclean     - cleans up HDF package(*.o,libdf.a,..et)"
-	@echo "make hdfdistclean - cleans up HDF package including"
-	@echo "                    configuration(Makefiles,config.status,..)"
-	@echo "make mfhdfclean   - cleans up NETCDF package(*.o,libmfhdf.a,..et)"
-	@echo "make mfhdfdistclean - cleans up NETCDF package including"
-	@echo "                       configuration(Makefiles,config.status,..)"
+ps: ps-recursive
 
-# target for recursive directory make
-subd:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
+ps-am:
 
-subdn:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(NETCDF_FLAGS) $(TARG)); \
-	done
+uninstall-am: uninstall-info-am
 
-# For making distribution
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)
-dist: $(DISTFILES)
-	rm -rf $(distdir)
-	mkdir $(distdir)
-	chmod 777 $(distdir)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir);}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-	chmod -R a+r $(distdir)
-	tar chof $(distdir).tar $(distdir)
-	compress $(distdir).tar
-	rm -rf $(distdir)
+uninstall-info: uninstall-info-recursive
 
-ftp:	$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive dist \
+	dist-all dist-gzip distcheck distclean distclean-generic \
+	distclean-recursive distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am dvi-recursive info info-am \
+	info-recursive install install-am install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-generic mostlyclean-recursive pdf pdf-am \
+	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
 
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE_IT
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE_IT
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# For the justification of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-#
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
-
-#config.h: stamp-h
-
-#stamp-h: $(TOP_SRCDIR)/config.status $(srcdir)/config.h.in
-#	CONFIG_FILES= CONFIG_HEADERS=config.h $(TOP_SRCDIR)/config.status
-
-#config.status: configure
-#	$(TOP_SRCDIR)/config.status --recheck
-
-#configure: configure.in
-#	cd $(srcdir) && autoconf
-
-#config.h.in: stamp-h.in
-
-#stamp-h.in: configure.in
-#	cd $(srcdir) && autoheader
-# Use echo instead of date to avoid spurious conflicts for
-# people who use CVS, since stamp-h.in is distributed.
-#	echo > $(srcdir)/$@
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
-# dummy target as a dependency for forcing a rule to be always executed
-FORCE_IT:

Modified: packages/libhdf4/trunk/README
===================================================================
--- packages/libhdf4/trunk/README	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/README	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,4 +1,4 @@
-               README for HDF 4.1r4 Version
+               README for HDF 4.1r5 Version
                ----------------------------
 
 Obtaining the latest version
@@ -17,7 +17,7 @@
    hdf    -- contains the source code for the HDF 'base library', the 
              the multi_file annotation interface, the multi_file raster
              image interface, HDF command line utilities (hdp, the hdf 
-             dumper is in mfhdf/), Pablo instrumentation support, 
+             dumper is in mfhdf/), 
              and a test suite. It also contains the software
              distributions for IJPEG(hdf/jpeg) and ZLIB(hdf/zlib) 
              which are required by the HDF library. 
@@ -43,10 +43,6 @@
 
  2. ZLIB 1.1.3(libz.a) distribution.  
 
- Both of these distributions are included with this distribution
- in 'hdf/jpeg' and 'hdf/zlib'. The HDF/mfhdf base distribution
- in known to work with these versions only.
-
 System Requirements
 -------------------
  To build the HDF library from source, you need:

Modified: packages/libhdf4/trunk/Win32.nofortran.zip
===================================================================
(Binary files differ)

Modified: packages/libhdf4/trunk/Win32.zip
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/aclocal.m4 (from rev 832, packages/libhdf4/branches/upstream/current/aclocal.m4)
===================================================================
--- packages/libhdf4/trunk/aclocal.m4	                        (rev 0)
+++ packages/libhdf4/trunk/aclocal.m4	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,907 @@
+# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.7.7])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5						-*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes.	-*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+
+# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+AC_PREREQ(2.50)
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi])
+

Copied: packages/libhdf4/trunk/bin (from rev 832, packages/libhdf4/branches/upstream/current/bin)

Copied: packages/libhdf4/trunk/config/BlankForm (from rev 832, packages/libhdf4/branches/upstream/current/config/BlankForm)
===================================================================
--- packages/libhdf4/trunk/config/BlankForm	                        (rev 0)
+++ packages/libhdf4/trunk/config/BlankForm	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC="/some/default/compiler/named/foo -ansi"
+  CC_BASENAME=foo
+fi
+
+if test "X-$F77" = "X-"; then
+  F77="/some/default/compiler/named/foo -ansi"
+  F77_BASENAME=foo
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX="/some/default/compiler/named/foo -ansi"
+  CXX_BASENAME=foo
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/freebsd (from rev 832, packages/libhdf4/branches/upstream/current/config/freebsd)
===================================================================
--- packages/libhdf4/trunk/config/freebsd	                        (rev 0)
+++ packages/libhdf4/trunk/config/freebsd	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=g++
+  CXX_BASENAME=g++
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -ansi -Wall -pedantic "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/hpux11.00 (from rev 832, packages/libhdf4/branches/upstream/current/config/hpux11.00)
===================================================================
--- packages/libhdf4/trunk/config/hpux11.00	                        (rev 0)
+++ packages/libhdf4/trunk/config/hpux11.00	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=fort77
+  F77_BASENAME=fort77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=aCC
+  CXX_BASENAME=aCC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Ae"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O -s"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O -s"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/ia64-linux-gnu (from rev 832, packages/libhdf4/branches/upstream/current/config/ia64-linux-gnu)
===================================================================
--- packages/libhdf4/trunk/config/ia64-linux-gnu	                        (rev 0)
+++ packages/libhdf4/trunk/config/ia64-linux-gnu	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=ecc
+  CC_BASENAME=ecc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=efc
+  F77_BASENAME=efc
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=ecc
+  CXX_BASENAME=ecc
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/irix6.x (from rev 832, packages/libhdf4/branches/upstream/current/config/irix6.x)
===================================================================
--- packages/libhdf4/trunk/config/irix6.x	                        (rev 0)
+++ packages/libhdf4/trunk/config/irix6.x	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi -s -woff 1429,1521"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi -s"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/linux-gnu (from rev 832, packages/libhdf4/branches/upstream/current/config/linux-gnu)
===================================================================
--- packages/libhdf4/trunk/config/linux-gnu	                        (rev 0)
+++ packages/libhdf4/trunk/config/linux-gnu	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,164 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=g77
+  F77_BASENAME=g77
+
+else
+    case $F77 in
+        # The PGI and Intel compilers are automatically detected below
+        f95*|pgf90*)
+            ;;
+
+        *)
+            # Figure out which compiler we are using: pgf90 or Absoft f95
+            RM='rm -f'
+            tmpfile=/tmp/cmpver.$$
+            $F77 -V >$tmpfile
+            if test -s "$tmpfile"; then 
+                if( grep -s 'Absoft' $tmpfile > /dev/null) then
+                    F77_BASENAME=f95
+                fi 
+                if( grep -s 'pgf90' $tmpfile > /dev/null) then
+                    F77_BASENAME=pgf90
+                fi 
+            fi
+            $RM $tmpfile
+            ;;
+    esac
+fi
+
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  f95)
+    CFLAGS="$CFLAGS -DH4_ABSOFT"
+    FFLAGS="$FFLAGS -YEXT_NAMES=UCS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Deleted: packages/libhdf4/trunk/config/mh-aix
===================================================================
--- packages/libhdf4/trunk/config/mh-aix	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-aix	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,182 +0,0 @@
-# $Id: mh-aix,v 1.14 1998/09/16 19:31:09 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC= xlc -qlanglvl=ansi
-#CC= gcc
-CFLAGS= -O
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= aix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/trunk/config/mh-alpha
===================================================================
--- packages/libhdf4/trunk/config/mh-alpha	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-alpha	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,183 +0,0 @@
-# $Id: mh-alpha,v 1.16 2000/03/01 17:11:44 epourmal Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-# This file is used for both the DEC Unix and Linux operating systems, running
-#    on DEC Alpha CPUs
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS= -Olimit 2048 -std1
-
-# Fortran compilier
-FC = f77 
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= osf
-
-CPP      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -D_GNU_SOURCE
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS#
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/trunk/config/mh-decstation
===================================================================
--- packages/libhdf4/trunk/config/mh-decstation	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-decstation	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,181 +0,0 @@
-# $Id: mh-decstation,v 1.11 1998/09/16 19:31:11 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=gcc
-CFLAGS= -ansi
-
-# Fortran compilier
-FC = f77
-FFLAGS =
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= ultrix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-fbsd
===================================================================
--- packages/libhdf4/trunk/config/mh-fbsd	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-fbsd	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,185 +0,0 @@
-# $Id: mh-fbsd,v 1.20 2000/08/29 13:55:16 koziol Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-CFLAGS=-ansi -Wall -pedantic -g
-#CFLAGS=-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2
-#CFLAGS=-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wnested-externs -pedantic -O2
-#
-#Using ANSI compilier
-CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O
-#FFLAGS = -g
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= freebsd
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-fujivp
===================================================================
--- packages/libhdf4/trunk/config/mh-fujivp	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-fujivp	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,184 +0,0 @@
-# $Id: mh-fujivp,v 1.6 1998/09/16 19:31:12 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-O
-
-# Fortran compilier
-FC = NONE
-#FC = frt
-FFLAGS = -Ab -Sw
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier, Fujitsu?
-LIBSX=-lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for  File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd, fujivp
-OS = fujivp
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS    =
-
-# Location of library, sometimes the sunos requires -lsun
-# Fujitsu requires -lnsl
-LD_XDR		= -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/trunk/config/mh-hpux
===================================================================
--- packages/libhdf4/trunk/config/mh-hpux	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-hpux	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,183 +0,0 @@
-# $Id: mh-hpux,v 1.21 1999/05/04 18:12:06 bljones Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi -g
-#
-#Using HP-ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-CFLAGS=-Ae -s
-
-# Fortran compilier, possible values fort77, f77, cf77 and fc
-FC = f77
-FFLAGS = -s
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= hpux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= $(TOP_SRCDIR)/mfhdf/port/uddummy.o 
-
-

Deleted: packages/libhdf4/trunk/config/mh-hpux11
===================================================================
--- packages/libhdf4/trunk/config/mh-hpux11	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-hpux11	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,183 +0,0 @@
-# $Id: mh-hpux11,v 1.1 2000/08/30 18:41:46 wendling Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi -g
-#
-#Using HP-ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-CFLAGS=-Ae -s
-
-# Fortran compilier, possible values fort77, f77, cf77 and fc
-FC = f77
-FFLAGS = -s
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm -lnsl
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= hpux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= $(TOP_SRCDIR)/mfhdf/port/uddummy.o 
-
-

Deleted: packages/libhdf4/trunk/config/mh-ia64
===================================================================
--- packages/libhdf4/trunk/config/mh-ia64	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-ia64	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,182 +0,0 @@
-# $Id: mh-ia64,v 1.1 2000/05/23 18:07:01 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-# This file is used for IA64 running Linux
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS= -DNDEBUG -DHDF -DBIG_LONGS -DIA64
-
-# Fortran compilier
-FC = f90
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= Linux
-
-CPP      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -D_GNU_SOURCE
-#
-# for IRIX6(64-bit) 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -DIA64
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/trunk/config/mh-irix32
===================================================================
--- packages/libhdf4/trunk/config/mh-irix32	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-irix32	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,195 +0,0 @@
-# $Id: mh-irix32,v 1.17 2000/08/29 00:30:39 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Machine/OS: SGI/IRIX 6.x (32-bit mode)
-#
-# This uses the -n32 options.
-# If you prefer other options like, you may change them in
-# the following CFLAGS and FFLAGS.
-# See also the netCDF section dealing with CPPFLAGS_HDF to
-# change the options there too.
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-# Using ANSI compilier
-CC=cc
-# IRIX 6.1 has an error in its system include file, stdio.h,
-# that gives incorrect warning message when both "-n32" and "-ansi"
-# flags are used.
-# Turn off some incorrect or harmless warnings.
-# 1521 -- about #ident not standard.  SGI puts them in their system header files
-warn=-woff 1521
-CFLAGS=-ansi -n32 -O -s $(warn)
-
-# Fortran compilier
-FC = f90
-FFLAGS =-n32 -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = -64 $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.x (32-bit mode).
-CPPFLAGS_HDF  = -n32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-irix5
===================================================================
--- packages/libhdf4/trunk/config/mh-irix5	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-irix5	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,185 +0,0 @@
-# $Id: mh-irix5,v 1.15 1998/09/16 19:31:15 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-#CFLAGS=-ansi -O -s -pedantic -fullwarn -wlint,-p -woff 828,841,822
-#CFLAGS=-ansi -O -s -pedantic -fullwarn -wlint,-p -woff 828,841,822,826,852,813
-CFLAGS=-ansi -O -s
-#CFLAGS=-ansi -g
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-irix6
===================================================================
--- packages/libhdf4/trunk/config/mh-irix6	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-irix6	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,185 +0,0 @@
-# $Id: mh-irix6,v 1.17 2000/08/29 00:30:39 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-# Using ANSI compilier
-CC=cc
-# turn off some incorrect or harmless warnings.
-# 1429 -- about long long as non-standard.  It is in the new C standard.
-# 1521 -- about #ident not standard.  SGI puts them in their system header files
-warn=-woff 1429,1521
-CFLAGS=-ansi -64 -O -s $(warn)
-
-# Fortran compilier
-FC = f90
-FFLAGS =-64 -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-CPPFLAGS_HDF  = -ansi -64 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.x (32-bit mode).
-# CPPFLAGS_HDF  = -n32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-linux
===================================================================
--- packages/libhdf4/trunk/config/mh-linux	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-linux	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,179 +0,0 @@
-# $Id: mh-linux,v 1.14 1999/05/04 17:39:49 mcgrath Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi
-
-# Fortran compilier
-#FC = f77
-#FC = NONE
-FC = g77
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= Linux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-#LEX	= lex    # GNU flex?
-LEX	= flex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-mac
===================================================================
--- packages/libhdf4/trunk/config/mh-mac	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-mac	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,187 +0,0 @@
-# $Id: mh-mac,v 1.6 1999/05/04 21:48:16 smitchel Exp $
-
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# This is a fake makefile fragment for the Macintosh
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi -O
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS =
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-# LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= sunos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-solaris
===================================================================
--- packages/libhdf4/trunk/config/mh-solaris	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-solaris	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,184 +0,0 @@
-# $Id: mh-solaris,v 1.15 1998/09/16 19:31:17 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-#CFLAGS= -Xc -xO2 -g -v
-CFLAGS= -Xc -xO2
-
-# Fortran compilier
-FC = f77
-#FFLAGS = -g
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= solaris
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-# Solaris requires -lnsl
-LD_XDR		= -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-solarisx86
===================================================================
--- packages/libhdf4/trunk/config/mh-solarisx86	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-solarisx86	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,182 +0,0 @@
-# $Id: mh-solarisx86,v 1.11 1998/09/16 19:31:18 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi -O
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS= -Xa
-
-# Fortran compilier
-FC = NONE
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= solarisx86
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-# Solaris requires -lnsl
-LD_XDR      = -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/trunk/config/mh-sun
===================================================================
--- packages/libhdf4/trunk/config/mh-sun	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-sun	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,183 +0,0 @@
-# $Id: mh-sun,v 1.15 1998/09/16 19:31:19 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi  
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS = -f
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= sunos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-t3e
===================================================================
--- packages/libhdf4/trunk/config/mh-t3e	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-t3e	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,184 +0,0 @@
-# $Id: mh-t3e,v 1.10 1999/04/17 20:18:51 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-X m -s
-
-# Fortran compilier
-# the -Wl"-Dpermok=yes" is for cld to permit execution mode on even if
-# warnings are encountered.
-FC = f90
-FFLAGS =-X m -Wl"-Dpermok=yes" -Wl"-s"
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= craympp
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-#CPP_XDR		= -I/usr/include/rpc
-CPP_XDR	= -I../xdr
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/trunk/config/mh-unicos
===================================================================
--- packages/libhdf4/trunk/config/mh-unicos	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config/mh-unicos	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,182 +0,0 @@
-# $Id: mh-unicos,v 1.12 1998/09/16 19:31:20 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-O -s
-
-# Fortran compilier
-FC = f90
-FFLAGS =-O 1
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= unicos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Copied: packages/libhdf4/trunk/config/osf5.x (from rev 832, packages/libhdf4/branches/upstream/current/config/osf5.x)
===================================================================
--- packages/libhdf4/trunk/config/osf5.x	                        (rev 0)
+++ packages/libhdf4/trunk/config/osf5.x	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=cxx
+  CXX_BASENAME=cxx
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS=
+    PROD_CPPFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Olimit 2048 -std1 -noso"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -noso"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/powerpc-apple (from rev 832, packages/libhdf4/branches/upstream/current/config/powerpc-apple)
===================================================================
--- packages/libhdf4/trunk/config/powerpc-apple	                        (rev 0)
+++ packages/libhdf4/trunk/config/powerpc-apple	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,172 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+#Make IBM xlf compiler a deafult
+if test "X-$F77" = "X-"; then
+  F77=xlf
+  F77_BASENAME=xlf
+
+else
+    case $F77 in
+        # The PGI and Intel compilers are automatically detected below
+        xlf*|f95*)
+            ;;
+
+        *)
+            # Figure out which compiler we are using: pgf90 or Absoft f95
+            RM='rm -f'
+            tmpfile=/tmp/cmpver.$$
+            $F77 -V >$tmpfile
+            if test -s "$tmpfile"; then 
+            #Absoft compiler f95 doesn't recognize -V flag; we will use
+            #the error message it produces to identify the compiler
+            #    if( grep -s 'Absoft' $tmpfile > /dev/null) then
+                if( grep -s 'ERROR: No input files' $tmpfile > /dev/null) then
+                    F77_BASENAME=f95
+                fi 
+                if( grep -s 'IBM XL' $tmpfile > /dev/null) then
+                    F77_BASENAME=xlf
+                fi 
+            fi
+            $RM $tmpfile
+            ;;
+    esac
+fi
+
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -ansi -Wall -pedantic "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  xlf)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  f95)
+    #
+    # Assume Absoft compiler
+    #
+    # Set a flag for compiling C stubs
+    CFLAGS="$CFLAGS -DH4_ABSOFT"
+    FFLAGS="$FFLAGS -YEXT_NAMES=UCS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/powerpc-ibm-aix5.x (from rev 832, packages/libhdf4/branches/upstream/current/config/powerpc-ibm-aix5.x)
===================================================================
--- packages/libhdf4/trunk/config/powerpc-ibm-aix5.x	                        (rev 0)
+++ packages/libhdf4/trunk/config/powerpc-ibm-aix5.x	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=xlc
+  CC_BASENAME=xlc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=xlf
+  F77_BASENAME=xlf
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=xlC
+  CXX_BASENAME=xlC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -D_ALL_SOURCE -qlanglvl=ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/solaris2.x (from rev 832, packages/libhdf4/branches/upstream/current/config/solaris2.x)
===================================================================
--- packages/libhdf4/trunk/config/solaris2.x	                        (rev 0)
+++ packages/libhdf4/trunk/config/solaris2.x	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 "
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Xc"
+    DEBUG_CFLAGS="-g -v"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-xO2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -O"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/sv1-cray (from rev 832, packages/libhdf4/branches/upstream/current/config/sv1-cray)
===================================================================
--- packages/libhdf4/trunk/config/sv1-cray	                        (rev 0)
+++ packages/libhdf4/trunk/config/sv1-cray	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -O -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -O 1"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS "
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/unicos10.0.X (from rev 832, packages/libhdf4/branches/upstream/current/config/unicos10.0.X)
===================================================================
--- packages/libhdf4/trunk/config/unicos10.0.X	                        (rev 0)
+++ packages/libhdf4/trunk/config/unicos10.0.X	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -Wl"-s" "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Copied: packages/libhdf4/trunk/config/unicosmk2.0.6.X (from rev 832, packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X)
===================================================================
--- packages/libhdf4/trunk/config/unicosmk2.0.6.X	                        (rev 0)
+++ packages/libhdf4/trunk/config/unicosmk2.0.6.X	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -X m -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -X m -Wl"-Dpermok=yes" -Wl"-s" "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Deleted: packages/libhdf4/trunk/config.guess
===================================================================
--- packages/libhdf4/trunk/config.guess	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config.guess	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-03-06'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
-	    x86) 
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    EM64T | authenticamd)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa:Linux:*:*)
-    	echo xtensa-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Deleted: packages/libhdf4/trunk/config.sub
===================================================================
--- packages/libhdf4/trunk/config.sub	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/config.sub	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-01-18'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16c)
-		basic_machine=cr16c-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-		os=-elf
-		;;
-        spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        c4x-* | tic4x-*)
-        	os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-        mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Modified: packages/libhdf4/trunk/configure
===================================================================
--- packages/libhdf4/trunk/configure	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/configure	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,1091 +1,8986 @@
-#!/bin/sh
+#! /bin/sh
+# From configure.ac Id: configure.ac.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57 for HDF 4.2r1.
+#
+# Report bugs to <hdfhelp at ncsa.uiuc.edu>.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
-### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
 
-# Configuration script
-# Copyright (C) 1988, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-# This version has been modified from the original configure script
-# Please report any problems running this configure script to
-# hdfhelp at ncsa.uiuc.edu
-#
-# OLD: Please report any problems running this configure script to
-#      configure at cygnus.com
-#      Please do not send reports about other problems to this address.  See
-#      gdb/README, gas/README, etc., for info on where and how to report
-#      problems about particular tools.
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-# The orginal file was written by K. Richard Pixley.
-# This file has been modified by HDF group
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
 #
-# Shell script to create proper links to machine-dependent files in
-# preparation for compilation.
+# Initializations.
 #
-# If configure succeeds, it leaves its status in config.status.
-# If configure fails after disturbing the status quo, 
-#       config.status is removed.
-#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
 
-remove=rm
-hard_link=ln
-symbolic_link='ln -s'
-mkdirprog=mkdir        # what is your make-directory-program
+# Identity of this package.
+PACKAGE_NAME='HDF'
+PACKAGE_TARNAME='hdf'
+PACKAGE_VERSION='4.2r1'
+PACKAGE_STRING='HDF 4.2r1'
+PACKAGE_BUGREPORT='hdfhelp at ncsa.uiuc.edu'
 
-#for Test
-#remove="echo rm"
-#hard_link="echo ln"
-#symbolic_link="echo ln -s"
+ac_unique_file="hdf/src/atom.c"
+ac_default_prefix=`pwd`/NewHDF
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
 
-# clear some things potentially inherited from environment.
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE F77 FFLAGS ac_ct_F77 HDF_BUILD_FORTRAN_TRUE HDF_BUILD_FORTRAN_FALSE LEX LEXLIB LEX_OUTPUT_ROOT LN_S RANLIB ac_ct_RANLIB YACC AR DIFF NEQN TBL EGREP HDF_BUILD_XDR_TRUE HDF_BUILD_XDR_FALSE CXXCPP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
 
-Makefile=Makefile
-Makefile_in=Makefile.in
-arguments=$*
-build_alias=
-configdirs=
-exec_prefix=
-exec_prefixoption=
-fatal=
-floating_point=default
-gas=default
-host_alias=NOHOST
-host_makefile_frag=
-moveifchange=
-norecursion=
-other_options=
-package_makefile_frag=
-prefix='$(TOP_SRCDIR)/NewHDF'
-progname=
-program_prefix=
-program_prefixoption=
-program_suffix=
-program_suffixoption=
-program_transform_name=
-program_transform_nameoption=
-redirect=">/dev/null"
-removing=
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
 site=
-site_makefile_frag=
-site_option=
 srcdir=
-srctrigger=
-subdirs=
-target_alias=NOTARGET
-target_makefile_frag=
-undefs=NOUNDEFS
-version="$Revision: 1.12 $"
-x11=default
+verbose=
+x_includes=NONE
+x_libraries=NONE
 
-### we might need to use some other shell than /bin/sh for running subshells
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+
 #
-config_shell=${CONFIG_SHELL-/bin/sh}
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures HDF 4.2r1 to adapt to many kinds of systems.
 
-NO_EDIT="This file was generated automatically by configure.  Do not edit."
+Usage: $0 [OPTION]... [VAR=VALUE]...
 
-## this is a little touchy and won't always work, but...
-##
-## if the argv[0] starts with a slash then it is an absolute name that can (and
-## must) be used as is.
-##
-## otherwise, if argv[0] has no slash in it, we can assume that it is on the
-## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
-##
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
 
-progname=$0
-# if PWD already has a value, it is probably wrong.
-if [ -n "$PWD" ]; then PWD=`pwd`; fi
+Defaults for the options are specified in brackets.
 
-case "${progname}" in
-/*) ;;
-*/*) ;;
-*)
-        PATH=$PATH:${PWD=`pwd`} ; export PATH
-        ;;
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of HDF 4.2r1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --enable-fortran        Build Fortran into library [default=yes]
+  --enable-production     Determines how to run the compiler.
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+
+ For the following --with-xxx options, you can specify where the header
+ files and libraries are in two different ways:
+
+    --with-xxx=INC,LIB - Specify individually the include directory and
+                         library directory separated by a comma
+    --with-xxx=DIR     - Specify only the directory which contains the
+                         include/ and lib/ subdirectories
+
+  --with-zlib=DIR         Use zlib library [default=yes]
+  --with-jpeg=DIR         Use jpeg library [default=yes]
+  --with-szlib=DIR        Use szlib library [default=no]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  CXXCPP      C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <hdfhelp at ncsa.uiuc.edu>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
 
-# Loop over all args
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+           test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
 
-#while :
-for arg
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+HDF configure 4.2r1
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by HDF $as_me 4.2r1, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
 
-# Break out if there are no more args
-	case $# in
-	0)
-		break
-		;;
-	esac
+} >&5
 
-# Get the first arg, and shuffle
-	option=$1
-	shift
+cat >&5 <<_ACEOF
 
-# Make all options have two hyphens
-	orig_option=$option	# Save original for error messages
-	case $option in
-	--*) ;;
-	-*) option=-$option ;;
-	esac
-		
-# Split out the argument for options that take them
-	case $option in
-	--*=*)
-		optarg=`echo $option | sed -e 's/^[^=]*=//'`
-		;;
-# These options have mandatory values.  Since we didn't find an = sign,
-# the value must be in the next argument
-	--b* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-*)
-		optarg=$1
-		shift
-		;;
-	esac
 
-# Now, process the options
-	case $option in
+## ----------- ##
+## Core tests. ##
+## ----------- ##
 
-	--build* | --b*)
-		case "$build_alias" in
-		"") build_alias=$optarg ;;
-		*) echo '***' Can only configure for one build machine at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-# Accepted for compatibility with new autoconf; ignored.
-	--cache*)
-		;;
-	--disable-*)
-		enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
-		eval $enableopt=no
-		disableoptions="$disableoptions $option"
-		;;
-	--enable-*)
-		case "$option" in
-		*=*)	;;
-		*)	optarg=yes ;;
-		esac
+_ACEOF
 
-		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval $enableopt="$optarg"
-		enableoptions="$enableoptions $option"
-		;;
-	--exec-prefix* | --ex*)
-		exec_prefix=$optarg
-		exec_prefixoption="--exec-prefix=$optarg"
-		;;
-	--gas | --g*)
-		gas=yes
-		;;
-	--help | --he*)
-		fatal=yes
-		;;
-	--host* | --ho*)
-		case $host_alias in
-		NOHOST) host_alias=$optarg ;;
-		*) echo '***' Can only configure for one host at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	--nfp | --nf*)
-		floating_point=no
-		;;
-	--norecursion | --no*)
-		norecursion=yes
-		;;
-	--prefix* | --pre*)
-		prefix=$optarg
-		prefixoption="--prefix=$optarg"
-		;;
-	--program-prefix* | --program-p*)
-		program_prefix=$optarg
-		program_prefixoption="--program-prefix=$optarg"
-		;;
-	--program-suffix* | --program-s*)
-		program_suffix=$optarg
-		program_suffixoption="--program-suffix=$optarg"
-		;;
-	--program-transform-name* | --program-t*)
-		# Double any backslashes or dollar signs in the argument
-		program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
-		program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
-		;;
-	--rm)
-		removing=--rm
-		;;
-	--silent | --sil* | --quiet | --q*)
-		redirect=">/dev/null"
-		verbose=--silent
-		;;
-	--site* | --sit*)
-		site=$optarg
-		site_option="--site=$optarg"
-		;;
-	--srcdir*/ | --sr*/)
-                # Remove trailing slashes.  Otherwise, when the file name gets
-                # bolted into an object file as debug info, it has two slashes
-                # in it.  Ordinarily this is ok, but emacs takes double slash
-                # to mean "forget the first part".
-		srcdir=`echo $optarg | sed -e 's:/$::'`
-		;;
-	--srcdir* | --sr*)
-		srcdir=$optarg
-		;;
-	--target* | --ta*)
-		case $target_alias in
-		NOTARGET) target_alias=$optarg ;;
-		*) echo '***' Can only configure for one target at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	--tmpdir* | --tm*)
-		TMPDIR=$optarg
-		tmpdiroption="--tmpdir=$optarg"
-		;;
-	--verbose | --v | --verb*)
-		redirect=
-		verbose=--verbose
-		;;
-	--version | --V | --vers*)
-		echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
-		exit 0
-		;;
-	--with-*)
-		case "$option" in
-		*=*)	;;
-		*)	optarg=yes ;;
-		esac
 
-		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval $withopt="$optarg"
-		withoptions="$withoptions $option"
-		;;
-	--without-*)
-		withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
-		eval $withopt=no
-		withoutoptions="$withoutoptions $option"
-		;;
-	--x)	with_x=yes
-		withoptions="$withoptions --with-x"
-		;;
-	--x-i* | --x-l*) other_options="$other_options $orig_option"
-		;;
-	--*)
-		echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
-		exit 1
-		;;
-	*)
-		case $undefs in
-		NOUNDEFS) undefs=$option ;;
-		*) echo '***' Can only configure for one host and one target at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	esac
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
 done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
-# process host and target
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
 
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET UNDEFS
-#
-# The rules are:
-# 1. You aren't allowed to specify --host, --target, and undefs at the
-#    same time.
-# 2. Host defaults to undefs.
-# 3. If undefs is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target defaults to undefs.
-# 5. If undefs is not specified, then target defaults to host.
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
 
-case "${fatal}" in
-"")
-	# Make sure that host, target & undefs aren't all specified at the
-	# same time.
-	case $host_alias---$target_alias---$undefs in
-	NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
-		;;
-	*) echo '***' Can only configure for one host and one target at a time.  1>&2
-	   fatal=yes
-	   break 2
-		;;
-	esac
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
 
-	# Now, do defaulting for host.
-	case $host_alias in
-	NOHOST)
-		case $undefs in
-		NOUNDEFS)
-			# Neither --host option nor undefs were present.
-			# Call config.guess.
-			guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
-			if host_alias=`${guesssys}`
-			then
-				# If the string we are going to use for
-				# the target is a prefix of the string
-				# we just guessed for the host, then
-				# assume we are running native, and force
-				# the same string for both target and host.
-				case $target_alias in
-				NOTARGET) ;;
-				*)
-					if expr $host_alias : $target_alias >/dev/null
-					then
-						host_alias=$target_alias
-					fi
-					;;
-				esac
-				echo "Configuring for a ${host_alias} host." 1>&2
-				arguments="--host=$host_alias $arguments"
-			else
-				echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
-				fatal=yes
-			fi
-			;;
-		*)
-			host_alias=$undefs
-			;;
-		esac
-	esac
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+        echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
 
-	# Do defaulting for target.  If --target option isn't present, default
-	# to undefs.  If undefs isn't present, default to host.
-	case $target_alias in
-	NOTARGET)
-		case $undefs in
-		NOUNDEFS)
-			target_alias=$host_alias
-			;;
-		*)
-			target_alias=$undefs
-			;;
-		esac
-	esac
-	;;
-*) ;;
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in bin $srcdir/bin; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in bin $srcdir/bin" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in bin $srcdir/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+          ac_config_headers="$ac_config_headers hdf/src/h4config.h"
+
+
+am__api_version="1.7"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
+      done
+    done
+    ;;
 esac
+done
 
-if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
-	exec 1>&2
-	echo Usage: configure [OPTIONS] [HOST]
-	echo
-	echo Options: [defaults in brackets]
-	echo ' --prefix=MYDIR		 install into MYDIR [/usr/local]'
-	echo ' --exec-prefix=MYDIR	 install host-dependent files into MYDIR [/usr/local]'
-	echo ' --help			 print this message [normal config]'
-	echo ' --build=BUILD		 configure for building on BUILD [BUILD=HOST]'
-	echo ' --host=HOST		 configure for HOST [determined via config.guess]'
-	echo ' --norecursion		 configure this directory only [recurse]'
-	echo ' --program-prefix=FOO	 prepend FOO to installed program names [""]'
-	echo ' --program-suffix=FOO	 append FOO to installed program names [""]'
-	echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
-	echo ' --site=SITE		 configure with site-specific makefile for SITE'
-	echo ' --srcdir=DIR		 find the sources in DIR [. or ..]'
-	echo ' --target=TARGET	 configure for TARGET [TARGET=HOST]'
-	echo ' --tmpdir=TMPDIR	 create temporary files in TMPDIR [/tmp]'
-	echo ' --nfp			 configure for software floating point [hard float]'
-	echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
-	echo ' --without-FOO		 package FOO is NOT available'
-	echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
-	echo ' --disable-FOO		 do not include feature FOO'
-	echo
-	echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
-	echo
-	if [ -r config.status ] ; then
-		cat config.status
-	fi
 
-	exit 1
 fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
-configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
-moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-# this is a hack.  sun4 must always be a valid host alias or this will fail.
-if ${configsub} sun4 >/dev/null 2>&1 ; then
-        true
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-        echo '***' cannot find config.sub.  1>&2
-        exit 1
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
 fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
 
-touch config.junk
-if ${moveifchange} config.junk config.trash ; then
-        true
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-        echo '***' cannot find move-if-change.  1>&2
-        exit 1
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
-rm -f config.junk config.trash
 
-case "${srcdir}" in
-"")
-        if [ -r configure.in ] ; then
-                srcdir=.
-        else
-                if [ -r ${progname}.in ] ; then
-                        srcdir=`echo ${progname} | sed 's:/configure$::'`
-                else
-                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
-                        exit 1
-                fi
-        fi
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=HDF
+ VERSION=4.2r1
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+
+          ac_config_commands="$ac_config_commands default-1"
+
+
+
+echo "$as_me:$LINENO: checking shell variables initial values" >&5
+echo $ECHO_N "checking shell variables initial values... $ECHO_C" >&6
+set >&5
+echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+echo "$as_me:$LINENO: checking if tr works" >&5
+echo $ECHO_N "checking if tr works... $ECHO_C" >&6
+TR_TEST="`echo Test | tr 'a-z,' 'A-Z '`"
+if test $TR_TEST != "TEST"; then
+  { { echo "$as_me:$LINENO: error: tr program doesn't work" >&5
+echo "$as_me: error: tr program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+echo "$as_me:$LINENO: checking if basename works" >&5
+echo $ECHO_N "checking if basename works... $ECHO_C" >&6
+BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`"
+if test $BASENAME_TEST != "basename_works"; then
+  { { echo "$as_me:$LINENO: error: basename program doesn't work" >&5
+echo "$as_me: error: basename program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+echo "$as_me:$LINENO: checking if xargs works" >&5
+echo $ECHO_N "checking if xargs works... $ECHO_C" >&6
+XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`"
+if test $XARGS_TEST != "xargs_works"; then
+  { { echo "$as_me:$LINENO: error: xargs program doesn't work" >&5
+echo "$as_me: error: xargs program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+case "$host_os" in
+  aix4.*)       host_os_novers="aix4.x"     ;;
+  aix5.*)       host_os_novers="aix5.x"     ;;
+  freebsd*)     host_os_novers="freebsd"    ;;
+  irix5.*)      host_os_novers="irix5.x"    ;;
+  irix6.*)      host_os_novers="irix6.x"    ;;
+  osf4.*)       host_os_novers="osf4.x"     ;;
+  osf5.*)       host_os_novers="osf5.x"     ;;
+  solaris2.*)   host_os_novers="solaris2.x" ;;
+  *)            host_os_novers="$host_os"   ;;
+esac
+
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os        \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os                  \
+         $host_vendor-$host_os_novers           \
+         $host_cpu-$host_os                     \
+         $host_cpu-$host_os_novers              \
+         $host_cpu-$host_vendor                 \
+         $host_os                               \
+         $host_os_novers                        \
+         $host_vendor                           \
+         $host_cpu ; do
+  echo "$as_me:$LINENO: checking for config $f" >&5
+echo $ECHO_N "checking for config $f... $ECHO_C" >&6
+  if test -f "$srcdir/config/$f"; then
+    host_config=$srcdir/config/$f
+    echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+    break
+  fi
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+done
+if test "X$host_config" != "Xnone"; then
+  CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  F77_BASENAME="`echo $F77 | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  CXX_BASENAME="`echo $CXX | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  . $host_config
+fi
+
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
         ;;
-*) ;;
+    conftest.$ac_ext )
+        # This is the source file.
+        ;;
+    [ab].out )
+        # We found the default executable, but exeext='' is most
+        # certainly right.
+        break;;
+    *.* )
+        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+        # FIXME: I believe we export ac_cv_exeext for Libtool,
+        # but it would be cool to find out if it's true.  Does anybody
+        # maintain Libtool? --akim.
+        export ac_cv_exeext
+        break;;
+    * )
+        break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
-### warn about some conflicting configurations.
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-case "${srcdir}" in
-".") ;;
-*)
-        if [ -f ${srcdir}/config.status ] ; then
-                echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
-                exit 1
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+# Check whether --enable-fortran or --disable-fortran was given.
+if test "${enable_fortran+set}" = set; then
+  enableval="$enable_fortran"
+
+else
+  enableval="yes"
+fi;
+
+case "$enableval" in
+  yes)
+    BUILD_FORTRAN="yes"
+    ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:3730:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "$G77" = yes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "$G77" = yes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+    if test "X$F77" = "X"; then
+      BUILD_FORTRAN="no"
+    fi
+    ;;
+  no)
+    BUILD_FORTRAN="no"
+    ;;
+esac
+
+
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  HDF_BUILD_FORTRAN_TRUE=
+  HDF_BUILD_FORTRAN_FALSE='#'
+else
+  HDF_BUILD_FORTRAN_TRUE='#'
+  HDF_BUILD_FORTRAN_FALSE=
+fi
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
         fi
+      done
+    done
+    ;;
 esac
+done
 
-# default exec_prefix
-case "${exec_prefixoption}" in
-"") exec_prefix="\$(prefix)" ;;
-*) ;;
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LEX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test -z "$LEXLIB"
+then
+  echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fl_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+  LEXLIB="-lfl"
+else
+  echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_l_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+  LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+  echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # The minimal lex program is just a single line: %%.  But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+  (eval $LEX conftest.l) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_lex_yytext_pointer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+fi
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_YACC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+for ac_prog in ar xar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AR" && break
+done
+test -n "$AR" || AR=":"
+
+
+# Extract the first word of "diff", so it can be a program name with args.
+set dummy diff; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DIFF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DIFF"; then
+  ac_cv_prog_DIFF="$DIFF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DIFF="diff -w"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+DIFF=$ac_cv_prog_DIFF
+if test -n "$DIFF"; then
+  echo "$as_me:$LINENO: result: $DIFF" >&5
+echo "${ECHO_T}$DIFF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$MAKEINFO"; then
+  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MAKEINFO="makeinfo"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+MAKEINFO=$ac_cv_prog_MAKEINFO
+if test -n "$MAKEINFO"; then
+  echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "neqn", so it can be a program name with args.
+set dummy neqn; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NEQN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NEQN"; then
+  ac_cv_prog_NEQN="$NEQN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_NEQN="neqn"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+NEQN=$ac_cv_prog_NEQN
+if test -n "$NEQN"; then
+  echo "$as_me:$LINENO: result: $NEQN" >&5
+echo "${ECHO_T}$NEQN" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "tbl", so it can be a program name with args.
+set dummy tbl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_TBL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$TBL"; then
+  ac_cv_prog_TBL="$TBL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_TBL="tbl"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+TBL=$ac_cv_prog_TBL
+if test -n "$TBL"; then
+  echo "$as_me:$LINENO: result: $TBL" >&5
+echo "${ECHO_T}$TBL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+
+
+
+
+# Check whether --with-fnord or --without-fnord was given.
+if test "${with_fnord+set}" = set; then
+  withval="$with_fnord"
+
+fi;
+
+
+# Check whether --with-zlib or --without-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval="$with_zlib"
+
+else
+  withval=yes
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_ZLIB="yes"
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-### break up ${srcdir}/configure.in.
-case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
-"")
-        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
-        exit 1
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_ZLIB
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_compress2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char compress2 ();
+int
+main ()
+{
+compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_compress2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_compress2=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6
+if test $ac_cv_lib_z_compress2 = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  unset HAVE_ZLIB
+fi
+
+
+    if test -z "$HAVE_ZLIB"; then
+      { { echo "$as_me:$LINENO: error: couldn't find zlib library" >&5
+echo "$as_me: error: couldn't find zlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    { { echo "$as_me:$LINENO: error: zlib library required to build HDF4" >&5
+echo "$as_me: error: zlib library required to build HDF4" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  *)
+    HAVE_ZLIB="yes"
+    case "$withval" in
+      *,*)
+        zlib_inc="`echo $withval | cut -f1 -d,`"
+        zlib_lib="`echo $withval | cut -f2 -d, -s`"
         ;;
-*) ;;
+      *)
+        if test -n "$withval"; then
+          zlib_inc="$withval/include"
+          zlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+            if test "X$zlib_inc" = "X/usr/include"; then
+      zlib_inc=""
+    fi
+    if test "X$zlib_lib" = "X/usr/lib"; then
+      zlib_lib=""
+    fi
+
+    if test -n "$zlib_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$zlib_inc"
+    fi
+
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
-"")
-        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
-        exit 1
-        ;;
-*) ;;
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_ZLIB
+fi
+
+done
+
+
+    if test -n "$zlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$zlib_lib"
+    fi
+
+
+echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_compress2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char compress2 ();
+int
+main ()
+{
+compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_compress2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_compress2=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6
+if test $ac_cv_lib_z_compress2 = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  unset HAVE_ZLIB
+fi
+
+
+    if test -z "$HAVE_ZLIB"; then
+      { { echo "$as_me:$LINENO: error: couldn't find zlib library" >&5
+echo "$as_me: error: couldn't find zlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
 esac
 
-case "${TMPDIR}" in
-"") TMPDIR=/tmp ; export TMPDIR ;;
-*) ;;
+
+# Check whether --with-jpeg or --without-jpeg was given.
+if test "${with_jpeg+set}" = set; then
+  withval="$with_jpeg"
+
+else
+  withval=yes
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_JPEG="yes"
+
+for ac_header in jpeglib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-# keep this filename short for &%*%$*# 14 char file names
-tmpfile=${TMPDIR}/cONf$$
-# Note that under many versions of sh a trap handler for 0 will *override* any
-# exit status you explicitly specify!  At this point, the only non-error exit
-# is at the end of the script; these actions are duplicated there, minus
-# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
-# trap handler, or you'll lose.
-trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-# split ${srcdir}/configure.in into common, per-host, per-target,
-# and post-target parts.  Post-target is optional.
-sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
-sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
-if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
-  sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
-  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
 else
-  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
-  echo >${tmpfile}.pos
+  unset HAVE_JPEG
 fi
 
-### do common part of configure.in
+done
 
-. ${tmpfile}.com
 
-# some sanity checks on configure.in
-case "${srctrigger}" in
-"")
-        echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in.  1>&2
-        exit 1
+echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
+echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6
+if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_start_decompress ();
+int
+main ()
+{
+jpeg_start_decompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_jpeg_jpeg_start_decompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_jpeg_jpeg_start_decompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6
+if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+  LIBS="-ljpeg $LIBS"
+
+else
+  unset HAVE_JPEG
+fi
+
+
+    if test -z "$HAVE_JPEG"; then
+      { { echo "$as_me:$LINENO: error: couldn't find jpeg library" >&5
+echo "$as_me: error: couldn't find jpeg library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    { { echo "$as_me:$LINENO: error: jpeg library required to build HDF4" >&5
+echo "$as_me: error: jpeg library required to build HDF4" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  *)
+    HAVE_JPEG="yes"
+    case "$withval" in
+      *,*)
+        jpeg_inc="`echo $withval | cut -f1 -d,`"
+        jpeg_lib="`echo $withval | cut -f2 -d, -s`"
         ;;
-*) ;;
+      *)
+        if test -n "$withval"; then
+          jpeg_inc="$withval/include"
+          jpeg_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+            if test "X$jpeg_inc" = "X/usr/include"; then
+      jpeg_inc=""
+    fi
+    if test "X$jpeg_lib" = "X/usr/lib"; then
+      jpeg_lib=""
+    fi
+
+    if test -n "$jpeg_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$jpeg_inc"
+    fi
+
+
+for ac_header in jpeglib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-case "${build_alias}" in
-"")	;;
-*)
-	if result=`${config_shell} ${configsub} ${build_alias}` ; then
-	    buildopt="--build=${build_alias}"
-	    build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-	    build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-	    build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-	    build=${build_cpu}-${build_vendor}-${build_os}
-	else
-	    echo "Unrecognized build system name ${build_alias}." 1>&2
-	    exit 1
-	fi
-	;;
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_JPEG
+fi
+
+done
+
+
+    if test -n "$jpeg_lib"; then
+      LDFLAGS="$LDFLAGS -L$jpeg_lib"
+    fi
+
+
+echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
+echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6
+if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_start_decompress ();
+int
+main ()
+{
+jpeg_start_decompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_jpeg_jpeg_start_decompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_jpeg_jpeg_start_decompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6
+if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+  LIBS="-ljpeg $LIBS"
+
+else
+  unset HAVE_JPEG
+fi
+
+
+    if test -z "$HAVE_JPEG"; then
+      { { echo "$as_me:$LINENO: error: couldn't find jpeg library" >&5
+echo "$as_me: error: couldn't find jpeg library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
 esac
 
-if result=`${config_shell} ${configsub} ${host_alias}` ; then
-    true
+
+# Check whether --with-szlib or --without-szlib was given.
+if test "${with_szlib+set}" = set; then
+  withval="$with_szlib"
+
 else
-    echo "Unrecognized host system name ${host_alias}." 1>&2
-    exit 1
+  withval=no
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_SZIP="yes"
+
+for ac_header in szlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-host=${host_cpu}-${host_vendor}-${host_os}
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-. ${tmpfile}.hst
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-if result=`${config_shell} ${configsub} ${target_alias}` ; then
-    true
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
 else
-    echo "Unrecognized target system name ${target_alias}." 1>&2
-    exit 1
+  ac_cpp_err=yes
 fi
-target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-target=${target_cpu}-${target_vendor}-${target_os}
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-. ${tmpfile}.tgt
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
-# Find the source files, if location was not specified.
-case "${srcdir}" in
-"")
-        srcdirdefaulted=1
-        srcdir=.
-        if [ ! -r ${srctrigger} ] ; then
-                srcdir=..
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_SZIP
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for SZ_BufftoBuffCompress in -lsz" >&5
+echo $ECHO_N "checking for SZ_BufftoBuffCompress in -lsz... $ECHO_C" >&6
+if test "${ac_cv_lib_sz_SZ_BufftoBuffCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SZ_BufftoBuffCompress ();
+int
+main ()
+{
+SZ_BufftoBuffCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sz_SZ_BufftoBuffCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sz_SZ_BufftoBuffCompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6
+if test $ac_cv_lib_sz_SZ_BufftoBuffCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSZ 1
+_ACEOF
+
+  LIBS="-lsz $LIBS"
+
+else
+  unset HAVE_SZIP
+fi
+
+
+    if test -z "$HAVE_SZIP"; then
+      { { echo "$as_me:$LINENO: error: couldn't find szlib library" >&5
+echo "$as_me: error: couldn't find szlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    echo "$as_me:$LINENO: checking for szlib" >&5
+echo $ECHO_N "checking for szlib... $ECHO_C" >&6
+    echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6
+    ;;
+  *)
+    HAVE_SZIP="yes"
+    case "$withval" in
+      *,*)
+        szip_inc="`echo $withval | cut -f1 -d,`"
+        szip_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          szip_inc="$withval/include"
+          szip_lib="$withval/lib"
         fi
         ;;
-*) ;;
+    esac
+
+            if test "X$szip_inc" = "X/usr/include"; then
+      szip_inc=""
+    fi
+    if test "X$szip_lib" = "X/usr/lib"; then
+      szip_lib=""
+    fi
+
+    if test -n "$szip_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$szip_inc"
+    fi
+
+
+for ac_header in szlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-if [ ! -r ${srcdir}/${srctrigger} ] ; then
-        case "${srcdirdefaulted}" in
-        "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
-        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
-        esac
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
-        exit 1
+else
+  unset HAVE_SZIP
 fi
 
-# Some systems (e.g., one of the i386-aix systems the gas testers are
-# using) don't handle "\$" correctly, so don't use it here.
-tooldir='$(exec_prefix)'/${target_alias}
+done
 
-if [ "${host_alias}" != "${target_alias}" ] ; then
-    if [ "${program_prefixoption}" = "" ] ; then
-        if [ "${program_suffixoption}" = "" ] ; then 
-            if [ "${program_transform_nameoption}" = "" ] ; then
-                program_prefix=${target_alias}- ;
-            fi
-        fi
+
+    if test -n "$szip_lib"; then
+      LDFLAGS="$LDFLAGS -L$szip_lib"
     fi
+
+
+echo "$as_me:$LINENO: checking for SZ_BufftoBuffCompress in -lsz" >&5
+echo $ECHO_N "checking for SZ_BufftoBuffCompress in -lsz... $ECHO_C" >&6
+if test "${ac_cv_lib_sz_SZ_BufftoBuffCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SZ_BufftoBuffCompress ();
+int
+main ()
+{
+SZ_BufftoBuffCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sz_SZ_BufftoBuffCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sz_SZ_BufftoBuffCompress=no
 fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6
+if test $ac_cv_lib_sz_SZ_BufftoBuffCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSZ 1
+_ACEOF
 
-# Merge program_prefix and program_suffix onto program_transform_name.
-# (program_suffix used to use $, but it's hard to preserve $ through both
-# make and sh.)
-if [ "${program_suffix}" != "" ] ; then
-    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
+  LIBS="-lsz $LIBS"
+
+else
+  unset HAVE_SZIP
 fi
 
-if [ "${program_prefix}" != "" ] ; then
-    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
+
+    if test -z "$HAVE_SZIP"; then
+      { { echo "$as_me:$LINENO: error: couldn't find szlib library" >&5
+echo "$as_me: error: couldn't find szlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for xdr library support" >&5
+echo $ECHO_N "checking for xdr library support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef VMS
+#define STDC_INCLUDES
+#endif
+#ifdef __ultrix
+#define GCC_FIX
+#endif
+#include <rpc/types.h>
+#ifdef __ultrix
+#undef GCC_FIX
+#endif
+#include <rpc/xdr.h>
+int
+main ()
+{
+xdr_int
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; build_xdr="no"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; build_xdr="yes"
 fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-for subdir in . ${subdirs} ; do
 
-    # ${subdir} is relative path from . to the directory we're currently
-    # configuring.
-    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
-    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
+if test "X$build_xdr" = "Xyes"; then
+  HDF_BUILD_XDR_TRUE=
+  HDF_BUILD_XDR_FALSE='#'
+else
+  HDF_BUILD_XDR_TRUE='#'
+  HDF_BUILD_XDR_FALSE=
+fi
 
-    ### figure out what to do with srcdir
-    case "${srcdir}" in
-        ".")  # no -srcdir option.  We're building in place.
-                makesrcdir=. ;;
-        /*) # absolute path
-                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
-                ;;
-        *) # otherwise relative
-                case "${subdir}" in
-                .) makesrcdir=${srcdir} ;;
-                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
-                esac
-                ;;
-    esac
 
-    if [ "${subdir}/" != "./" ] ; then
-        Makefile=${subdir}/Makefile
+case "$host" in
+  *-solaris*|*-hp-hpux*|S370-fujitsu-sysv*)
+    LIBS="$LIBS -lnsl"  ;;
+  *) ;;
+esac
+
+
+CPPFLAGS="-I/usr/include/rpc $CPPFLAGS"
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+
+
+if test "x$CC" != xcc; then
+  echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
+fi
+set dummy $CC; ac_cc=`echo $2 |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+        # cc works too.
+        :
+      else
+        # cc exists but doesn't like -o.
+        eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
     fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
 
-    if [ ! -d ${subdir} ] ; then
-        if mkdir ${subdir} ; then
-                true
-        else
-                echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
-                exit 1
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  echo "$as_me:$LINENO: checking whether $F77 understand -c and -o together" >&5
+echo $ECHO_N "checking whether $F77 understand -c and -o together... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# We test twice because some compilers refuse to overwrite an existing
+# `.o' file with `-o', although they will create one.
+ac_try='$F77 $FFLAGS -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+     test -f conftest.$ac_objext &&
+     { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  ac_cv_prog_f77_c_o=yes
+else
+  ac_cv_prog_f77_c_o=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_c_o" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_c_o" >&6
+if test $ac_cv_prog_f77_c_o = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define F77_NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for int*" >&5
+echo $ECHO_N "checking for int*... $ECHO_C" >&6
+if test "${ac_cv_type_intp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((int* *) 0)
+  return 0;
+if (sizeof (int*))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_intp=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_intp=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_intp" >&5
+echo "${ECHO_T}$ac_cv_type_intp" >&6
+
+echo "$as_me:$LINENO: checking size of int*" >&5
+echo $ECHO_N "checking size of int*... $ECHO_C" >&6
+if test "${ac_cv_sizeof_intp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_intp" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_intp=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (int*)); }
+unsigned long ulongval () { return (long) (sizeof (int*)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (int*))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (int*))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (int*))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_intp=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_intp=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_intp" >&5
+echo "${ECHO_T}$ac_cv_sizeof_intp" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INTP $ac_cv_sizeof_intp
+_ACEOF
+
+
+
+if test $ac_cv_sizeof_intp -ge 8; then
+  CPPFLAGS="$CPPFLAGS -DBIG_LONGS"
+
+    case "${host}" in
+    *-ibm-aix*) CPPFLAGS="$CPPFLAGS -DAIX5L64" ;;
+    *)          ;;
+  esac
+fi
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+    CPPFLAGS="$CPPFLAGS -DSWAP" ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+echo "$as_me:$LINENO: checking for build mode" >&5
+echo $ECHO_N "checking for build mode... $ECHO_C" >&6
+# Check whether --enable-production or --disable-production was given.
+if test "${enable_production+set}" = set; then
+  enableval="$enable_production"
+
+fi;
+
+case "X-$enable_production" in
+  X-|X-yes)
+    echo "$as_me:$LINENO: result: production" >&5
+echo "${ECHO_T}production" >&6
+
+        CFLAGS_temp=""
+    if test -n "$CFLAGS"; then
+      for d in $CFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CFLAGS_temp="$CFLAGS_temp $d"
         fi
+      done
+      CFLAGS=$CFLAGS_temp
     fi
 
-    case "${removing}" in
-    "")
-        case "${subdir}" in
-        .) ;;
-        *) eval echo Building in ${subdir} ${redirect} ;;
-        esac
+    FFLAGS_temp=""
+    if test -n "$FFLAGS"; then
+      for d in $FFLAGS ; do
+        if test "X$d" != "X-g"; then
+          FFLAGS_temp="$FFLAGS_temp $d"
+        fi
+      done
+      FFLAGS=$FFLAGS_temp
+    fi
 
-        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
-        # Set up the list of links to be made.
-        # ${links} is the list of link names, and ${files} is the list of names to link to.
-
-        # Make the links.
-        configlinks="${links}"
-        if [ -r ${subdir}/config.status ] ; then
-                mv -f ${subdir}/config.status ${subdir}/config.back
+    CXXFLAGS_temp=""
+    if test -n "$CXXFLAGS"; then
+      for d in $CXXFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CXXFLAGS_temp="$CXXFLAGS_temp $d"
         fi
-#
-#  Added THISDIR variable to make symlinks easier when linking
-#  to files not in the same directory -GV
-#        THISDIR=${PWD=`pwd`}
-        ### figure out what to do with srcdir
-        case "${srcdir}" in
-          ".") THISDIR=${PWD=`pwd`} ;; # no -srcdir option.  We're building in place.
-          /*) # absolute path
-              THISDIR=${srcdir}
-              ;;
-          *) # otherwise relative
-             THISDIR=../${srcdir}
-             ;;
-        esac
-#        echo "thisdir is $THISDIR "
-#        while [ -n "${files}" ] ; do
-        for file in ${files} ;  do
-                # set file to car of files, files to cdr of files
-                set ${files}; file=$1; shift; files=$*
-                set ${links}; link=$1; shift; links=$*
+      done
+      CXXFLAGS=$CXXFLAGS_temp
+    fi
 
-                ## Took this code from 'install-sh' script
-                ## this sed command emulates the dirname command
-                dstdir=`echo $link | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+    CFLAGS="$CFLAGS $PROD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
+    FFLAGS="$FFLAGS $PROD_FFLAGS"
+    CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+    ;;
+  X-no)
+    echo "$as_me:$LINENO: result: development" >&5
+echo "${ECHO_T}development" >&6
+    CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+    FFLAGS="$FFLAGS $DEBUG_FFLAGS"
+    CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
+    CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+    ;;
+  *)
+    echo "$as_me:$LINENO: result: user-defined" >&5
+echo "${ECHO_T}user-defined" >&6
+    ;;
+esac
 
-                # Make sure that the destination directory exists.
-                #  this part is taken from Noah Friedman's mkinstalldirs script
 
-                # Skip lots of stat calls in the usual case.
-                if [ ! -d "$dstdir" ]; then
-                  defaultIFS='	
-                  '
-                  IFS="${IFS-${defaultIFS}}"
+echo "$as_me:$LINENO: checking for math library support" >&5
+echo $ECHO_N "checking for math library support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+sqrt(37.927)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                  oIFS="${IFS}"
-                  # Some sh's can't handle IFS=/ for some reason.
-                  IFS='%'
-                  set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-                  IFS="${oIFS}"
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; LIBS="$LIBS -lm"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-                  pathcomp=''
 
-                  while [ $# -ne 0 ] ; do
-                    pathcomp="${pathcomp}${1}"
-                    shift
+case "$host" in
+  alpha-*-*)            BAR="alpha"       ;;
+  alphaev*-*-*)         BAR="alpha"       ;;
+  mips*-dec-ultrix*)    BAR="dec"         ;;
+  mips*-sgi-irix6.*)    BAR="irix6"       ;;
+  mips*-sgi-irix6_32*)  BAR="irix32"      ;;
+  mips*-sgi-irix5*)     BAR="irix5"       ;;
+  mips*-sgi-irix4*)     BAR="irix4"       ;;
+  *-linux*)             BAR="linux"       ;;
+  *-freebsd*)           BAR="fbsd"        ;;
+  ia64-*-*)             BAR="ia64"        ;;
+  *-ibm-aix*)           BAR="aix"         ;;
+  i386-*-solaris2*)     BAR="solarisx86"  ;;
+  sparc64-*-solaris2*)  BAR="solaris64"   ;;
+  *-*-solaris2*)        BAR="solaris"     ;;
+  *-sun-*)              BAR="sun"         ;;
+  *-hp-hpux*)           BAR="hpux"        ;;
+  *-convex-bsd*)        BAR="convex"      ;;
+  *-cray-unicos*)       BAR="unicos"      ;;
+  t3*-cray-craympp)     BAR="t3e"         ;;
+  S370-fujitsu-sysv*)   BAR="fujivp"      ;;
+  *-mac-*)              BAR="mac"         ;;
+  *-apple*)             BAR="apple"       ;;
+  *)                    echo "*** unknown host $host!"; exit 1 ;;
+esac
 
-                    if [ ! -d "${pathcomp}" ] ;
-                    then
-                      $mkdirprog "${pathcomp}"
-                    else
-                      true
-                    fi
+src_files="mfhdf/libsrc/config/netcdf-FOO.h:mfhdf/libsrc/netcdf.h
+           mfhdf/fortran/config/jackets-FOO.c:mfhdf/fortran/jackets.c
+           mfhdf/fortran/config/netcdf-FOO.inc:mfhdf/fortran/netcdf.inc
+           mfhdf/fortran/config/ftest-FOO.f:mfhdf/fortran/ftest.f"
+src_files="`echo $src_files | sed -e s/FOO/${BAR}/g`"
 
-                    pathcomp="${pathcomp}/"
-                  done
-                fi
+for config_file in $src_files; do
+  src_file="${srcdir}/`echo $config_file | sed -e s/:.*$//`"
+  target_file="`echo $config_file | sed -e s/^[^:]*://g`"
 
-                if [ ! -r ${srcdir}/${file} ] ; then
-                  #                  echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
-                  # Changed to copy instead of linking. -GV(5/10/96)
-                        echo '***' "${progname}: cannot copy file \"${link}\"," 1>&2                  
-                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
-                        exit 1
-                fi
+  if test ! -r ${src_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2
+    echo '***' "since the file \"${src_file}\" does not exist." 1>&2
+    exit 1
+  fi
 
-                ${remove} -f ${link}
-		# Make a symlink if possible, otherwise try a hard link
+  ## this sed command emulates the dirname command
+  dstdir=`echo "$target_file" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+  ## Create directory for the target_file if it's not there.
+  if test ! -d $dstdir; then
+    ${srcdir}/bin/mkinstalldirs $dstdir
+  fi
+
+  echo "Copying \"${src_file}\" to \"${target_file}\" ."
+  cp ${src_file} ${target_file}
+
+  if test ! -r ${target_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2
+    exit 1
+  fi
+done
+
+                                                                                                                                                                                                                                      ac_config_files="$ac_config_files Makefile hdf/Makefile hdf/src/Makefile hdf/test/Makefile hdf/util/Makefile hdf/util/h4cc hdf/util/h4fc hdf/util/h4redeploy hdf/util/testutil.sh man/Makefile mfhdf/Makefile mfhdf/dumper/Makefile mfhdf/dumper/testhdp.sh mfhdf/fortran/Makefile mfhdf/hdfimport/Makefile mfhdf/hdfimport/testutil.sh mfhdf/hdiff/Makefile mfhdf/hrepack/Makefile mfhdf/libsrc/Makefile mfhdf/ncdump/Makefile mfhdf/ncgen/Makefile mfhdf/nctest/Makefile mfhdf/port/Makefile"
+
+
+if test "X$build_xdr" = "Xyes"; then
+            ac_config_files="$ac_config_files mfhdf/xdr/Makefile"
+
+fi
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-#  Used variable THISDIR to make symlinks easier when linking
-#  to files not in the same directory -GV
-#		if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
-		if ${symbolic_link} ${THISDIR}/${file} ${link} >/dev/null 2>&1 ; then
-			true
-		else
-			# We need to re-remove the file because Lynx leaves a 
-			# very strange directory there when it fails an NFS symlink.
-			${remove} -r -f ${link}
-#			${hard_link} ${srcdir}/${file} ${link}
-			${hard_link} ${THISDIR}/${file} ${link}
-		fi
-                if [ ! -r ${link} ] ; then
-                  #                  echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
-                  # Changed to copy instead of linking. -GV(5/10/96)
-                  echo '***' "${progname}: unable to copy  \"${srcdir}/${file}\" to  \"${link}\"." 1>&2
-                        exit 1
-                fi
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
 
-# Changed to copy instead of Linking -GV(5/10/96)
-                echo "Copied \"${srcdir}/${file}\" to \"${link}\" ."
-#                echo "Linked \"${link}\" to \"${srcdir}/${file}\"."                                
-        done
+_ACEOF
 
-        # Create a .gdbinit file which runs the one in srcdir
-        # and tells GDB to look there for source files.
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
 
-        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
-                case ${srcdir} in
-                .) ;;
-                *) cat > ${subdir}/.gdbinit <<EOF
-# ${NO_EDIT}
-dir ${makesrcdir}
-dir .
-source ${makesrcdir}/.gdbinit
-EOF
-                        ;;
-                esac
-        fi
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-        # Install a makefile, and make it set VPATH
-        # if necessary so that the sources are found.
-        # Also change its value of srcdir.
-        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
-        # been somewhat optimized and is perhaps a bit twisty.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
+fi
 
-        # code is order so as to try to sed the smallest input files we know.
+DEFS=-DHAVE_CONFIG_H
 
-        # the four makefile fragments MUST end up in the resulting Makefile in this order: 
-        # package, target, host, and site.  so do these separately because I don't trust the
-        #  order of sed -e expressions.
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
 
-        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
+LTLIBOBJS=$ac_ltlibobjs
 
-            # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
-            rm -f ${subdir}/Makefile.tem
-              case "${site}" in
-              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
-              *)
-                      site_makefile_frag=${srcdir}/config/ms-${site}
 
-                      if [ -f ${site_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \
-                                      > ${subdir}/Makefile.tem
-                      else
-                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
-                              site_makefile_frag=
-                      fi
-                      ;;
-            esac
-            # working copy now in ${subdir}/Makefile.tem
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HDF_BUILD_FORTRAN_TRUE}" && test -z "${HDF_BUILD_FORTRAN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HDF_BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HDF_BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HDF_BUILD_XDR_TRUE}" && test -z "${HDF_BUILD_XDR_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HDF_BUILD_XDR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HDF_BUILD_XDR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-            # Conditionalize the makefile for this host.
-            rm -f ${Makefile}
-            case "${host_makefile_frag}" in
-              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
-              *)
-                      if [ ! -f ${host_makefile_frag} ] ; then
-                              host_makefile_frag=${srcdir}/${host_makefile_frag}
-                      fi
-                      if [ -f ${host_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
-                      else
-                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
-                              echo '***' is missing in ${PWD=`pwd`}. 1>&2
-                              mv ${subdir}/Makefile.tem ${Makefile}
-                      fi
-            esac
-            # working copy now in ${Makefile}
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
 
-            # Conditionalize the makefile for this target.
-            rm -f ${subdir}/Makefile.tem
-            case "${target_makefile_frag}" in
-              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
-              *)
-                      if [ ! -f ${target_makefile_frag} ] ; then
-                              target_makefile_frag=${srcdir}/${target_makefile_frag}
-                      fi
-                      if [ -f ${target_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
-                      else
-                              mv ${Makefile} ${subdir}/Makefile.tem
-                              target_makefile_frag=
-                      fi
-                      ;;
-            esac
-            # real copy now in ${subdir}/Makefile.tem
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
 
-            # Conditionalize the makefile for this package.
-            rm -f ${Makefile}
-            case "${package_makefile_frag}" in
-              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
-              *)
-                      if [ ! -f ${package_makefile_frag} ] ; then
-                              package_makefile_frag=${srcdir}/${package_makefile_frag}
-                      fi
-                      if [ -f ${package_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
-			      rm -f ${subdir}/Makefile.tem
-                      else
-                              echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
-                              echo '***' is missing in ${PWD=`pwd`}. 1>&2
-                              mv ${subdir}/Makefile.tem ${Makefile}
-                      fi
-            esac
-            # working copy now in ${Makefile}
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
-            mv ${Makefile} ${subdir}/Makefile.tem
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
 
-            # real copy now in ${subdir}/Makefile.tem
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
 
-            # prepend warning about editting, and a bunch of variables.
-            rm -f ${Makefile}
-            cat > ${Makefile} <<EOF
-# ${NO_EDIT}
-#VPATH = ${makesrcdir}
-links = ${configlinks}
-host_alias = ${host_alias}
-host_cpu = ${host_cpu}
-host_vendor = ${host_vendor}
-host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_os}
-target_alias = ${target_alias}
-target_cpu = ${target_cpu}
-target_vendor = ${target_vendor}
-target_os = ${target_os}
-target_canonical = ${target_cpu}-${target_vendor}-${target_os}
-EOF
-	    case "${build}" in
-	      "") ;;
-	      *)  cat >> ${Makefile} << EOF
-build_alias = ${build_alias}
-build_cpu = ${build_cpu}
-build_vendor = ${build_vendor}
-build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_os}
-EOF
-	    esac
 
-            case "${package_makefile_frag}" in
-              "") ;;
-              /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
-            esac
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-            case "${target_makefile_frag}" in
-              "") ;;
-              /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
-            esac
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
 
-            case "${host_makefile_frag}" in
-              "") ;;
-              /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
-            esac
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-            if [ "${site_makefile_frag}" != "" ] ; then
-                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
-            fi 
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
 
-	    # make sure that some sort of reasonable default exists for these 
-	    # two variables
-	    CXX=${CXX-"g++ -O"}
-	    CC=${CC-cc}
 
-            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
-            # remove any form feeds.
-            if [ -z "${subdirs}" ]; then
-                rm -f ${subdir}/Makefile.tem2
-                sed -e "s:^SUBDIRS[ 	]*=.*$:SUBDIRS = ${configdirs}:" \
-                    -e "s:^NONSUBDIRS[ 	]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
-                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tem2
-                rm -f ${subdir}/Makefile.tem
-                mv ${subdir}/Makefile.tem2 ${subdir}/Makefile.tem
-            fi
-            sed -e "s:^prefix[ 	]*=.*$:prefix = ${prefix}:" \
-                    -e "s:^exec_prefix[ 	]*=.*$:exec_prefix = ${exec_prefix}:" \
-		    -e "s:^SHELL[	 ]*=.*$:SHELL = ${config_shell}:" \
-                    -e "s:^srcdir[ 	]*=.*$:srcdir = ${makesrcdir}:" \
-                    -e "s///" \
-                    -e "s:^program_prefix[ 	]*=.*$:program_prefix = ${program_prefix}:" \
-                    -e "s:^program_suffix[ 	]*=.*$:program_suffix = ${program_suffix}:" \
-                    -e "s:^program_transform_name[ 	]*=.*$:program_transform_name = ${program_transform_name}:" \
-                    -e "s:^tooldir[ 	]*=.*$:tooldir = ${tooldir}:" \
-                    ${subdir}/Makefile.tem >> ${Makefile}
-            # final copy now in ${Makefile}
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
 
-        else
-           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
-        fi
 
-        rm -f ${subdir}/Makefile.tem
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-        case "${host_makefile_frag}" in
-        "") using= ;;
-        *) using="and \"${host_makefile_frag}\"" ;;
-        esac
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
 
-        case "${target_makefile_frag}" in
-        "") ;;
-        *) using="${using} and \"${target_makefile_frag}\"" ;;
-        esac
 
-        case "${site_makefile_frag}" in
-        "") ;;
-        *) using="${using} and \"${site_makefile_frag}\"" ;;
-        esac
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 
-        newusing=`echo "${using}" | sed 's/and/using/'`
-        using=${newusing}
-        echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
 
-        . ${tmpfile}.pos
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
 
-        # describe the chosen configuration in config.status.
-        # Make that file a shellscript which will reestablish
-        # the same configuration.  Used in Makefiles to rebuild
-        # Makefiles.
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
 
-        case "${norecursion}" in
-        "") arguments="${arguments} --norecursion" ;;
-        *) ;;
-        esac
 
-        if [ ${subdir} = . ] ; then
-            echo "#!/bin/sh
-# ${NO_EDIT}
-# This directory was configured as follows:
-${progname}" ${arguments}  "
-# ${using}" > ${subdir}/config.new
-        else
-            echo "#!/bin/sh
-# ${NO_EDIT}
-# This directory was configured as follows:
-cd ${invsubdir}
-${progname}" ${arguments}  "
-# ${using}" > ${subdir}/config.new
-        fi
-        chmod a+x ${subdir}/config.new
-        if [ -r ${subdir}/config.back ] ; then
-                mv -f ${subdir}/config.back ${subdir}/config.status
-        fi
-        ${moveifchange} ${subdir}/config.new ${subdir}/config.status
-        ;;
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
 
-    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
-    esac
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by HDF $as_me 4.2r1, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+HDF config.status 4.2r1
+configured by $0, generated by GNU Autoconf 2.57,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
 done
 
-# If there are subdirectories, then recur. 
-if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then 
-        for configdir in ${configdirs} ; do
+ac_configure_extra_args=
 
-                if [ -d ${srcdir}/${configdir} ] ; then
-                        eval echo Configuring ${configdir}... ${redirect}
-                        case "${srcdir}" in
-                        ".") ;;
-                        *)
-                                if [ ! -d ./${configdir} ] ; then
-                                        if mkdir ./${configdir} ; then
-                                                true
-                                        else
-                                                echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
-                                                exit 1
-                                        fi
-                                fi
-                                ;;
-                        esac
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
 
-                        POPDIR=${PWD=`pwd`}
-                        cd ${configdir} 
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
 
-### figure out what to do with srcdir
-                        case "${srcdir}" in
-                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
-                        /*) # absolute path
-                                newsrcdir=${srcdir}/${configdir}
-                                srcdiroption="--srcdir=${newsrcdir}"
-                                ;;
-                        *) # otherwise relative
-                                newsrcdir=../${srcdir}/${configdir}
-                                srcdiroption="--srcdir=${newsrcdir}"
-                                ;;
-                        esac
+_ACEOF
 
-### check for guested configure, otherwise fix possibly relative progname
-                        if [ -f ${newsrcdir}/configure ] ; then
-                                recprog=${newsrcdir}/configure
-                        elif [ -f ${newsrcdir}/configure.in ] ; then
-                                case "${progname}" in
-                                /*)     recprog=${progname} ;;
-##
-## Changed the way this is handled the default case is to use
-## the top level configure found originaly and not the one found in
-## parent directory -GV
-##                              *)      recprog=../${progname} ;;
-                                *)      recprog=${POPDIR}/${progname} ;;
-                                esac
-			else
-				eval echo No configuration information in ${configdir} ${redirect}
-				recprog=
-                        fi
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
 
-### The recursion line is here.
-			if [ ! -z "${recprog}" ] ; then
-	                        if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
-        	                        ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
-                	                ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
-	                                true
-        	                else
-					echo Configure in `pwd` failed, exiting. 1>&2
-                	                exit 1
-                        	fi
-			fi
 
-                        cd ${POPDIR}
-                fi
-        done
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "hdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/Makefile" ;;
+  "hdf/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/src/Makefile" ;;
+  "hdf/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/test/Makefile" ;;
+  "hdf/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/util/Makefile" ;;
+  "hdf/util/h4cc" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4cc" ;;
+  "hdf/util/h4fc" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4fc" ;;
+  "hdf/util/h4redeploy" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4redeploy" ;;
+  "hdf/util/testutil.sh" ) CONFIG_FILES="$CONFIG_FILES hdf/util/testutil.sh" ;;
+  "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+  "mfhdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/Makefile" ;;
+  "mfhdf/dumper/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/dumper/Makefile" ;;
+  "mfhdf/dumper/testhdp.sh" ) CONFIG_FILES="$CONFIG_FILES mfhdf/dumper/testhdp.sh" ;;
+  "mfhdf/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/fortran/Makefile" ;;
+  "mfhdf/hdfimport/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdfimport/Makefile" ;;
+  "mfhdf/hdfimport/testutil.sh" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdfimport/testutil.sh" ;;
+  "mfhdf/hdiff/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdiff/Makefile" ;;
+  "mfhdf/hrepack/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hrepack/Makefile" ;;
+  "mfhdf/libsrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/libsrc/Makefile" ;;
+  "mfhdf/ncdump/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/ncdump/Makefile" ;;
+  "mfhdf/ncgen/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/ncgen/Makefile" ;;
+  "mfhdf/nctest/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/nctest/Makefile" ;;
+  "mfhdf/port/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/port/Makefile" ;;
+  "mfhdf/xdr/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/xdr/Makefile" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "hdf/src/h4config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS hdf/src/h4config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
-# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
-# and reset the trap handler.
-rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
-trap 0
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
 
-exit 0
+# Create a (secure) tmp directory for tmp files.
 
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
 #
-# Local Variables:
-# fill-column: 131
-# End:
+# CONFIG_FILES section.
 #
 
-# end of configure
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at CPP@,$CPP,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at F77@,$F77,;t t
+s, at FFLAGS@,$FFLAGS,;t t
+s, at ac_ct_F77@,$ac_ct_F77,;t t
+s, at HDF_BUILD_FORTRAN_TRUE@,$HDF_BUILD_FORTRAN_TRUE,;t t
+s, at HDF_BUILD_FORTRAN_FALSE@,$HDF_BUILD_FORTRAN_FALSE,;t t
+s, at LEX@,$LEX,;t t
+s, at LEXLIB@,$LEXLIB,;t t
+s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s, at LN_S@,$LN_S,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at YACC@,$YACC,;t t
+s, at AR@,$AR,;t t
+s, at DIFF@,$DIFF,;t t
+s, at NEQN@,$NEQN,;t t
+s, at TBL@,$TBL,;t t
+s, at EGREP@,$EGREP,;t t
+s, at HDF_BUILD_XDR_TRUE@,$HDF_BUILD_XDR_TRUE,;t t
+s, at HDF_BUILD_XDR_FALSE@,$HDF_BUILD_XDR_FALSE,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X$ac_file : 'X\(//\)[^/]' \| \
+         X$ac_file : 'X\(//\)$' \| \
+         X$ac_file : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    default-1 )
+  echo "creating hdf/src/h4config.h"
+  sed 's/#define /#define H4_/' < hdf/src/h4config.h |\
+    sed 's/#undef /#undef H4_/' > h4config
+  if test ! -f hdf/src/h4config.h; then
+    /bin/mv -f h4config hdf/src/h4config.h
+  elif (diff h4config hdf/src/h4config.h >/dev/null); then
+    /bin/rm -f h4config
+    echo "hdf/src/h4config.h is unchanged"
+  else
+    /bin/mv -f h4config hdf/src/h4config.h
+  fi
+ ;;
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$mf" : 'X\(//\)[^/]' \| \
+         X"$mf" : 'X\(//\)$' \| \
+         X"$mf" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$file" : 'X\(//\)[^/]' \| \
+         X"$file" : 'X\(//\)$' \| \
+         X"$file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+chmod 755 hdf/util/h4cc hdf/util/h4redeploy
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  chmod 755 hdf/util/h4fc
+fi

Copied: packages/libhdf4/trunk/configure.ac (from rev 832, packages/libhdf4/branches/upstream/current/configure.ac)
===================================================================
--- packages/libhdf4/trunk/configure.ac	                        (rev 0)
+++ packages/libhdf4/trunk/configure.ac	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,638 @@
+dnl Process this file with autoconf to produce configure.
+dnl
+dnl Copyright by the Board of Trustees of the University of Illinois.
+dnl All rights reserved.
+dnl
+AC_REVISION($Id: configure.ac,v 1.8 2005/02/08 18:29:27 acheng Exp $)
+
+dnl ======================================================================
+dnl Initialize configure.
+dnl ======================================================================
+dnl AC_INIT takes the name of the package, the version number, and an
+dnl email address to report bugs. AC_CONFIG_SRCDIR takes a unique file
+dnl as its argument.
+dnl
+dnl NOTE: Don't forget to change the version number here when we do a
+dnl release!!!
+dnl
+AC_INIT([HDF], [4.2r1], [hdfhelp at ncsa.uiuc.edu])
+AC_CONFIG_SRCDIR([hdf/src/atom.c])
+AC_CONFIG_AUX_DIR([bin])
+AC_CONFIG_HEADER([hdf/src/h4config.h])
+
+AM_INIT_AUTOMAKE([HDF], [4.2r1])
+AM_MAINTAINER_MODE
+
+AC_PREFIX_DEFAULT([`pwd`/NewHDF])
+
+AC_OUTPUT_COMMANDS([
+  echo "creating hdf/src/h4config.h"
+  sed 's/#define /#define H4_/' < hdf/src/h4config.h |\
+    sed 's/#undef /#undef H4_/' > h4config
+  if test ! -f hdf/src/h4config.h; then
+    /bin/mv -f h4config hdf/src/h4config.h
+  elif (diff h4config hdf/src/h4config.h >/dev/null); then
+    /bin/rm -f h4config
+    echo "hdf/src/h4config.h is unchanged"
+  else
+    /bin/mv -f h4config hdf/src/h4config.h
+  fi
+])
+
+dnl ======================================================================
+dnl Information on the package
+dnl ======================================================================
+
+dnl Dump all shell variables values.
+AC_MSG_CHECKING([shell variables initial values])
+set >&AS_MESSAGE_LOG_FD
+AC_MSG_RESULT([done])
+
+AC_CANONICAL_HOST
+
+dnl Some platforms have broken tr, basename, and/or xargs programs. Check
+dnl that it actually does what it's supposed to do. Catch this early
+dnl since configure relies upon tr heavily and there's no use continuing
+dnl if it's broken.
+dnl
+AC_MSG_CHECKING([if tr works])
+TR_TEST="`echo Test | tr 'a-z,' 'A-Z '`"
+if test $TR_TEST != "TEST"; then
+  AC_MSG_ERROR([tr program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+AC_MSG_CHECKING([if basename works])
+BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`"
+if test $BASENAME_TEST != "basename_works"; then
+  AC_MSG_ERROR([basename program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+AC_MSG_CHECKING([if xargs works])
+XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`"
+if test $XARGS_TEST != "xargs_works"; then
+  AC_MSG_ERROR([xargs program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+dnl Source any special files that we need. These files normally aren't
+dnl present but can be used by the maintainers to fine tune things like
+dnl turning on debug or profiling flags for the compiler. The search order
+dnl is:
+dnl
+dnl         CPU-VENDOR-OS
+dnl         VENDOR-OS
+dnl         CPU-OS
+dnl         CPU-VENDOR
+dnl         OS
+dnl         VENDOR
+dnl         CPU
+dnl
+dnl If the `OS' ends with a version number then remove it. For instance,
+dnl `freebsd3.1' would become `freebsd'
+dnl
+case "$host_os" in
+  aix4.*)       host_os_novers="aix4.x"     ;;
+  aix5.*)       host_os_novers="aix5.x"     ;;
+  freebsd*)     host_os_novers="freebsd"    ;;
+  irix5.*)      host_os_novers="irix5.x"    ;;
+  irix6.*)      host_os_novers="irix6.x"    ;;
+  osf4.*)       host_os_novers="osf4.x"     ;;
+  osf5.*)       host_os_novers="osf5.x"     ;;
+  solaris2.*)   host_os_novers="solaris2.x" ;;
+  *)            host_os_novers="$host_os"   ;;
+esac
+
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os        \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os                  \
+         $host_vendor-$host_os_novers           \
+         $host_cpu-$host_os                     \
+         $host_cpu-$host_os_novers              \
+         $host_cpu-$host_vendor                 \
+         $host_os                               \
+         $host_os_novers                        \
+         $host_vendor                           \
+         $host_cpu ; do
+  AC_MSG_CHECKING([for config $f])
+  if test -f "$srcdir/config/$f"; then
+    host_config=$srcdir/config/$f
+    AC_MSG_RESULT([found])
+    break
+  fi
+  AC_MSG_RESULT([no])
+done
+if test "X$host_config" != "Xnone"; then
+  CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  F77_BASENAME="`echo $F77 | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  CXX_BASENAME="`echo $CXX | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  . $host_config
+fi
+
+dnl ======================================================================
+dnl Checks for programs
+dnl ======================================================================
+
+AC_PROG_MAKE_SET
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+
+AC_ARG_ENABLE([fortran],
+              [AC_HELP_STRING([--enable-fortran],
+                              [Build Fortran into library [default=yes]])],,
+              enableval="yes")
+
+case "$enableval" in
+  yes)
+    BUILD_FORTRAN="yes"
+    AC_PROG_F77
+
+    if test "X$F77" = "X"; then
+      BUILD_FORTRAN="no"
+    fi
+    ;;
+  no)
+    BUILD_FORTRAN="no"
+    ;;
+esac
+
+AM_CONDITIONAL([HDF_BUILD_FORTRAN], [test "X$BUILD_FORTRAN" = "Xyes"])
+
+AC_PROG_INSTALL
+AM_PROG_LEX
+AC_PROG_LN_S
+AC_PROG_RANLIB
+AC_PROG_YACC
+
+AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH])
+
+AC_CHECK_PROG([DIFF],     [diff],     [diff -w])
+AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+AC_CHECK_PROG([NEQN],     [neqn],     [neqn])
+AC_CHECK_PROG([TBL],      [tbl],      [tbl])
+
+AC_SUBST([AR])
+AC_SUBST([DIFF])
+
+dnl ======================================================================
+dnl Checks for libraries
+dnl ======================================================================
+
+dnl ----------------------------------------------------------------------
+dnl Fake --with-xxx option to allow us to create a help message for the
+dnl following --with-xxx options which can take either a =DIR or =INC,LIB
+dnl specifier.
+dnl
+AC_ARG_WITH([fnord],
+  [
+ For the following --with-xxx options, you can specify where the header
+ files and libraries are in two different ways:
+
+    --with-xxx=INC,LIB - Specify individually the include directory and
+                         library directory separated by a comma
+    --with-xxx=DIR     - Specify only the directory which contains the
+                         include/ and lib/ subdirectories
+  ])
+
+dnl ----------------------------------------------------------------------
+dnl Is the GNU zlib present? It has a header file `zlib.h' and a library
+dnl `-lz' and their locations might be specified with the `--with-zlib'
+dnl command-line switch. The value is an include path and/or a library path.
+dnl If the library path is specified then it must be preceded by a comma.
+AC_ARG_WITH([zlib],
+            [AC_HELP_STRING([--with-zlib=DIR],
+                            [Use zlib library [default=yes]])],,
+            [withval=yes])
+
+case "$withval" in
+  yes)
+    HAVE_ZLIB="yes"
+    AC_CHECK_HEADERS([zlib.h],, [unset HAVE_ZLIB])
+    AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+
+    if test -z "$HAVE_ZLIB"; then
+      AC_MSG_ERROR([couldn't find zlib library])
+    fi
+    ;;
+  no)
+    AC_MSG_ERROR([zlib library required to build HDF4])
+    ;;
+  *)
+    HAVE_ZLIB="yes"
+    case "$withval" in
+      *,*)
+        zlib_inc="`echo $withval | cut -f1 -d,`"
+        zlib_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          zlib_inc="$withval/include"
+          zlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$zlib_inc" = "X/usr/include"; then
+      zlib_inc=""
+    fi
+    if test "X$zlib_lib" = "X/usr/lib"; then
+      zlib_lib=""
+    fi
+
+    if test -n "$zlib_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$zlib_inc"
+    fi
+
+    AC_CHECK_HEADERS([zlib.h],, [unset HAVE_ZLIB])
+
+    if test -n "$zlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$zlib_lib"
+    fi
+
+    AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+
+    if test -z "$HAVE_ZLIB"; then
+      AC_MSG_ERROR([couldn't find zlib library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is the JPEG library present?
+AC_ARG_WITH([jpeg],
+            [AC_HELP_STRING([--with-jpeg=DIR],
+                            [Use jpeg library [default=yes]])],,
+            [withval=yes])
+
+case "$withval" in
+  yes)
+    HAVE_JPEG="yes"
+    AC_CHECK_HEADERS([jpeglib.h],, [unset HAVE_JPEG])
+    AC_CHECK_LIB([jpeg], [jpeg_start_decompress],, [unset HAVE_JPEG])
+
+    if test -z "$HAVE_JPEG"; then
+      AC_MSG_ERROR([couldn't find jpeg library])
+    fi
+    ;;
+  no)
+    AC_MSG_ERROR([jpeg library required to build HDF4])
+    ;;
+  *)
+    HAVE_JPEG="yes"
+    case "$withval" in
+      *,*)
+        jpeg_inc="`echo $withval | cut -f1 -d,`"
+        jpeg_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          jpeg_inc="$withval/include"
+          jpeg_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$jpeg_inc" = "X/usr/include"; then
+      jpeg_inc=""
+    fi
+    if test "X$jpeg_lib" = "X/usr/lib"; then
+      jpeg_lib=""
+    fi
+
+    if test -n "$jpeg_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$jpeg_inc"
+    fi
+
+    AC_CHECK_HEADERS([jpeglib.h],, [unset HAVE_JPEG])
+
+    if test -n "$jpeg_lib"; then
+      LDFLAGS="$LDFLAGS -L$jpeg_lib"
+    fi
+
+    AC_CHECK_LIB([jpeg], [jpeg_start_decompress],, [unset HAVE_JPEG])
+
+    if test -z "$HAVE_JPEG"; then
+      AC_MSG_ERROR([couldn't find jpeg library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is the SZip library present?
+AC_ARG_WITH([szlib],
+            [AC_HELP_STRING([--with-szlib=DIR],
+                            [Use szlib library [default=no]])],,
+            [withval=no])
+
+case "$withval" in
+  yes)
+    HAVE_SZIP="yes"
+    AC_CHECK_HEADERS([szlib.h],, [unset HAVE_SZIP])
+    AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZIP])
+
+    if test -z "$HAVE_SZIP"; then
+      AC_MSG_ERROR([couldn't find szlib library])
+    fi
+    ;;
+  no)
+    AC_MSG_CHECKING([for szlib])
+    AC_MSG_RESULT([suppressed])
+    ;;
+  *)
+    HAVE_SZIP="yes"
+    case "$withval" in
+      *,*)
+        szip_inc="`echo $withval | cut -f1 -d,`"
+        szip_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          szip_inc="$withval/include"
+          szip_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$szip_inc" = "X/usr/include"; then
+      szip_inc=""
+    fi
+    if test "X$szip_lib" = "X/usr/lib"; then
+      szip_lib=""
+    fi
+
+    if test -n "$szip_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$szip_inc"
+    fi
+
+    AC_CHECK_HEADERS([szlib.h],, [unset HAVE_SZIP])
+
+    if test -n "$szip_lib"; then
+      LDFLAGS="$LDFLAGS -L$szip_lib"
+    fi
+
+    AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZIP])
+
+    if test -z "$HAVE_SZIP"; then
+      AC_MSG_ERROR([couldn't find szlib library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is XDR support present? The TRY_LINK info was gotten from the
+dnl mfhdf/libsrc/local_nc.c file.
+AC_MSG_CHECKING([for xdr library support])
+AC_TRY_LINK([
+#ifdef VMS
+#define STDC_INCLUDES
+#endif
+#ifdef __ultrix
+#define GCC_FIX
+#endif 
+#include <rpc/types.h>
+#ifdef __ultrix
+#undef GCC_FIX
+#endif
+#include <rpc/xdr.h>], [xdr_int],
+            [AC_MSG_RESULT([yes]); build_xdr="no"],
+            [AC_MSG_RESULT([no]); build_xdr="yes"])
+AM_CONDITIONAL([HDF_BUILD_XDR], [test "X$build_xdr" = "Xyes"])
+
+dnl For Solaris and Fuji systems, add the -nsl for XDR support
+case "$host" in
+  *-solaris*|*-hp-hpux*|S370-fujitsu-sysv*)
+    LIBS="$LIBS -lnsl"  ;;
+  *) ;;
+esac
+
+dnl ======================================================================
+dnl Checks for header files
+dnl ======================================================================
+
+dnl Always put the /usr/include/rpc directory first in the search list.
+CPPFLAGS="-I/usr/include/rpc $CPPFLAGS"
+
+AC_HEADER_STDC
+
+dnl ======================================================================
+dnl Checks for types
+dnl ======================================================================
+
+dnl ======================================================================
+dnl Checks for structures
+dnl ======================================================================
+
+dnl ======================================================================
+dnl Checks for compiler characteristics
+dnl ======================================================================
+
+AC_PROG_CC_C_O
+AC_PROG_CXXCPP
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  AC_PROG_F77_C_O
+fi
+
+dnl This is a bit of a hack. The AC_CHECK_SIZEOF macro is supposed to
+dnl #define a value in a header file. However, we don't use a generated
+dnl header file. So I check the value left over from autoconf's test  is
+dnl >= 8.
+AC_CHECK_SIZEOF([int*])
+
+if test $ac_cv_sizeof_intp -ge 8; then
+  CPPFLAGS="$CPPFLAGS -DBIG_LONGS"
+
+  dnl Define super secret special flag for AIX machines in 64-bit mode.
+  case "${host}" in
+    *-ibm-aix*) CPPFLAGS="$CPPFLAGS -DAIX5L64" ;;
+    *)          ;;
+  esac
+fi
+
+AC_C_BIGENDIAN([], [CPPFLAGS="$CPPFLAGS -DSWAP"])
+
+dnl Are we building this in debug or production mode? (Remove the -g flag
+dnl in production mode.)
+AC_MSG_CHECKING(for build mode)
+AC_ARG_ENABLE(production,
+              [AC_HELP_STRING([--enable-production],
+                              [Determines how to run the compiler.])])
+
+case "X-$enable_production" in
+  X-|X-yes)
+    AC_MSG_RESULT([production])
+
+    dnl Remove the "-g" flag from compile line if it's in there.
+    CFLAGS_temp=""
+    if test -n "$CFLAGS"; then
+      for d in $CFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CFLAGS_temp="$CFLAGS_temp $d"
+        fi
+      done
+      CFLAGS=$CFLAGS_temp
+    fi
+
+    FFLAGS_temp=""
+    if test -n "$FFLAGS"; then
+      for d in $FFLAGS ; do
+        if test "X$d" != "X-g"; then
+          FFLAGS_temp="$FFLAGS_temp $d"
+        fi
+      done
+      FFLAGS=$FFLAGS_temp
+    fi
+
+    CXXFLAGS_temp=""
+    if test -n "$CXXFLAGS"; then
+      for d in $CXXFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CXXFLAGS_temp="$CXXFLAGS_temp $d"
+        fi
+      done
+      CXXFLAGS=$CXXFLAGS_temp
+    fi
+
+    CFLAGS="$CFLAGS $PROD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
+    FFLAGS="$FFLAGS $PROD_FFLAGS"
+    CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+    ;;
+  X-no)
+    AC_MSG_RESULT([development])
+    CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+    FFLAGS="$FFLAGS $DEBUG_FFLAGS"
+    CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
+    CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+    ;;
+  *)
+    AC_MSG_RESULT([user-defined])
+    ;;
+esac
+
+dnl ======================================================================
+dnl Checks for library functions
+dnl ======================================================================
+
+AC_MSG_CHECKING([for math library support])
+AC_TRY_LINK([#include <math.h>], [sqrt(37.927)],
+            [AC_MSG_RESULT([yes])],
+            [AC_MSG_RESULT([no]); LIBS="$LIBS -lm"])
+
+dnl ======================================================================
+dnl Checks for system services
+dnl ======================================================================
+
+dnl Copy NetCDF header files.
+dnl
+dnl FIXME: This is code stolen^Wborrowed from the old HDF4 configure.
+dnl These header files should probably be generated by autoconf instead
+dnl of being copied depending upon the host.
+case "$host" in
+  alpha-*-*)            BAR="alpha"       ;;
+  alphaev*-*-*)         BAR="alpha"       ;;
+  mips*-dec-ultrix*)    BAR="dec"         ;;
+  mips*-sgi-irix6.*)    BAR="irix6"       ;;
+  mips*-sgi-irix6_32*)  BAR="irix32"      ;;
+  mips*-sgi-irix5*)     BAR="irix5"       ;;
+  mips*-sgi-irix4*)     BAR="irix4"       ;;
+  *-linux*)             BAR="linux"       ;;
+  *-freebsd*)           BAR="fbsd"        ;;
+  ia64-*-*)             BAR="ia64"        ;;
+  *-ibm-aix*)           BAR="aix"         ;;
+  i386-*-solaris2*)     BAR="solarisx86"  ;;
+  sparc64-*-solaris2*)  BAR="solaris64"   ;;
+  *-*-solaris2*)        BAR="solaris"     ;;
+  *-sun-*)              BAR="sun"         ;;
+  *-hp-hpux*)           BAR="hpux"        ;;
+  *-convex-bsd*)        BAR="convex"      ;;
+  *-cray-unicos*)       BAR="unicos"      ;;
+  t3*-cray-craympp)     BAR="t3e"         ;;
+  S370-fujitsu-sysv*)   BAR="fujivp"      ;;
+  *-mac-*)              BAR="mac"         ;;
+  *-apple*)             BAR="apple"       ;;
+  *)                    echo "*** unknown host $host!"; exit 1 ;;
+esac
+
+src_files="mfhdf/libsrc/config/netcdf-FOO.h:mfhdf/libsrc/netcdf.h
+           mfhdf/fortran/config/jackets-FOO.c:mfhdf/fortran/jackets.c
+           mfhdf/fortran/config/netcdf-FOO.inc:mfhdf/fortran/netcdf.inc
+           mfhdf/fortran/config/ftest-FOO.f:mfhdf/fortran/ftest.f"
+src_files="`echo $src_files | sed -e s/FOO/${BAR}/g`"
+
+for config_file in $src_files; do
+  src_file="${srcdir}/`echo $config_file | sed -e s/:.*$//`"
+  target_file="`echo $config_file | sed -e s/^[[^:]]*://g`"
+
+  if test ! -r ${src_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2                  
+    echo '***' "since the file \"${src_file}\" does not exist." 1>&2
+    exit 1
+  fi
+
+  ## this sed command emulates the dirname command
+  dstdir=`echo "$target_file" | sed -e 's,[[^/]]*$,,;s,/$,,;s,^$,.,'`
+
+  ## Create directory for the target_file if it's not there.
+  if test ! -d $dstdir; then
+    ${srcdir}/bin/mkinstalldirs $dstdir
+  fi
+
+  echo "Copying \"${src_file}\" to \"${target_file}\" ."
+  cp ${src_file} ${target_file}
+
+  if test ! -r ${target_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2                  
+    exit 1
+  fi
+done
+
+AC_CONFIG_FILES([Makefile
+                 hdf/Makefile
+                 hdf/src/Makefile
+                 hdf/test/Makefile
+                 hdf/util/Makefile
+                 hdf/util/h4cc
+                 hdf/util/h4fc
+                 hdf/util/h4redeploy
+                 hdf/util/testutil.sh
+                 man/Makefile
+                 mfhdf/Makefile
+                 mfhdf/dumper/Makefile
+                 mfhdf/dumper/testhdp.sh
+                 mfhdf/fortran/Makefile
+                 mfhdf/hdfimport/Makefile
+                 mfhdf/hdfimport/testutil.sh
+                 mfhdf/hdiff/Makefile
+                 mfhdf/hrepack/Makefile
+                 mfhdf/libsrc/Makefile
+                 mfhdf/ncdump/Makefile
+                 mfhdf/ncgen/Makefile
+                 mfhdf/nctest/Makefile
+			 mfhdf/port/Makefile])
+
+dnl If we're building the XDR library, then generate its Makefile.
+if test "X$build_xdr" = "Xyes"; then
+  AC_CONFIG_FILES([mfhdf/xdr/Makefile])
+fi
+
+AC_OUTPUT
+
+chmod 755 hdf/util/h4cc hdf/util/h4redeploy
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  chmod 755 hdf/util/h4fc
+fi

Deleted: packages/libhdf4/trunk/configure.in
===================================================================
--- packages/libhdf4/trunk/configure.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/configure.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,201 +0,0 @@
-##############################################################################
-## This file was taken from the Cygnus Toolkit distribution and used as
-## as a template.
-
-## This file is a Bourne shell script fragment that supplies the information
-## necessary to tailor a template configure script into the configure
-## script appropriate for this directory.  For more information, check
-## any existing configure script.  
-
-## Be warned, there are two types of configure.in files.  There are those
-## used by Autoconf, which are macros which are expanded into a configure
-## script by autoconf.  The other sort, of which this is one, is executed
-## by Cygnus configure.  
-
-## For more information on these two systems, check out the documentation
-## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi) or
-## the official documentation on these packages.  
-
-##############################################################################
-
-# Right now the JPEG has still needs a seperate makefile fragmenet
-# So we run configure here i.e we use configure.in and config/ 
-# directory found in the hdf/jpeg to build the configuration.
-host_libs=""
-
-# The followin features Not yet implemented
-#echo "without options are $withoutoptions"
-# without options for packages e.g 'jpeg'
-for wooption in $withoutoptions ; do
-if [ "$wooption" = "--without-jpeg" ] ; then 
-   host_libs=""
-fi
-done
-
-# Add file cache directory as a directory to run configure in also
-# since this is a self contained package that was setup 
-# using Cygnus configuration software.
-host_libs="$host_libs hdf/fmpool"
-
-# Not yet implemented
-#echo "enabled options are $enableoptions"
-# enabled options 'fmpool', 'pablo'
-#for eoption in $enableoptions ; do
-#if [ "$eoption" = "--enable-pablo" ] ; then 
-#   host_libs="$host_libs hdf/pablo"
-#fi
-#if [ "$eoption" = "--enable-fmpool" ] ; then 
-#   host_libs="$host_libs hdf/fmpool"
-#fi
-#done
-#echo "host libs are $host_libs"
-
-## We assign ${configdirs} this way to remove all embedded newlines.  This
-## is important because configure will choke if they ever get through.
-#
-configdirs=`echo ${host_libs}`
-
-#
-#Directories we want configure to generate Makefiles from Makefile.in
-#
-subdirs="hdf man hdf/src hdf/test hdf/util hdf/pablo mfhdf mfhdf/xdr mfhdf/libsrc mfhdf/dumper mfhdf/nctest mfhdf/ncgen mfhdf/ncdump mfhdf/fortran mfhdf/doc mfhdf/pablo"
-
-################################################################################
-
-srctrigger=move-if-change
-srcname="HDF/netCDF library"
-
-# This gets set non-empty for some net releases of packages.
-appdirs=""
-
-# per-host:
-
-# Work in distributions for each host makefile fragment
-host_makefile_frag=""
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  *-*-linux*|*-*-gnu*)	  host_makefile_frag=config/mh-linux ;;
-  alpha-*-*)         	  host_makefile_frag=config/mh-alpha ;;
-  mips*-dec-ultrix*)      host_makefile_frag=config/mh-decstation ;;
-  mips*-sgi-irix6.*)      host_makefile_frag=config/mh-irix6 ;;
-  mips*-sgi-irix6_32*)    host_makefile_frag=config/mh-irix32 ;;
-  mips*-sgi-irix5*)       host_makefile_frag=config/mh-irix5 ;;
-  mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
-  i[3456]86-*-freebsd*)   host_makefile_frag=config/mh-fbsd ;;
-  ia64-*-*)               host_makefile_frag=config/mh-ia64 ;;
-  *-ibm-aix*)             host_makefile_frag=config/mh-aix ;;
-  i386-*-solaris2*)       host_makefile_frag=config/mh-solarisx86 ;;
-  *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
-  *-sun-*)                host_makefile_frag=config/mh-sun ;;
-  *-hp-hpux11*)           host_makefile_frag=config/mh-hpux11 ;;
-  *-hp-hpux*)             host_makefile_frag=config/mh-hpux ;;
-  *-convex-bsd*)          host_makefile_frag=config/mh-convex ;;
-  *-cray-unicos*)         host_makefile_frag=config/mh-unicos ;;
-  t3*-cray-craympp)       host_makefile_frag=config/mh-t3e ;;
-  S370-fujitsu-sysv*)     host_makefile_frag=config/mh-fujivp ;;
-  *-mac-*)                host_makefile_frag=config/mh-mac ;;
-esac
-fi
-
-# Check for valid platfroms before we continue
-if [ "${host_makefile_frag}" = "" ] ; then
-    echo '***' "The HDF/netCDF library is not supported on host ${host}" 1>&2
-    exit 1
-fi
-
-# make sure makefile fragment is there
-if [ ! -f ${srcdir}/${host_makefile_frag} ]; then
-    echo '***' "We are missing makefile fragment ${host_makefile_frag}" 1>&2
-    echo '***' "Please read the installation docs" 1>&2
-    exit 1
-fi
-
-
-# The Solaris /usr/ucb/cc compiler does not appear to work.
-case "${host}" in
-  sparc-sun-solaris2*)
-      if [ "`/usr/bin/which ${CC-cc}`" = "/usr/ucb/cc" ] ; then
-          could_use=
-          [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
-          if [ -d /opt/cygnus/bin ] ; then
-              if [ "$could_use" == "" ] ; then
-                  could_use="/opt/cygnus/bin"
-              else
-                  could_use="$could_use or /opt/cygnus/bin"
-              fi
-          fi
-        if [ "$could_use" = "" ] ; then
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc.  You should change your PATH or CC "
-            echo "variable and rerun configure."
-        else
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc, when you should use the C compiler from"
-            echo "$could_use.  You should change your"
-            echo "PATH or CC variable and rerun configure."
-        fi
-      fi
-  ;;
-esac
-
-# per-target:
-
-# 
-# Set proper files that need to linked to the correct pre-generated
-# configuration files. These are mainly on the MFHDF side as 
-# the HDF side stuff is taken care of in the configure.in found
-# in two directories hdf/fmpool and hdf/jpeg respectively.
-files=
-links="mfhdf/libsrc/netcdf.h mfhdf/fortran/jackets.c mfhdf/fortran/netcdf.inc mfhdf/fortran/ftest.f"
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  *-*-linux*|*-*-gnu*)    files="mfhdf/libsrc/config/netcdf-linux.h mfhdf/fortran/config/jackets-linux.c mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/config/ftest-linux.f" ;;
-  alpha-*-*)              files="mfhdf/libsrc/config/netcdf-alpha.h mfhdf/fortran/config/jackets-alpha.c mfhdf/fortran/config/netcdf-alpha.inc mfhdf/fortran/config/ftest-alpha.f" ;;
-  mips*-dec-ultrix*)      files="mfhdf/libsrc/config/netcdf-dec.h mfhdf/fortran/config/jackets-dec.c mfhdf/fortran/config/netcdf-dec.inc mfhdf/fortran/config/ftest-dec.f" ;;
-  mips*-sgi-irix6.*)      files="mfhdf/libsrc/config/netcdf-irix6.h mfhdf/fortran/config/jackets-irix6.c mfhdf/fortran/config/netcdf-irix6.inc mfhdf/fortran/config/ftest-irix6.f" ;;
-  mips*-sgi-irix6_32*)    files="mfhdf/libsrc/config/netcdf-irix32.h mfhdf/fortran/config/jackets-irix32.c mfhdf/fortran/config/netcdf-irix32.inc mfhdf/fortran/config/ftest-irix32.f" ;;
-  mips*-sgi-irix5*)       files="mfhdf/libsrc/config/netcdf-irix5.h mfhdf/fortran/config/jackets-irix5.c mfhdf/fortran/config/netcdf-irix5.inc mfhdf/fortran/config/ftest-irix5.f" ;;
-  mips*-sgi-irix4*)       files="mfhdf/libsrc/config/netcdf-irix4.h mfhdf/fortran/config/jackets-irix4.c mfhdf/fortran/config/netcdf-irix4.inc mfhdf/fortran/config/ftest-irix4.f" ;;
-  i[3456]86-*-freebsd*)   files="mfhdf/libsrc/config/netcdf-fbsd.h mfhdf/fortran/config/jackets-fbsd.c mfhdf/fortran/config/netcdf-fbsd.inc mfhdf/fortran/config/ftest-fbsd.f" ;;
-  ia64-*-*)               files="mfhdf/libsrc/config/netcdf-ia64.h mfhdf/fortran/config/jackets-ia64.c mfhdf/fortran/config/netcdf-ia64.inc mfhdf/fortran/config/ftest-ia64.f" ;;
-  *-ibm-aix*)             files="mfhdf/libsrc/config/netcdf-aix.h mfhdf/fortran/config/jackets-aix.c mfhdf/fortran/config/netcdf-aix.inc mfhdf/fortran/config/ftest-aix.f" ;;
-  i386-*-solaris2*)       files="mfhdf/libsrc/config/netcdf-solarisx86.h mfhdf/fortran/config/jackets-solarisx86.c mfhdf/fortran/config/netcdf-solarisx86.inc mfhdf/fortran/config/ftest-solarisx86.f" ;;
-  *-*-solaris2*)          files="mfhdf/libsrc/config/netcdf-solaris.h mfhdf/fortran/config/jackets-solaris.c mfhdf/fortran/config/netcdf-solaris.inc mfhdf/fortran/config/ftest-solaris.f";;
-  *-sun-*)		          files="mfhdf/libsrc/config/netcdf-sun.h mfhdf/fortran/config/jackets-sun.c mfhdf/fortran/config/netcdf-sun.inc mfhdf/fortran/config/ftest-sun.f";;
-  *-hp-hpux*)             files="mfhdf/libsrc/config/netcdf-hpux.h mfhdf/fortran/config/jackets-hpux.c mfhdf/fortran/config/netcdf-hpux.inc mfhdf/fortran/config/ftest-hpux.f";;
-  *-convex-bsd*)          files="mfhdf/libsrc/config/netcdf-convex.h mfhdf/fortran/config/jackets-convex.c mfhdf/fortran/config/netcdf-convex.inc mfhdf/fortran/config/ftest-convex.f" ;;
-  *-cray-unicos*)         files="mfhdf/libsrc/config/netcdf-unicos.h mfhdf/fortran/config/jackets-unicos.c mfhdf/fortran/config/netcdf-unicos.inc mfhdf/fortran/config/ftest-unicos.f" ;;
-  t3*-cray-craympp)       files="mfhdf/libsrc/config/netcdf-t3e.h mfhdf/fortran/config/jackets-t3e.c mfhdf/fortran/config/netcdf-t3e.inc mfhdf/fortran/config/ftest-t3e.f" ;;
-  S370-fujitsu-sysv*)     files="mfhdf/libsrc/config/netcdf-fujivp.h mfhdf/fortran/config/jackets-fujivp.c mfhdf/fortran/config/netcdf-fujivp.inc mfhdf/fortran/config/ftest-fujivp.f" ;;
-  *-mac-*)		          files="mfhdf/libsrc/config/netcdf-mac.h mfhdf/fortran/config/jackets-mac.c mfhdf/fortran/config/netcdf-mac.inc mfhdf/fortran/config/ftest-mac.f" ;;
-esac
-fi
-
-# make sure host specific files are there
-#if [ ! -f ${srcdir}/${files} ]; then
-#    echo '***' "We are missing host specific customize file ${files}" 1>&2
-#    echo '***' "Please read the installation docs" 1>&2
-#    exit 1
-#fi
-
-# Decided to copy files instead of using symbolic links.
-#
-# Now for Mac and PC configurations we want to copy and not use symbolic
-# links. You can use this also for any platfrom you want.
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  *-mac-*)             symbolic_link="cp -p" ;;
-  *-win-*)             symbolic_link="cp -p" ;;
-  *)                   symbolic_link="cp" ;;
-esac
-fi
-
-# post-target:
-
-# We don't have anything
-
-#
-# Local Variables:
-# fill-column: 131
-# End:
-#

Modified: packages/libhdf4/trunk/debian/changelog
===================================================================
--- packages/libhdf4/trunk/debian/changelog	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/debian/changelog	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,3 +1,14 @@
+libhdf4 (4.2r1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+    (closes: #217010)
+  * Added new Homepage field in debian/control
+    Merges from 4.1r4 series:
+  	* Introduced versioned conflicts against libhdf4-run.
+    	(closes: #425938)
+
+ -- Francesco Paolo Lovergine <frankie at debian.org>  Fri, 28 Sep 2007 23:44:02 +0200
+
 libhdf4 (4.1r4-20) unstable; urgency=low
 
   * New maintainership team. Added myself as uploader.

Modified: packages/libhdf4/trunk/debian/control
===================================================================
--- packages/libhdf4/trunk/debian/control	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/debian/control	2007-09-28 21:58:13 UTC (rev 1125)
@@ -5,13 +5,14 @@
 Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
 Build-depends: g77, sharutils, libjpeg62-dev, zlib1g-dev, bison, flex, groff, autotools-dev
 Standards-Version: 3.7.2
+Home page: http://hdfgroup.com/products/hdf4/index.html
 
 Package: libhdf4g
 Section: libs
 Priority: optional
 Architecture: any
 Depends: ${shlibs:Depends}
-Conflicts: libhdf4 (<<4.0.2-4), libhdf4g-run
+Conflicts: libhdf4 (<<4.0.2-4), libhdf4g-run (<<4.1r4-20)
 Replaces: libhdf4
 Suggests: libhdf4g-doc, libhdf4g-dev, hdf4-tools
 Description: The Hierarchical Data Format library -- library package
@@ -24,15 +25,13 @@
  can be added by the HDF developers or users.
  .
  This package contains the HDF run-time libraries.
- .
-  Home page: http://www.hdfgroup.com/
 
 Package: hdf4-tools
 Section: graphics
 Priority: optional
 Architecture: any
 Depends: ${shlibs:Depends}
-Conflicts: libhdf4 (<<4.0.2-4), libhdf4g-run
+Conflicts: libhdf4 (<<4.0.2-4), libhdf4g-run (<<4.1r4-20)
 Replaces: libhdf4, libhdf4g, libhdf4g-run
 Provides: libhdf4g-run
 Description: The Hierarchical Data Format library -- runtime package
@@ -46,8 +45,6 @@
  .
  This package includes some basic utilities to view, pack, unpack, 
  HDF files.
- .
-  Home page: http://www.hdfgroup.com/
 
 Package: libhdf4g-dev
 Section: devel
@@ -65,8 +62,6 @@
  .
  This package contains development stuff, includomg files and static 
  library for the HDF package and some HDF API reference manpages.
- .
-  Home page: http://www.hdfgroup.com/
 
 Package: libhdf4g-doc
 Section: doc
@@ -84,5 +79,3 @@
  .
  This package contains user guide and reference manual for HDF format
  and API
- .
-  Home page: http://www.hdfgroup.com/

Copied: packages/libhdf4/trunk/hdf/COPYING (from rev 832, packages/libhdf4/branches/upstream/current/hdf/COPYING)
===================================================================
--- packages/libhdf4/trunk/hdf/COPYING	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/COPYING	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,23 @@
+/*=======================================================================
+UNIVERSITY OF ILLINOIS (UI), NATIONAL CENTER FOR SUPERCOMPUTING
+APPLICATIONS (NCSA), Software Distribution Policy for Public Domain
+Software
+
+NCSA HDF Version 4.0 source code and documentation are in the public
+domain, available without fee for education, research, non-commercial and
+commercial purposes.  Users may distribute the binary or source code to
+third parties provided that this statement appears on all copies and that
+no charge is made for such copies.  
+
+UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY
+PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.  THE
+UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USER OF THIS
+SOFTWARE.  The software may have been developed under agreements between
+the UI and the Federal Government which entitle the Government to certain
+rights.
+
+By copying this program, you, the user, agree to abide by the conditions
+and understandings with respect to any software which is marked with a
+public domain notice.
+=======================================================================*/
+

Copied: packages/libhdf4/trunk/hdf/COPYRIGHT (from rev 832, packages/libhdf4/branches/upstream/current/hdf/COPYRIGHT)
===================================================================
--- packages/libhdf4/trunk/hdf/COPYRIGHT	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/COPYRIGHT	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,23 @@
+/*=======================================================================
+UNIVERSITY OF ILLINOIS (UI), NATIONAL CENTER FOR SUPERCOMPUTING
+APPLICATIONS (NCSA), Software Distribution Policy for Public Domain
+Software
+
+NCSA HDF Version 3.3 source code and documentation are in the public
+domain, available without fee for education, research, non-commercial and
+commercial purposes.  Users may distribute the binary or source code to
+third parties provided that this statement appears on all copies and that
+no charge is made for such copies.  
+
+UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY
+PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.  THE
+UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USER OF THIS
+SOFTWARE.  The software may have been developed under agreements between
+the UI and the Federal Government which entitle the Government to certain
+rights.
+
+By copying this program, you, the user, agree to abide by the conditions
+and understandings with respect to any software which is marked with a
+public domain notice.
+=======================================================================*/
+

Deleted: packages/libhdf4/trunk/hdf/MAKE.COM
===================================================================
--- packages/libhdf4/trunk/hdf/MAKE.COM	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/MAKE.COM	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,108 +0,0 @@
-! ****************************************************************************
-! * NCSA HDF                                                                 *
-! * Software Development Group                                               *
-! * National Center for Supercomputing Applications                          *
-! * University of Illinois at Urbana-Champaign                               *
-! * 605 E. Springfield, Champaign IL 61820                                   *
-! *                                                                          *
-! * For conditions of distribution and use, see the accompanying             *
-! * hdf/COPYING file.                                                        *
-! *                                                                          *
-! ***************************************************************************
-!
-! $Id: MAKE.COM,v 1.15 1996/03/25 17:53:34 sxu Exp $
-!
-! $ !
-! $ ! Build the entire HDF library
-! $ !
-! $ !
-! $ ! The following defines should be used to tell VMS where to
-! $ !   place the resulting HDF library, include files, and utilites
-! $ !   These directories will not be created, you must create them
-! $ !   by hand.
-! $ !
-$ create/dir [-.lib]
-$ create/dir [-.include]
-$ create/dir [-.bin]
-$ define/nolog hdf$src     mrlxp4$dka200:[folk.dev.hdf.src]   ! HDF src
-$ define/nolog hdf$util    mrlxp4$dka200:[folk.dev.hdf.util]  ! HDF utilities
-$ define/nolog hdf$test    mrlxp4$dka200:[folk.dev.hdf.test]  ! HDF test programs
-$ define/nolog jpeg$src    mrlxp4$dka200:[folk.dev.hdf.jpeg]  !
-$ define/nolog zlib$src    mrlxp4$dka200:[folk.dev.hdf.zlib]  !
-$ define/nolog hdf$lib     mrlxp4$dka200:[folk.dev.lib]df ! Location and name for lib
-$ define/nolog jpeg$lib     mrlxp4$dka200:[folk.dev.lib]libjpeg.olb
-$ define/nolog zlib$lib     mrlxp4$dka200:[folk.dev.lib]libz.olb
-$ define/nolog hdf$include mrlxp4$dka200:[folk.dev.include] ! Where to put includes
-$ define/nolog hdf$bin     mrlxp4$dka200:[folk.dev.bin]   ! Where to put executables
-$ !
-$ define/nolog sys$clib sys$library:vaxcrtl
-$ !
-$ ! Makefile for VAX/VMX systems.
-$ !
-$ ! Make jpeg library
-$  type sys$input
-  ======== Building jpeg library =======
-$ set def jpeg$src
-$ copy jconfig.vms jconfig.h
-$ copy makefile.vms make.com
-$ @make
-$ copy libjpeg.olb jpeg$lib
-$ copy jconfig.h hdf$include
-$ copy jerror.h hdf$include
-$ copy jmorecfg.h  hdf$include
-$ copy jpeglib.h  hdf$include
-$ delete *.obj;*
-$ delete *.exe;*
-$!
-$ ! Make gzip library
-$  type sys$input
-  ======== Building gzip library =======
-$ set def zlib$src
-$ copy make_vms.com make.com
-$ @make
-$ copy libz.olb zlib$lib
-$ copy zconf.h hdf$include
-$ copy zlib.h  hdf$include
-$ delete *.obj;*
-$ delete *.exe;*
-$ !
-$ ! Make full df lib (with fortran stubs)
-$ type sys$input
-  ======== Building HDF 4.0 ========
-$ !              
-$ ! Build the base HDF library
-$ !
-$ set def hdf$src
-$ @MAKENOF
-$ !
-$ ! If you do not want to include the HDF Fortran interfaces, comment
-$ !   out the following command.
-$ !
-$ @MAKEFS
-$ !
-$ ! Move the files to their correct destinations
-$ !
-$ copy df.olb hdf$lib
-$ copy *.h    hdf$include
-$ delete *.obj;*
-$ !
-$ ! Build the HDF utility programs
-$ !
-$ set default hdf$util
-$ @MAKEUTIL
-$ !
-$ ! Move the HDF utilities to where they belong
-$ !
-$ copy *.exe hdf$bin
-$ delete *.obj;*
-$ !
-$ @setuputils
-$ !
-$ ! Build the test programs
-$ !
-$ set default hdf$test
-$ @MAKE
-$ !
-$ delete *.obj;*
-$ type sys$input
-  ======== HDF 4.0 has now been built ========

Copied: packages/libhdf4/trunk/hdf/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/hdf/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/hdf/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1 @@
+SUBDIRS=src test util

Modified: packages/libhdf4/trunk/hdf/Makefile.in
===================================================================
--- packages/libhdf4/trunk/hdf/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,286 +1,429 @@
-# Makefile for HDF
-#
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+ at SET_MAKE@
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = src test util
+subdir = hdf
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in COPYING Makefile.am
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ETAGS = etags
+ETAGSFLAGS =
 
-#defaults
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+CTAGS = ctags
+CTAGSFLAGS =
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+tags: TAGS
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	else \
+	  include_option=--include; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# ############# End of system configuration section. ###############
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-PACKAGE	 = HDF
-VERSION  = 4.0
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in COPYING build.inc
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
-SUBDIRS= src fmpool pablo test util
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-HDFINC= $(srcdir)/src
-HDFLIB= $(srcdir)/src
-HDFBIN= $(srcdir)/bin
-PABLO_HINC= $(srcdir)/pablo
-FMPOOL_INC= $(srcdir)/fmpool
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-#
-#
-# Flags to recursively send
-#
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        PABLO_FLAGS="$(PABLO_FLAGS)" \
-        PABLO_INCLUDE="$(PABLO_INCLUDE)" \
-        MACHINE="$(MACHINE)" 
+clean-generic:
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-#
-#
-# General rules
-#
-all:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src pablo fmpool util test" subd
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
 
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool util test" subd
+clean-am: clean-generic mostlyclean-am
 
-rebuild rebuildnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src pablo fmpool util test" subd
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-libnofortran:
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=nofortran \
-	  SUBDIRS="src pablo fmpool" subd
+dvi: dvi-recursive
 
-libnostub: libnofortran
+dvi-am:
 
-allnostub: allnofortran
+info: info-recursive
 
-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool" subd
+info-am:
 
-libdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src" subd
+install-data-am:
 
-utilities:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool util" subd
+install-exec-am:
 
-hdf-test:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool test" subd
+install-info: install-info-recursive
 
-hdf-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool test" subd
+install-man:
 
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool test" subd
+installcheck-am:
 
-test-hdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdf \
-          SUBDIRS="test" subd
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-test-hdfnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdfnofortran \
-          SUBDIRS="test" subd
+mostlyclean: mostlyclean-recursive
 
-test-hdffortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdffortran \
-          SUBDIRS="test" subd
+mostlyclean-am: mostlyclean-generic
 
-test-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="util" subd
+pdf: pdf-recursive
 
-install:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-lib \
-          SUBDIRS="src pablo fmpool" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="util" subd
+pdf-am:
 
-install-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-lib \
-          SUBDIRS="src pablo fmpool" subd
+ps: ps-recursive
 
-install-includes:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-includes \
-          SUBDIRS="src pablo fmpool" subd
+ps-am:
 
-install-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="util" subd
+uninstall-am: uninstall-info-am
 
-perfs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src perf fmpool" subd
+uninstall-info: uninstall-info-recursive
 
-#install:      $(INSTALL_DIRS)
-#	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-#          SUBDIRS="src util test" subd
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive distclean \
+	distclean-generic distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+	ps-recursive tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-info-recursive uninstall-recursive
 
-debug:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=debug \
-          SUBDIRS="src fmpool test" subd
-
-saber:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=saber \
-          SUBDIRS="src test" subd
-
-clean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src pablo fmpool util test" subd
-	-$(RM) $(RMFLAGS) core *.log
-
-distclean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src pablo fmpool util test" subd
-	-$(RM) $(RMFLAGS) core *.log
-	-$(RM) -rf bin lib include config.status Makefile
-
-# for recusive make in subdirs
-subd:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-
-# for auto remaking, see toplevel Makefile
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
-
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes HDF package"
-	@echo "make allnofortran - makes HDF package excluding fortran support"
-	@echo "make libnofortran - makes HDF library excluding fortran support"
-	@echo "make testnofortran - makes HDF library and tests"
-	@echo "                     excluding fortran support"
-	@echo "make hdf-test      - makes HDF library and tests"
-	@echo "make utilities     - makes HDF library and utilities"
-	@echo "make libs          - makes HDF libraries only"
-	@echo "make libdf         - makes HDF library "
-	@echo "make test-hdf          - run HDF library tests " 
-	@echo "make test-hdfnofortran - run HDF library tests except the fortran test " 
-	@echo "make test-hdffortran   - run HDF library fortran tests only " 
-	@echo "make test-utils        - run HDF utilities test"
-	@echo "make install           - install HDF library, "
-	@echo "                         utilites, and includes " 
-	@echo "make install-libs      - install HDF library and includes " 
-	@echo "make install-includes  - install HDF includes " 
-	@echo "make install-utils     - install HDF utilities " 
-	@echo "make clean     - cleans up HDF packages(*.o,libdf.a,..)"
-	@echo "make distclean - cleans up HDF packages including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
-
-

Copied: packages/libhdf4/trunk/hdf/README.33r4 (from rev 832, packages/libhdf4/branches/upstream/current/hdf/README.33r4)
===================================================================
--- packages/libhdf4/trunk/hdf/README.33r4	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/README.33r4	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,31 @@
+
+In general, HDF 4.0 can be built with a single command from this 
+directory.  The file Makefile is a generic, machine independent 
+Makefile which you can modify if there is no Makefile already built 
+for your machine.
+
+For convenience, there are also machine customized makefiles.  For
+example MAKE.IBM6000 is a Makefile suitable for compiling HDF
+on an IBM RS/6000.
+
+Assuming you are on an IBM RS/6000:
+
+cp MAKE.IBM6000 Makefile
+
+make    
+make all 
+        --- builds HDF library and the C and Fortran interfaces, the 
+                utilities and C and Fortran test programs.
+
+make allnofortran   
+        --- builds the HDF library and only the C interfaces, the
+                utilities and the C test programs.
+
+make libdf
+        --- builds the HDF library and the C and Fortran interfaces
+
+make utilities
+        --- builds only the utility programs
+
+make tests
+        --- builds all of the test programs

Deleted: packages/libhdf4/trunk/hdf/build.inc
===================================================================
--- packages/libhdf4/trunk/hdf/build.inc	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/build.inc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,133 +0,0 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ***************************************************************************
-#
-# $Id: build.inc,v 1.6 1995/05/17 02:57:40 georgev Exp $
-#
-# ##################################################################
-#
-#
-# This is the top level Makefile to build HDF 4.0 on Unix based
-#       platforms
-#
-
-#
-#
-# Flags to recursively send
-#
-
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" \
-        HDFLIB="$(HDFLIB)" \
-        HDFINC="$(HDFINC)" \
-	HDFBIN="$(HDFBIN)"	
-
-#
-#
-# General rules
-#
-all:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src jpeg util test" subd message 
-
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src jpeg util test" subd message 
-
-rebuild rebuildnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src jpeg util test" subd message 
-
-libnofortran:
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=nofortran \
-	  SUBDIRS="src jpeg" subd message
-
-libnostub: libnofortran
-
-allnostub: allnofortran
-
-libdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src" subd
-
-libjpeg:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="jpeg" subd
-
-utilities:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg util" subd
-
-tests:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg test" subd
-
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src jpeg test" subd message 
-
-perfs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg perf" subd
-
-#install:      $(INSTALL_DIRS)
-#	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-#          SUBDIRS="src util test" subd
-
-debug:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=debug \
-          SUBDIRS="src jpeg test" subd message 
-
-saber:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=saber \
-          SUBDIRS="src jpeg test" subd
-
-clean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg util test" subd
-	$(RM) $(RMFLAGS) core *.log
-
-distclean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg util test" subd
-	$(RM) $(RMFLAGS) core *.log
-	$(RM) -rf bin lib include
-
-subd:
-	@for dir in $(SUBDIRS); do \
-		(cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-		$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
-
-message:
-	@echo ""
-	@echo "***********************************************************"
-	@echo " HDF 4.0 library successfully created."
-	@echo ""
-	@echo "If you have any old vset files (v 1.0) you must use vcompat"
-	@echo "to make them compatible with Vset 2.0 applications"
-	@echo ""
-	@echo "User programs can be created as follows:"
-	@echo ""
-	@echo "   ${CC} program.c libdf.a -o program"
-	@echo ""
-	@echo "***********************************************************"
-	@echo ""
-

Modified: packages/libhdf4/trunk/hdf/fmpool/Makefile.in
===================================================================
--- packages/libhdf4/trunk/hdf/fmpool/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/fmpool/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -114,7 +114,6 @@
 HDFINC= $(srcdir)/../src
 HDFLIB= $(srcdir)/../src
 HDFBIN= $(srcdir)/../bin
-PABLO_DIR= $(srcdir)/../pablo
 
 #### makefile fragment from 'config/' goes here ##############
 ## ------------------------ end of makefile fragments--------------------
@@ -152,13 +151,6 @@
 	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) pall; \
 	fi
 
-pall::         FORCE
-	@if test -z "$(PABLO_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libfmpool.a; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libfmpool.a pablolib; \
-	fi
-
 libfmpool.a: $(LIBOBJECTS) $(HDFLIB)/libdf.a
 	$(RM) $(RMFLAGS) libfmpool.a
 	$(AR) $(ARFLAGS) libfmpool.a  $(LIBOBJECTS)
@@ -173,12 +165,6 @@
 	$(AR) $(ARFLAGS) libfmpool.a  $(LIBOBJECTS)
 	$(AR2) libfmpool.a
 
-pablolib: $(LIBOBJECTS) $(PABLO_DIR)/libdf-inst.a
-	if test -f $(PABLO_DIR)/libdf-inst.a ; then \
-	  $(AR) rcuv $(PABLO_DIR)/libdf-inst.a $(LIBOBJECTS); \
-	  $(RANLIB) $(PABLO_DIR)/libdf-inst.a ; \
-	fi
-
 tfmp: ${INCLUDES} fmpconf.h test_fmpio.c libfmpool.a
 	${CC} $(CFLAGS)  ${AUXFLAGS} -I. -c test_fmpio.c 
 	$(LN) $(LDFLAGS) -o tfmp $(TOBJECTS) libfmpool.a $(LDLIBS)

Copied: packages/libhdf4/trunk/hdf/src/INSTALL (from rev 832, packages/libhdf4/branches/upstream/current/hdf/src/INSTALL)
===================================================================
--- packages/libhdf4/trunk/hdf/src/INSTALL	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/src/INSTALL	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,75 @@
+***********************************************************************
+			NCSA HDF version 4.1
+***********************************************************************
+
+     ---------------- Invoking the Makefile ------------------ 
+
+A Makefile is provided for building HDF4.1.  Open the Makefile
+in your editor and read the instructions at the top of the file.
+The section marked PORTING INSTRUCTIONS indicates that you need
+to modify certain lines in order to configure the Makefile for your
+particular system.
+
+Make targets available are :
+make            -- compile and install library 
+make all        -- compile and install library
+make libdf.a    -- compile library
+make nofortran  -- compile and install library, only C interface
+make libnostub  -- same as make nofortran
+make libnofortran  -- compile library and only C interface
+make install_it    -- install library 
+make clean      -- rm intermediate files
+make cleanup    -- rm all make products
+
+
+    --------------- Compiling Subsets of HDF ---------------
+
+In order to use HDF, you must compile the C routines using the
+following modules: hfile.c, hfile.h, hdf.h, hdfi.h, herr.c, herr.h,
+hkit.c and hproto.h.  You can omit various other routines by
+deleting references to certain files from the makefile, as
+follows:
+
+ To omit selected fortran interfaces, delete all references to
+     fortran files that contain those interfaces (xxx.f) and 
+     their object files (xxx.o).
+
+Similarly:
+
+  To omit DFR8 routines, delete files that begin dfr8...
+  To omit DF24 routines, delete files that begin df24...
+  To omit DFP  routines, delete files that begin dfp...
+  To omit DFSD routines, delete files that begin dfsd...
+  To omit DFAN routines, delete files that begin dfan...
+  To omit Vset routines, delete files that begin v...
+  To omit conversion routines (currently only used by DFSD
+     and Vset), delete files that begin dfconv...
+  To omit the routines that emulate the old lower layer
+     of HDF, delete df.h, dfi.h, df.c, dfF.c and dfFf.f
+
+
+     ------------ Compiling C programs with HDF ----------------
+
+To use HDF routines in your program, you must have the line
+'#include "hdf.h"' near the beginning of your code.  You may also
+need to include additional header files (eg. dfrig.h or dfsd.h, etc),
+depending on the interfaces you are using.  Call the appropriate
+HDF routines as described in the documentation. 
+Compile a C program called "myprog.c" as follows:
+
+    cc myprog.c libdf.a -o myprog
+or
+    cc myprog.c -o myprog -ldf
+
+If the include files are in the directory "incdir", and the 
+library file "libdf.a" is in "libdir", use
+
+    cc -Iincdir myprog.c libdir/libdf.a -o myprog
+or
+    cc -Iincdir myprog.c -o myprog -L libdir -ldf
+
+
+    ------------ Testing HDF ----------------
+
+A partial test suite should be included in this distribution.
+A Makefile and instructions are included with this test suite.

Copied: packages/libhdf4/trunk/hdf/src/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/hdf/src/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/hdf/src/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/src/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,48 @@
+#############################################################################
+##                          Library to build                               ##
+#############################################################################
+
+lib_LIBRARIES = libdf.a
+
+FSOURCES = df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c    \
+           dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c  \
+           hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c vgff.f 
+CSOURCES = atom.c bitvect.c cdeflate.c cnbit.c cnone.c crle.c cskphuff.c    \
+           cszip.c df24.c df24f.c dfan.c dfcomp.c dfconv.c dfgr.c dfgroup.c \
+           dfimcomp.c dfjpeg.c dfkconv.c dfkcray.c dfkfuji.c dfknat.c       \
+           dfkswap.c dfkvms.c dfp.c dfr8.c dfrle.c dfsd.c dfstubs.c         \
+           dfufp2i.c dfunjpeg.c dfutil.c dynarray.c glist.c hbitio.c        \
+           hblocks.c hbuffer.c hchunks.c hcomp.c hcompri.c hdfalloc.c       \
+           herr.c hextelt.c hfile.c hfiledd.c hkit.c linklist.c mcache.c    \
+           mfan.c mfgr.c mstdio.c tbbt.c vattr.c vconv.c vg.c vgp.c vhi.c   \
+           vio.c vparse.c vrw.c vsfld.c
+
+CHEADERS = atom.h bitvect.h cdeflate.h cnbit.h cnone.h cskphuff.h crle.h    \
+           cszip.h df.h dfan.h dfi.h dfgr.h dfrig.h dfsd.h dfstubs.h        \
+           dfufp2i.h dynarray.h h4config.h hbitio.h hchunks.h hcomp.h       \
+           hcompi.h hconv.h hdf.h hdfi.h herr.h hfile.h hkit.h hlimits.h    \
+           hntdefs.h hproto.h  htags.h linklist.h mfan.h mfgr.h mstdio.h    \
+           tbbt.h vattr.h vg.h
+FHEADERS = dffunc.f90 hdf.f90 dffunc.inc hdf.inc
+
+if HDF_BUILD_FORTRAN
+libdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+include_HEADERS = $(CHEADERS) $(FHEADERS)
+else
+libdf_a_SOURCES = $(CSOURCES)
+include_HEADERS = $(CHEADERS)
+endif
+
+SUFFIXES = .inc .f90
+.inc.f90:
+	if test -f $<; then                                             \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90; \
+	else                                                            \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $(srcdir)/$< > $*.f90; \
+	fi
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = dffunc.f90 hdf.f90

Modified: packages/libhdf4/trunk/hdf/src/Makefile.in
===================================================================
--- packages/libhdf4/trunk/hdf/src/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,519 +1,665 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ***************************************************************************
-#
-# $Id: Makefile.in,v 1.28 2000/08/29 11:04:27 acheng Exp $
-#
-# ##################################################################
-#
-#           MAKEFILE for creating the HDF library, libdf.a,
-#
-# This makefile creates the following FORTRAN and C interfaces 
-# for HDF in a library called "libdf.a": 
-#
-#              DFR8   (8-bit raster image sets)
-#              DF24   (24-bit raster image sets)
-#              DFP    (palettes)
-#              DFSD   (scientific data sets)
-#              DFAN   (annotations)
-#              V      (vsets)
-#
-# See the file INSTALL for further information on how to invoke
-# this makefile.
-#
-# This release of HDF marks the first use of a new set of lower
-# level routines.  The makefile also creates these interfaces,
-# which are available in C only.  These routines are categorized 
-# as follows:
-#
-#              H      (new lower level i/o)
-#              DF     (emulation of old lower level i/o routines)
-#              HD     (lower level utilities for developers)
-#              HE     (lower level error-handling)
-#              HD     (lower level utilities, for developers)
-#              DFK    (conversion routines)
-#
-# ##################################################################
-#
-#
-# PORTING INSTRUCTIONS
-# You must modify the lines marked "# ==>".
-#
-#
-# These values will typically be over ridden by values passed 
-#   down from the top level HDF makefile
-#
-#
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+ at SET_MAKE@
 
-program_transform_name =
+#############################################################################
+#############################################################################
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+lib_LIBRARIES = libdf.a
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+FSOURCES = df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c    \
+           dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c  \
+           hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c vgff.f 
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+CSOURCES = atom.c bitvect.c cdeflate.c cnbit.c cnone.c crle.c cskphuff.c    \
+           cszip.c df24.c df24f.c dfan.c dfcomp.c dfconv.c dfgr.c dfgroup.c \
+           dfimcomp.c dfjpeg.c dfkconv.c dfkcray.c dfkfuji.c dfknat.c       \
+           dfkswap.c dfkvms.c dfp.c dfr8.c dfrle.c dfsd.c dfstubs.c         \
+           dfufp2i.c dfunjpeg.c dfutil.c dynarray.c glist.c hbitio.c        \
+           hblocks.c hbuffer.c hchunks.c hcomp.c hcompri.c hdfalloc.c       \
+           herr.c hextelt.c hfile.c hfiledd.c hkit.c linklist.c mcache.c    \
+           mfan.c mfgr.c mstdio.c tbbt.c vattr.c vconv.c vg.c vgp.c vhi.c   \
+           vio.c vparse.c vrw.c vsfld.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+CHEADERS = atom.h bitvect.h cdeflate.h cnbit.h cnone.h cskphuff.h crle.h    \
+           cszip.h df.h dfan.h dfi.h dfgr.h dfrig.h dfsd.h dfstubs.h        \
+           dfufp2i.h dynarray.h h4config.h hbitio.h hchunks.h hcomp.h       \
+           hcompi.h hconv.h hdf.h hdfi.h herr.h hfile.h hkit.h hlimits.h    \
+           hntdefs.h hproto.h  htags.h linklist.h mfan.h mfgr.h mstdio.h    \
+           tbbt.h vattr.h vg.h
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+FHEADERS = dffunc.f90 hdf.f90 dffunc.inc hdf.inc
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+ at HDF_BUILD_FORTRAN_TRUE@libdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+ at HDF_BUILD_FORTRAN_FALSE@libdf_a_SOURCES = $(CSOURCES)
+ at HDF_BUILD_FORTRAN_TRUE@include_HEADERS = $(CHEADERS) $(FHEADERS)
+ at HDF_BUILD_FORTRAN_FALSE@include_HEADERS = $(CHEADERS)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+SUFFIXES = .inc .f90
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+#############################################################################
+#############################################################################
+DISTCLEANFILES = dffunc.f90 hdf.f90
+subdir = hdf/src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-TARGETLIB = libdf.a
+libdf_a_AR = $(AR) cru
+libdf_a_LIBADD =
+am__libdf_a_SOURCES_DIST = atom.c bitvect.c cdeflate.c cnbit.c cnone.c \
+	crle.c cskphuff.c cszip.c df24.c df24f.c dfan.c dfcomp.c \
+	dfconv.c dfgr.c dfgroup.c dfimcomp.c dfjpeg.c dfkconv.c \
+	dfkcray.c dfkfuji.c dfknat.c dfkswap.c dfkvms.c dfp.c dfr8.c \
+	dfrle.c dfsd.c dfstubs.c dfufp2i.c dfunjpeg.c dfutil.c \
+	dynarray.c glist.c hbitio.c hblocks.c hbuffer.c hchunks.c \
+	hcomp.c hcompri.c hdfalloc.c herr.c hextelt.c hfile.c hfiledd.c \
+	hkit.c linklist.c mcache.c mfan.c mfgr.c mstdio.c tbbt.c \
+	vattr.c vconv.c vg.c vgp.c vhi.c vio.c vparse.c vrw.c vsfld.c \
+	df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c \
+	dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c \
+	hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c \
+	vgff.f
+am__objects_1 = atom.$(OBJEXT) bitvect.$(OBJEXT) cdeflate.$(OBJEXT) \
+	cnbit.$(OBJEXT) cnone.$(OBJEXT) crle.$(OBJEXT) \
+	cskphuff.$(OBJEXT) cszip.$(OBJEXT) df24.$(OBJEXT) \
+	df24f.$(OBJEXT) dfan.$(OBJEXT) dfcomp.$(OBJEXT) \
+	dfconv.$(OBJEXT) dfgr.$(OBJEXT) dfgroup.$(OBJEXT) \
+	dfimcomp.$(OBJEXT) dfjpeg.$(OBJEXT) dfkconv.$(OBJEXT) \
+	dfkcray.$(OBJEXT) dfkfuji.$(OBJEXT) dfknat.$(OBJEXT) \
+	dfkswap.$(OBJEXT) dfkvms.$(OBJEXT) dfp.$(OBJEXT) dfr8.$(OBJEXT) \
+	dfrle.$(OBJEXT) dfsd.$(OBJEXT) dfstubs.$(OBJEXT) \
+	dfufp2i.$(OBJEXT) dfunjpeg.$(OBJEXT) dfutil.$(OBJEXT) \
+	dynarray.$(OBJEXT) glist.$(OBJEXT) hbitio.$(OBJEXT) \
+	hblocks.$(OBJEXT) hbuffer.$(OBJEXT) hchunks.$(OBJEXT) \
+	hcomp.$(OBJEXT) hcompri.$(OBJEXT) hdfalloc.$(OBJEXT) \
+	herr.$(OBJEXT) hextelt.$(OBJEXT) hfile.$(OBJEXT) \
+	hfiledd.$(OBJEXT) hkit.$(OBJEXT) linklist.$(OBJEXT) \
+	mcache.$(OBJEXT) mfan.$(OBJEXT) mfgr.$(OBJEXT) mstdio.$(OBJEXT) \
+	tbbt.$(OBJEXT) vattr.$(OBJEXT) vconv.$(OBJEXT) vg.$(OBJEXT) \
+	vgp.$(OBJEXT) vhi.$(OBJEXT) vio.$(OBJEXT) vparse.$(OBJEXT) \
+	vrw.$(OBJEXT) vsfld.$(OBJEXT)
+am__objects_2 = df24ff.$(OBJEXT) dfanf.$(OBJEXT) dfanff.$(OBJEXT) \
+	dff.$(OBJEXT) dfff.$(OBJEXT) dfpf.$(OBJEXT) dfpff.$(OBJEXT) \
+	dfr8f.$(OBJEXT) dfr8ff.$(OBJEXT) dfsdf.$(OBJEXT) \
+	dfsdff.$(OBJEXT) dfufp2if.$(OBJEXT) dfutilf.$(OBJEXT) \
+	herrf.$(OBJEXT) hfilef.$(OBJEXT) hfileff.$(OBJEXT) \
+	mfanf.$(OBJEXT) mfgrf.$(OBJEXT) mfgrff.$(OBJEXT) \
+	vattrf.$(OBJEXT) vattrff.$(OBJEXT) vgf.$(OBJEXT) vgff.$(OBJEXT)
+ at HDF_BUILD_FORTRAN_TRUE@am_libdf_a_OBJECTS = $(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_FALSE@am_libdf_a_OBJECTS = $(am__objects_1)
+libdf_a_OBJECTS = $(am_libdf_a_OBJECTS)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/atom.Po ./$(DEPDIR)/bitvect.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdeflate.Po ./$(DEPDIR)/cnbit.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cnone.Po ./$(DEPDIR)/crle.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cskphuff.Po ./$(DEPDIR)/cszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/df24.Po ./$(DEPDIR)/df24f.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfan.Po ./$(DEPDIR)/dfanf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfcomp.Po ./$(DEPDIR)/dfconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dff.Po ./$(DEPDIR)/dfgr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfgroup.Po ./$(DEPDIR)/dfimcomp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfjpeg.Po ./$(DEPDIR)/dfkconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfkcray.Po ./$(DEPDIR)/dfkfuji.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfknat.Po ./$(DEPDIR)/dfkswap.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfkvms.Po ./$(DEPDIR)/dfp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfpf.Po ./$(DEPDIR)/dfr8.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfr8f.Po ./$(DEPDIR)/dfrle.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfsd.Po ./$(DEPDIR)/dfsdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfstubs.Po ./$(DEPDIR)/dfufp2i.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfunjpeg.Po ./$(DEPDIR)/dfutil.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfutilf.Po ./$(DEPDIR)/dynarray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/glist.Po ./$(DEPDIR)/hbitio.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hblocks.Po ./$(DEPDIR)/hbuffer.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hchunks.Po ./$(DEPDIR)/hcomp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hcompri.Po ./$(DEPDIR)/hdfalloc.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/herr.Po ./$(DEPDIR)/herrf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hextelt.Po ./$(DEPDIR)/hfile.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hfiledd.Po ./$(DEPDIR)/hfilef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hkit.Po ./$(DEPDIR)/linklist.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mcache.Po ./$(DEPDIR)/mfan.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfanf.Po ./$(DEPDIR)/mfgr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfgrf.Po ./$(DEPDIR)/mstdio.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tbbt.Po ./$(DEPDIR)/vattr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vattrf.Po ./$(DEPDIR)/vconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vg.Po ./$(DEPDIR)/vgf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vgp.Po ./$(DEPDIR)/vhi.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vio.Po ./$(DEPDIR)/vparse.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vrw.Po ./$(DEPDIR)/vsfld.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__libdf_a_SOURCES_DIST)
+HEADERS = $(include_HEADERS)
 
-# ############# End of system configuration section. ###############
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.in INSTALL \
+	Makefile.am h4config.h.in
+SOURCES = $(libdf_a_SOURCES)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+all: h4config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
-# ==> specify directories where to find inludes and library
-#     HDF library, and HDF utilities
-HDFINC= $(srcdir)/../src
-HDFLIB= $(srcdir)/../src
-HDFBIN= $(srcdir)/../bin
+.SUFFIXES:
+.SUFFIXES: .inc .f90 .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/src/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ==> specify where to find the JPEG include files and library
-JPEGINC=$(srcdir)/../jpeg
-JPEGLIB=$(srcdir)/../jpeg
+h4config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
 
-# ==> specify where to find the Pablo include and source files 
-PABLO_HINC=$(srcdir)/../pablo
-PABLO_SRC=$(srcdir)/../pablo
+stamp-h1: $(srcdir)/h4config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status hdf/src/h4config.h
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+$(srcdir)/h4config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/h4config.h.in
 
-ALL_CFLAGS = -I. $(CFLAGS) $(FMPOOL_FLAGS)
-LINTFLAGS=
-SHAR=shar
-ARCHIVE=hdf.shar
+distclean-hdr:
+	-rm -f h4config.h stamp-h1
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in src.inc $(HDRS) $(CSRCS) $(FSRCS) $(FINCS) \
-	win32hdf.mak hdfnof.bld hdfnofw3.lbc hdfnofwc.lbc \
-	hdfw386.lbc hdfwcc.lbc makepc.msc makepc.386 makepc.wcc makewin.msc
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-#
-#include the source file definitions
-#
-include src.inc
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libdf.a: $(libdf_a_OBJECTS) $(libdf_a_DEPENDENCIES) 
+	-rm -f libdf.a
+	$(libdf_a_AR) libdf.a $(libdf_a_OBJECTS) $(libdf_a_LIBADD)
+	$(RANLIB) libdf.a
 
-HINCS = $(HDRS) $(FINCS)
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-#.SUFFIXES:
-.SUFFIXES: .sho .c.o .f.o .c.sho .f.sho .installed .finstalled
+distclean-compile:
+	-rm -f *.tab.c
 
-# This rule causes ansi2knr to be invoked.
-#@ISANSICOM at .c.o:
-#@ISANSICOM@	./ansi2knr $(srcdir)/$*.c T$*.c
-#@ISANSICOM@	$(CC) $(CFLAGS) -c T$*.c
-#@ISANSICOM@	$(RM) $(RMFLAGS) T$*.c $*.o
-#@ISANSICOM@	$(MV) T$*.o $*.o
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bitvect.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdeflate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cnbit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cnone.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crle.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cskphuff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/df24.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/df24f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfan.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfanf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfgroup.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfimcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfjpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkcray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkfuji.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfknat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkswap.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkvms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfpf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfr8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfr8f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfrle.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfsdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfstubs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfufp2i.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfunjpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfutil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfutilf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dynarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/glist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hbitio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hblocks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hbuffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hchunks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hcompri.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfalloc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/herr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/herrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hextelt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfiledd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfilef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hkit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linklist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mcache.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfan.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfanf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfgrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mstdio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tbbt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vattrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vgf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vgp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vhi.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vparse.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vrw.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vsfld.Po at am__quote@
 
-#ansi2knr: ansi2knr.c
-#	$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
 .c.o:
-	$(CC) $(CPPFLAGS) $(ALL_CFLAGS) -D_REENTRANT -c $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-.c.sho:
-	$(CC) $(CPPFLAGS) $(ALL_CFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
 .f.o:
-	$(FC) $(FFLAGS) -D_REENTRANT -c $<
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-.f.sho:
-	$(FC) $(FFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# Rules to make Free format Fortran90 include files from F77 include files
-# 1) change all col. 1 [Cc] to '!'
-# 2) change all col. 6 continuation character to '&'
-#
-.SUFFIXES:	.inc .f90
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
-.inc.f90:
-	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
+ETAGS = etags
+ETAGSFLAGS =
 
-.PHONY : all nofortran libnostub clean distclean debug saber lint
+CTAGS = ctags
+CTAGSFLAGS =
 
+tags: TAGS
 
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) libnofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) rall ; \
-	esac
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-rall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libdf.a libdf.so; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" libdf.a libdf.so; \
-	fi
+TAGS:  $(HEADERS) $(SOURCES) h4config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) h4config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-libnofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) nofort-libdf.a nofort-libdf.so; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" nofort-libdf.a nofort-libdf.so; \
-	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) h4config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) h4config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-libdf.a: $(COBJS) $(FOBJS)
-	-$(RM) $(RMFLAGS) libdf.a
-#	$(AR) $(ARFLAGS) libdf.a `lorder '$(COBJS) $(FOBJS)' | tsort `
-	$(AR) $(ARFLAGS) libdf.a $(COBJS) $(FOBJS)
-	$(RANLIB) libdf.a
-#	$(LD) -b -o libdf.sl $(COBJS) $(FOBJS)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-nofort-libdf.a: $(COBJS)
-	-$(RM) $(RMFLAGS) libdf.a
-#	$(AR) $(ARFLAGS) libdf.a `lorder $(COBJS) | tsort `
-	$(AR) $(ARFLAGS) libdf.a $(COBJS)
-	$(RANLIB) libdf.a
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-libdf.so: libdf.so.$(somajor)
-	ln -sf $^ $@
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS) h4config.h
 
-libdf.so.$(somajor): libdf.so.$(sominor)
-	ln -sf $^ $@
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-ifeq ($(NOFORTRANINSOLIB),)
-libdf.so.$(sominor): $(COBJS:%.o=%.sho) $(FOBJS:%.o=%.sho)
-else
-libdf.so.$(sominor): $(COBJS:%.o=%.sho)
-	@echo "### Temporary Debian hack: build solib without fortran"
-endif
-	$(CC) -shared -Wl,-soname,libdf.so.$(somajor) -o $@ $^ -lz -ljpeg -lc
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-nofort-libdf-inst.a:   $(COBJS) $(PCOBJS)
-	-$(RM) $(RMFLAGS) libdf-inst.a libdf.a
-	$(AR) $(ARFLAGS) libdf-inst.a  $(COBJS) $(PCOBJS)
-	$(RANLIB) libdf-inst.a
-	ln -s libdf-inst.a libdf.a
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
+clean-generic:
 
-#libnostub nofortran: libnofortran .finstalled
-libnostub nofortran: libnofortran 
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-$(FOBJS): $(FRC)
+distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
+	distclean-tags
 
-#debug: libdf.a .installed
-debug: libdf.a 
+dvi: dvi-am
 
-saber:
-	#load -D$(MACHINE) $(CSRCS) $(TSRCS) -lc
+dvi-am:
 
-install: install-lib install-headers
+info: info-am
 
-install-includes: install-headers
+info-am:
 
-install-lib: install-headers
-	$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
-	( cd $(libdir) ; $(RANLIB) $(libdir)/$(TARGETLIB).n )
-	mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
-	cp -a libdf.so* $(libdir)/
+install-data-am: install-includeHEADERS
 
-install-headers: FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) install-headers-nofort;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) install-headers-all; \
-	esac
+install-exec-am: install-libLIBRARIES
 
-install-headers-all: $(HDRS) $(FINCS)
-	for p in $(HDRS) $(FINCS); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(includedir)/$$p; \
-	done
+install-info: install-info-am
 
-install-headers-nofort: $(HDRS)
-	for p in $(HDRS); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(includedir)/$$p; \
-	done
+install-man:
 
-.installed: libdf.a
-	-if (test \! -d $(HDFINC)) then (mkdir $(HDFINC) ) fi
-	-cp $(HDRS) $(FINCS) $(HDFINC)
-	-if (test \! -d $(HDFLIB)) then (mkdir $(HDFLIB) ) fi
-	-cp libdf.a $(HDFLIB)
-	-$(RANLIB) $(HDFLIB)/libdf.a
-	-touch .installed
+installcheck-am:
 
-.finstalled: libnofortran
-	-if (test \! -d $(HDFINC)) then (mkdir $(HDFINC) ) fi
-	-cp $(HDRS) $(FINCS) $(HDFINC)
-	-if (test \! -d $(HDFLIB)) then (mkdir $(HDFLIB) ) fi
-	-cp libdf.a $(HDFLIB)
-	-$(RANLIB) $(HDFLIB)/libdf.a
-	-touch .finstalled
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-depend:
-	makedepend -fMakefile -- $(CSRCS)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-clean:
-	-$(RM) $(RMFLAGS) *.o *.sho $(F90INCS) 
+mostlyclean: mostlyclean-am
 
-distclean:
-	-$(RM) $(RMFLAGS) *.o *.sho libdf.a config.status Makefile $(F90INCS) \
-		libdf.so*
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-lint: $(SRCS) $(R8SRCS)
-	$(LINT) $(LINTFLAGS) $(SRCS)
+pdf: pdf-am
 
-TAGS: $(SRCS) $(HDRS)
-	etags $(SRCS) $(HDRS)
+pdf-am:
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/src
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+ps: ps-am
 
-# for auto remaking, see toplevel Makefile
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
+ps-am:
 
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
+
+.inc.f90:
+	if test -f $<; then                                             \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90; \
+	else                                                            \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $(srcdir)/$< > $*.f90; \
+	fi
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes HDF library"
-	@echo "make libdf.a      - makes HDF library "
-	@echo "make libnofortran - makes HDF library excluding fortran support"
-	@echo "make rebuild      - rebuilds HDF library "
-	@echo "make rebuildnofortran - rebuilds HDF library excluding"
-	@echo "                        fortran support "
-	@echo "make install          - install HDF library, "
-	@echo "                        and includes " 
-	@echo "make install-includes - install HDF includes "
-	@echo "make clean     - cleans up HDF library(*.o,libdf.a,..)"
-	@echo "make distclean - cleans up HDF library including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
-
-#$(ARCHIVE): ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS)
-#       $(RM) $(RMFLAGS) $(ARCHIVE)
-#       $(SHAR) $(ARCHIVE) ChangeLog Makefile $(SRCS) $(HDRS) \
-#               $(TSRCS) $(USRCS)
-
-#archive: $(ARCHIVE)
-
-#backup: ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS)
-#       cp ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS) $(BDIR)
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-hfile.o: hdf.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hfile.o: hfile.h $(FRC)
-herr.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-herr.o: $(FRC)
-hblocks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hblocks.o: hfile.h $(FRC)
-hextelt.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hextelt.o: hfile.h $(FRC)
-hkit.o: hdf.h hlimits.h hdfi.h hbitio.h
-hkit.o: hcomp.h herr.h hproto.h hfile.h hkit.h $(FRC)
-dfan.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfan.o: hfile.h dfan.h $(FRC)
-dfr8.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-dfr8.o: dfrig.h $(FRC)
-dfcomp.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-dfcomp.o: $(FRC)
-dfrle.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfrle.o: $(FRC)
-dfimcomp.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h
-dfimcomp.o: hproto.h $(FRC)
-dfjpeg.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfjpeg.o: $(FRC)
-dfunjpeg.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-dfunjpeg.o: hproto.h $(FRC)
-dfp.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfp.o: hfile.h $(FRC)
-dfgr.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfgr.o: dfgr.h $(FRC)
-df24.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-df24.o: dfgr.h $(FRC)
-dfsd.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfsd.o: dfsd.h hfile.h $(FRC)
-dfgroup.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfgroup.o: hfile.h $(FRC)
-dfconv.o: hdf.h hlimits.h hdfi.h hbitio.h
-dfconv.o: hcomp.h herr.h hproto.h hconv.h $(FRC)
-dfufp2i.o: hdf.h hlimits.h hdfi.h hbitio.h
-dfufp2i.o: hcomp.h herr.h hproto.h dfufp2i.h dfsd.h $(FRC)
-vg.o: vg.h hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-vg.o: tbbt.h $(FRC)
-vrw.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-vrw.o: vg.h tbbt.h hfile.h $(FRC)
-vio.o: vg.h hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h
-vio.o: hproto.h tbbt.h hfile.h $(FRC)
-vparse.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vparse.o: hproto.h tbbt.h $(FRC)
-vconv.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vconv.o: hproto.h tbbt.h $(FRC)
-vsfld.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vsfld.o: hproto.h tbbt.h $(FRC)
-vgp.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vgp.o: hproto.h tbbt.h hfile.h $(FRC)
-vhi.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vhi.o: hproto.h tbbt.h $(FRC)
-dfutil.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfutil.o: $(FRC)
-dfstubs.o: dfstubs.h df.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h
-dfstubs.o: herr.h hproto.h $(FRC)
-dfknat.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfknat.o: hconv.h $(FRC)
-dfkswap.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkswap.o: hconv.h $(FRC)
-dfkcray.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkcray.o: hconv.h $(FRC)
-dfkvms.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkvms.o: hconv.h $(FRC)
-dfkconv.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkconv.o: hconv.h $(FRC)
-dfkfuji.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkfuji.o: hconv.h $(FRC)
-hbitio.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hbitio.o: hfile.h $(FRC)
-tbbt.o:  hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-tbbt.o: tbbt.h $(FRC)
-atom.o:  hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-atom.o: atom.h $(FRC)
-hdfalloc.o: hdf.h hlimits.h hdfi.h  hbitio.h
-hdfalloc.o: hcomp.h herr.h hproto.h hfile.h $(FRC)
-hcomp.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hcomp.o: hfile.h hcompi.h mstdio.h cnone.h crle.h cnbit.h cskphuff.h cdeflate.h $(FRC)
-crle.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-crle.o: hfile.h hcompi.h mstdio.h crle.h  $(FRC)
-cnbit.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cnbit.o: hfile.h hcompi.h mstdio.h cnbit.h $(FRC)
-mstdio.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mstdio.o: hfile.h hcompi.h mstdio.h $(FRC)
-cnone.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cnone.o: hfile.h hcompi.h mstdio.h cnone.h $(FRC)
-cskphuff.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cskphuff.o: hfile.h hcompi.h mstdio.h cskphuff.h $(FRC)
-cdeflate.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cdeflate.o: hfile.h hcompi.h mstdio.h cdeflate.h $(FRC)
-hblocks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hblocks.o: hfile.h $(FRC)
-mfan.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mfan.o: hfile.h mfan.h $(FRC)
-mfanf.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mfanf.o: hfile.h mfan.h $(FRC)
-mfgr.o: hdf.h hlimits.h hdfi.h herr.h hproto.h hfile.h mfgr.h $(FRC)
-hchunks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hchunks.o: hfile.h hchunks.h mcache.h hqueue.h $(FRC)
-mcache.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mcache.o: hfile.h mcache.h hqueue.h
-vattr.o:  hdf.h hlimits.h hdfi.h herr.h hproto.h vg.h

Modified: packages/libhdf4/trunk/hdf/src/atom.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/atom.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/atom.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,11 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.7 $";
+static char RcsId[] = "@(#)$Revision: 1.9 $";
 #endif
 
 
-/* $Id: atom.c,v 1.7 1999/06/16 21:10:38 dwells Exp $ */
+/* $Id: atom.c,v 1.9 2005/01/09 20:53:43 mcgrath Exp $ */
 
 /*
 FILE
@@ -64,9 +64,6 @@
 #include "atom.h"
 #include <assert.h>
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_atom_c
-#endif
 /* Private function prototypes */
 static atom_info_t *HAIfind_atom(atom_t atm);
 
@@ -96,10 +93,6 @@
     atom_group_t *grp_ptr=NULL;     /* ptr to the atomic group */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAinit_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if((grp<=BADGROUP || grp>=MAXGROUP) && hash_size>0)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -110,16 +103,7 @@
 #endif /* ATOMS_CACHE_INLINE */
 
 #ifdef HASH_SIZE_POWER_2
-    /* If anyone knows a faster test for a power of two, please change this silly code -QAK */
-    if(!(hash_size==2 || hash_size==4 || hash_size==8 || hash_size==16
-            || hash_size==32 || hash_size==64 || hash_size==128 || hash_size==256
-            || hash_size==512 || hash_size==1024 || hash_size==2048
-            || hash_size==4096 || hash_size==8192 || hash_size==16374
-            || hash_size==32768 || hash_size==65536 || hash_size==131072
-            || hash_size==262144 || hash_size==524288 || hash_size==1048576
-            || hash_size==2097152 || hash_size==4194304 || hash_size==8388608
-            || hash_size==16777216 || hash_size==33554432 || hash_size==67108864
-            || hash_size==134217728 || hash_size==268435456))
+    if(hash_size & (hash_size-1))
         HGOTO_ERROR(DFE_ARGS, FAIL);
 #endif /* HASH_SIZE_POWER_2 */
 
@@ -160,9 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAinit_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAinit_group() */
@@ -188,10 +169,6 @@
     atom_group_t *grp_ptr=NULL;     /* ptr to the atomic group */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAdestroy_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -228,9 +205,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAdestroy_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAdestroy_group() */
@@ -262,10 +236,6 @@
     uintn hash_loc;                 /* new item's hash table location */
     atom_t ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAregister_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -302,9 +272,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAregister_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAregister_atom() */
@@ -337,10 +304,6 @@
     atom_info_t *atm_ptr=NULL;      /* ptr to the new atom */
     VOIDP ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAatom_object);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
 #ifndef ATOMS_CACHE_INLINE
@@ -380,9 +343,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAatom_object);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAatom_object() */
@@ -404,10 +364,6 @@
     CONSTR(FUNC, "HAatom_group");	/* for HERROR */
     group_t ret_value=BADGROUP;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAatom_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     ret_value=ATOM_TO_GROUP(atm);
     if(ret_value<=BADGROUP || ret_value>=MAXGROUP)
@@ -420,9 +376,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAatom_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAatom_group() */
@@ -452,10 +405,6 @@
 #endif /* ATOMS_ARE_CACHED */
     VOIDP ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAremove_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     grp=ATOM_TO_GROUP(atm);
     if(grp<=BADGROUP || grp>=MAXGROUP)
@@ -513,9 +462,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAremove_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAremove_atom() */
@@ -545,10 +491,6 @@
     intn i;                         /* local counting variable */
     void * ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAsearch_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, NULL);
@@ -576,9 +518,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAsearch_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAsearch_atom() */

Copied: packages/libhdf4/trunk/hdf/src/cszip.c (from rev 832, packages/libhdf4/branches/upstream/current/hdf/src/cszip.c)
===================================================================
--- packages/libhdf4/trunk/hdf/src/cszip.c	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/src/cszip.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1080 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#ifdef RCSID
+static char RcsId[] = "@(#)$Revision: 1.9 $";
+#endif
+
+/* $Id: cszip.c,v 1.9 2005/01/08 20:12:34 mcgrath Exp $ */
+
+/* General HDF includes */
+
+#include "hdf.h"
+
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+#define CSZIP_MASTER
+#define CODER_CLIENT
+/* HDF compression includes */
+#include "hcompi.h"     /* Internal definitions for compression */
+
+/* internal defines */
+#define TMP_BUF_SIZE    8192    /* size of throw-away buffer */
+
+/* declaration of the functions provided in this module */
+PRIVATE int32 HCIcszip_staccess
+            (accrec_t * access_rec, int16 acc_mode);
+
+PRIVATE int32 HCIcszip_init
+            (accrec_t * access_rec);
+
+PRIVATE int32 HCIcszip_decode
+            (compinfo_t * info, int32 length, uint8 *buf);
+
+PRIVATE int32 HCIcszip_encode
+            (compinfo_t * info, int32 length, const uint8 *buf);
+
+PRIVATE int32 HCIcszip_term
+            (compinfo_t * info);
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_init -- Initialize a SZIP compressed data element.
+
+ USAGE
+    int32 HCIcszip_init(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called by HCIcszip_staccess and HCIcszip_seek
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_init(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCIcszip_init");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+#ifndef H4_HAVE_LIBSZ
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+#endif
+
+    info = (compinfo_t *) access_rec->special_info;
+    if (Hseek(info->aid, 0, DF_START) == FAIL)  /* seek to beginning of element */
+        HRETURN_ERROR(DFE_SEEKERROR, FAIL);
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* Initialize SZIP state information */
+    szip_info->szip_state = SZIP_INIT;     /* start in initial state */
+    if (szip_info->buffer_size != 0) {
+        szip_info->buffer_size = 0;   /* offset into the file */
+        if (szip_info->buffer != NULL) {
+		HDfree(szip_info->buffer);
+		szip_info->buffer = NULL;
+        }
+    }
+    szip_info->offset = 0;   /* offset into the file */
+    szip_info->szip_dirty=SZIP_CLEAN;
+
+    return (SUCCEED);
+}   /* end HCIcszip_init() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_decode -- Decode SZIP compressed data into a buffer.
+
+ USAGE
+    int32 HCIcszip_decode(info,length,buf)
+    compinfo_t *info;   IN: the info about the compressed element
+    int32 length;       IN: number of bytes to read into the buffer
+    uint8 *buf;         OUT: buffer to store the bytes read
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to decode SZIP data from the file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_decode(compinfo_t * info, int32 length, uint8 *buf)
+{
+    CONSTR(FUNC, "HCIcszip_decode");
+    accrec_t *access_rec;
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8 *in_buffer;
+    uint8 *out_buffer;
+    int32 in_length;
+    int32 out_length;
+    int bytes_per_pixel;
+    int32 rbytes;
+    uint16 tag,ref;
+    int32 len1;
+    int32 aid;
+    int32 status;
+    size_t size_out;
+    uint8 *cp;
+    int32 good_bytes;
+    int32 old_way;
+#ifdef H4_HAVE_LIBSZ
+    SZ_com_t sz_param;
+#endif
+
+#ifdef H4_HAVE_LIBSZ
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state == SZIP_INIT) {
+	/*  Load from disk, decode the data */
+
+	if ((access_rec = HAatom_object(info->aid)) == NULL)    /* get the access_rec pointer */
+	    HRETURN_ERROR(DFE_ARGS, FAIL);
+
+	/* Discover how much data must be read */
+	if(HTPinquire(access_rec->ddid,&tag,&ref,NULL,&in_length)==FAIL)
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+        if (in_length == -1)
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+        if (tag & 0x4000) {
+	    /* this is linked list -- get the length of the data */
+            aid = Hstartread(access_rec->file_id, tag, ref);
+            if (HDinqblockinfo(aid, &len1, NULL, NULL, NULL) == FAIL) {
+	       Hendaccess(aid);
+	       HRETURN_ERROR(DFE_INTERNAL, FAIL);
+            }
+            in_length = len1; 
+	    Hendaccess(aid);
+        }
+
+	old_way = (int)(szip_info->options_mask & SZ_H4_REV_2);
+	if (old_way == 0) {
+		/* special case: read data encoded in V4.2r0 */
+		old_way = 1;
+		good_bytes = in_length;
+                in_length = in_length+5;
+	        if ((in_buffer = (uint8 *) HDmalloc(in_length)) == NULL)
+    	           HRETURN_ERROR(DFE_NOSPACE, FAIL);
+		cp = in_buffer;
+		*cp = 0;
+		cp++;
+		INT32ENCODE(cp, good_bytes);
+	} else {
+		/*  V4.2r1: in_length is correct */
+		old_way = 0;
+	        if ((in_buffer = (uint8 *) HDmalloc(in_length)) == NULL)
+    	           HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	}
+
+        /* Allocate memory for the uncompressed data */
+	bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+	if (bytes_per_pixel == 3)
+		bytes_per_pixel++;
+
+        out_length = szip_info->pixels * bytes_per_pixel;
+	if ((out_buffer = (uint8 *) HDmalloc(out_length)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+	/* Read the unompressed data */
+	if (old_way == 1) {
+		/* this is encoded in V4.2r0 */
+		/* the preamble isn't in the file, so read only the data */
+		if ((rbytes = Hread(info->aid, in_length-5, in_buffer+5)) == FAIL)
+		{
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+		if (rbytes == 0 || rbytes != (in_length - 5)) {
+			/* is this possible? */
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+	} else {
+		/* HDF4.2R1: read the data plus preamble */
+		if ((rbytes = Hread(info->aid, in_length, in_buffer)) == FAIL)
+		{
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+		if (rbytes == 0 || rbytes != in_length) {
+			/* is this possible? */
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+	}
+        cp = in_buffer;
+        cp++;
+        INT32DECODE(cp, good_bytes);
+	if (in_buffer[0] == 1) {
+           /* This byte means the data was not compressed -- just copy out */
+	    szip_info->szip_state = SZIP_RUN;
+	    HDmemcpy(out_buffer, in_buffer+5, good_bytes);
+	    szip_info->buffer = out_buffer;
+	    szip_info->buffer_pos = 0;
+	    szip_info->buffer_size = good_bytes;
+	    szip_info->offset = 0;
+	    if (good_bytes > length) {
+		/* partial read */
+		HDmemcpy(buf, in_buffer+5, length);
+	        szip_info->buffer_pos += length;
+	        szip_info->buffer_size -= length;
+	    } else {
+		/* read the whole data block to the user buffer */
+		HDmemcpy(buf, in_buffer+5, good_bytes);
+	        szip_info->buffer_pos += good_bytes;
+	        szip_info->buffer_size -= good_bytes;
+	    }
+	    szip_info->offset = szip_info->buffer_pos;
+	    HDfree(in_buffer);
+	    if (szip_info->buffer_size == 0) {
+		if (szip_info->buffer != NULL) {
+		   HDfree(szip_info->buffer);
+		   szip_info->buffer = NULL;
+		}
+	    }
+	    return (SUCCEED);
+        }
+
+	/* Decompress the data */
+     
+        /* set up the parameters */
+	sz_param.options_mask = (szip_info->options_mask & ~SZ_H4_REV_2);
+	sz_param.bits_per_pixel = szip_info->bits_per_pixel;
+	sz_param.pixels_per_block = szip_info->pixels_per_block;
+	sz_param.pixels_per_scanline = szip_info->pixels_per_scanline;
+	size_out = out_length;
+	if(SZ_OK!= (status = SZ_BufftoBuffDecompress(out_buffer, &size_out, (in_buffer+5), good_bytes, &sz_param)))
+         {
+		HDfree(out_buffer);
+		HDfree(in_buffer);
+		HRETURN_ERROR(DFE_CDECODE, FAIL);
+        }
+
+	if (size_out != out_length) {
+	   /* This should never happen?? */
+	   printf("status: %d ??bytes != out_length %d != %d\n",status,size_out,out_length);
+	}
+
+        /* The data is successfully decompressed. Put into the szip struct */
+	 HDfree(in_buffer);
+	 szip_info->szip_state = SZIP_RUN;
+	 szip_info->buffer = out_buffer;
+	 szip_info->buffer_pos = 0;
+	 szip_info->buffer_size = out_length;
+	 szip_info->offset = 0;
+    }
+
+   /* copy the data into the return buffer */
+    if (length > szip_info->buffer_size)
+    {	
+        /*  can't happen?? panic?? */
+	if (szip_info->buffer != NULL) {
+            HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+        } 
+        return (FAIL);
+    }
+
+    HDmemcpy(buf, szip_info->buffer + szip_info->buffer_pos, length);
+    szip_info->buffer_pos += length;
+    szip_info->buffer_size -= length;
+    szip_info->offset = szip_info->buffer_pos;
+
+    if (szip_info->buffer_size == 0) {
+       if (szip_info->buffer != NULL) {
+  	    HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+       }
+    }
+
+    return (SUCCEED);
+
+#else /* ifdef H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_decode() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_encode -- Encode data from a buffer into SZIP compressed data
+
+ USAGE
+    int32 HCIcszip_encode(info,length,buf)
+    compinfo_t *info;   IN: the info about the compressed element
+    int32 length;       IN: number of bytes to store from the buffer
+    const uint8 *buf;         OUT: buffer to get the bytes from
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to encode SZIP data into a file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_encode(compinfo_t * info, int32 length, const uint8 *buf)
+{
+    CONSTR(FUNC, "HCIcszip_encode");
+    int bytes_per_pixel;
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    int32 buffer_size;
+
+#ifdef H4_HAVE_LIBSZ
+    if (SZ_encoder_enabled() == 0) 
+        HRETURN_ERROR(DFE_NOENCODER, FAIL);
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state == SZIP_INIT) {
+	/* Need to initialize */
+	bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+	if (bytes_per_pixel == 3)
+		bytes_per_pixel = 4;
+
+	buffer_size = szip_info->pixels * bytes_per_pixel;
+	if ((szip_info->buffer = HDmalloc(buffer_size)) == NULL)
+			HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	
+	szip_info->buffer_size = buffer_size;
+	szip_info->buffer_pos = 0;
+	szip_info->szip_state = SZIP_RUN;
+    }
+
+    /* copy the data into the buffer.  This wil be written in 'term' function */
+    HDmemcpy(szip_info->buffer + szip_info->buffer_pos, buf, length);
+    szip_info->buffer_pos += length;
+    szip_info->buffer_size -= length;
+    szip_info->offset = szip_info->buffer_pos; 
+    szip_info->szip_dirty=SZIP_DIRTY;
+
+    return (SUCCEED);
+
+#else /* ifdef H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTDECOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_encode() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_term -- Flush encoded data from internal buffer to SZIP compressed data
+
+ USAGE
+    int32 HCIcszip_term(info)
+    compinfo_t *info;   IN: the info about the compressed element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to flush SZIP data into a file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_term(compinfo_t * info)
+{
+    CONSTR(FUNC, "HCIcszip_term");
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8 *out_buffer;
+    uint8 *ob;
+    int32 out_buffer_size;
+    int bytes_per_pixel;
+    int32 current_size;
+    accrec_t *access_rec;
+    uint16 tag,ref;
+    int32 len1;
+    int32 aid;
+#ifdef H4_HAVE_LIBSZ
+    SZ_com_t sz_param;
+#endif
+    size_t size_out;
+    int32 status;
+    uint8 *cp;
+
+#ifdef H4_HAVE_LIBSZ
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state != SZIP_RUN)
+	return (SUCCEED); /* nothing to do */
+
+    if (szip_info->szip_dirty != SZIP_DIRTY) /* Should never happen?? */
+    {
+	    if (szip_info->buffer_size == 0) {
+                if (szip_info->buffer != NULL) {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	return (SUCCEED);
+    }
+
+    szip_info->szip_state = SZIP_TERM;
+
+    current_size = 0;
+    if ((access_rec = HAatom_object(info->aid)) == NULL)    /* get the access_rec pointer */
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+    /* Discover how much data must be read */
+    if(HTPinquire(access_rec->ddid,&tag,&ref,NULL, &current_size)==FAIL)
+	HRETURN_ERROR(DFE_INTERNAL, FAIL);
+    if (tag & 0x4000) {
+    /* this is linked list -- get the length of the data */
+        aid = Hstartread(access_rec->file_id, tag, ref);
+        if (HDinqblockinfo(aid, &len1, NULL, NULL, NULL) == FAIL) 
+        {
+            Hendaccess(aid);
+	    HRETURN_ERROR(DFE_INTERNAL, FAIL);
+        }
+        current_size = len1; 
+	Hendaccess(aid);
+    }
+
+   /* Compute how much memory is needed to hold compressed data */
+    bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+    if (bytes_per_pixel == 3)
+	bytes_per_pixel = 4;
+
+    /* temporary buffer for compression -- leave extra space in case of
+          overflow in the SZIP algorithm. (This number corresponds to
+          the current internal buffer of szip lib.)  Sigh. */
+    /* allocate one byte to indicate when data is written uncompressed */
+    /* allocate 4 bytes to store the amount of data written:  
+        after compression may be less than the previous size  */
+    out_buffer_size = (szip_info->pixels * 2 * bytes_per_pixel) + 5;
+
+    /* heuristic for tiny data -- really shouldn't compress stuff this small,
+       but there isn't any way to prevent it from getting here */
+    if (out_buffer_size < 1024) out_buffer_size = 1024;
+    if ((out_buffer = HDmalloc(out_buffer_size)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+    /* set parms */
+    sz_param.options_mask = szip_info->options_mask;
+    sz_param.bits_per_pixel = szip_info->bits_per_pixel;
+    sz_param.pixels_per_block = szip_info->pixels_per_block;
+    sz_param.pixels_per_scanline = szip_info->pixels_per_scanline;
+    size_out = out_buffer_size - 5;
+
+    *out_buffer=0;
+    if(SZ_OK!= (status =SZ_BufftoBuffCompress((out_buffer+5), &size_out, szip_info->buffer, szip_info->buffer_pos, &sz_param)))
+    {
+       /* Compression Failed.  Analyse several cases, and clean up the mess */
+	if (size_out > out_buffer_size) {
+                /* Should never happen */
+		printf("PANIC: overwrote memory\n");fflush(stdout);
+	}
+	if (status == 2/*SZ_OUTBUF_FULL*/) {
+            /* SZIP internal overflow: data not successfully compressed */
+            /* Write out the uncompressed data */
+	    *out_buffer=1;  /* 1 = don't decompress */
+            cp = out_buffer;
+            cp++;
+            INT32ENCODE(cp, szip_info->buffer_pos);
+	    HDmemcpy((out_buffer+5), szip_info->buffer, szip_info->buffer_pos);
+	    HDfree(out_buffer);
+	    szip_info->szip_dirty=SZIP_CLEAN;
+			
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+	 } 
+
+	  /* compress failed, return error */
+          szip_info->szip_dirty=SZIP_CLEAN;
+          HDfree(out_buffer);
+	  if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+          }
+	  HRETURN_ERROR(DFE_CENCODE, FAIL);
+	}
+
+        /* Compression Succeeded, write out the compressed data */
+
+	if (size_out >= out_buffer_size) 
+		printf("PANIC: overwrote memory but returned OK?\n");fflush(stdout);
+	if (size_out > (szip_info->pixels * bytes_per_pixel)) {
+            /* The compression succeeded, but is larger than the original data! */
+	    /*  Write the original data, discard the output  */
+	    *out_buffer=1;  /* 1 = don't decompress */
+            cp = out_buffer;
+            cp++;
+            INT32ENCODE(cp, szip_info->buffer_pos);
+	    HDmemcpy((out_buffer+5), szip_info->buffer, szip_info->buffer_pos);
+	    Hwrite(info->aid, (szip_info->buffer_pos+5), out_buffer);
+	    szip_info->szip_dirty=SZIP_CLEAN;
+	    HDfree(out_buffer);
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL) {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+	}
+
+      if ((current_size > 0) && ((size_out+5) < current_size)) {
+            /* SZIP freaks out if there is junk at the end of the good data */
+            /* need to have enough data to overwrite the existing data */
+            /* allocate a buffer, fill in the good data. The rest must be
+                zeroes */
+            if ((ob = HDmalloc(current_size)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	    *ob=0;  /* data needs to be decompressed */
+            cp = ob;
+            cp++;
+            INT32ENCODE(cp, size_out); /* how much to decompress  (< total size)*/
+	    HDmemcpy((ob+5), out_buffer+5, size_out);
+	    Hwrite(info->aid, current_size, ob);  /* write out at least 'current_size' bytes */
+	    szip_info->szip_dirty=SZIP_CLEAN;
+	    HDfree(out_buffer);
+	    HDfree(ob);
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+     } 
+
+      /* Finally!  Write the compressed data. Byte 0 is '0' */ 
+    *out_buffer=0;   /* data needs to be decompressed */
+    cp = out_buffer;
+    cp++;
+    INT32ENCODE(cp, size_out);   /* whole bufer needs to be decompressed */
+    status = Hwrite(info->aid, size_out+5, out_buffer);
+
+    szip_info->szip_dirty=SZIP_CLEAN;
+    if (szip_info->buffer_size == 0) {
+	if (szip_info->buffer != NULL) {
+	    HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+        }
+    }
+    HDfree(out_buffer);
+
+    return (SUCCEED);
+
+#else /* H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_term() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_staccess -- Start accessing a SZIP compressed data element.
+
+ USAGE
+    int32 HCIcszip_staccess(access_rec, access)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int16 access;           IN: the type of access wanted
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called by HCIcszip_stread and HCIcszip_stwrite
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_staccess(accrec_t * access_rec, int16 acc_mode)
+{
+    CONSTR(FUNC, "HCIcszip_staccess");
+    compinfo_t *info;           /* special element information */
+
+#ifdef H4_HAVE_LIBSZ
+
+    info = (compinfo_t *) access_rec->special_info;
+
+    if (acc_mode == DFACC_READ)
+        info->aid = Hstartread(access_rec->file_id, DFTAG_COMPRESSED,
+                               info->comp_ref);
+    else
+	{
+	    if (SZ_encoder_enabled() == 0) 
+		HRETURN_ERROR(DFE_NOENCODER, FAIL);
+	    info->aid = Hstartaccess(access_rec->file_id, DFTAG_COMPRESSED,
+                       info->comp_ref, DFACC_RDWR|DFACC_APPENDABLE);
+	}
+
+    if (info->aid == FAIL)
+        HRETURN_ERROR(DFE_DENIED, FAIL);
+
+    return (HCIcszip_init(access_rec));  /* initialize the SZIP info */
+
+#else /* H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_DENIED, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_staccess() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_stread -- start read access for compressed file
+
+ USAGE
+    int32 HCPcszip_stread(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Start read access on a compressed data element using a simple SZIP scheme.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_stread(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_stread");
+    int32       ret;
+
+    if ((ret = HCIcszip_staccess(access_rec, DFACC_READ)) == FAIL)
+        HRETURN_ERROR(DFE_CINIT, FAIL);
+    return (ret);
+}   /* HCPcszip_stread() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_stwrite -- start write access for compressed file
+
+ USAGE
+    int32 HCPcszip_stwrite(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Start write access on a compressed data element using a simple SZIP scheme.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_stwrite(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_stwrite");
+    int32       ret;
+
+    if ((ret = HCIcszip_staccess(access_rec, DFACC_WRITE)) == FAIL)
+        HRETURN_ERROR(DFE_CINIT, FAIL);
+    return (ret);
+}   /* HCPcszip_stwrite() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_seek -- Seek to offset within the data element
+
+ USAGE
+    int32 HCPcszip_seek(access_rec,offset,origin)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 offset;       IN: the offset in bytes from the origin specified
+    intn origin;        IN: the origin to seek from [UNUSED!]
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Seek to a position with a compressed data element.  The 'origin'
+    calculations have been taken care of at a higher level, it is an
+    un-used parameter.  The 'offset' is used as an absolute offset
+    because of this.
+
+    COMMENT:
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_seek(accrec_t * access_rec, int32 offset, int origin)
+{
+    CONSTR(FUNC, "HCPcszip_seek");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8      *tmp_buf;        /* pointer to throw-away buffer */
+
+    /* shut compiler up */
+    origin = origin;
+
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    if (offset < szip_info->offset)
+      {     /* need to seek from the beginning */
+          if (szip_info->szip_dirty == SZIP_DIRTY && szip_info->szip_state != SZIP_INIT)
+{
+              if (HCIcszip_term(info) == FAIL)
+                  HRETURN_ERROR(DFE_CTERM, FAIL);
+}
+          if (HCIcszip_init(access_rec) == FAIL)
+              HRETURN_ERROR(DFE_CINIT, FAIL);
+      }     /* end if */
+
+    if ((tmp_buf = (uint8 *) HDmalloc(TMP_BUF_SIZE)) == NULL)     /* get tmp buffer */
+        HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+    while (szip_info->offset + TMP_BUF_SIZE < offset)    /* grab chunks */
+    {
+        if (HCIcszip_decode(info, TMP_BUF_SIZE, tmp_buf) == FAIL)
+          {
+              HDfree(tmp_buf);
+              HRETURN_ERROR(DFE_CDECODE, FAIL)
+          }     /* end if */
+    }
+    if (szip_info->offset < offset)  /* grab the last chunk */
+    {
+        if (HCIcszip_decode(info, offset - szip_info->offset, tmp_buf) == FAIL)
+          {
+              HDfree(tmp_buf);
+              HRETURN_ERROR(DFE_CDECODE, FAIL)
+          }     /* end if */
+    }
+
+    HDfree(tmp_buf);
+    return (SUCCEED);
+}   /* HCPcszip_seek() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_read -- Read in a portion of data from a compressed data element.
+
+ USAGE
+    int32 HCPcszip_read(access_rec,length,data)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 length;           IN: the number of bytes to read
+    void * data;             OUT: the buffer to place the bytes read
+
+ RETURNS
+    Returns the number of bytes read or FAIL
+
+ DESCRIPTION
+    Read in a number of bytes from a SZIP compressed data element.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_read(accrec_t * access_rec, int32 length, void * data)
+{
+    CONSTR(FUNC, "HCPcszip_read");
+    compinfo_t *info;           /* special element information */
+
+    info = (compinfo_t *) access_rec->special_info;
+
+    if (HCIcszip_decode(info, length, data) == FAIL)
+        HRETURN_ERROR(DFE_CDECODE, FAIL);
+
+#ifdef QAK
+printf("%s: *data=%u\n",FUNC,*(uint8 *)data);
+#endif /* QAK */
+    return (length);
+}   /* HCPcszip_read() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_write -- Write out a portion of data from a compressed data element.
+
+ USAGE
+    int32 HCPcszip_write(access_rec,length,data)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 length;           IN: the number of bytes to write
+    void * data;             IN: the buffer to retrieve the bytes written
+
+ RETURNS
+    Returns the number of bytes written or FAIL
+
+ DESCRIPTION
+    Write out a number of bytes to a SZIP compressed data element.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_write(accrec_t * access_rec, int32 length, const void * data)
+{
+    CONSTR(FUNC, "HCPcszip_write");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+    if (SZ_encoder_enabled() == 0) 
+	HRETURN_ERROR(DFE_NOENCODER, FAIL);
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* Don't allow random write in a dataset unless: */
+    /*  1 - append onto the end */
+    /*  2 - start at the beginning and rewrite (at least) the whole dataset */
+    if ((info->length != szip_info->offset)
+        && (szip_info->offset != 0 || length < info->length))
+        HRETURN_ERROR(DFE_UNSUPPORTED, FAIL);
+
+    if (HCIcszip_encode(info, length, data) == FAIL)
+        HRETURN_ERROR(DFE_CENCODE, FAIL);
+
+    return (length);
+}   /* HCPcszip_write() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_inquire -- Inquire information about the access record and data element.
+
+ USAGE
+    int32 HCPcszip_inquire(access_rec,pfile_id,ptag,pref,plength,poffset,pposn,
+            paccess,pspecial)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 *pfile_id;        OUT: ptr to file id
+    uint16 *ptag;           OUT: ptr to tag of information
+    uint16 *pref;           OUT: ptr to ref of information
+    int32 *plength;         OUT: ptr to length of data element
+    int32 *poffset;         OUT: ptr to offset of data element
+    int32 *pposn;           OUT: ptr to position of access in element
+    int16 *paccess;         OUT: ptr to access mode
+    int16 *pspecial;        OUT: ptr to special code
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Inquire information about the access record and data element.
+    [Currently a NOP].
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_inquire(accrec_t * access_rec, int32 *pfile_id, uint16 *ptag,
+                uint16 *pref, int32 *plength, int32 *poffset,
+                int32 *pposn, int16 *paccess, int16 *pspecial)
+{
+    /* shut compiler up */
+    access_rec = access_rec;
+    pfile_id = pfile_id;
+    ptag = ptag;
+    pref = pref;
+    plength = plength;
+    poffset = poffset;
+    pposn = pposn;
+    paccess = paccess;
+    pspecial = pspecial;
+
+    return (SUCCEED);
+}   /* HCPcszip_inquire() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_endaccess -- Close the compressed data element
+
+ USAGE
+    int32 HCPcszip_endaccess(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Close the compressed data element and free encoding info.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn
+HCPcszip_endaccess(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_endaccess");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* flush out SZIP buffer if there is unwritten data */
+    if (szip_info->szip_dirty == SZIP_DIRTY && szip_info->szip_state != SZIP_INIT)
+{
+        if (HCIcszip_term(info) == FAIL)
+            HRETURN_ERROR(DFE_CTERM, FAIL);
+    }
+
+    /* close the compressed data AID */
+    if (Hendaccess(info->aid) == FAIL)
+        HRETURN_ERROR(DFE_CANTCLOSE, FAIL);
+
+    return (SUCCEED);
+}   /* HCPcszip_endaccess() */
+
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPsetup_szip_parms -- Initialize SZIP parameters
+
+ USAGE
+    intn HCPcszip_setup_parms( comp_info *c_info, int32 nt, int32 ndims, int32 *dims, int32 *cdims)
+    comp_info *c_info;    IN/OUT: the szip compression params
+    int32 nt;             IN: the number type of the data
+    int32 ncomp;          IN: components in GR, 1 for SD
+    int32 ndims;          IN: The rank of the data
+    int32 *dims;          IN: the dimensions 
+    int32 *cdims;         IN: the dimensions of a chunk, if chunked, or NULL;
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    
+    Computes the SZIP parameters for dataset or chunk:
+       pixels -- total elements per compression
+       pixels_per_scanline 
+       bits_per_pixel
+    
+    This is called from SDsetcompress, SDsetchunk, GRsetcompress, GRsetchunk
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn 
+HCPsetup_szip_parms( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims)
+{
+    int32 scanline;
+    int32 npoints;
+    int32 sz;
+    int i;
+    intn       ret_value = SUCCEED;
+
+#ifdef H4_HAVE_LIBSZ
+    if (ndims <= 0) {
+          ret_value = FAIL;
+          goto done;
+    }
+
+    /* compute the number of elements in the compressed unit:
+        if chunked, compress each chunk. If not, compress whole 
+        object
+    */
+    npoints = ncomp; /* for GR24, treat as 3 D data for szip */
+    /* get npoints */
+    if (cdims == NULL ) {
+	   /* the whole array */
+        for (i = 0; i < ndims; i++) {
+	  npoints *= dims[i];
+        }
+    } else {
+	   /* elements in a single chunk */
+        for (i = 0; i < ndims; i++) {
+	  npoints *= cdims[i];
+        }
+    }
+    c_info->szip.pixels = npoints;
+
+    /* compute the pixels per scanline */
+	/* start with the n-1th dimension, allow for components of GR */
+    if (cdims == NULL ) {
+	scanline = dims[ndims - 1] * ncomp;
+    } else {
+	scanline = cdims[ndims-1] * ncomp;
+    }
+
+    /* apply restrictions to find the correct value */
+    if (scanline < c_info->szip.pixels_per_block) {
+	if (c_info->szip.pixels < c_info->szip.pixels_per_block) {
+	    ret_value = FAIL;
+	    goto done;
+	}
+	scanline = MIN((c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE), npoints);
+		
+    } else {
+	if (scanline <= SZ_MAX_PIXELS_PER_SCANLINE) {
+		scanline = MIN((c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE), scanline);
+	} else {
+		scanline = c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE;
+	}
+    }
+    c_info->szip.pixels_per_scanline = scanline;
+
+    /* compute the bits per pixel from the HDF NDT */
+    if (FAIL == (sz = DFKNTsize(nt | DFNT_NATIVE))) {
+            ret_value = FAIL;
+            goto done;
+    }
+    c_info->szip.bits_per_pixel = sz * 8;
+
+done:
+    return(ret_value);
+#else
+   /* szip not enabled */
+   return(FAIL);
+#endif
+}

Copied: packages/libhdf4/trunk/hdf/src/cszip.h (from rev 832, packages/libhdf4/branches/upstream/current/hdf/src/cszip.h)
===================================================================
--- packages/libhdf4/trunk/hdf/src/cszip.h	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/src/cszip.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,110 @@
+
+/****************************************************************************
+  * NCSA HDF                                                                 *
+  * Software Development Group                                               *
+  * National Center for Supercomputing Applications                          *
+  * University of Illinois at Urbana-Champaign                               *
+  * 605 E. Springfield, Champaign IL 61820                                   *
+  *                                                                          *
+  * For conditions of distribution and use, see the accompanying             *
+  * hdf/COPYING file.                                                        *
+  *                                                                          *
+  ****************************************************************************/
+
+/* $Id: cszip.h,v 1.4 2005/01/03 22:18:40 mcgrath Exp $ */
+
+/*-----------------------------------------------------------------------------
+  * File:    cszip.h
+  * Purpose: Header file for szip encoding information.
+  * Dependencies: should only be included from hcompi.h
+  * Invokes: none
+  * Contents: Structures & definitions for szip encoding.  This header
+  *              should only be included in hcomp.c and cszip.c.
+  * Structure definitions:
+  * Constant definitions:
+  *---------------------------------------------------------------------------*/
+
+/* avoid re-inclusion */
+#ifndef __CSZIP_H
+#define __CSZIP_H
+
+#if defined c_plusplus || defined __cplusplus
+extern      "C"
+{
+#endif                          /* c_plusplus || __cplusplus */
+
+/*
+    ** from cszip.c
+  */
+
+     extern int32 HCPcszip_stread
+                 (accrec_t * rec);
+
+     extern int32 HCPcszip_stwrite
+                 (accrec_t * rec);
+
+     extern int32 HCPcszip_seek
+                 (accrec_t * access_rec, int32 offset, int origin);
+
+     extern int32 HCPcszip_inquire
+                 (accrec_t * access_rec, int32 *pfile_id, uint16 *ptag, 
+uint16 *pref,
+                int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
+                  int16 *pspecial);
+
+     extern int32 HCPcszip_read
+                 (accrec_t * access_rec, int32 length, void * data);
+
+     extern int32 HCPcszip_write
+                 (accrec_t * access_rec, int32 length, const void * data);
+
+     extern intn HCPcszip_endaccess
+                 (accrec_t * access_rec);
+
+     extern intn HCPsetup_szip_parms
+                 ( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims);
+
+#if defined c_plusplus || defined __cplusplus
+}
+#endif                          /* c_plusplus || __cplusplus */
+
+
+/* SZIP [en|de]coding information */
+typedef struct
+{
+     int32       offset;    /* offset in the file */
+     uint8       *buffer;   /* buffer for storing SZIP bytes */
+     int32       buffer_pos;
+     int32       buffer_size;
+     int32 bits_per_pixel;
+     int32 options_mask;
+     int32 pixels;
+     int32 pixels_per_block;
+     int32 pixels_per_scanline;
+     enum
+       {
+           SZIP_INIT, SZIP_RUN,  SZIP_TERM
+       }
+     szip_state;                  /* state of the buffer storage */
+     enum { SZIP_CLEAN, SZIP_DIRTY } szip_dirty;
+}
+comp_coder_szip_info_t;
+
+#define SZ_H4_REV_2 0x10000   /* special bit to signal revised format */
+
+#ifndef CSZIP_MASTER
+extern funclist_t cszip_funcs;   /* functions to perform szip encoding */
+#else
+funclist_t  cszip_funcs =
+{                               /* functions to perform szip encoding */
+     HCPcszip_stread,
+     HCPcszip_stwrite,
+     HCPcszip_seek,
+     HCPcszip_inquire,
+     HCPcszip_read,
+     HCPcszip_write,
+     HCPcszip_endaccess
+};
+#endif
+
+#endif /* __CSZIP_H */

Modified: packages/libhdf4/trunk/hdf/src/df24.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/df24.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/df24.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.25 $";
+static char RcsId[] = "@(#)$Revision: 1.26 $";
 #endif
 
-/* $Id: df24.c,v 1.25 1999/06/16 21:10:40 dwells Exp $ */
+/* $Id: df24.c,v 1.26 2005/01/09 20:53:44 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     df24.c
@@ -51,10 +51,6 @@
 #define LUT     0
 #define IMAGE   1
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_df24_c
-#endif
-
 /*--------------------------------------------------------------------------
  NAME
     DF24getdims -- get dimensions of next image RIG
@@ -80,10 +76,6 @@
   intn        ncomps;
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24getdims);
-#endif /* HAVE_PABLO */
-
   do
     {
       if (DFGRIgetdims(filename, pxdim, pydim, &ncomps, pil, IMAGE) < 0)
@@ -102,9 +94,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24getdims);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end DF24getdims() */
@@ -129,16 +118,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24reqil);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIreqil(il, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24reqil);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24reqil() */
 
@@ -173,10 +154,6 @@
   uint16 compr_type;
   intn         ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DF24getimage);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !image || (xdim <= 0) || (ydim <= 0))
@@ -206,10 +183,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24getimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24getimage() */
 
@@ -234,17 +207,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24setdims);
-#endif /* HAVE_PABLO */
-
   dimsset = 1;
   ret_value = (DFGRIsetdims(xdim, ydim, 3, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24setdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setdims() */
 
@@ -268,16 +233,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24setil);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIsetil(il, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24setil);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setil() */
 
@@ -306,16 +263,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24setcompress);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRsetcompress(type, cinfo));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24setcompress);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setcompress() */
 
@@ -339,16 +288,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask, ID_DF24restart);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIrestart());
 
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_DF24restart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24restart() */
 
@@ -378,10 +319,6 @@
   CONSTR(FUNC, "DF24addimage");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24addimage);
-#endif /* HAVE_PABLO */
-
   /* 0 == C */
   if (!dimsset && DFGRIsetdims(xdim, ydim, 3, IMAGE) == FAIL)
     HGOTO_ERROR(DFE_BADDIM, FAIL);
@@ -396,10 +333,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_DF24addimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24addimage() */
 
@@ -429,10 +362,6 @@
   CONSTR(FUNC, "DF24putimage");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24putimage);
-#endif /* HAVE_PABLO */
-
   /* 0 == C */
   if (!dimsset && DFGRIsetdims(xdim, ydim, 3, IMAGE) == FAIL)
     HGOTO_ERROR(DFE_BADDIM, FAIL);
@@ -447,10 +376,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24putimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24putimage() */
 
@@ -482,10 +407,6 @@
   uint8       GRtbuf[64];     /* local buffer to read the ID element into */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24nimages);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* should use reopen if same file as last time - more efficient */
@@ -541,10 +462,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24nimages);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24nimages() */
 
@@ -569,16 +486,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24readref);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRreadref(filename, ref));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24readref);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }   /* end DF24readref() */
 
@@ -601,15 +510,7 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24lastref );
-#endif /* HAVE_PABLO */
- 
   ret_value = (DFGRIlastref());
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24lastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24lastref() */

Modified: packages/libhdf4/trunk/hdf/src/dfan.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/dfan.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dfan.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.41 $";
+static char RcsId[] = "@(#)$Revision: 1.43 $";
 #endif
 
-/* $Id: dfan.c,v 1.41 1999/06/16 21:10:41 dwells Exp $ */
+/* $Id: dfan.c,v 1.43 2005/01/16 21:44:07 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfan.c
@@ -58,13 +58,6 @@
 
 #include "hdf.h"
 #include "dfan.h"
-/****************************************************************************/
-/* define Pablo trace hooks                                                 */
-/****************************************************************************/
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfan_c
-#endif
-
 PRIVATE uint16 Lastref = 0;     /* Last ref read/written */
 PRIVATE uint16 Next_label_ref = 0;  /* Next file label ref to read/write */
 PRIVATE uint16 Next_desc_ref = 0;   /* Next file desc ref to read/write */
@@ -119,16 +112,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetlablen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetannlen(filename, tag, ref, DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetlablen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -160,16 +145,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetlabel);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetann(filename, tag, ref, (uint8 *) label, maxlen, DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetlabel);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -197,16 +174,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetdesclen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetannlen(filename, tag, ref, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetdesclen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -240,16 +209,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetdesc);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetann(filename, tag, ref, (uint8 *) desc, maxlen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetdesc);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -284,16 +245,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfidlen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfannlen(file_id, DFAN_LABEL, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfidlen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -323,16 +276,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfid);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfann(file_id, label, maxlen, DFAN_LABEL, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -363,16 +308,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfdslen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfannlen(file_id, DFAN_DESC, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfdslen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -402,16 +339,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfds);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfann(file_id, desc, maxlen, DFAN_DESC, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfds);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -444,17 +373,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANputlabel);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIputann(filename, tag, ref, (uint8 *) label,
                            (int32) HDstrlen(label), DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANputlabel);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -487,16 +408,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANputdesc);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIputann(filename, tag, ref, (uint8 *) desc, desclen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANputdesc);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }
 
@@ -525,16 +438,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANaddfid);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIaddfann(file_id, id, (int32) HDstrlen(id), DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANaddfid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -562,16 +467,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANaddfds);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIaddfann(file_id, desc, desclen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANaddfds);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -599,16 +496,8 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANlastref);
-#endif /* HAVE_PABLO */
-
   ret_value = (Lastref);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -648,16 +537,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANlablist);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIlablist(filename, tag, reflist, (uint8 *) labellist,
                             listsize, maxlen, startpos, 0));
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANlablist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -682,16 +563,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,ID_DFANclear);
-#endif /* HAVE_PABLO */
-
   ret_value = DFANIclear();
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANclear);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -733,10 +606,20 @@
 
   for (p=DFANdir[0]; p!=NULL; p=q) {  /* free linked list space */
     q = p->next;
+    if (p->entries != NULL)
+	    HDfree((VOIDP) p->entries);
+    p->nentries=0;
+    p->entries = NULL;
+    p->next=NULL;
     HDfree((VOIDP) p);
   }
   for (p=DFANdir[1]; p!=NULL; p=q) {
     q = p->next;
+    if (p->entries != NULL)
+	    HDfree((VOIDP) p->entries);
+    p->nentries=0;
+    p->entries = NULL;
+    p->next=NULL;
     HDfree((VOIDP) p);
   }
   DFANdir[0] = DFANdir[1] = NULL;
@@ -807,11 +690,21 @@
       for (p = DFANdir[0]; p != NULL; p = q)
         {   /* free linked list space */
           q = p->next;
+	    if (p->entries != NULL)
+		    HDfree((VOIDP) p->entries);
+	    p->nentries=0;
+	    p->entries = NULL;
+	    p->next=NULL;
           HDfree((VOIDP) p);
         }
       for (p = DFANdir[1]; p != NULL; p = q)
         {
           q = p->next;
+	    if (p->entries != NULL)
+		    HDfree((VOIDP) p->entries);
+	    p->nentries=0;
+	    p->entries = NULL;
+	    p->next=NULL;
           HDfree((VOIDP) p);
         }
       DFANdir[0] = DFANdir[1] = NULL;
@@ -893,12 +786,15 @@
       if (nanns == 0)
         HGOTO_ERROR(DFE_INTERNAL, 0);
 
-      /* allocate directory space.  Note head struct includes 1 entry */
-      DFANdir[type] = (DFANdirhead *)
-        HDmalloc(((uint32) sizeof(DFANdirhead) +
-                  (size_t)(nanns - 1) * sizeof(DFANdirentry)));
+      /* allocate directory space, and space for entries. */
+      DFANdir[type] = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead));
       if (DFANdir[type] == NULL)
         HGOTO_ERROR(DFE_NOSPACE, 0);
+      DFANdir[type]->entries = (DFANdirentry *)
+        HDmalloc( (size_t)nanns * sizeof(DFANdirentry));
+      if (DFANdir[type]->entries == NULL) 
+        HGOTO_ERROR(DFE_NOSPACE, 0);
+
       DFANdir[type]->next = NULL;
       DFANdir[type]->nentries = nanns;
 
@@ -1003,10 +899,12 @@
     }
 
   /* need new list or new node in list */
-  /* allocate directory space.  Note head struct includes 1 entry */
-  if ((q = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead) +
-               (DFAN_DEFENTRIES - 1) * sizeof(DFANdirentry))) == NULL)
+  /* allocate directory space and space for entries. */
+  if ((q = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead))) == NULL)
       HGOTO_ERROR(DFE_NOSPACE,FAIL);
+  q->entries = (DFANdirentry *) HDmalloc( DFAN_DEFENTRIES * sizeof(DFANdirentry));
+  if (q->entries == NULL)
+      HGOTO_ERROR(DFE_NOSPACE,FAIL);
 
   q->next = NULL;
   q->nentries = DFAN_DEFENTRIES;

Modified: packages/libhdf4/trunk/hdf/src/dfan.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/dfan.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dfan.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,7 +11,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: dfan.h,v 1.9 1994/06/29 13:03:51 koziol Exp $ */
+/* $Id: dfan.h,v 1.10 2005/01/16 21:44:08 mcgrath Exp $ */
 
 /*------------------------------------------------------------------------------
  * File:    dfan.h
@@ -58,7 +58,7 @@
   {
       struct DFANdirhead *next; /* list element */
       int32       nentries;     /* Numer of entries */
-      DFANdirentry entries[1];  /* actually an arbitrary size array */
+      DFANdirentry *entries;  /* actually an arbitrary size array */
   }
 DFANdirhead;
 

Modified: packages/libhdf4/trunk/hdf/src/dffunc.inc
===================================================================
--- packages/libhdf4/trunk/hdf/src/dffunc.inc	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dffunc.inc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: dffunc.inc,v 1.39 2000/02/29 20:31:45 epourmal Exp $
+C $Id: dffunc.inc,v 1.41 2001/09/29 15:47:58 epourmal Exp $
 C
 C     dffunc.inc
 C
@@ -342,6 +342,8 @@
       external sfschnk
       integer  sfscompress
       external sfscompress
+      integer  sfgcompress
+      external sfgcompress
       integer  sfisrcrd
       external sfisrcrd
       integer  sfsblsz
@@ -516,6 +518,12 @@
       external vsfwrtc
       integer  vsfwrit
       external vsfwrit
+      external vsfsetblsz
+      integer  vsfsetblsz
+      external vsfsetnmbl 
+      integer  vsfsetnmbl
+      external vsfgetblinfo
+      integer  vsfgetblinfo
 C
 C     Declarations of return values for HDF Vdata Field Functions
 C
@@ -572,6 +580,8 @@
       external hishdff
       integer  hestringf
       external hestringf
+      integer heprntf
+      external heprntf
       
 
 C
@@ -642,8 +652,12 @@
       external mgrcchnk
       integer  mgscompress
       external mgscompress
+      integer  mggcompress
+      external mggcompress
       integer  mglt2rf
       external mglt2rf
+      integer  mggnluts
+      external mggnluts
 
 C
 C       Decls of ANxxx functions for Fortran multi-file AN interface

Modified: packages/libhdf4/trunk/hdf/src/dfp.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/dfp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dfp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.29 $";
+static char RcsId[] = "@(#)$Revision: 1.30 $";
 #endif
 
-/* $Id: dfp.c,v 1.29 1999/06/16 21:10:42 dwells Exp $ */
+/* $Id: dfp.c,v 1.30 2005/01/09 20:53:46 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfp.c
@@ -33,12 +33,6 @@
  *---------------------------------------------------------------------------*/
 
 #include "hdf.h"
-/*****************************************************************************/
-/* Define Pablo Hooks                                                        */
-/*****************************************************************************/
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfp_c
-#endif
 
 /* remember that '0' is invalid ref number */
 PRIVATE uint16 Readref = 0;
@@ -77,10 +71,6 @@
   int32       length;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPgetpal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!palette)
@@ -154,10 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPgetpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPgetpal() */
 
@@ -190,10 +176,6 @@
   int32       file_id;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPputpal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!palette)
@@ -236,10 +218,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPputpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPputpal() */
 
@@ -264,16 +242,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPaddpal);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFPputpal(filename, palette, 0, "a"));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPaddpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPaddpal() */
 
@@ -306,10 +276,6 @@
   intn        i, j;           /* local counting variable */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPnpals);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* should use reopen if same file as last time - more efficient */
@@ -393,10 +359,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPnpals);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPnpals() */
 
@@ -425,10 +387,6 @@
   int32       aid;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPreadref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if ((file_id = DFPIopen(filename, DFACC_READ)) == FAIL)
@@ -457,10 +415,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPreadref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPreadref() */
 
@@ -486,18 +440,10 @@
 {
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPwriteref);
-#endif /* HAVE_PABLO */
-
   /* shut compiler up */
   filename = filename;
   Writeref = ref;
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPwriteref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPwriteref() */
 
@@ -521,16 +467,8 @@
 {
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPrestart);
-#endif /* HAVE_PABLO */
-
   Lastfile[0] = '\0';
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPrestart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPrestart() */
 
@@ -554,16 +492,8 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPlastref);
-#endif /* HAVE_PABLO */
-
   ret_value = Lastref;
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPlastref() */
 

Modified: packages/libhdf4/trunk/hdf/src/dfr8.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/dfr8.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dfr8.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.44 $";
+static char RcsId[] = "@(#)$Revision: 1.45 $";
 #endif
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfr8_c
-#endif
+/* $Id: dfr8.c,v 1.45 2005/01/09 20:53:47 mcgrath Exp $ */
 
-/* $Id: dfr8.c,v 1.44 1999/06/16 21:10:42 dwells Exp $ */
-
 /*-----------------------------------------------------------------------------
  * File:     dfr8.c
  * Purpose:  read and write 8-bit Raster Image Groups
@@ -185,10 +181,6 @@
   CONSTR(FUNC, "DFR8setcompress");
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
- TRACE_ON(PABLO_mask,ID_DFR8setcompress); 
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -219,10 +211,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
- 	TRACE_OFF(PABLO_mask, ID_DFR8setcompress);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8setcompress() */
 
@@ -255,10 +243,6 @@
   int32       file_id=(-1);
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
- 	TRACE_ON(PABLO_mask,ID_DFR8getdims);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !pxdim || !pydim)
@@ -291,10 +275,6 @@
   if(file_id!=(-1))
       Hclose(file_id);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8getdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8getdims() */
 
@@ -333,10 +313,6 @@
   int32       file_id=(-1);
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8getimage);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !image || (xdim <= 0) || (ydim <= 0))
@@ -409,10 +385,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8getimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8getimage() */
 
@@ -442,10 +414,6 @@
   CONSTR(FUNC, "DFR8setpalette");
   intn     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8setpalette);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -480,10 +448,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8setpalette);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8setpalette() */
 
@@ -698,10 +662,6 @@
     CONSTR(FUNC, "DFR8putimage");    /* for HERROR */
     intn ret_value;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_DFR8putimage);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -717,10 +677,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8putimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8putimage() */
 
@@ -754,10 +710,6 @@
     CONSTR(FUNC, "DFR8addimage");    /* for HERROR */
     intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8addimage);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -773,10 +725,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8addimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8addimage() */
 
@@ -1053,10 +1001,6 @@
   intn        i, j;           /* local counting variable */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8nimages);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1193,10 +1137,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8nimages);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8nimages() */
 
@@ -1226,10 +1166,6 @@
   int32       aid;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8readref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1259,10 +1195,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8readref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8readref() */
 
@@ -1289,10 +1221,6 @@
     CONSTR(FUNC, "DFR8writeref");    /* for HERROR */
   intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8writeref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1312,10 +1240,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8writeref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8writeref() */
 
@@ -1340,10 +1264,6 @@
     CONSTR(FUNC, "DFR8restart");    /* for HERROR */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8restart);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -1359,10 +1279,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8restart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8restart() */
 
@@ -1387,10 +1303,6 @@
     CONSTR(FUNC, "DFR8lastref");    /* for HERROR */
     uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8lastref);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -1406,10 +1318,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8lastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8lastref() */
 
@@ -1729,10 +1637,6 @@
     CONSTR(FUNC, "DFR8Istart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8Istart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -1747,10 +1651,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8Istart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end DFR8Istart() */
 

Modified: packages/libhdf4/trunk/hdf/src/dfsd.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/dfsd.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dfsd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.77 $";
+static char RcsId[] = "@(#)$Revision: 1.78 $";
 #endif
 
-/* $Id: dfsd.c,v 1.77 1999/06/16 21:10:44 dwells Exp $ */
+/* $Id: dfsd.c,v 1.78 2005/01/09 20:53:49 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfsd_c
-#endif
- 
 /*-----------------------------------------------------------------------------
  File:  dfsd.c
 
@@ -241,10 +237,6 @@
   CONSTR(FUNC, "DFSDgetdims");
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdims);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -286,10 +278,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -320,10 +308,6 @@
   CONSTR(FUNC, "DFSDgetdatastrs");
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdatastrs);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -366,10 +350,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdatastrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -402,10 +382,6 @@
   CONSTR(FUNC, "DFSDgetdimstrs");
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimstrs);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -449,10 +425,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimstrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -481,10 +453,6 @@
   CONSTR(FUNC, "DFSDgetdatalen");
   intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdatalen);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -507,10 +475,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdatalen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -537,10 +501,6 @@
   CONSTR(FUNC, "DFSDgetdimlen");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimlen);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -565,10 +525,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimlen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -600,10 +556,6 @@
   CONSTR(FUNC, "DFSDgetdimscale");
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimscale);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -646,10 +598,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimscale);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -687,10 +635,6 @@
   CONSTR(FUNC, "DFSDgetrange");
   int         ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetrange);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -728,10 +672,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetrange);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -771,16 +711,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdata);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIgetdata(filename, rank, maxsizes, data, 0));   /* 0 == C */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -810,10 +742,6 @@
   CONSTR(FUNC, "DFSDsetlengths");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetlengths);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -835,10 +763,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetlengths);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -867,10 +791,6 @@
   CONSTR(FUNC, "DFSDsetdims");
   intn     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdims);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -935,10 +855,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -962,16 +878,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdatastrs);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIsetdatastrs(label, unit, format, coordsys));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdatastrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1083,16 +991,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdimstrs);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIsetdimstrs(dim, label, unit, format));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdimstrs);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }   /* DFSDsetdimstrs */
 
@@ -1217,10 +1117,6 @@
     intn        ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDsetdimscale");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdimscale);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -1313,10 +1209,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdimscale);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1355,10 +1247,6 @@
     intn        ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDsetrange");    /* for HERROR */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetrange);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -1391,10 +1279,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetrange);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1423,17 +1307,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDputdata);
-#endif /* HAVE_PABLO */
-
   /* 0, 0 specify create mode, C style array (row major) */
   ret_value = (DFSDIputdata(filename, rank, dimsizes, data, 0, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDputdata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1466,17 +1342,9 @@
 {
   intn  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDadddata);
-#endif /* HAVE_PABLO */
-
   /* 1, 0 specifies append mode, C style array (row major) */
   ret_value = (DFSDIputdata(filename, rank, dimsizes, data, 1, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDadddata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1497,10 +1365,6 @@
   intn ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDndatasets");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDrestart);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1517,10 +1381,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDrestart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1547,10 +1407,6 @@
   int32       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDndatasets");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDndatasets);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1576,10 +1432,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDndatasets);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1601,10 +1453,6 @@
   CONSTR(FUNC, "DFSDclear");
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDclear);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1624,10 +1472,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDclear);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1649,10 +1493,6 @@
   CONSTR(FUNC, "DFSDlastref");
   uint16  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDlastref);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1667,10 +1507,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1702,10 +1538,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDreadref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDreadref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1734,10 +1566,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDreadref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1783,16 +1611,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIgetslice(filename, winst, windims, data, dims, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1824,10 +1644,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDstartslice");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDstartslice);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1877,10 +1693,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDstartslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1919,16 +1731,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDputslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIputslice(winend, data, dims, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDputslice);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }
 
@@ -1956,16 +1760,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDendslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIendslice(0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDendslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2002,10 +1798,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDsetNT");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetNT);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -2038,10 +1830,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetNT);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2129,10 +1917,6 @@
   intn    ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetNT");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetNT);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -2151,10 +1935,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetNT);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2189,10 +1969,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDpre32sdg");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDpre32sdg);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -2240,10 +2016,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDpre32sdg);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end of DFSDpre32sdg   */
 
@@ -4986,10 +4758,6 @@
   intn      ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetcal");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDgetcal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -5019,10 +4787,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDgetcal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* DFSDgetcal */
 
@@ -5071,10 +4835,6 @@
     CONSTR(FUNC, "DFSDsetcal");
   intn    ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetcal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -5097,10 +4857,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetcal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5127,10 +4883,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDwriteref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDwriteref);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack */
   HEclear();
 
@@ -5178,10 +4930,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDwriteref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5213,10 +4961,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDsetfillvalue");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetfillvalue);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack  */
   HEclear();
 
@@ -5251,10 +4995,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetfillvalue);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5282,10 +5022,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetfillvalue");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDgetfillvalue);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack  */
   HEclear();
 
@@ -5315,10 +5051,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDgetfillvalue);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5363,16 +5095,8 @@
   /* shut compiler up */
   stride = stride;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDreadslab);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDgetslice(filename, start, slab_size, buffer, buffer_size));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDreadslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5407,10 +5131,6 @@
   intn       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDstartslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDstartslab);
-#endif /* HAVE_PABLO */
-
   /* Clear errors */
   HEclear();
 
@@ -5536,10 +5256,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDstartslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5608,10 +5324,6 @@
   intn       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDwriteslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDwriteslab);
-#endif /* HAVE_PABLO */
-
   /* shut compiler up */
   stride = stride;
 
@@ -5860,10 +5572,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDwriteslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5887,10 +5595,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDendslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDendslab);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack */
   HEclear();
 
@@ -5951,10 +5655,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDendslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 

Modified: packages/libhdf4/trunk/hdf/src/dynarray.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/dynarray.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/dynarray.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: dynarray.c,v 1.4 1999/06/16 21:10:49 dwells Exp $ */
+/* $Id: dynarray.c,v 1.5 2005/01/09 20:53:51 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dynarray_c
-#endif
-
 /*
 FILE
     dynarray.c - Internal storage routines for handling "dynamic arrays"
@@ -89,10 +85,6 @@
     dynarr_t   *new_arr=NULL;       /* ptr to the new dynarray */
     dynarr_p    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAcreate_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(start_size<0 || incr_mult<=0)
         HGOTO_ERROR(DFE_ARGS, NULL);
@@ -124,10 +116,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAcreate_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAcreate_array() */
 
@@ -152,10 +140,6 @@
     intn i;
     intn    ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAdestroy_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     dest_arr=(dynarr_t *)arr;
     if(dest_arr==NULL)
@@ -180,10 +164,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAdestroy_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAdestroy_array() */
 
@@ -205,10 +185,6 @@
     dynarr_t   *arr_ptr;            /* ptr to the dynarray destroy*/
     intn    ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAsize_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr_ptr=(dynarr_t *)arr;
     if(arr_ptr==NULL)
@@ -223,10 +199,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAsize_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAsize_array() */
 
@@ -251,10 +223,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     VOIDP    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAget_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -272,10 +240,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAget_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAget_elem() */
 
@@ -302,10 +266,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     intn        ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAset_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -343,10 +303,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAset_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAset_elem() */
 
@@ -371,10 +327,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     VOIDP    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAdel_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -395,10 +347,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DAdel_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAdel_elem() */
 

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/herrpf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/herrpf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/herrpf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.1 $";
+static char RcsId[] = "@(#)$Revision: 1.4 $";
 #endif
 
-/* $Id: herrpf.c,v 1.1 2000/04/17 20:44:23 epourmal Exp $ */
+/* $Id: herrpf.c,v 1.4 2001/10/15 18:52:51 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    herrf.c
@@ -39,19 +39,45 @@
 /*-----------------------------------------------------------------------------
  * Name:    heprntc
  * Purpose: call HEprint to print error messages, starting from top of stack
- * Inputs:  print_levels: number of levels to print
- * Returns: 0 on success, FAIL on failure
+ * Inputs:  filename - name of the output file; if lenght is 0 then
+ *                     messages will be printied to stderr. 
+ *          print_levels: number of levels to print
+ *          namelen - length of the filname string
  * Users:   Fortran stub routine
  * Invokes: HEprint
- * Remarks: This routine has one less parameter than HEprint, because it
- *          doesn't allow the user to specify the stream to print to.
- *          Instead it prints automatically to stdout.
+ * Returns: 0 on success, FAIL on failure
  *---------------------------------------------------------------------------*/
 
-FRETVAL(VOID)
-nheprntc(intf * print_levels)
+FRETVAL(intf)
+
+#ifdef PROTOTYPE
+nheprntc(_fcd filename, intf * print_levels, intf *namelen)
+#else
+nheprntc(filename, print_levels, namelen)
+           _fcd  filename;
+           intf *print_levels; 
+           intf  *namelen;
+#endif /* PROTOTYPE */
+
 {
-    HEprint(stderr, *print_levels);
+    FILE *err_file;
+    char * c_name;
+    intn c_len;
+    int ret = 0;
+
+    c_len = *namelen;
+    if(c_len == 0) {
+                HEprint(stderr, *print_levels);
+                return(ret);
+    }
+    c_name = HDf2cstring(filename, c_len);
+    	if (!c_name) return(FAIL);
+    err_file = fopen(c_name, "a");
+    	if (!err_file) return(FAIL);
+    HEprint(err_file, *print_levels);
+    fclose(err_file);
+    return(ret);
+    
 }
 /*-----------------------------------------------------------------------------
  * Name: hestringc
@@ -82,7 +108,6 @@
                 status = 0;
                 HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
    }  
- 
    return status;
  
  

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/herrpff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/herrpff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/herrpff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -17,8 +17,9 @@
       INTERFACE
         INTEGER FUNCTION hestringc(error_code, error_message, length)
           !MS$ATTRIBUTES C,reference,alias:'_HESTRINGC' :: hestringc
+          !DEC$ ATTRIBUTES reference :: error_message 
           integer error_code, length
-	    character*(*) error_message
+	  character*(*) error_message
         END FUNCTION hestringc
       END INTERFACE
       hestringf = hestringc(error_code, error_message,
@@ -26,7 +27,7 @@
       return
       end
 C-----------------------------------------------------------------------------
-C Name: heprnt
+C Name: heprntf
 C Purpose: prints values from the error stack 
 C Inputs:  print_levels - number of levels to print 
 C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
@@ -34,18 +35,22 @@
 C Remarks: This routine always prints to the standard output.
 C-----------------------------------------------------------------------------*/
 
-      integer function heprnt(print_levels)
+      integer function heprntf(filename, print_levels)
 	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: heprnt
+	!MS$attributes dllexport :: heprntf
 	!MS$endif
       integer print_levels 
+      character*(*) filename
 
       INTERFACE
-        INTEGER FUNCTION heprntc(print_levels)
+        INTEGER FUNCTION heprntc(filename, print_levels, namelen)
           !MS$ATTRIBUTES C,reference,alias:'_HEPRNTC' :: heprntc
+          !DEC$ ATTRIBUTES reference :: filename
           integer print_levels 
+          character*(*) filename
+          integer namelen
         END FUNCTION heprntc
       END INTERFACE
-      heprnt = heprntc(print_levels)
+      heprntf = heprntc(filename, print_levels, len(filename))
       return
       end

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/hfilepf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/hfilepf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/hfilepf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.5 $";
+static char RcsId[] = "@(#)$Revision: 1.6 $";
 #endif
 
-/* $Id: hfilepf.c,v 1.5 2000/08/22 20:35:14 epourmal Exp $ */
+/* $Id: hfilepf.c,v 1.6 2001/09/29 15:48:03 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hfilepf.c. based on hfilef.c,v 1.19
@@ -37,7 +37,6 @@
 #   define nhxiscdir FNAME(HXISCDIR)
 #   define nhddontatexit FNAME(HDDONTATEXIT)
 #   define nhglibverc FNAME(HGLIBVERC)
-#   define nhgfilverc FNAME(HGFILVERC)
 #else
 #   define nhiopen   FNAME(hiopen)
 #   define nhiclose   FNAME(hiclose)
@@ -289,35 +288,3 @@
     return (ret);
 }
 
-/*-----------------------------------------------------------------------------
- * Name: hestringc
- * Purpose:  Calls HEstring
- * Inputs:   error_code - HDF error code
- * Outputs: error_message - error message assocoated with the error code
- * Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
- *----------------------------------------------------------------------------*/
- 
- 
- FRETVAL(intf)
-#ifdef PROTOTYPE
-nhestringc(intf *error_code,
-            _fcd error_message, intf *len)
-#else
-nhestringc(error_code, error_message, len)
-           intf *error_code;
-           _fcd  error_message;
-           intf  *len;
-#endif /* PROTOTYPE */
-{
-   char *cstring = NULL;
-   intn   status;
- 
-   status = -1;
-   cstring = (char *)HEstring((hdf_err_code_t) *error_code);
-   if (cstring) {
-                status = 0;
-                HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
-   }  
- 
-   return status;
-}

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/hfilepff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/hfilepff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/hfilepff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,288 +1,263 @@
-C****************************************************************************
-C* NCSA HDF                                                                 *
-C* Software Development Group                                               *
-C* National Center for Supercomputing Applications                          *
-C* University of Illinois at Urbana-Champaign                               *
-C* 605 E. Springfield, Champaign IL 61820                                   *
-C*                                                                          *
-C* For conditions of distribution and use, see the accompanying             *
-C* hdf/COPYING file.                                                        *
-C*                                                                          *
-C****************************************************************************
-C
-C $Id: hfilepff.f,v 1.6 2000/08/01 20:51:51 epourmal Exp $
-C
-C------------------------------------------------------------------------------
-C File:     hfilepFf.f, based on hfileff.f,v 1.7
-C Purpose:  Fortran stubs for H Fortran PowerStation routines
-C Invokes:  hfilepF.c 
-C Contents: 
-C   hopen:          Call hiopen to open file
-C hnumber:          Call hnumber
-C Remarks: none
-C--------------------------------------------------------------
-
-
-C------------------------------------------------------------------
-C Name: hopen
-C Purpose:  call hiopen, open file
-C Inputs:   path: Name of file to be opened
-C           access: DFACC_READ, DFACC_WRITE, DFACC_CREATE,
-C                      or any bitwise-or of the above.
-C           ndds: Number of dds in header block if file needs to be created.
-C Returns: 0 on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hiopen
-C-------------------------------------------------------------------
-
-      integer function hopen(filename, access, defdds)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hopen
-	!MS$endif
-
-      character*(*) filename
-      integer       access, defdds
-C      integer       hiopen
-      INTERFACE 
-        INTEGER FUNCTION hiopen(filename,access, defdds, nmlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HIOPEN' :: hiopen
-	    !DEC$ ATTRIBUTES reference :: filename
-          integer access, defdds, nmlen
-          character*(*) filename
-        END FUNCTION hiopen
-      END INTERFACE
-
-      hopen = hiopen(filename, access, defdds, len(filename))
-      return
-      end
-
-C------------------------------------------------------------------
-C Name: hclose
-C Purpose:  call hiclose, close file
-C           fid:  handle to HDF file to close
-C Returns: 0 on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hiclose
-C-------------------------------------------------------------------
-
-      integer function hclose(fid)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hclose
-	!MS$endif
-
-      integer       fid
-C      integer       hiclose
-      INTERFACE 
-        INTEGER FUNCTION hiclose(fid)
-          !MS$ATTRIBUTES C, reference, alias: '_HICLOSE' :: hiclose
-          integer fid
-        END FUNCTION hiclose
-      END INTERFACE
-
-      hclose = hiclose(fid)
-      return
-      end
-
-C------------------------------------------------------------------
-C Name: hnumber
-C Purpose:  call hinumbr, get number of elements with tag 
-C           fid:  handle to HDF file to close
-C           tag: the tag which the elements have
-C Returns: number of element on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hinumbr
-C-------------------------------------------------------------------
-
-      integer function hnumber(fid, tag)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hnumber
-	!MS$endif
-
-      integer       fid, tag
-C      integer       hinumbr
-      INTERFACE 
-        INTEGER FUNCTION hinumbr(fid, tag)
-          !MS$ATTRIBUTES C, reference, alias: '_HINUMBR' :: hinumbr
-          integer fid, tag
-        END FUNCTION hinumbr
-      END INTERFACE
-
-      hnumber = hinumbr(fid, tag)
-      return
-      end
-
-C--------------------------------------------------------------------
-C Name: hxsdir
-C Purpose:  call hxisdir to set directory variable for locating an external file
-C Inputs:   dir: names of directory separated by colons.
-C Returns:  SUCCEED if no error, else FAIL
-C Users:    Fortran stub routine
-C Invokes: hxisdir
-C------------------------------------------------------------------
-
-      integer function hxsdir(dir)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hxsdir
-	!MS$endif
-
-      character*(*) dir
-C      integer       hxisdir
-      INTERFACE
-        INTEGER FUNCTION hxisdir(dir, dirlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HXISDIR' :: hxisdir
-	    !DEC$ ATTRIBUTES reference :: dir
-          character*(*) dir
-          integer dirlen
-        END FUNCTION hxisdir
-      END INTERFACE
-
-      hxsdir = hxisdir(dir, len(dir))
-      return
-      end
-
-C---------------------------------------------------------------------
-C Name: hxscdir
-C Purpose:  call hxiscdir to set directory variable for creating an external file
-C Inputs:   dir: name of the directory
-C Returns:  SUCCEED if no error, else FAIL
-C Users:    Fortran stub routine
-C Invokes: hxiscdir
-C--------------------------------------------------------------*/
-
-      integer function hxscdir(dir)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hxscdir
-	!MS$endif
-
-      character*(*) dir
-C      integer       hxiscdir
-      INTERFACE
-        INTEGER FUNCTION hxiscdir(dir, dirlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HXISCDIR' :: hxiscdir
-	    !DEC$ ATTRIBUTES reference :: dir
-          character*(*) dir
-          integer dirlen
-        END FUNCTION hxiscdir
-      END INTERFACE
-
-      hxscdir = hxiscdir(dir, len(dir))
-      return
-      end
-
-C-----------------------------------------------------------------------------
-C Name: hglibver
-C Purpose: retrieves the version information for the current HDF library
-C Outputs: major_v - major version number
-C          minor_v - minor version number
-C          release - release number
-C          string  - version number test string
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hglibver(major_v, minor_v, release, string)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hglibver
-	!MS$endif
-
-      integer major_v, minor_v, release
-      character*(*) string
-C      integer hglibverc 
-      INTERFACE
-        INTEGER FUNCTION hglibverc(major_v, minor_v, release, string,
-     +	   stringlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HGLIBVERC' :: hglibverc
-	    !DEC$ ATTRIBUTES reference :: string
-          integer major_v, minor_v, release, stringlen
-          character*(*) string
-        END FUNCTION hglibverc
-      END INTERFACE
-
-      hglibver = hglibverc(major_v, minor_v, release, string,
-     .                     len(string))
-      return
-      end
-C-----------------------------------------------------------------------------
-C Name: hgfilver
-C Purpose: retrieves the version information for the current HDF library
-C Inputs:  file_id - file identifier
-C Outputs: major_v - major version number
-C          minor_v - minor version number
-C          release - release number
-C          string  - version number test string
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hgfilver(file_id, major_v, minor_v, release,
-     .                          string)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hgfilver
-	!MS$endif
-
-      integer file_id, major_v, minor_v, release
-      character*(*) string
-C      integer hgfilverc 
-      INTERFACE
-        INTEGER FUNCTION hgfilverc(file_id, major_v, minor_v, release,
-     +	                             string, stringlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HGFILVERC' :: hgfilverc
-	    !DEC$ ATTRIBUTES reference :: string
-          integer file_id, major_v, minor_v, release, stringlen
-          character*(*) string
-        END FUNCTION hgfilverc
-      END INTERFACE
-
-      hgfilver = hgfilverc(file_id, major_v, minor_v, release, string,
-     .                     len(string))
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: hishdf
-C Purpose:  Identifies if the file "file_name" is an HDF file. 
-C Inputs:   file_name:  File name
-C Returns: TRUE (1) if successful, FALSE (0) otherwise.
-C Invokes: hiopen
-C----------------------------------------------------------------------------*/
-
-      integer function hishdf(filename)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hishdf
-	!MS$endif
-      character*(*) filename
-C      integer       hiishdf
-	INTERFACE
-        INTEGER FUNCTION hiishdf(filename, length)
-          !MS$ATTRIBUTES C,reference,alias:'_HIISHDF' :: hiishdf
-          integer length
-	    character*(*) filename
-        END FUNCTION hiishdf
-      END INTERFACE
-      hishdf = hiishdf(filename, len(filename))
-      return
-      end
-C-----------------------------------------------------------------------------
-C Name: hestring
-C Purpose: retrieves the error message associated with the specified error code 
-C Inputs:  error_code 
-C Outputs: error_message - string associated with the error code 
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hestring(error_code, error_message)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hestring
-	!MS$endif
-      integer error_code 
-      character*(*) error_message 
-C      integer hestringc 
-
-      INTERFACE
-        INTEGER FUNCTION hestringc(error_code, error_message, length)
-          !MS$ATTRIBUTES C,reference,alias:'_HESTRINGC' :: hestringc
-          integer error_code, length
-	    character*(*) error_message
-        END FUNCTION hestringc
-      END INTERFACE
-      hestring = hestringc(error_code, error_message,len(error_message))
-      return
-      end
+C****************************************************************************
+C* NCSA HDF                                                                 *
+C* Software Development Group                                               *
+C* National Center for Supercomputing Applications                          *
+C* University of Illinois at Urbana-Champaign                               *
+C* 605 E. Springfield, Champaign IL 61820                                   *
+C*                                                                          *
+C* For conditions of distribution and use, see the accompanying             *
+C* hdf/COPYING file.                                                        *
+C*                                                                          *
+C****************************************************************************
+C
+C $Id: hfilepff.f,v 1.9 2004/05/06 16:52:46 ymuqun Exp $
+C
+C------------------------------------------------------------------------------
+C File:     hfilepFf.f, based on hfileff.f,v 1.7
+C Purpose:  Fortran stubs for H Fortran PowerStation routines
+C Invokes:  hfilepF.c 
+C Contents: 
+C   hopen:          Call hiopen to open file
+C hnumber:          Call hnumber
+C Remarks: none
+C--------------------------------------------------------------
+
+
+C------------------------------------------------------------------
+C Name: hopen
+C Purpose:  call hiopen, open file
+C Inputs:   path: Name of file to be opened
+C           access: DFACC_READ, DFACC_WRITE, DFACC_CREATE,
+C                      or any bitwise-or of the above.
+C           ndds: Number of dds in header block if file needs to be created.
+C Returns: 0 on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hiopen
+C-------------------------------------------------------------------
+
+      integer function hopen(filename, access, defdds)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hopen
+	!MS$endif
+
+      character*(*) filename
+      integer       access, defdds
+C      integer       hiopen
+      INTERFACE 
+        INTEGER FUNCTION hiopen(filename,access, defdds, nmlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HIOPEN' :: hiopen
+	    !DEC$ ATTRIBUTES reference :: filename
+          integer access, defdds, nmlen
+          character*(*) filename
+        END FUNCTION hiopen
+      END INTERFACE
+
+      hopen = hiopen(filename, access, defdds, len(filename))
+      return
+      end
+
+C------------------------------------------------------------------
+C Name: hclose
+C Purpose:  call hiclose, close file
+C           fid:  handle to HDF file to close
+C Returns: 0 on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hiclose
+C-------------------------------------------------------------------
+
+      integer function hclose(fid)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hclose
+	!MS$endif
+
+      integer       fid
+C      integer       hiclose
+      INTERFACE 
+        INTEGER FUNCTION hiclose(fid)
+          !MS$ATTRIBUTES C, reference, alias: '_HICLOSE' :: hiclose
+          integer fid
+        END FUNCTION hiclose
+      END INTERFACE
+
+      hclose = hiclose(fid)
+      return
+      end
+
+C------------------------------------------------------------------
+C Name: hnumber
+C Purpose:  call hinumbr, get number of elements with tag 
+C           fid:  handle to HDF file to close
+C           tag: the tag which the elements have
+C Returns: number of element on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hinumbr
+C-------------------------------------------------------------------
+
+      integer function hnumber(fid, tag)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hnumber
+	!MS$endif
+
+      integer       fid, tag
+C      integer       hinumbr
+      INTERFACE 
+        INTEGER FUNCTION hinumbr(fid, tag)
+          !MS$ATTRIBUTES C, reference, alias: '_HINUMBR' :: hinumbr
+          integer fid, tag
+        END FUNCTION hinumbr
+      END INTERFACE
+
+      hnumber = hinumbr(fid, tag)
+      return
+      end
+
+C--------------------------------------------------------------------
+C Name: hxsdir
+C Purpose:  call hxisdir to set directory variable for locating an external file
+C Inputs:   dir: names of directory separated by colons.
+C Returns:  SUCCEED if no error, else FAIL
+C Users:    Fortran stub routine
+C Invokes: hxisdir
+C------------------------------------------------------------------
+
+      integer function hxsdir(dir)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hxsdir
+	!MS$endif
+
+      character*(*) dir
+C      integer       hxisdir
+      INTERFACE
+        INTEGER FUNCTION hxisdir(dir, dirlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HXISDIR' :: hxisdir
+	    !DEC$ ATTRIBUTES reference :: dir
+          character*(*) dir
+          integer dirlen
+        END FUNCTION hxisdir
+      END INTERFACE
+
+      hxsdir = hxisdir(dir, len(dir))
+      return
+      end
+
+C---------------------------------------------------------------------
+C Name: hxscdir
+C Purpose:  call hxiscdir to set directory variable for creating an external file
+C Inputs:   dir: name of the directory
+C Returns:  SUCCEED if no error, else FAIL
+C Users:    Fortran stub routine
+C Invokes: hxiscdir
+C--------------------------------------------------------------*/
+
+      integer function hxscdir(dir)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hxscdir
+	!MS$endif
+
+      character*(*) dir
+C      integer       hxiscdir
+      INTERFACE
+        INTEGER FUNCTION hxiscdir(dir, dirlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HXISCDIR' :: hxiscdir
+	    !DEC$ ATTRIBUTES reference :: dir
+          character*(*) dir
+          integer dirlen
+        END FUNCTION hxiscdir
+      END INTERFACE
+
+      hxscdir = hxiscdir(dir, len(dir))
+      return
+      end
+
+C-----------------------------------------------------------------------------
+C Name: hglibver
+C Purpose: retrieves the version information for the current HDF library
+C Outputs: major_v - major version number
+C          minor_v - minor version number
+C          release - release number
+C          string  - version number test string
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C-----------------------------------------------------------------------------*/
+
+      integer function hglibver(major_v, minor_v, release, string)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hglibver
+	!MS$endif
+
+      integer major_v, minor_v, release
+      character*(*) string
+C      integer hglibverc 
+      INTERFACE
+        INTEGER FUNCTION hglibverc(major_v, minor_v, release, string,
+     +	   stringlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HGLIBVERC' :: hglibverc
+	    !DEC$ ATTRIBUTES reference :: string
+          integer major_v, minor_v, release, stringlen
+          character*(*) string
+        END FUNCTION hglibverc
+      END INTERFACE
+
+      hglibver = hglibverc(major_v, minor_v, release, string,
+     .                     len(string))
+      return
+      end
+C-----------------------------------------------------------------------------
+C Name: hgfilver
+C Purpose: retrieves the version information for the current HDF library
+C Inputs:  file_id - file identifier
+C Outputs: major_v - major version number
+C          minor_v - minor version number
+C          release - release number
+C          string  - version number test string
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C-----------------------------------------------------------------------------*/
+
+      integer function hgfilver(file_id, major_v, minor_v, release,
+     .                          string)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hgfilver
+	!MS$endif
+
+      integer file_id, major_v, minor_v, release
+      character*(*) string
+C      integer hgfilverc 
+      INTERFACE
+        INTEGER FUNCTION hgfilverc(file_id, major_v, minor_v, release,
+     +	                             string, stringlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HGFILVERC' :: hgfilverc
+	    !DEC$ ATTRIBUTES reference :: string
+          integer file_id, major_v, minor_v, release, stringlen
+          character*(*) string
+        END FUNCTION hgfilverc
+      END INTERFACE
+
+      hgfilver = hgfilverc(file_id, major_v, minor_v, release, string,
+     .                     len(string))
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: hishdf
+C Purpose:  Identifies if the file "file_name" is an HDF file. 
+C Inputs:   file_name:  File name
+C Returns: TRUE (1) if successful, FALSE (0) otherwise.
+C Invokes: hiopen
+C----------------------------------------------------------------------------*/
+
+      integer function hishdf(filename)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hishdf
+	!MS$endif
+      character*(*) filename
+C      integer       hiishdf
+	INTERFACE
+        INTEGER FUNCTION hiishdf(filename, length)
+          !MS$ATTRIBUTES C,reference,alias:'_HIISHDF' :: hiishdf
+	    !DEC$ ATTRIBUTES reference :: filename
+          integer length
+	    character*(*) filename
+        END FUNCTION hiishdf
+      END INTERFACE
+      hishdf = hiishdf(filename, len(filename))
+      return
+      end

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/hprotop.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/hprotop.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/hprotop.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hprotop.h,v 1.3 1998/02/02 21:46:23 smitchel Exp $ */
+/* $Id: hprotop.h,v 1.4 2005/01/09 20:54:27 mcgrath Exp $ */
 
 #ifndef _H_PROTO
 #define _H_PROTO
@@ -2551,28 +2551,6 @@
 
 extern intn GRPshutdown(void);
 
-/* For Pablo wrapper functions */
-
-#if defined HAVE_PABLO || defined PABLO
-extern int HDFinitIOTrace(char *traceFileName, intn detail, intn lifetime,
-                          intn timeWindow, float64 timeWindowSize,
-                          intn regionTrace, intn regionSize,
-                          uint16 procTraceMask );
-extern int HDFendIOTrace(VOID);
-
-#ifndef PABLO_FNAMES
-#   define PABLO_FNAMES
-#ifdef DF_CAPFNAMES
-#   define nihinitiotrace FNAME(IHINITIOTRACE)
-#   define nhendiotrace   FNAME(HENDIOTRACE)
-#else  /* !DF_CAPFNAMES */
-#   define nihinitiotrace FNAME(ihinitiotrace)
-#   define nhendiotrace   FNAME(hendiotrace)
-#endif /* DF_CAPFNAMES */
-#endif /* PABLO_FNAMES */
-
-#endif /* HAVE_PABLO || PABLO*/
-
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.8 $";
 #endif
 
-/* $Id: mfgrpf.c,v 1.4 2000/08/01 20:51:51 epourmal Exp $ */
+/* $Id: mfgrpf.c,v 1.8 2003/12/10 21:13:28 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfgrpf.c, based on mfgrf.c,v 1.7
@@ -1040,7 +1040,6 @@
 return(ret);
 
 }   
-//#if 0 /* Commented out for now  -EIP 12/29/97 */ 
 /*-----------------------------------------------------------------------------
  * Name:     mgcwcchnk
  * Purpose:  write the specified chunk of CHARACTER data to the GR 
@@ -1120,7 +1119,6 @@
        return(ret);
 
 } 
-//#endif /*Commented out for now -EIP 12/29/97 */
 /*-------------------------------------------------------------------------
  * Name:    mgcscompress
  * Puporse: Call GRsetcompress
@@ -1154,7 +1152,7 @@
 
 int32 riid;               /*  GR id               */
 comp_info c_info;         /* compression info     */
-int32 c_type;              /* compression type definition */
+comp_coder_t c_type;              /* compression type definition */
 
 int   i, CASE;
 intf ret;
@@ -1200,3 +1198,104 @@
 return(ret);
 
 }   
+/*-------------------------------------------------------------------------
+ * Name:    mgcgnluts
+ * Puporse: Call GRgetnluts
+ * Inputs:  id: image identifier
+ * Returns: number of palettes on success and -1 if fails.
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgnluts(intf *id)
+#else
+       nmgcgnluts( id)
+       intf *id;
+#endif /* PROTOTYPE */
+{
+   intf ret = -1;
+   intn c_ret;
+
+   c_ret = GRgetnluts ( *id );
+   if(c_ret >= 0) ret = c_ret;
+   return(ret);
+}
+/*-------------------------------------------------------------------------
+ * Name:    mgcgcompress
+ * Puporse: Call GRgetcompress
+ * Inputs:  id: access id to GR
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *                      COMP_CODE_JPEG    = 7 
+ *          comp_prm:   compression parameters array
+ *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          comp_prm[0]=deflate_level:    GZIP  compression parameter
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nmgcgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int CASE;
+    intf ret = -1;
+    intn c_ret;
+
+
+    c_ret = GRgetcompress(*id, &c_type, &c_info);
+
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+         ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+         ret = 0;
+         break;
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = (intf)c_info.skphuff.skp_size;
+          ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = (intf)c_info.deflate.level;
+          ret = 0;
+          break;
+
+       case COMP_CODE_JPEG:      /* JPEG compression */  
+          *comp_type = 7;
+          ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+     } /*end CASE */
+    } /*end if */
+    return(ret);
+
+}   

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/mfgrpff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -9,7 +9,7 @@
 C* hdf/COPYING file.                                                        *
 C*                                                                          *
 C****************************************************************************
-C $Id: mfgrpff.f,v 1.5 2000/08/01 20:51:51 epourmal Exp $
+C $Id: mfgrpff.f,v 1.8 2003/12/10 21:13:28 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     mfgrpff.f
@@ -997,7 +997,7 @@
 C                            COMP_CODE_RLE =1
 C                            COMP_CODE_SKPHUFF = 3
 C                            COMP_CODE_DEFLATE = 4
-C                            COMP_CODE_JPEG    = 6 
+C                            COMP_CODE_JPEG    = 7 
 C                   comp_prm  - compression parameters array
 C                   Huffman:   comp_prm(1) = skphuff_skp_size
 C                   GZIP:      comp_prm(1) = deflate_level       
@@ -1025,3 +1025,65 @@
      .                              comp_prm)
          return
          end
+C-------------------------------------------------------------------------
+C        Name:      mggcompress
+C        Purpose:   gets compression information about GR image
+C        Inputs:    riid      - access ID to GR
+C        Outputs:  comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4
+C                            COMP_CODE_JPEG    = 6
+C                   comp_prm  - compression parameters array
+C                   Huffman:   comp_prm(1) = skphuff_skp_size
+C                   GZIP:      comp_prm(1) = deflate_level       
+C        Returns:   0 on success, -1 on failure
+C        Calls:     mgcgcompress (C stub for GRgetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggcompress(riid, comp_type, comp_prm)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: mggcompress
+	!MS$endif
+
+         INTEGER riid, comp_type, comp_prm(1)
+      INTERFACE
+        INTEGER FUNCTION mgcgcompress(riid, comp_type, comp_prm)
+          !MS$ATTRIBUTES C,reference,alias:'_MGCGCOMPRESS'::mgcgcompress
+          integer riid, comp_type, comp_prm(1)
+        END FUNCTION mgcgcompress
+      END INTERFACE
+
+         mggcompress = mgcgcompress(riid, comp_type,
+     .                              comp_prm)
+         return
+         end
+C-------------------------------------------------------------------------
+C        Name:      mggnluts
+C        Purpose:   gets number of palettes (LUTs) for an image
+C        Inputs:    riid      - access ID to GR
+C        Returns:   Number of palettes on success (0 or 1), -1 on failure
+C        Calls:     mgcgnluts (C stub for GRgetnluts function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggnluts(riid)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: mggnluts
+	!MS$endif
+
+         INTEGER riid
+      INTERFACE
+        INTEGER FUNCTION mgcgnluts(riid) 
+          !MS$ATTRIBUTES C,reference,alias:'_MGCGNLUTS'::mgcgnluts
+          integer riid
+        END FUNCTION mgcgnluts
+      END INTERFACE
+
+         mggnluts = mgcgnluts(riid)
+         return
+         end
+
+           

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/vgpf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/vgpf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/vgpf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.3 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: vgpf.c,v 1.3 1998/06/23 20:27:46 epourmal Exp $ */
+/* $Id: vgpf.c,v 1.5 2001/09/27 15:55:07 epourmal Exp $ */
 
 /*
    *
@@ -1435,3 +1435,86 @@
        HDfree(class_name);
        return(ret);
 } 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetblsz
+ *       Purpose:   calls VSsetblocksize
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetblsz( intf *id , intf *block_size)
+#else
+       nvscsetblsz (id, block_size)
+               intf   *id;
+               intf   *block_size;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+       intn c_ret;	
+
+       c_ret = VSsetblocksize( *id, *block_size);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetnmbl
+ *       Purpose:   calls VSsetnumblocks
+ *       Inputs:    id    -  vdata identifier
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetnmbl( intf *id , intf *num_blocks)
+#else
+       nvscsetnmbl (id, num_blocks)
+               intf   *id;
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret;
+       intn  c_ret;
+
+       c_ret = VSsetnumblocks( *id, *num_blocks);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscgblinfo
+ *       Purpose:   calls VSgetblockinfo
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscgblinfo( intf *id , intf *block_size, intf *num_blocks)
+#else
+       nvscgblinfo (id, block_size, num_blocks)
+               intf   *id;
+               intf   *block_size; 
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+        intn c_ret;
+	int32 c_block_size;
+        int32 c_num_blocks;
+
+       c_ret = VSgetblockinfo( *id, &c_block_size, &c_num_blocks);
+       if (c_ret == 0) {
+       		*block_size = c_block_size;
+       	        *num_blocks = c_num_blocks;
+       	      	ret = 0;
+       }
+       return(ret);
+} 

Modified: packages/libhdf4/trunk/hdf/src/fort_ps/vgpff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/fort_ps/vgpff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/fort_ps/vgpff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: vgpff.f,v 1.3 1998/07/20 13:30:24 epourmal Exp $ 
+C $Id: vgpff.f,v 1.6 2001/09/27 15:55:07 epourmal Exp $ 
 C     
 c **************************************************************************
 c *
@@ -1794,3 +1794,86 @@
          end
  
 
+C-------------------------------------------------------------------------
+C        Name:      vsfsetblsz
+C        Purpose:   sets the block size of the linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   block_size - size of each block
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetblsz (C stub for VSsetblocksize function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetblsz(id, block_size)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfsetblsz
+	!MS$endif
+         INTEGER id, block_size
+C
+      INTERFACE
+        INTEGER FUNCTION vscsetblsz(id, block_size)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCSETBLSZ' :: vscsetblsz
+          integer id, block_size
+        END FUNCTION vscsetblsz
+      END INTERFACE
+         vsfsetblsz = vscsetblsz(id, block_size) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfsetnmbl
+C        Purpose:   sets the number of blocks for a linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   num_blocks - number of blocks to be used for the linked-block
+C                                elements
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetnmbl (C stub for VSsetnumblocks function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetnmbl(id, num_blocks)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfsetnmbl
+	!MS$endif
+         INTEGER id, num_blocks
+      INTERFACE
+        INTEGER FUNCTION vscsetnmbl(id, num_blocks)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCSETNMBL' :: vscsetnmbl
+          integer id, num_blocks
+        END FUNCTION vscsetnmbl
+      END INTERFACE
+C
+         vsfsetnmbl = vscsetnmbl(id, num_blocks) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfgetblinfo
+C        Purpose:   retrieves the block size and the number of blocks
+C                   of a linked-block element.
+C        Inputs:    id       -  vdata identifier
+C        Outputs:   block_size - the linked-block size
+C                   num_blocks - number of blocks the element has
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscgetblinfo (C stub for VSgetblockinfo function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfgetblinfo(id, block_size, num_blocks)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfgetblinfo
+	!MS$endif
+         INTEGER id, num_blocks, block_size
+C
+      INTERFACE
+        INTEGER FUNCTION vscgblinfo(id, block_size, num_blocks)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCGBLINFO' :: vscgblinfo
+          integer id, block_size, num_blocks
+        END FUNCTION vscgblinfo
+      END INTERFACE
+         vsfgetblinfo = vscgblinfo(id, block_size, num_blocks) 
+         return 
+         end

Copied: packages/libhdf4/trunk/hdf/src/h4config.h.in (from rev 832, packages/libhdf4/branches/upstream/current/hdf/src/h4config.h.in)
===================================================================
--- packages/libhdf4/trunk/hdf/src/h4config.h.in	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/src/h4config.h.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,88 @@
+/* hdf/src/h4config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if your Fortran 77 compiler doesn't accept -c and -o together.
+   */
+#undef F77_NO_MINUS_C_MINUS_O
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <jpeglib.h> header file. */
+#undef HAVE_JPEGLIB_H
+
+/* Define to 1 if you have the `jpeg' library (-ljpeg). */
+#undef HAVE_LIBJPEG
+
+/* Define to 1 if you have the `sz' library (-lsz). */
+#undef HAVE_LIBSZ
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <szlib.h> header file. */
+#undef HAVE_SZLIB_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a `int*', as computed by sizeof. */
+#undef SIZEOF_INTP
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#undef YYTEXT_POINTER

Modified: packages/libhdf4/trunk/hdf/src/hbitio.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hbitio.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hbitio.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.41 $";
+static char RcsId[] = "@(#)$Revision: 1.42 $";
 #endif
 
-/* $Id: hbitio.c,v 1.41 1999/06/16 21:10:51 dwells Exp $ */
+/* $Id: hbitio.c,v 1.42 2005/01/09 20:53:51 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hbitio_c
-#endif
- 
 /*
 FILE
    hbitio.c
@@ -784,10 +780,6 @@
     CONSTR(FUNC, "HIbitstart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HIbitstart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -802,10 +794,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HIbitstart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HIbitstart() */
 

Modified: packages/libhdf4/trunk/hdf/src/hblocks.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hblocks.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hblocks.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.63 $";
+static char RcsId[] = "@(#)$Revision: 1.67 $";
 #endif
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hblocks_c
-#endif
+/* $Id: hblocks.c,v 1.67 2005/01/09 20:53:52 mcgrath Exp $ */
 
-/* $Id: hblocks.c,v 1.63 1999/06/16 21:10:52 dwells Exp $ */
-
 /*LINTLIBRARY */
 /* ------------------------------ hblocks.c -------------------------------
    routines to implement linked-block elements
@@ -245,10 +241,6 @@
     uint8       local_ptbuf[16];
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HLcreate);
-#endif /* HAVE_PABLO */
-
 #ifdef QAK
 printf("%s: block_length=%ld, number_blocks=%ld\n",FUNC,block_length,number_blocks);
 #endif /* QAK */
@@ -392,10 +384,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HLcreate);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* HLcreate() */
 
@@ -458,10 +446,6 @@
     int32       old_posn;       /* position in the access element */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HLconvert);
-#endif /* HAVE_PABLO */
-
 #ifdef QAK
 printf("%s: block_length=%ld, number_blocks=%ld\n",FUNC,block_length,number_blocks);
 #endif /* QAK */
@@ -596,10 +580,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HLconvert);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HLconvert() */
 
@@ -1212,8 +1192,7 @@
 {
     CONSTR(FUNC, "HLPwrite");   /* for HERROR */
     const uint8      *data = datap;
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;       /* file record */
     int32       dd_aid;         /* AID for writing the special info */
     uint16      data_tag, data_ref;  /* Tag/ref of the data in the file */
     linkinfo_t *info =          /* linked blocks information record */
@@ -1223,7 +1202,7 @@
     int32       relative_posn = /* relative position in linked block */
         access_rec->posn;
     int32       block_idx;      /* block table index of current block */
-    link_t     *prev_link = NULL;   /* ptr to block table before current block table.
+    link_t     *prev_link = NULL; /* ptr to block table before current block table.
                                        for groking the offset of
                                        current block table */
     int32       current_length; /* length of current block */
@@ -1232,6 +1211,9 @@
     uint8       local_ptbuf[4];
     int32       ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
 #ifdef QAK
 printf("%s: length=%d\n",FUNC,(int)length);
 printf("%s: info->first_length=%d\n",FUNC,(int)info->first_length);
@@ -1660,10 +1642,12 @@
 HLPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HLPendaccess");   /* for HERROR */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;           /* file record */
     intn      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* detach the special information record.
        If no more references to that, free the record */
     HLPcloseAID(access_rec);
@@ -1800,3 +1784,135 @@
 
   return ret_value;
 }   /* HLPinfo */
+
+/*--------------------------------------------------------------------------
+NAME
+   HLsetblocksize -- set the block length of a linked-block element
+
+USAGE
+   intn HLsetblockinfo(
+   int32 aid		IN: access record id
+   int32 block_size	IN: length to be used for each linked-block 
+   int32 num_blocks	IN: number of blocks the element will have
+
+RETURNS
+   SUCCEED / FAIL
+
+DESCRIPTION
+   HLsetblocksize sets (accrec_t).block_size and (accrec_t).num_blocks
+   to block_size and num_blocks, respectively.  An error will occur, if
+   either of the parameters is a 0 or a negative number, that is not
+   -1, which is used to indicate that the respective field is not to be
+   changed.
+
+   In the library, this routine is used by:
+	VSsetblocksize 
+	VSsetnumblocks
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+--------------------------------------------------------------------------*/
+intn
+HLsetblockinfo(int32 aid,	/* access record id */
+              int32 block_size, /* length to be used for each linked-block */
+              int32 num_blocks) /* number of blocks the element will have */
+{
+    CONSTR(FUNC, "HLsetblockinfo");  	/* for HERROR */
+    accrec_t   *access_rec;               /* access record */
+    intn	ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* validate aid */
+    if (HAatom_group(aid)!=AIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* block_size and num_blocks should be either -1, to keep the original 
+       values, or positive values to change the block size and/or the 
+       number of blocks */ 
+    if ((block_size <= 0 && block_size != -1) || 
+        (num_blocks <= 0 && num_blocks != -1))
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the access record */
+    if ((access_rec = HAatom_object(aid)) == NULL)        
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* change the linked-block size if requested */
+    if (block_size != -1)
+        access_rec->block_size = block_size;
+
+    /* change the number of linked-blocks if requested */
+    if (num_blocks != -1)
+        access_rec->num_blocks = num_blocks;
+
+done:
+    if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+}       /* end HLsetblockinfo */
+
+/*--------------------------------------------------------------------------
+NAME
+   HLgetblocksize -- get the block size and the number of blocks of a 
+		    linked-block element
+
+USAGE
+   intn HLgetblockinfo(aid, block_size, num_blocks)
+   int32  aid		IN: access record id
+   int32* block_size	OUT: the returned block size of each linked-block 
+   int32* num_blocks	OUT: the returned number of blocks of the element
+
+RETURNS
+   SUCCEED / FAIL
+
+DESCRIPTION
+   HLgetblocksize retrieves the values of (accrec_t).block_size and 
+   (accrec_t).num_blocks to block_size and num_blocks, respectively.  
+   A NULL can be passed in for an unwanted value.
+
+   In the library, this routine is used by:
+	VSgetblockinfo 
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+--------------------------------------------------------------------------*/
+intn
+HLgetblockinfo(int32 aid,	/* access record id */
+              int32* block_size, /* length being used for each linked-block */
+              int32* num_blocks) /* number of blocks the element will have */
+{
+    CONSTR(FUNC, "HLgetblockinfo");  /* for HERROR */
+    accrec_t   *access_rec;               /* access record */
+    intn	ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* get the access record */
+    if ((access_rec = HAatom_object(aid)) == NULL)        
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the linked-block size and the number of linked-blocks if requested */
+    if (block_size != NULL)
+        *block_size = access_rec->block_size;
+    if (num_blocks != NULL)
+        *num_blocks = access_rec->num_blocks;
+
+done:
+    if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+}       /* end HLgetblockinfo */
+

Modified: packages/libhdf4/trunk/hdf/src/hbuffer.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hbuffer.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hbuffer.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.6 $";
+static char RcsId[] = "@(#)$Revision: 1.8 $";
 #endif
 
-/* $Id: hbuffer.c,v 1.6 1999/06/16 21:10:55 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hbuffer_c
-#endif
-
+/* $Id: hbuffer.c,v 1.8 2005/01/10 19:38:18 mcgrath Exp $ */
 /*LINTLIBRARY */
 /* ------------------------------ hbuffer.c -------------------------------
 
@@ -125,10 +121,6 @@
     int32       data_len;		/* length of the data we are checking */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HBconvert);
-#endif /* HAVE_PABLO */
-    /* clear error stack and validate args */
     HEclear();
     if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -219,10 +211,7 @@
     { /* Error condition cleanup */
     } /* end if */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_HBconvert);
-#endif /* HAVE_PABLO */
-  return ret_value; 
+  return ret_value;
 } /* HBconvert */
 
 /* ------------------------------ HBPstread ------------------------------- */

Modified: packages/libhdf4/trunk/hdf/src/hchunks.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hchunks.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hchunks.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.31 $";
+static char RcsId[] = "@(#)$Revision: 1.38 $";
 #endif
 
-/* $Id: hchunks.c,v 1.31 1999/06/16 21:10:55 dwells Exp $ */
+/* $Id: hchunks.c,v 1.38 2005/01/09 20:53:54 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hchunks_c
-#endif
-
 /*LINTLIBRARY */
 /* ------------------------------ HMCxxx -------------------------------
    Routines to implement chunked elements via a Vdatas for
@@ -223,6 +219,7 @@
    HMCPinquire     -- Hinquire for chunked element
    HMCPendacess    -- close a chunked element AID
    HMCPinfo        -- return info about a chunked element
+   HMCPgetnumrecs  -- get the number of records in a chunked element
 
    TBBT helper rotuines
    -------------------
@@ -957,7 +954,7 @@
     chunkinfo_t *info    = NULL;     /* information about data elt */
     int32       dd_aid;              /* AID for writing the special info */
     uint16      data_tag, data_ref;  /* Tag/ref of the data in the file */
-    uint8       local_ptbuf[4];      /* 4 bytes for special header length */
+    uint8       local_ptbuf[6];      /* 6 bytes for special header length */
 #if 0
     uint8       *c_sp_header = NULL;   /* special element header(dynamic) */
 #endif
@@ -971,12 +968,13 @@
     CHUNK_REC   *chkptr = NULL;      /* Chunk record */
     int32       *chk_key   = NULL;   /* chunk key */
     int32       npages     = 1;      /* number of chunks */
+    int32       chunks_needed;       /* default chunk cache size  */
     int32       access_aid = FAIL;   /* access id */
     int32       ret_value = SUCCEED;
     char        name[VSNAMELENMAX + 1];  /* Vdata name */
     char        class[VSNAMELENMAX + 1]; /* Vdata class */
     char        v_class[VSNAMELENMAX + 1] = ""; /* Vdata class for comparison */
-    intn        j,k;                     /* loop indicies */
+    intn        i,j,k;                     /* loop indicies */
 
     /* Check args */
     if (access_rec == NULL)
@@ -1375,11 +1373,15 @@
 
           /* create chunk cache with 'maxcache' set to the number of chunks
              along the last dimension i.e subscript changes the fastest*/
+	  chunks_needed = 1;
+	  for (i = 1; i < info->ndims; i++) {
+		chunks_needed *= info->ddims[i].num_chunks;
+	  }
           if ((info->chk_cache = 
                mcache_open(&access_rec->file_id,                   /* cache key */
                            access_aid,                             /* object id */
                            (info->chunk_size*info->nt_size),       /* chunk size */
-                           info->ddims[info->ndims -1].num_chunks, /* maxcache */
+                           chunks_needed, /* maxcache */
                            npages,                                 /* num chunks */
                            0                                       /* flags */)) 
               == NULL)
@@ -1523,6 +1525,7 @@
     chunkinfo_t *info      = NULL; /* information for the chunked elt */
     uint8       *c_sp_header = NULL; /* special element header */
     int32       npages     = 1;    /* i.e. number of chunks in element */
+    int32       chunks_needed;     /* default size of chunk cache */
     int32       access_aid = FAIL; /* access id */
     uint16      chktbl_ref;        /* the ref of the link structure
                                       chunk table i.e. Vdata */
@@ -1535,10 +1538,6 @@
     char        v_class[VSNAMELENMAX + 1] = ""; /* Vdata class */
     intn        i;                 /* loop index */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCcreate);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     nlevels=nlevels;
 
@@ -1933,12 +1932,16 @@
     /* register this valid access record for the chunked element */
     access_aid = HAregister_atom(AIDGROUP,access_rec);
 
+    chunks_needed = 1;
+    for (i = 1; i < info->ndims; i++) {
+	chunks_needed *= info->ddims[i].num_chunks;
+    }
     /* create chunk cache */
     if ((info->chk_cache = 
          mcache_open(&access_rec->file_id,                   /* cache key */
                      access_aid,                             /* object id */
                      (info->chunk_size*info->nt_size),       /* chunk size */
-                     info->ddims[info->ndims -1].num_chunks, /* maxcache */
+                     chunks_needed, /* maxcache */
                      npages,                                 /* num chunks */
                      0                                       /* flags */)) 
         == NULL)
@@ -2005,14 +2008,63 @@
     if (c_sp_header != NULL)
         HDfree(c_sp_header);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCcreate);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* HMCcreate() */
 
+/*--------------------------------------------------------------------------
+NAME
+     HMCgetcompress - get compression information for chunked element
 
+DESCRIPTION
+     Checks if the given element is compressed then get the compression
+     information using HCPdecode_header.
+     This routine is used by HCgetcompress for the chunked element part.
+
+RETURNS
+     Returns SUCCEED/FAIL
+
+REVISION LOG
+     September 2001: Added to fix bug #307 - BMR
+
+-------------------------------------------------------------------------- */
+int32
+HMCgetcompress( accrec_t*    access_rec, /* IN: access record */
+		comp_coder_t* comp_type, /* OUT: compression type */
+		comp_info* c_info)       /* OUT: retrieved compression info */
+{
+    CONSTR(FUNC, "HMCgetcompress");   /* for HERROR */
+    chunkinfo_t *info = NULL;   /* chunked element information record */
+    model_info  m_info;         /* modeling information - dummy */
+    comp_model_t model_type;    /* modeling type - dummy */
+    int32       ret_value = SUCCEED;
+
+    /* Get the special info from the given record */
+    info = (chunkinfo_t *) access_rec->special_info;
+    if (info == NULL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+    /* If this chunked element is compressed, retrieve its comp info */
+    if (info->flag == SPECIAL_COMP)
+    {
+        /* Decode header from storage */
+        ret_value = HCPdecode_header((uint8 *)info->comp_sp_tag_header,
+                 &model_type, &m_info, /* dummy */ 
+		 comp_type, c_info);
+    }
+    /* It's not compressed */
+    else
+	*comp_type = COMP_CODE_NONE;
+
+  done:
+    if(ret_value == FAIL)
+      { /* Error condition cleanup */
+
+      } /* end if */
+
+    /* Normal function cleanup */
+    return ret_value;
+} /* HMCgetcompress() */
+
+
 /*--------------------------------------------------------------------------
 NAME
      HMCsetMaxcache - maximum number of chunks to cache 
@@ -2055,10 +2107,6 @@
     chunkinfo_t *info       = NULL;   /* chunked element information record */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCsetMaxcache);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     flags=flags;
 
@@ -2096,10 +2144,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCsetMaxcache);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* HMCsetMaxcache() */
 
@@ -2121,16 +2165,8 @@
 {
     int32 ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPstread);
-#endif /* HAVE_PABLO */
-
     ret_value = HMCIstaccess(access_rec, DFACC_READ);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPstread);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPstread */
 
@@ -2152,16 +2188,8 @@
 {
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPstwrite);
-#endif /* HAVE_PABLO */
-
     ret_value = HMCIstaccess(access_rec, DFACC_WRITE);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPstwrite);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPstwrite */
 
@@ -2187,10 +2215,6 @@
     chunkinfo_t *info = NULL;    /* information for the chunked elt */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPseek);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_3
     printf("HMCPseek called with offset %d \n",offset);
 #endif
@@ -2235,10 +2259,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPseek);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPseek */
 
@@ -2274,10 +2294,6 @@
     int32       nitems = 1;        /* used in HDmemfill(), */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPchunkread);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -2356,9 +2372,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPchunkread);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_3
     printf("HMCPchunkread exit with ret_value= %d \n",ret_value);
 #endif
@@ -2403,9 +2416,6 @@
     int32       ret_value = SUCCEED;
     intn        i;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCreadChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_5
     printf("HMCreadChunk: entered \n");
 #endif
@@ -2529,9 +2539,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCreadChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_5
     printf("HMCreadChunk: exited, ret=%d \n",ret_value);
 #endif
@@ -2577,10 +2584,6 @@
 #endif
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPread);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_3
     printf("HMCPread called with length %d \n",length);
 #endif
@@ -2730,10 +2733,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPread);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPread  */
 
@@ -2775,10 +2774,6 @@
     int32       ret_value = SUCCEED;
     intn        k;                 /* loop index */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPchunkwrite);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -2829,6 +2824,10 @@
           printf(")\n");
 #endif
 
+          if (chkptr->chk_ref == 0) {
+                    /* out of ref numbers -- extremely fatal  */
+                    HGOTO_ERROR(DFE_NOREF, FAIL);
+          }
           /* Copy origin first to vdata record*/
           pntr = v_data;
           for (k = 0; k < info->ndims; k++)
@@ -2898,9 +2897,6 @@
     if (v_data != NULL)
         HDfree(v_data);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPchunkwrite);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCPchunkwrite exited with ret_value %d \n",ret_value);
 #endif
@@ -2951,9 +2947,6 @@
     intn        i;
 
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCwriteChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCwriteChunk: entered \n");
 #endif
@@ -3147,9 +3140,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCwriteChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCwriteChunk: exited, ret=%d \n",ret_value);
 #endif
@@ -3203,10 +3193,6 @@
     intn         i;
 #endif
 
-#ifdef HAVE_PABLO_4
-    TRACE_ON(PABLO_mask,ID_HMCPwrite);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_4
     printf("HMCPwrite called with length %d \n",length);
 #endif
@@ -3409,9 +3395,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPwrite);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCPwrite: exited, ret=%d \n",ret_value);
 #endif
@@ -3551,10 +3534,6 @@
     filerec_t   *file_rec = NULL;    /* file record */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPendaccess);
-#endif /* HAVE_PABLO */
-
     /* validate arguments first */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);        
@@ -3592,10 +3571,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPendaccess);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPendaccess */
 
@@ -3621,10 +3596,6 @@
     int32       ret_value = SUCCEED;
     intn        i;                  /* loop variable */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPinfo);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -3668,10 +3639,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPinfo);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPinfo */
 
@@ -3705,10 +3672,6 @@
     chunkinfo_t *info = NULL;       /* special information record */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPinquire);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -3745,9 +3708,49 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPinquire);
-#endif /* HAVE_PABLO */
+    return ret_value;
+}   /* HMCPinquire */
 
+/* -------------------------------------------------------------------------
+NAME
+   HMCPgetnumrecs -- get the number of records in a chunked element
+DESCRIPTION
+   Retrieves the number of records in a chunked element.  
+   This function was originally added for SDcheckempty/HDcheckempty to 
+   determine whether a chunked SDS has been written with data.
+RETURNS
+   SUCCEED/FAIL - FAIL when num_recs is NULL
+AUTHOR
+   bmribler - 10/3/2004
+---------------------------------------------------------------------------*/
+int32
+HMCPgetnumrecs(accrec_t* access_rec,	/* access record */
+               int32 *num_recs		/* OUT: length of the chunked elt */)
+{
+    CONSTR(FUNC, "HMCPgetnumrecs");	/* for HGOTO_ERROR */
+    chunkinfo_t *chunk_info = NULL;	/* chunked element information record */
+    int32       ret_value = SUCCEED;
+
+    /* Check args */
+    if (access_rec == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the special info from the given record */
+    chunk_info = (chunkinfo_t *) access_rec->special_info;
+    if (chunk_info == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    if (num_recs)
+        *num_recs = chunk_info->num_recs;
+    else
+	ret_value = FAIL;
+
+  done:
+    if(ret_value == FAIL)   
+      { /* Error condition cleanup */
+
+      } /* end if */
+
+    /* Normal function cleanup */
     return ret_value;
-}   /* HMCPinquire */
+}   /* HMCPgetnumrecs */
+

Modified: packages/libhdf4/trunk/hdf/src/hchunks.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hchunks.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hchunks.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hchunks.h,v 1.18 1998/07/22 16:06:56 koziol Exp $ */
+/* $Id: hchunks.h,v 1.20 2004/10/31 06:40:13 bmribler Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:         hchunks.h
@@ -177,6 +177,11 @@
          HCHUNK_DEF *chk_array /* IN: structure describing chunk distribution
                                  can be an array? but we only handle 1 level */);
 
+    HDFLIBAPI int32 HMCgetcompress
+	(accrec_t* access_rec,    /* IN: access record */
+	 comp_coder_t* comp_type, /* OUT: compression type */
+         comp_info* c_info        /* OUT: retrieved compression info */);
+
     HDFLIBAPI int32 HMCsetMaxcache
         (int32 access_id, /* IN: access aid to mess with */
          int32 maxcache,  /* IN: max number of pages to cache */
@@ -254,6 +259,10 @@
          int16 *paccess,        /* OUT: access mode; */
          int16 *pspecial        /* OUT: special code; */);
 
+    extern int32 HMCPgetnumrecs
+        (accrec_t * access_rec, /* IN:  access record to return info about */
+         int32 *num_recs        /* OUT: length of the chunked elt */);
+
 #endif /* _HCHUNKS_MAIN_ */
 
 #if defined c_plusplus || defined __cplusplus

Modified: packages/libhdf4/trunk/hdf/src/hcomp.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hcomp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hcomp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.57 $";
+static char RcsId[] = "@(#)$Revision: 1.68 $";
 #endif
 
-/* $Id: hcomp.c,v 1.57 1999/03/27 19:44:01 epourmal Exp $ */
+/* $Id: hcomp.c,v 1.68 2005/01/09 20:53:55 mcgrath Exp $ */
 
 /*
 FILE
@@ -155,8 +155,15 @@
 HCIinit_coder(int16 acc_mode, comp_coder_info_t * cinfo, comp_coder_t coder_type,
               comp_info * c_info)
 {
+    uint32 comp_info;
     CONSTR(FUNC, "HCIinit_coder");  /* for HERROR */
 
+    HCget_config_info(coder_type, &comp_info);
+    if ((comp_info & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+              HRETURN_ERROR(DFE_BADCODER, FAIL)
+    }
+
     switch (coder_type)
       {     /* determin the type of encoding */
           case COMP_CODE_NONE:      /* "none" (i.e. no) encoding */
@@ -188,29 +195,52 @@
               if(c_info->skphuff.skp_size<1)
                   HRETURN_ERROR(DFE_BADCODER, FAIL)
 
-              cinfo->coder_type = COMP_CODE_SKPHUFF;    /* set the coding type */
-              cinfo->coder_funcs = cskphuff_funcs;  /* set the skipping huffman func. ptrs */
+              /* set the coding type and the skipping huffman func. ptrs */
+              cinfo->coder_type = COMP_CODE_SKPHUFF;
+              cinfo->coder_funcs = cskphuff_funcs;
 
               /* copy encoding info */
               cinfo->coder_info.skphuff_info.skip_size = c_info->skphuff.skp_size;
               break;
 
           case COMP_CODE_DEFLATE:   /* gzip 'deflate' encoding */
-   /* valid deflate levels are from 0 to 9, this error checking
-      caused the problem in HDF4r1.2 , fixed by Apu Kapadia    
-              if(c_info->deflate.level<1 || c_info->deflate.level>9)
-   */
+	      /* valid deflate levels are from 0 to 9, this error checking
+		 caused the problem in HDF4r1.2 , fixed by Apu Kapadia    
+	      if(c_info->deflate.level<1 || c_info->deflate.level>9)
+	      */
               if(c_info->deflate.level<0 || c_info->deflate.level>9)
                   HRETURN_ERROR(DFE_BADCODER, FAIL)
 
-              cinfo->coder_type = COMP_CODE_DEFLATE;    /* set the coding type */
-              cinfo->coder_funcs = cdeflate_funcs;  /* set the gzip 'deflate' func. ptrs */
+              /* set the coding type and the gzip 'deflate' func. ptrs */
+              cinfo->coder_type = COMP_CODE_DEFLATE;
+              cinfo->coder_funcs = cdeflate_funcs;
 
               /* copy encoding info */
               if(acc_mode&DFACC_WRITE)
                   cinfo->coder_info.deflate_info.deflate_level = c_info->deflate.level;
               break;
 
+#ifdef H4_HAVE_LIBSZ
+           case COMP_CODE_SZIP:
+              /* set the coding type and the szip func. ptrs */
+              cinfo->coder_type = COMP_CODE_SZIP;
+              cinfo->coder_funcs = cszip_funcs;
+
+              /* copy encoding info */
+              cinfo->coder_info.szip_info.pixels = c_info->szip.pixels;
+              cinfo->coder_info.szip_info.bits_per_pixel = c_info->szip.bits_per_pixel;
+              cinfo->coder_info.szip_info.pixels_per_block = c_info->szip.pixels_per_block;
+              cinfo->coder_info.szip_info.pixels_per_scanline = c_info->szip.pixels_per_scanline;
+              cinfo->coder_info.szip_info.options_mask = c_info->szip.options_mask;
+              cinfo->coder_info.szip_info.buffer = NULL;
+              cinfo->coder_info.szip_info.buffer_size = 0;
+              cinfo->coder_info.szip_info.offset = 0;
+              cinfo->coder_info.szip_info.szip_state = SZIP_INIT;
+              cinfo->coder_info.szip_info.szip_dirty = SZIP_CLEAN;
+              break;
+
+#endif /* H4_HAVE_LIBSZ */
+
           default:
               HRETURN_ERROR(DFE_BADCODER, FAIL)
       }     /* end switch */
@@ -306,18 +336,22 @@
     /* add any additional information needed for coding type */
     switch (coder_type)
       {
-          case COMP_CODE_NBIT:      /* N-bit coding needs 16 bytes of info */
+          case COMP_CODE_NBIT:    /* N-bit coding needs 16 bytes of info */
               coder_len+=16;
               break;
 
-          case COMP_CODE_SKPHUFF:   /* Skipping Huffman coding needs 8 bytes of info */
+          case COMP_CODE_SKPHUFF: /* Skipping Huffman coding needs 8 bytes of info */
               coder_len+=8;
               break;
 
-          case COMP_CODE_DEFLATE:   /* Deflation coding stores deflation level */
+          case COMP_CODE_DEFLATE: /* Deflation coding stores deflation level */
               coder_len+=2;
               break;
 
+          case COMP_CODE_SZIP:   /* Szip coding ...? */
+	      coder_len += 14;
+	      break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -414,6 +448,14 @@
               UINT16ENCODE(p, (uint16) c_info->deflate.level);
               break;
 
+          case COMP_CODE_SZIP:  /* Szip coding ...? */
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels);
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels_per_scanline);
+              UINT32ENCODE(p, (uint32) (c_info->szip.options_mask | SZ_H4_REV_2));
+              *p++ = (uint8) c_info->szip.bits_per_pixel;
+              *p++ = (uint8) c_info->szip.pixels_per_block;
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -523,6 +565,16 @@
               }     /* end case */
               break;
 
+          case COMP_CODE_SZIP:   /* Szip coding stores the following values*/
+	      {
+                  UINT32DECODE(p, c_info->szip.pixels);
+                  UINT32DECODE(p, c_info->szip.pixels_per_scanline);
+                  UINT32DECODE(p, c_info->szip.options_mask);
+                  c_info->szip.bits_per_pixel = *p++;
+                  c_info->szip.pixels_per_block = *p++;
+	      }
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -608,6 +660,14 @@
               UINT32ENCODE(p, (uint32) info->cinfo.coder_info.skphuff_info.skip_size);
               break;
 
+          case COMP_CODE_SZIP:
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels);
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels_per_scanline);
+              UINT32ENCODE(p, (uint32) c_info->szip.options_mask);
+              UINT8ENCODE(p, (uint8) c_info->szip.bits_per_pixel);
+              UINT8ENCODE(p, (uint8) c_info->szip.pixels_per_block);
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -857,6 +917,106 @@
 
 /*--------------------------------------------------------------------------
  NAME
+    HCPgetcompress -- Retrieves compression information of an element
+ USAGE
+    intn HCPgetcompress(aid, coder_type, c_info)
+    int32 aid;                  IN: access record ID
+    comp_coder_t* coder_type;   OUT: the type of compression
+    comp_info* c_info;          OUT: ptr to compression information
+                                structure for storing the retrieved info
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    This routine retrieves the compression type and the compression
+    information of the element, identified by 'aid'.  The routine is 
+    used by GRgetcompress and SDgetcompress at this time.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+    July 2001: Added to fix bug #307 - BMR
+    Dec. 2004: Changed name to HCPgetcompress, to be consistent with other
+               practice.  REM
+--------------------------------------------------------------------------*/
+intn
+HCPgetcompress(int32 file_id,
+              uint16 data_tag, uint16 data_ref,
+              comp_coder_t* comp_type,  /* OUT: compression type */
+              comp_info* c_info)        /* OUT: retrieved compression info */
+{
+    CONSTR(FUNC, "HCPgetcompress");   /* for HGOTO_ERROR */
+    int32   aid=0, status;
+    accrec_t*    access_rec=NULL;/* access element record */
+    compinfo_t*  info=NULL;  /* compressed element information */
+    model_info  m_info;         /* modeling information - dummy */
+    int32       ret_value=SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired for its compression information */
+    aid = Hstartread(file_id, data_tag, data_ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* if the element is compressed, get the compression info as requested*/
+    if (access_rec->special == SPECIAL_COMP)
+    {
+        info = (compinfo_t *) access_rec->special_info;
+        if (info == NULL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+        status = HCIread_header(access_rec, info, c_info, &m_info);
+        if (status == FAIL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+        /* get the compression type */
+        *comp_type = info->cinfo.coder_type;
+
+    }  /* end if element is compressed */
+
+    /* if the element is chunked, call HMCgetcompress to get the 
+	compression info as appropriate */
+    else if (access_rec->special == SPECIAL_CHUNKED)
+    {
+	status = HMCgetcompress(access_rec, comp_type, c_info);
+        if (status == FAIL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+    }
+
+    /* flag the error when attempting to get compression info on a
+       non-compressed element */
+    else 
+    /* EIP 9/16/03  Fail but return compression type COMP_CODE_NONE
+       instead of junk in this case.
+    */
+     {
+        /*Mac OSX screams here (comp_coder_t)*comp_type = COMP_CODE_NONE; */
+        *comp_type = COMP_CODE_NONE; 
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+     }
+    /* end access to the aid appropriately */
+    if (Hendaccess(aid)== FAIL)
+        HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+       /* end access to the aid if it's been accessed */
+        if (aid != 0)
+            if (Hendaccess(aid)== FAIL)
+       /* EIP 9/16/03 This causes infinite loop since HGOTO_ERROR has goto done in it 
+                HGOTO_ERROR(DFE_CANTENDACCESS, FAIL); Replaced with HERROR call*/
+                HERROR(DFE_CANTENDACCESS);
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* HCgetcompress */
+
+/*--------------------------------------------------------------------------
+ NAME
     HCIstaccess -- Start accessing a compressed data element.
  USAGE
     int32 HCIstaccess(access_rec, access)
@@ -1147,10 +1307,12 @@
     compinfo_t *info;           /* information on the special element */
     uint8       local_ptbuf[4];
     uint8       *p = local_ptbuf;  /* temp buffer ptr */
-    filerec_t   *file_rec =     /* file record */
-                           HAatom_object(access_rec->file_id);  
+    filerec_t  *file_rec;           /* file record */
     int32       ret_value;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate length */
     if (length < 0)
         HRETURN_ERROR(DFE_RANGE, FAIL);
@@ -1281,9 +1443,12 @@
 HCPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HCPendaccess");   /* for HERROR */
-    filerec_t  *file_rec = HAatom_object(access_rec->file_id);    /* file record */
+    filerec_t  *file_rec;           /* file record */
     intn      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate file record */
     if (BADFREC(file_rec))
         HGOTO_ERROR(DFE_INTERNAL, FAIL);
@@ -1385,3 +1550,70 @@
 
     return SUCCEED;
 }   /* HCPinfo */
+
+/* ------------------------------- HCPgetinfo ----------------------------- */
+/*
+NAME
+   HCget_config_info -- return info about configuration of a compression method
+
+USAGE
+     intn HCget_config_info( comp_coder_t coder_type,  
+	uint32* compression_config_info)
+        comp_coder_t coder_type;  IN: the compression type queried  
+	compression_config_info;  OUT: flags to indiat compression status
+               
+                0 -- not enabled
+		COMP_DECODER_ENABLED - decoding enabled
+                COMP_ENCODER_ENABLED - encoding enabled
+
+RETURNS
+   SUCCEED / FAIL
+DESCRIPTION
+   Return information about the given compresion method. 
+
+   Currently, reports if encoding and/or decoding are available. SZIP
+   is the only method that varies in the current versions.
+
+
+---------------------------------------------------------------------------*/
+intn
+HCget_config_info( comp_coder_t coder_type,  /* IN: compression type */
+		uint32* compression_config_info)
+{
+    CONSTR(FUNC, "HCget_config_info");
+
+    *compression_config_info = 0;
+    switch (coder_type)
+      {     
+          case COMP_CODE_NONE:      /* "none" (i.e. no) encoding */
+		*compression_config_info = 0;
+          case COMP_CODE_RLE:   /* Run-length encoding */
+          case COMP_CODE_NBIT:      /* N-bit encoding */
+          case COMP_CODE_SKPHUFF:   /* Skipping Huffman encoding */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+
+          case COMP_CODE_JPEG:  /* jpeg may be optional */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+          case COMP_CODE_DEFLATE:   /* gzip 'deflate' encoding, maybe optional */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+
+           case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+	      if (SZ_encoder_enabled()) {
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+		} else {
+		*compression_config_info = COMP_DECODER_ENABLED;
+		}
+#else
+		*compression_config_info = 0;
+#endif /* H4_HAVE_LIBSZ */
+              break;
+          default:
+		*compression_config_info = 0;
+              HRETURN_ERROR(DFE_BADCODER, FAIL)
+	}
+    return SUCCEED;
+}

Modified: packages/libhdf4/trunk/hdf/src/hcomp.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hcomp.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hcomp.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hcomp.h,v 1.19 1999/02/12 23:37:11 koziol Exp $ */
+/* $Id: hcomp.h,v 1.22 2004/12/09 18:51:57 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcomp.h
@@ -41,6 +41,7 @@
       COMP_CODE_NBIT,           /* for N-bit encoding */
       COMP_CODE_SKPHUFF,        /* for Skipping huffman encoding */
       COMP_CODE_DEFLATE,        /* for gzip 'deflate' encoding */
+      COMP_CODE_SZIP,		/* for szip encoding */
       COMP_CODE_INVALID,        /* invalid last code, for range checking */
       COMP_CODE_JPEG            /* _Ugly_ hack to allow JPEG images to be created with GRsetcompress */
   }
@@ -52,6 +53,10 @@
 #define COMP_RLE        11
 #define COMP_IMCOMP     12
 
+/* Compression encoder/decoder configuration */
+#define COMP_DECODER_ENABLED     1
+#define COMP_ENCODER_ENABLED     2
+
 #ifndef COMPRESS_MASTER
 extern uint16 compress_map[];
 #else
@@ -121,6 +126,16 @@
             intn    level;   /* how hard to work when compressing the data */
         }
       deflate;
+      struct
+        {
+            int32 options_mask;   /* IN */
+            int32 pixels_per_block;   /* IN */
+            int32 pixels_per_scanline; /* OUT: computed */
+	    int32 bits_per_pixel; /* OUT: size of NT */
+            int32 pixels; /* OUT: size of dataset or chunk */
+         }
+       szip;  /* for szip encoding */
+
   }
 comp_info;
 

Modified: packages/libhdf4/trunk/hdf/src/hcompi.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hcompi.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hcompi.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hcompi.h,v 1.13 1995/10/25 17:51:45 koziol Exp $ */
+/* $Id: hcompi.h,v 1.15 2003/12/10 21:13:19 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcompi.h
@@ -57,6 +57,7 @@
 #include "cnbit.h"  /* N-bit encoding header */
 #include "cskphuff.h"   /* Skipping huffman encoding header */
 #include "cdeflate.h"   /* gzip 'deflate' encoding header */
+#include "cszip.h"   /* szip encoding header */
 
 typedef struct comp_coder_info_tag
   {
@@ -68,6 +69,8 @@
             comp_coder_nbit_info_t nbit_info;   /* N-bit coding info */
             comp_coder_skphuff_info_t skphuff_info;     /* Skipping huffman coding info */
             comp_coder_deflate_info_t deflate_info;   /* gzip 'deflate' coding info */
+	    comp_coder_szip_info_t szip_info;   /* szip coding info */
+
         }
       coder_info;
       funclist_t  coder_funcs;  /* functions to perform encoding */

Modified: packages/libhdf4/trunk/hdf/src/hcompri.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hcompri.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hcompri.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.6 $";
 #endif
 
-/* $Id: hcompri.c,v 1.4 2000/02/29 21:34:46 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hcompri_c
-#endif
-
+/* $Id: hcompri.c,v 1.6 2005/01/09 20:53:57 mcgrath Exp $ */
 /*LINTLIBRARY */
 /* ------------------------------ hcompri.c -------------------------------
 
@@ -120,10 +116,6 @@
     crinfo_t  *info;                /* information for the compressed raster element */
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HRPconvert);
-#endif /* HAVE_PABLO */
-    /* clear error stack and validate args */
     HEclear();
 
 #ifdef QAK
@@ -184,9 +176,6 @@
     { /* Error condition cleanup */
     } /* end if */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_HRPconvert);
-#endif /* HAVE_PABLO */
   return ret_value; 
 } /* HRPconvert */
 
@@ -462,10 +451,12 @@
 #ifdef LATER
     CONSTR(FUNC, "HRPendaccess");   /* for HERROR */
 #endif /* LATER */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec; 	    /* file record */
     intn     ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
 #ifdef QAK
 printf("%s: check 1.0\n",FUNC);
 #endif /* QAK */

Modified: packages/libhdf4/trunk/hdf/src/hconv.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hconv.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hconv.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,7 +11,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hconv.h,v 1.20 2000/05/23 18:03:29 acheng Exp $ */
+/* $Id: hconv.h,v 1.22 2003/12/10 21:13:19 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hconv.h
@@ -63,7 +63,7 @@
 /* CONSTANT DEFINITIONS                                                      */
 /*****************************************************************************/
 /* Generally Big-Endian machines */
-#if !defined(VMS) && !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !defined(IA64) && !defined(__ia64__)
+#if !defined(VMS) && !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !defined(__ia64) && !defined(__x86_64__)
 #   if !defined(UNICOS)
 #       define UI8_IN     DFKnb1b   /* Unsigned Integer, 8 bits */
 #       define UI8_OUT    DFKnb1b
@@ -165,7 +165,7 @@
 #       define LF64_OUT   DFKluo8f
 
 #   endif   /* !UNICOS */
-#else  /* must be VMS || INTEL86 || MIPSEL || DEC_ALPHA || I860 || SUN386 || IA64 (Generally, little-endian machines */
+#else  /* must be VMS || INTEL86 || MIPSEL || DEC_ALPHA || I860 || SUN386 || IA64 || Linux64 (Generally, little-endian machines */
 #   define UI8_IN     DFKnb1b   /* Big-Endian IEEE support */
 #   define UI8_OUT    DFKnb1b   /* The s in DFKsb2b is for swap */
 #   define SI16_IN    DFKsb2b
@@ -210,7 +210,7 @@
 #       define LF64_OUT   DFKnb8b
 #   endif   /* VMS */
 
-#endif /* !VMS && !INTEL86 && !MIPS && !DEC_ALPHA && !I860 && !SUN386 && !IA64 */
+#endif /* !VMS && !INTEL86 && !MIPS && !DEC_ALPHA && !I860 && !SUN386 && !IA64 && !Linux64*/
 
 /* All Machines (except the Cray) currently use the same routines */
 /* for Native mode "conversions" */

Modified: packages/libhdf4/trunk/hdf/src/hdf.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hdf.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hdf.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,11 +11,12 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hdf.h,v 1.60 1998/09/02 21:09:17 acheng Exp $ */
+/* $Id: hdf.h,v 1.64 2005/01/09 20:53:57 mcgrath Exp $ */
 
 #ifndef HDF_H
 #define HDF_H
 
+#include "h4config.h"
 #include "hdfi.h"
 #include "hlimits.h"
 
@@ -101,10 +102,6 @@
 #   define TRUE (!FALSE)
 #endif
 
-#ifndef NULL
-#   define NULL (void *)0
-#endif
-
 /* macros */
 #define STREQ(s, t) (HDstrcmp((s), (t)) == 0)
 #define NSTREQ(s, t, n) (HDstrncmp((s), (t), (n)) == 0)
@@ -150,15 +147,9 @@
 #include "vg.h"         /* Add the Vgroup/Vdata header so the users don't have to */
 #include "mfgr.h"       /* Add the GR header so the users don't have to */
 
-/* For Pablo Instrumentation */
-#ifdef HAVE_PABLO
-#include "ProcIDs.h"
-#include "trace.h"
-#endif /* PABLO */
-
 /* these may eventaully evolve into real-life functions but not yet */
 #define HDFopen(f,a,d)      Hopen((f), (a), (d))
-#define HDFclose(f,a,d)     Hclose((f), (a), (d))
+#define HDFclose(f)         Hclose((f))
 #define Vstart(f)           Vinitialize((f))
 #define Vend(f)             Vfinish((f))
 

Modified: packages/libhdf4/trunk/hdf/src/hdfi.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hdfi.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hdfi.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hdfi.h,v 1.146 2000/08/22 20:26:57 epourmal Exp $ */
+/* $Id: hdfi.h,v 1.156 2005/01/25 03:36:44 epourmal Exp $ */
 
 #ifndef HDFI_H
 #define HDFI_H
@@ -47,7 +47,6 @@
 /*      8 - Cray IEEE                                                       */
 /*          (i.e. Big-Endian, all 64-bit architecture w/IEEE Floats)        */
 /*--------------------------------------------------------------------------*/
-#define     DFMT_S390           0x1111
 #define     DFMT_SUN            0x1111
 #define     DFMT_ALLIANT        0x1111
 #define     DFMT_IRIX           0x1111
@@ -61,8 +60,8 @@
 #define     DFMT_CTSS           0x3331
 #define     DFMT_VAX            0x2221
 #define     DFMT_MIPSEL         0x4441
-#define     DFMT_MIPSEB         0x1111
 #define     DFMT_PC             0x4441
+#define     DFMT_APPLE          0x1111
 #define     DFMT_MAC            0x1111
 #define     DFMT_SUN386         0x4441
 #define     DFMT_NEXT           0x1111
@@ -72,8 +71,7 @@
 #define     DFMT_I860           0x4441
 #define     DFMT_CRAYMPP        0x1171
 #define     DFMT_IA64           0x4441
-#define     DFMT_ARMV4L         0x4441
-#define     DFMT_X86_64         0x4441
+#define     DFMT_LINUX64        0x4441
 
 /* I/O library constants */
 #define UNIXUNBUFIO 1
@@ -95,12 +93,6 @@
 #include <limits.h>
 #include <string.h>
 
-/* PABLO support files */
-#ifdef HAVE_PABLO
-#define HDFIOTRACE
-#include "HDFIOTrace.h"
-#endif  /* HAVE_PABLO */
-
 /**
  * Provide the macros to adapt the HDF public functions to
  * dll entry points.
@@ -197,14 +189,23 @@
 typedef unsigned char     uint8;
 typedef short int         int16;
 typedef unsigned short int uint16;
+#ifdef _LP64 /* 64-bit environment */
+typedef int               int32;
+typedef unsigned int      uint32;
+#else /* 32-bit environment */
 typedef long int          int32;
 typedef unsigned long int uint32;
+#endif
 typedef int               intn;
 typedef unsigned int      uintn;
 typedef int               intf;     /* size of INTEGERs in Fortran compiler */
 typedef float             float32;
 typedef double            float64;
+#ifdef _LP64 /* 64-bit environment */
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#else /* 32-bit environment */
 typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#endif
 #define FNAME_POST_UNDERSCORE
 #define _fcdtocp(desc) (desc)
 #ifdef  HAVE_FMPOOL
@@ -311,19 +312,23 @@
 #ifndef _ALL_SOURCE       
 typedef char              int8;
 typedef short int         int16; 
-typedef long int          int32; 
+typedef int               int32;
 #endif  
 typedef char              char8;
 typedef unsigned char     uchar8;
 typedef unsigned char     uint8;
 typedef unsigned short int uint16;
-typedef unsigned long int uint32;
+typedef unsigned int      uint32;
 typedef int               intn;
 typedef unsigned int      uintn;
 typedef float             float32;
 typedef double            float64;
 typedef int               intf;     /* size of INTEGERs in Fortran compiler */
+#ifdef AIX5L64
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#else /*AIX5L64 */
 typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#endif /*AIX5L64 */
 #define _fcdtocp(desc) (desc)
 #ifdef  HAVE_FMPOOL
 #define FILELIB PAGEBUFIO  /* enable page buffering */
@@ -343,7 +348,7 @@
 
 #endif /* IBM6000 */
 
-#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux) || defined(__hppa__)))
+#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux)))
 
 #ifndef HP9000
 #define HP9000
@@ -397,10 +402,6 @@
 /*  what each does */
 #define JMEMSYS         MEM_ANSI
 
-#ifdef __linux__
-#define FNAME_POST_UNDERSCORE
-#endif
-
 #endif /* HP9000 */
 
 
@@ -462,9 +463,11 @@
 #else
 #define FILELIB UNIXBUFIO
 #endif
+/*
 #ifdef IRIX64
 #define BIG_LONGS
 #endif
+*/
 
 
 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
@@ -714,8 +717,65 @@
 #endif /* CONVEX */
 
 
-#if (defined(MIPSEL) || ((defined(mips) || defined(__mips)) && (defined(ultrix) || defined(__ultrix)))) && !defined(__linux__)
+#if defined (__APPLE__)
 
+#ifndef __APPLE__
+#define __APPLE__
+#endif
+
+#ifdef GOT_MACHINE
+If you get an error on this line more than one machine type has been defined.
+Please check your Makefile.
+#endif
+#define GOT_MACHINE 1
+
+#ifndef __GNUC__
+#define DUMBCC 	/* because it is.  for later use in macros */
+#endif /* __GNUC__ */
+
+#include <sys/types.h>
+#include <sys/file.h>               /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#define DF_MT   DFMT_APPLE 
+typedef void            VOID;
+typedef void            *VOIDP;
+typedef char            *_fcd;
+typedef char            char8;
+typedef unsigned char   uchar8;
+typedef char            int8;
+typedef unsigned char   uint8;
+typedef short           int16;
+typedef unsigned short  uint16;
+typedef int             int32;
+typedef unsigned int    uint32;
+typedef int             intn;
+typedef unsigned int    uintn;
+typedef float           float32;
+typedef double          float64;
+typedef int             intf;     /* size of INTEGERs in Fortran compiler */
+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#define _fcdtocp(desc) (desc)
+#define FNAME(x) x
+#ifdef H4_ABSOFT
+#define DF_CAPFNAMES
+#endif /*ABSOFT*/
+#ifdef  HAVE_FMPOOL
+#define FILELIB PAGEBUFIO  /* enable page buffering */
+#else
+#define FILELIB UNIXBUFIO
+#endif
+
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
+
+/* Determine the memory manager we are going to use. Valid values are: */
+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
+/*  what each does */
+#define JMEMSYS         MEM_ANSI
+
+#endif /* __APPLE__ */
+
+#if defined(MIPSEL) || ((defined(mips) || defined(__mips)) && (defined(ultrix) || defined(__ultrix)))
+
 #ifndef MIPSEL
 #define MIPSEL
 #endif
@@ -788,7 +848,7 @@
 #else  /* MPW, possibly others */
 #include <Files.h>              /* for unbuffered I/O stuff */
 #endif /* SYMANTEC_C*/
-#ifndef ABSOFT
+#ifndef ABSOFT 
 #define DF_CAPFNAMES            /* fortran names are in all caps */
 #endif /* ABSOFT */
 #define DF_DYNAMIC              /* use dynamic allocation */
@@ -877,7 +937,7 @@
 #endif
 
 #if defined(_MSC_VER) && !defined(_MFHDFLIB_) && !defined(_HDFLIB_)	/* Auto-link when possible */
-#	define HDF_LIB_VER	"414"
+#	define HDF_LIB_VER	"421"
 #	if !defined(_DEBUG)
 #		if !defined(_HDFDLL_)
 #			define HDF_LIB_NAME	"HD" HDF_LIB_VER ".lib"
@@ -933,7 +993,12 @@
 #endif
 
 #if defined UNIX386
+#ifdef H4_ABSOFT
+#define FNAME(x) x
+#define DF_CAPFNAMES
+#else
 #define FNAME_POST_UNDERSCORE
+#endif
 #elif defined INTEL386
 #define DF_CAPFNAMES
 #endif
@@ -957,340 +1022,6 @@
 #endif /* INTEL86 */
 #endif /* !(defined(macintosh) || defined(MAC)) */
 
-#if defined (__linux__) && defined (__mc68000__)
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#define DF_MT             DFMT_MOTOROLA
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef char              int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/m68k */
-
-#if defined (__linux__) && defined (__sparc__)
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#define DF_MT             DFMT_SUN
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef char              int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/Sparc */
-
-#if defined (__linux__) && defined (__powerpc__)
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#define DF_MT             DFMT_MOTOROLA
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef signed char       int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/powerpc */
-
-#if defined (__linux__) && defined (__s390__)
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#define DF_MT             DFMT_S390
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef signed char       int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/s390 */
-
-#if defined (__linux__) && (defined (MIPSEB) || defined(MIPSEL))
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#if defined (MIPSEB)
-#define DF_MT             DFMT_MIPSEB
-#elif defined(MIPSEL)
-#define DF_MT		  DFMT_MIPSEL
-#endif
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef signed char       int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/mips */
-
-#if defined (__linux__) && defined (__arm__)
-
-#ifdef GOT_MACHINE
-If you get an error on this line more than one machine type has been defined.
-Please check your Makefile.
-#endif
-#define GOT_MACHINE 1
-
-#include <fcntl.h>
-#include <sys/types.h>      /* for unbuffered file I/O */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>          /* for character macros */
-
-#define DF_MT             DFMT_ARMV4L
-
-#ifndef VOID    /* The stupid windows.h header file uses a #define instead of a typedef */
-typedef void              VOID;
-#endif  /* end VOID */
-typedef void *            VOIDP;
-typedef char *            _fcd;
-typedef char              char8;
-typedef unsigned char     uchar8;
-typedef signed char       int8;
-typedef unsigned char     uint8;
-typedef short int         int16;
-typedef unsigned short int uint16;
-typedef long int          int32;
-typedef unsigned long int uint32;
-typedef int               intn;
-typedef unsigned int      uintn;
-typedef float             float32;
-typedef double            float64;
-typedef long              intf;     /* size of INTEGERs in Fortran compiler */
-typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
-#define FNAME_POST_UNDERSCORE
-#define _fcdtocp(desc) (desc)
-
-#ifdef  HAVE_FMPOOL
-#define FILELIB PAGEBUFIO  /* enable page buffering */
-#else
-#define FILELIB UNIXBUFIO
-#endif
-
-/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
-
-/* Determine the memory manager we are going to use. Valid values are: */
-/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
-/*  what each does */
-#define JMEMSYS         MEM_ANSI
-#define HAVE_STDC
-#define INCLUDES_ARE_ANSI
-
-#endif /* Linux/arm */
-
 #if defined(NEXT) || defined(NeXT)
 
 #ifndef NEXT
@@ -1437,8 +1168,6 @@
 #define FILELIB UNIXBUFIO
 #endif
 
-#define BIG_LONGS
-
 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
 
 /* Determine the memory manager we are going to use. Valid values are: */
@@ -1546,10 +1275,9 @@
 
 #endif /* I860 */
 
+/* Linux 64 */
+#if defined __x86_64__
 
-/* IA64 running Linux */
-#if defined IA64 || defined __ia64__
-
 #ifdef GOT_MACHINE
 If you get an error on this line more than one machine type has been defined.
 Please check your Makefile.
@@ -1558,7 +1286,7 @@
 
 #include <sys/file.h>               /* for unbuffered i/o stuff */
 #include <sys/stat.h>
-#define DF_MT             DFMT_IA64
+#define DF_MT             DFMT_LINUX64
 typedef void              VOID;
 typedef void              *VOIDP;
 typedef char              *_fcd;
@@ -1584,8 +1312,6 @@
 #define FILELIB UNIXBUFIO
 #endif
 
-#define BIG_LONGS
-
 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
 
 /* Determine the memory manager we are going to use. Valid values are: */
@@ -1598,12 +1324,20 @@
 #define INCLUDES_ARE_ANSI
 #endif
 
-#endif /* IA64 */
+#endif /*Linux 64 */
 
+/*#ifndef GOT_MACHINE
+No machine type has been defined.  Your Makefile needs to have someing like
+-DSUN or -DUNICOS in order for the HDF internal structures to be defined
+correctly.
+#endif
+*/
 
-/* AMD64 running Linux */
-#if defined(__x86_64__)
+/*-----------------------------------------------------*/
 
+/* IA64 running Linux */
+#if defined __ia64
+
 #ifdef GOT_MACHINE
 If you get an error on this line more than one machine type has been defined.
 Please check your Makefile.
@@ -1612,7 +1346,7 @@
 
 #include <sys/file.h>               /* for unbuffered i/o stuff */
 #include <sys/stat.h>
-#define DF_MT             DFMT_X86_64
+#define DF_MT             DFMT_IA64
 typedef void              VOID;
 typedef void              *VOIDP;
 typedef char              *_fcd;
@@ -1638,8 +1372,6 @@
 #define FILELIB UNIXBUFIO
 #endif
 
-#define BIG_LONGS
-
 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
 
 /* Determine the memory manager we are going to use. Valid values are: */
@@ -1652,7 +1384,7 @@
 #define INCLUDES_ARE_ANSI
 #endif
 
-#endif /* X86_64 */
+#endif /* IA64 */
 
 #ifndef GOT_MACHINE
 No machine type has been defined.  Your Makefile needs to have someing like

Modified: packages/libhdf4/trunk/hdf/src/herr.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/herr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/herr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.34 $";
+static char RcsId[] = "@(#)$Revision: 1.35 $";
 #endif
 
-/* $Id: herr.c,v 1.34 1999/06/16 21:10:58 dwells Exp $ */
+/* $Id: herr.c,v 1.35 2005/01/09 20:53:59 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_herr_c
-#endif
-
 /*LINTLIBRARY */
 /* -------------------------------- herr.c -------------------------------- */
 /*
@@ -90,23 +86,14 @@
 HEstring(hdf_err_code_t error_code)
 {
     int         i;              /* temp int index */
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEstring);
-#endif /* HAVE_PABLO */
 
     /* look for the error_code in error message table */
     for (i = 0; i < (int)ERRMESG_SZ; i++)
         if (error_messages[i].error_code == error_code)
           {
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_HEstring);
-#endif /* HAVE_PABLO */
             return error_messages[i].str;
           }
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HEstring);
-#endif /* HAVE_PABLO */
     /* otherwise, return default message */
     return DEFAULT_MESG;
 } /* HEstring */
@@ -125,9 +112,6 @@
 VOID
 HEPclear(void)
 {
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HEclear);
-#endif /* HAVE_PABLO */
     if (!error_top)
         goto done;
 
@@ -143,9 +127,6 @@
       }
 
 done:
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEclear);
-#endif /* HAVE_PABLO */
   return;
 } /* HEPclear */
 
@@ -173,9 +154,6 @@
 HEpush(hdf_err_code_t error_code, const char *function_name, const char *file_name, intn line)
 {
     intn        i;
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEpush);
-#endif /* HAVE_PABLO */
 
     /* if the stack is not allocated, then do it */
     if (!error_stack)
@@ -206,9 +184,6 @@
             }
           error_top++;
       }
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEpush);
-#endif /* HAVE_PABLO */
 }   /* HEpush */
 
 /*-------------------------------------------------------------------------
@@ -232,10 +207,6 @@
     char       *tmp;
     CONSTR(FUNC, "HEreport");   /* name of function if HIalloc fails */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEreport);
-#endif /* HAVE_PABLO */
-
     va_start(arg_ptr, format);
 
     if ((error_top < ERR_STACK_SZ + 1) && (error_top > 0))
@@ -255,9 +226,6 @@
     va_end(arg_ptr);
 
 done:
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_HEreport);
-#endif /* HAVE_PABLO */
     return;
 } /* HEreport */
 
@@ -279,9 +247,6 @@
 VOID
 HEprint(FILE * stream, int32 print_levels)
 {
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HEprint);
-#endif /* HAVE_PABLO */
     if (print_levels == 0 || print_levels > error_top)  /* print all errors */
         print_levels = error_top;
 
@@ -297,9 +262,6 @@
           if (error_stack[print_levels].desc)
               fprintf(stream, "\t%s\n", error_stack[print_levels].desc);
       }
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEprint);
-#endif /* HAVE_PABLO */
 } /* HEprint */
 
 /* ------------------------------- HEvalue -------------------------------- */

Modified: packages/libhdf4/trunk/hdf/src/herr.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/herr.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/herr.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: herr.h,v 1.36 1996/08/27 15:05:59 sxu Exp $ */
+/* $Id: herr.h,v 1.41 2004/12/09 18:51:57 mcgrath Exp $ */
 
 /*+ herr.h
    ***  header file for using error routines
@@ -91,7 +91,15 @@
 
 /* always points to the next available slot; the last error record is in slot (top-1) */
 #ifndef _H_ERR_MASTER_
+#if defined WIN32 && defined HDFAPDLL
+__declspec(dllimport)
+#else
 extern
+#endif
+#else
+#if defined WIN32 && defined HDFLIBDLL
+__declspec(dllexport)
+#endif
 #endif /* _H_ERR_MASTER_ */
 int32       error_top
 #ifdef _H_ERR_MASTER_
@@ -216,12 +224,14 @@
       DFE_COMPINFO,             /* Invalid compression header */
       DFE_CANTCOMP,             /* Can't compress an object */
       DFE_CANTDECOMP,           /* Can't de-compress an object */
+      DFE_NOENCODER,            /* Encoder not available */
 
 /* Raster errors */
       DFE_NODIM,                /* No dimension record associated with image */
       DFE_BADRIG,               /* Error processing a RIG */
       DFE_RINOTFOUND,           /* Can't find raster image */
       DFE_BADATTR,              /* Bad Attribute */
+      DFE_LUTNOTFOUND,          /* No palette information for RIG */
 
 /* SDG/NDG errors */
       DFE_BADTABLE,             /* the nsdg table is wrong */
@@ -245,6 +255,7 @@
       DFE_VSWRITE,              /* Error writing to VData */
       DFE_VSREAD,               /* Error reading from VData */
       DFE_BADVH,                /* Error in VData Header */
+      DFE_FIELDSSET,            /* Fields already set for vdata */
 /* High-level Vdata/Vset errors */
       DFE_VSCANTCREATE,         /* Cannot create VData */
       DFE_VGCANTCREATE,         /* Cannot create VGroup */
@@ -387,12 +398,14 @@
     {DFE_COMPINFO,      "Invalid compression header"},
     {DFE_CANTCOMP,      "Can't compress an object"},
     {DFE_CANTDECOMP,    "Can't de-compress an object"},
+    {DFE_NOENCODER,     "Encoder not available"},
 
 /* Raster errors */
     {DFE_NODIM,         "No dimension record associated with image"},
     {DFE_BADRIG,        "Error processing a RIG"},
     {DFE_RINOTFOUND,    "Can't find raster image"},
     {DFE_BADATTR,       "Bad Attribute"},
+    {DFE_LUTNOTFOUND,   "No palette information for RIG"},
 
 /* SDG/NDG errors */
     {DFE_BADTABLE,      "The nsdg table is wrong"},
@@ -415,6 +428,7 @@
     {DFE_BADVSCLASS,    "Cannot set VData class"},
     {DFE_VSWRITE,       "Error writing to VData"},
     {DFE_VSREAD,        "Error reading from VData"},
+    {DFE_FIELDSSET,     "Fields already set for vdata"},
 
 /* High-level Vdata/Vset errors */
     {DFE_VSCANTCREATE,  "Cannot create VData"},

Modified: packages/libhdf4/trunk/hdf/src/herrf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/herrf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/herrf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.10 $";
+static char RcsId[] = "@(#)$Revision: 1.14 $";
 #endif
 
-/* $Id: herrf.c,v 1.10 2000/02/29 20:31:46 epourmal Exp $ */
+/* $Id: herrf.c,v 1.14 2001/10/15 18:52:45 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    herrf.c
@@ -54,6 +54,49 @@
     HEprint(stderr, *print_levels);
 }
 /*-----------------------------------------------------------------------------
+ * Name:    heprntc
+ * Purpose: call HEprint to print error messages, starting from top of stack
+ * Inputs:  print_levels: number of levels to print
+ * Returns: 0 on success, FAIL on failure
+ * Users:   Fortran stub routine
+ * Invokes: HEprint
+ * Remarks: This routine has one less parameter than HEprint, because it
+ *          doesn't allow the user to specify the stream to print to.
+ *          Instead it prints automatically to stdout.
+ *---------------------------------------------------------------------------*/
+
+FRETVAL(intf)
+
+#ifdef PROTOTYPE
+nheprntc(_fcd filename, intf * print_levels, intf *namelen)
+#else
+nheprntc(filename, print_levels, namelen)
+           _fcd  filename;
+           intf *print_levels; 
+           intf  *namelen;
+#endif /* PROTOTYPE */
+
+{
+    FILE *err_file;
+    char * c_name;
+    intn c_len;
+    int ret = 0;
+
+    c_len = *namelen;
+    if(c_len == 0) {
+                HEprint(stderr, *print_levels);
+                return(ret);
+    }
+    c_name = HDf2cstring(filename, c_len);
+    	if (!c_name) return(FAIL);
+    err_file = fopen(c_name, "a");
+    	if (!err_file) return(FAIL);
+    HEprint(err_file, *print_levels);
+    fclose(err_file);
+    return(ret);
+    
+}
+/*-----------------------------------------------------------------------------
  * Name: hestringc
  * Purpose:  Calls HEstring
  * Inputs:   error_code - HDF error code
@@ -82,7 +125,6 @@
                 status = 0;
                 HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
    }  
- 
    return status;
  
  

Modified: packages/libhdf4/trunk/hdf/src/hextelt.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hextelt.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hextelt.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.82 $";
+static char RcsId[] = "@(#)$Revision: 1.84 $";
 #endif
 
-/* $Id: hextelt.c,v 1.82 1999/06/16 21:10:58 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hextelt_c
-#endif
+/* $Id: hextelt.c,v 1.84 2005/01/09 20:53:59 mcgrath Exp $ */
 
 /*LINTLIBRARY */
 /* ------------------------------ hextelt.c -------------------------------
@@ -212,9 +209,6 @@
     void *       buf = NULL;      /* temporary buffer */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXcreate);
-#endif /* HAVE_PABLO */
     /* clear error stack and validate args */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -364,9 +358,6 @@
   if (buf != NULL)
       HDfree(buf);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXcreate);
-#endif /* HAVE_PABLO */
   return ret_value; 
 } /* HXcreate */
 
@@ -737,11 +728,13 @@
     CONSTR(FUNC, "HXPwrite");   /* for HERROR */
     extinfo_t  *info =          /* information on the special element */
                     (extinfo_t *) (access_rec->special_info);
-    uint8      *p =local_ptbuf;/* temp buffer ptr */
-    filerec_t  *file_rec =     /* file record */
-                          HAatom_object(access_rec->file_id);
+    uint8      *p =local_ptbuf; /* temp buffer ptr */
+    filerec_t  *file_rec;       /* file record */
     int32      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate length */
     if (length < 0)
         HGOTO_ERROR(DFE_RANGE, FAIL);
@@ -905,10 +898,12 @@
 HXPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HXPendaccess");   /* for HERROR */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;           /* file record */
     intn     ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* close the file pointed to by this access rec */
     HXPcloseAID(access_rec);
 
@@ -1159,9 +1154,6 @@
   char	*pt;
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXsetcreatedir);
-#endif /* HAVE_PABLO */
 
   if (dir)
     {
@@ -1183,9 +1175,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXsetcreatedir);
-#endif /* HAVE_PABLO */
   return ret_value; 
 }	/* HXsetcreatedir */
 
@@ -1216,9 +1205,6 @@
   char	*pt;
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXsetdir);
-#endif /* HAVE_PABLO */
   if (dir)
     {
       if (!(pt = HDstrdup(dir)))
@@ -1239,9 +1225,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXsetdir);
-#endif /* HAVE_PABLO */
   return ret_value; 
 }	/* HXsetdir */
 

Modified: packages/libhdf4/trunk/hdf/src/hfile.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hfile.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hfile.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
 ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.154 $";
+static char RcsId[] = "@(#)$Revision: 1.160 $";
 #endif
 
-/* $Id: hfile.c,v 1.154 1999/06/16 21:10:59 dwells Exp $ */
+/* $Id: hfile.c,v 1.160 2005/01/09 20:53:59 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hfile_c
-#endif
- 
 /*LINTLIBRARY */
 /*+
    FILE
@@ -82,6 +78,7 @@
    Hgetfileversion -- return version info on HDF file
    HPgetdiskblock  -- Get the offset of a free block in the file.
    HPfreediskblock -- Release a block in a file to be re-used.
+   HDcheck_empty   -- determines if an element has been written with data
    HDget_special_info -- get information about a special element
    HDset_special_info -- reset information about a special element
 
@@ -270,10 +267,6 @@
   int32       fid=FAIL;     /* File ID */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hopen);
-#endif /* HAVE_PABLO */
-
   /* Clear errors and check args and all the boring stuff. */
   HEclear();
   if (!path || ((acc_mode & DFACC_ALL) != acc_mode))
@@ -322,7 +315,7 @@
             }
           file_rec->file = f;
           file_rec->f_cur_off=0;
-          file_rec->last_op=OP_UNKNOWN;
+          file_rec->last_op=H4_OP_UNKNOWN;
 #else  /* NO_MULTI_OPEN */
           HGOTO_ERROR(DFE_DENIED, FAIL);
 #endif /* NO_MULTI_OPEN */
@@ -368,7 +361,7 @@
                 }
 
               file_rec->f_cur_off=0;
-              file_rec->last_op=OP_UNKNOWN;
+              file_rec->last_op=H4_OP_UNKNOWN;
               /* Read in all the relevant data descriptor records. */
               if (HTPstart(file_rec) == FAIL)
                 {
@@ -387,7 +380,7 @@
           if (OPENERR(file_rec->file))
             HGOTO_ERROR(DFE_BADOPEN, FAIL);
           file_rec->f_cur_off=0;
-          file_rec->last_op=OP_UNKNOWN;
+          file_rec->last_op=H4_OP_UNKNOWN;
 #ifdef STDIO_BUF
 	/* Testing stdio buffered i/o */
           if (setvbuf(file_rec->file, my_stdio_buf, _IOFBF, MY_STDIO_BUF_SIZE) != 0)
@@ -445,10 +438,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hopen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hopen */
 
@@ -473,10 +462,6 @@
   filerec_t  *file_rec;		/* file record pointer */
   intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hclose);
-#endif /* HAVE_PABLO */
-
   /* Clear errors and check args and all the boring stuff. */
   HEclear();
 
@@ -526,10 +511,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hclose);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hclose */
 
@@ -565,16 +546,8 @@
   int32       find_offset, find_length;
   intn        ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hexist);
-#endif /* HAVE_PABLO */
-
   ret_value = (Hfind(file_id, search_tag, search_ref, &find_tag, &find_ref,
                 &find_offset, &find_length, DF_FORWARD));
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hexist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hexist() */
 
@@ -613,10 +586,6 @@
   accrec_t   *access_rec;	/* access record */
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hinquire);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -649,10 +618,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hinquire);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hinquire */
 
@@ -679,10 +644,6 @@
     filerec_t *file_rec;
     intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hfidinquire);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     file_rec = HAatom_object(file_id);
@@ -700,10 +661,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hfidinquire);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Hfidinquire */
 
@@ -734,10 +691,6 @@
   int32       ret;			/* AID to return */
   int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartread);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -754,10 +707,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hstartread() */
 
@@ -794,10 +743,6 @@
   int32  new_off, new_len;      /* offset & length of new tag & ref */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnextread);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of the access id */
     HEclear();
     access_rec = HAatom_object(access_id);
@@ -909,10 +854,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnextread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hnextread() */
 
@@ -942,10 +883,6 @@
   int32       ret;			/* AID to return */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartwrite);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -972,10 +909,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartwrite);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hstartwrite */
 
@@ -1008,10 +941,6 @@
   int32  new_off, new_len;      /* offset & length of new tag & ref */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartaccess);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
 
@@ -1033,8 +962,14 @@
   if (flags & DFACC_APPENDABLE)
     access_rec->appendable = TRUE;	/* start data as appendable */
   else
-    access_rec->appendable = FALSE;		/* start data as non-appendable */
+    access_rec->appendable = FALSE;	/* start data as non-appendable */
 
+  /* set the default values for block size and number of blocks for use in */
+  /* linked-block creation/conversion; they can be changed by the user via */
+  /* VSsetblocksize and VSsetnumblocks - BMR (bug #267 - June 2001) */
+  access_rec->block_size = HDF_APPENDABLE_BLOCK_LEN;
+  access_rec->num_blocks = HDF_APPENDABLE_BLOCK_NUM;
+
   access_rec->special_info = NULL; /* reset */
 
   /* if the DFACC_CURRENT flag is set, start searching for the tag/ref from */
@@ -1125,10 +1060,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartaccess);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hstartaccess */
 
@@ -1156,10 +1087,6 @@
   int32       offset;			/* offset of this data element in file */
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_Hsetlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
 
@@ -1192,10 +1119,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hsetlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hsetlength */
 
@@ -1221,10 +1144,6 @@
   accrec_t   *access_rec;		/* access record */
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Happendable);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
   if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
@@ -1241,10 +1160,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Happendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Happendable */
 
@@ -1273,10 +1188,6 @@
   int32       data_off;		/* offset of the data we are checking */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hisappendable);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
   if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
@@ -1303,10 +1214,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hisappendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end HPisappendable */
 
@@ -1342,10 +1249,6 @@
   int32       data_off;		/* offset of the data we are checking */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hseek);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -1407,7 +1310,7 @@
       /* check if we are at end of file */
       if (data_len + data_off != file_rec->f_end_off)
           {	/* nope, so try to convert element into linked-block element */
-            if (HLconvert(access_id, HDF_APPENDABLE_BLOCK_LEN, HDF_APPENDABLE_BLOCK_NUM) == FAIL)
+            if (HLconvert(access_id, access_rec->block_size, access_rec->num_blocks) == FAIL)
               {
                 access_rec->appendable = FALSE;
                 HEreport("Tried to seek to %d (object length:  %d)", offset, data_len);
@@ -1436,10 +1339,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hseek);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hseek() */
 
@@ -1464,10 +1363,6 @@
   accrec_t   *access_rec;		/* access record */
   int32     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htell);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -1485,10 +1380,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htell);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Htell() */
 
@@ -1519,10 +1410,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hread);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -1578,10 +1465,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hread */
 
@@ -1615,10 +1498,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hwrite);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -1682,7 +1561,7 @@
       if (data_len + data_off != file_rec->f_end_off)
         {	/* nope, not at end of file. Try to promote to
                linked-block element. */
-          if (HLconvert(access_id, HDF_APPENDABLE_BLOCK_LEN, HDF_APPENDABLE_BLOCK_NUM) == FAIL)
+          if (HLconvert(access_id, access_rec->block_size, access_rec->num_blocks) == FAIL)
             {
               access_rec->appendable = FALSE;
               HGOTO_ERROR(DFE_BADSEEK, FAIL);
@@ -1726,10 +1605,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hwrite);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hwrite */
 
@@ -1837,10 +1712,6 @@
     accrec_t   *access_rec=NULL;/* access record */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hendaccess);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of access id */
     HEclear();
     if ((access_rec = HAremove_atom(access_id))==NULL)
@@ -1877,10 +1748,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hendaccess);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hendaccess */
 
@@ -1910,10 +1777,6 @@
   int32       length;			/* length of this elt */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetelement);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -1938,10 +1801,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hgetelement);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hgetelement() */
 
@@ -1971,10 +1830,6 @@
   int32       access_id=FAIL;   /* access record id */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hputelement);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -1996,10 +1851,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hputelement);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hputelement() */
 
@@ -2032,10 +1883,6 @@
   int32       idx;			/* index into DDB i.e. DD of element */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2057,10 +1904,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #else /* FASTER_BUT_DOESNT_WORK */
   CONSTR(FUNC, "Hlength");    /* for HERROR */
@@ -2068,10 +1911,6 @@
   int32       length=FAIL;    /* length of elt inquired */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2096,10 +1935,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #endif /* FASTER_BUT_DOESNT_WORK */
 }	/* end Hlength */
@@ -2134,10 +1969,6 @@
   int32       offset=FAIL;	/* offset of elt inquired */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hoffset);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2161,10 +1992,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hoffset);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hoffset */
 
@@ -2194,10 +2021,6 @@
   int32       fid;
   intn   ret_value = TRUE;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   fid = Hopen(filename, DFACC_READ, 0);
   if (fid == FAIL)
     {
@@ -2214,20 +2037,12 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #else
   intn        ret;
   hdf_file_t  fp;
   intn   ret_value = TRUE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   /* Search for a matching slot in the already open files. */
   if(HAsearch_atom(FIDGROUP,HPcompare_filerec_path,filename)!=NULL)
       HGOTO_DONE(TRUE);
@@ -2251,10 +2066,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #endif
 }	/* Hishdf */
@@ -2282,10 +2093,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htrunc);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(aid);
@@ -2328,10 +2135,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htrunc);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Htrunc() */
 
@@ -2404,10 +2207,6 @@
   filerec_t  *file_rec;		/* file record */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hsync);
-#endif /* HAVE_PABLO */
-
   /* check validity of file record and get dd ptr */
   file_rec = HAatom_object(file_id);
   if (BADFREC(file_rec))
@@ -2424,10 +2223,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-   TRACE_OFF(PABLO_mask, ID_Hsync);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hsync */
 
@@ -2452,10 +2247,6 @@
   filerec_t  *file_rec;		/* file record */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hcache);
-#endif /* HAVE_PABLO */
-
   if (file_id == CACHE_ALL_FILES)/* check whether to modify the default cache */
     {	/* set the default caching for all further files Hopen'ed */
       default_cache = (cache_on != 0 ? TRUE : FALSE);
@@ -2483,10 +2274,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hcache);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hcache */
 
@@ -2505,9 +2292,11 @@
 intn
 HDvalidfid(int32 file_id)
 {
-  filerec_t  *file_rec = HAatom_object(file_id);
+  filerec_t  *file_rec;
   intn        ret_value = TRUE;
 
+  /* convert file id to file rec and check for validity */
+  file_rec = HAatom_object(file_id);
   if (BADFREC(file_rec))
     ret_value = FALSE;
 
@@ -2547,10 +2336,6 @@
   accrec_t   *access_rec;		/* access record */
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hsetaccesstype);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -2581,10 +2366,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hsetaccesstype);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hsetacceesstype() */
 
@@ -2621,10 +2402,6 @@
 #endif /* LATER */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HDdont_atexit);
-#endif /* HAVE_PABLO */
-
     if(install_atexit == TRUE)
         install_atexit=FALSE;
 
@@ -2637,10 +2414,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HDdont_atexit() */
 
@@ -2671,10 +2444,6 @@
     CONSTR(FUNC, "HIstart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HIstart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -2712,10 +2481,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HIstart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HIstart() */
 
@@ -2743,10 +2508,6 @@
 {
     CONSTR(FUNC, "HPregister_term_func");    /* for HERROR */
     intn        ret_value = SUCCEED;
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     if(library_terminate == FALSE)
         if(HIstart()==FAIL)
             HGOTO_ERROR(DFE_CANTINIT, FAIL);
@@ -2766,10 +2527,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HPregister_term_func() */
 
@@ -3161,10 +2918,6 @@
 #ifdef LATER
   CONSTR(FUNC, "Hgetlibversion");
 #endif
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetlibversion);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   *majorv = LIBVER_MAJOR;
@@ -3172,10 +2925,6 @@
   *releasev = LIBVER_RELEASE;
   HIstrncpy(string, LIBVER_STRING, LIBVSTR_LEN + 1);
 
-#ifdef HAVE_PABLO
-	TRACE_OFF(PABLO_mask, ID_Hgetlibversion);
-#endif /* HAVE_PABLO */
-
   return (SUCCEED);
 }	/* HDgetlibversion */
 
@@ -3206,10 +2955,6 @@
   filerec_t  *file_rec;
   intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetfileversion);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   file_rec = HAatom_object(file_id);
@@ -3232,10 +2977,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hgetfileversion);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hgetfileversion */
 
@@ -4021,12 +3762,12 @@
   intn     ret_value = SUCCEED;
 
   /* Check for switching file access operations */
-  if(file_rec->last_op==OP_WRITE || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->last_op==H4_OP_WRITE || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       read_force_seek++;
 #endif /* HFILE_SEEKINFO */
-      file_rec->last_op=OP_UNKNOWN;
+      file_rec->last_op=H4_OP_UNKNOWN;
       if(HPseek(file_rec,file_rec->f_cur_off)==FAIL)
         HGOTO_ERROR(DFE_INTERNAL,FAIL);
     } /* end if */
@@ -4034,7 +3775,7 @@
   if(HI_READ(file_rec->file,buf,bytes)==FAIL)
     HGOTO_ERROR(DFE_READERROR, FAIL);
   file_rec->f_cur_off+=bytes;
-  file_rec->last_op=OP_READ;
+  file_rec->last_op=H4_OP_READ;
 done:
   if(ret_value == FAIL)   
     { /* Error condition cleanup */
@@ -4074,7 +3815,7 @@
 #ifdef HFILE_SEEKINFO
 printf("%s: file_rec=%p, last_offset=%ld, offset=%ld, last_op=%d",FUNC,file_rec,(long)file_rec->f_cur_off,(long)offset,(int)file_rec->last_op);
 #endif /* HFILE_SEEKINFO */
-  if(file_rec->f_cur_off!=offset || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->f_cur_off!=offset || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       seek_taken++;
@@ -4083,7 +3824,7 @@
       if (HI_SEEK(file_rec->file, offset) == FAIL)
         HGOTO_ERROR(DFE_SEEKERROR, FAIL);
       file_rec->f_cur_off=offset;
-      file_rec->last_op=OP_SEEK;
+      file_rec->last_op=H4_OP_SEEK;
     } /* end if */
 #ifdef HFILE_SEEKINFO
   else
@@ -4131,12 +3872,12 @@
   intn    ret_value = SUCCEED;
 
   /* Check for switching file access operations */
-  if(file_rec->last_op==OP_READ || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->last_op==H4_OP_READ || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       write_force_seek++;
 #endif /* HFILE_SEEKINFO */
-      file_rec->last_op=OP_UNKNOWN;
+      file_rec->last_op=H4_OP_UNKNOWN;
       if(HPseek(file_rec,file_rec->f_cur_off)==FAIL)
         HGOTO_ERROR(DFE_INTERNAL,FAIL);
     } /* end if */
@@ -4144,7 +3885,7 @@
   if(HI_WRITE(file_rec->file,buf,bytes)==FAIL)
     HGOTO_ERROR(DFE_WRITEERROR, FAIL);
   file_rec->f_cur_off+=bytes;
-  file_rec->last_op=OP_WRITE;
+  file_rec->last_op=H4_OP_WRITE;
 
 done:
   if(ret_value == FAIL)   
@@ -4157,6 +3898,90 @@
   return ret_value;
 } /* end HP_write() */
 
+/*--------------------------------------------------------------------------
+ NAME
+    HDcheck_empty -- determines if an element has been written with data
+ USAGE
+    int32 HDcheck_empty(file_id, tag, ref, *emptySDS)
+    int32 file_id;             IN: id of file
+    uint16 tag;                IN: tag of data element
+    uint16 ref;                IN: ref of data element
+    intn *emptySDS;	      OUT: TRUE if data element is empty 
+ RETURNS
+    Returns SUCCEED/FAIL
+ DESCRIPTION
+    If the data element is SPECIAL_CHUNKED, calls HMCPgetnumrecs to get the
+    data length, or if the data element is SPECIAL_COMP, lets Hinquire
+    retrieve the data length via macro HQuerylength.
+
+    Uses the data length to determine the value for 'emptySDS'.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+    10-30-2004 BMR: This function was added for SDcheckempty
+--------------------------------------------------------------------------*/
+int32
+HDcheck_empty(int32 file_id, uint16 tag, uint16 ref,
+	      intn  *emptySDS /* TRUE if data element is empty */)
+{
+    CONSTR(FUNC, "HDcheck_empty");	/* for HERROR */
+    accrec_t*   access_rec=NULL;	/* access element record */
+    int32	aid;			/* access id */
+    int32       length;			/* length of the element's data */
+    int32       ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired about */
+    aid = Hstartread(file_id, tag, ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* if the element is chunked, call HMCPgetnumrecs to get the
+        number of records */
+    if (access_rec->special == SPECIAL_CHUNKED)
+    {
+	/* get the access_rec pointer */
+	access_rec = HAatom_object(aid);
+	if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+        ret_value = HMCPgetnumrecs(access_rec, &length);
+        if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+
+    /* otherwise, let Hinquire retrieve the data length via macro 
+	HQuerylength */
+    else /* if (access_rec->special == SPECIAL_COMP) */
+    {
+	ret_value = HQuerylength(aid, &length);
+	if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    } 
+
+    /* end access to the aid appropriately */
+    if (Hendaccess(aid)== FAIL)
+        HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
+
+    if (length == 0)
+	*emptySDS = TRUE;
+    else
+	*emptySDS = FALSE;
+
+done:
+  if(ret_value == FAIL)   
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* end HDcheck_empty() */
+
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME

Modified: packages/libhdf4/trunk/hdf/src/hfile.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hfile.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hfile.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hfile.h,v 1.117 2000/11/20 15:35:18 epourmal Exp $ */
+/* $Id: hfile.h,v 1.128 2005/02/17 21:44:08 epourmal Exp $ */
 
 /*+ hfile.h
    *** Header for hfile.c, routines for low level data element I/O
@@ -47,9 +47,9 @@
 /* Library version numbers */
 
 #define LIBVER_MAJOR    4
-#define LIBVER_MINOR    1 
-#define LIBVER_RELEASE  4 
-#define LIBVER_STRING   "NCSA HDF Version 4.1 Release 4, December 2000"
+#define LIBVER_MINOR    2 
+#define LIBVER_RELEASE  1 
+#define LIBVER_STRING   "NCSA HDF Version 4.2 Release 1, February 17, 2005"
 #define LIBVSTR_LEN    80   /* length of version string  */
 #define LIBVER_LEN  92      /* 4+4+4+80 = 92 */
 /* end of version tags */
@@ -337,10 +337,10 @@
 /* For determining what the last file operation was */
 typedef enum
   {
-      OP_UNKNOWN = 0,   /* Don't know what the last operation was (after fopen frex) */
-      OP_SEEK,          /* Last operation was a seek */
-      OP_WRITE,         /* Last operation was a write */
-      OP_READ           /* Last operation was a read */
+      H4_OP_UNKNOWN = 0,   /* Don't know what the last operation was (after fopen frex) */
+      H4_OP_SEEK,          /* Last operation was a seek */
+      H4_OP_WRITE,         /* Last operation was a write */
+      H4_OP_READ           /* Last operation was a read */
   }
 fileop_t;
 
@@ -399,7 +399,8 @@
       intn        appendable;   /* whether appends to the data are allowed */
       intn        special;      /* special element ? */
       intn        new_elem;     /* is a new element (i.e. no length set yet) */
-      
+      int32       block_size;   /* size of the blocks for linked-block element*/
+      int32       num_blocks;   /* number blocks in the linked-block element */
       uint32      access;       /* access codes */
       uintn       access_type;  /* I/O access type: serial/parallel/... */
       int32       file_id;      /* id of attached file */
@@ -555,6 +556,9 @@
     HDFLIBAPI intn HPfreediskblock
                 (filerec_t * file_rec, int32 block_offset, int32 block_size);
 
+    HDFLIBAPI int32 HDcheck_empty
+                (int32 file_id, uint16 tag, uint16 ref, intn *emptySDS);
+
     HDFLIBAPI int32 HDget_special_info
                 (int32 access_id, sp_info_block_t * info_block);
 
@@ -682,6 +686,9 @@
     HDFLIBAPI int32 HCPinfo
                 (accrec_t * access_rec, sp_info_block_t * info_block);
 
+    HDFLIBAPI int32 get_comp_len
+	        (accrec_t* access_rec);
+
 /*
    ** from hchunks.c - should be the same as found in 'hchunks.h'
  */

Modified: packages/libhdf4/trunk/hdf/src/hfiledd.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/hfiledd.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hfiledd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.14 $";
+static char RcsId[] = "@(#)$Revision: 1.20 $";
 #endif
 
-/* $Id: hfiledd.c,v 1.14 1999/06/16 21:11:06 dwells Exp $ */
+/* $Id: hfiledd.c,v 1.20 2005/01/09 20:54:04 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_filedd_c
-#endif
-
 /*
 FILE
     hfiledd.c - DD & DD block management routines.
@@ -122,7 +118,21 @@
 #define REF_DYNARRAY_START  64
 /* The increment of a ref dynarray */
 #define REF_DYNARRAY_INCR   256
+/* macros to encode and decode a DD */
+#define DDENCODE(p, tag,ref,offset,length) \
+   {UINT16ENCODE(p, tag); \
+    UINT16ENCODE(p, ref); \
+    INT32ENCODE(p, offset); \
+    INT32ENCODE(p, length); \
+   }
+#define DDDECODE(p, tag,ref,offset,length) \
+   {UINT16DECODE(p, tag); \
+    UINT16DECODE(p, ref); \
+    INT32DECODE(p, offset); \
+    INT32DECODE(p, length); \
+   }
 
+
 /******************************************************************************
  NAME
      HTPstart - Initialize the DD list in memory
@@ -238,10 +248,8 @@
         p = tbuf;
         for (i = 0; i < ndds; i++, curr_dd_ptr++)
           {
-            UINT16DECODE(p, curr_dd_ptr->tag);
-            UINT16DECODE(p, curr_dd_ptr->ref);
-            INT32DECODE(p, curr_dd_ptr->offset);
-            INT32DECODE(p, curr_dd_ptr->length);
+	    DDDECODE(p, curr_dd_ptr->tag, curr_dd_ptr->ref,
+		curr_dd_ptr->offset, curr_dd_ptr->length);
             curr_dd_ptr->blk=ddcurr;
   
              /* check if maximum ref # exceeded */
@@ -365,7 +373,7 @@
 
     /* Fill the first memory DD block with NIL dd's */
     list[0].tag = DFTAG_NULL;
-    list[0].ref = 0; /* invalid ref */
+    list[0].ref = DFREF_NONE;
     list[0].length = INVALID_LENGTH;
     list[0].offset = INVALID_OFFSET;
     list[0].blk = block;
@@ -377,10 +385,8 @@
   
     /* Fill the first disk DD block with NIL dd's */
     p = tbuf;
-    UINT16ENCODE(p, (uint16) DFTAG_NULL);
-    UINT16ENCODE(p, (uint16) 0); /* invalid ref */
-    INT32ENCODE(p, (int32) INVALID_LENGTH);
-    INT32ENCODE(p, (int32) INVALID_OFFSET);
+    DDENCODE(p, (uint16) DFTAG_NULL, (uint16) DFREF_NONE,
+	(int32) INVALID_LENGTH, (int32) INVALID_OFFSET);
     HDmemfill(p,tbuf,DD_SZ,(uint32)(ndds-1));
 
     /* Write the NIL dd's out into the DD block on disk */
@@ -478,12 +484,7 @@
             list = &block->ddlist[0];	/* start at the first DD, go from there */
             p = tbuf;
             for (i = 0; i < ndds; i++, list++)
-              {
-                UINT16ENCODE(p, list->tag);
-                UINT16ENCODE(p, list->ref);
-                INT32ENCODE(p, list->offset);
-                INT32ENCODE(p, list->length);
-              }	/* end for */
+		DDENCODE(p, list->tag, list->ref, list->offset, list->length);
 
             if (HP_write(file_rec, tbuf, ndds * DD_SZ) == FAIL)
               HGOTO_ERROR(DFE_WRITEERROR, FAIL);
@@ -947,10 +948,6 @@
     int32       old_off;        /* The offset of the old DD */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hdupdd);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -986,10 +983,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hdupdd);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hdupdd() */
 
@@ -1015,12 +1008,11 @@
     CONSTR(FUNC, "Hnumber");
     uintn       all_cnt;
     uintn       real_cnt;
-    filerec_t  *file_rec = HAatom_object(file_id);
+    filerec_t  *file_rec;           /* file record */
     int32 ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnumber);
-#endif /* HAVE_PABLO */
+    /* convert file id to file record */
+    file_rec = HAatom_object(file_id);
 
     HEclear();
     if (BADFREC(file_rec))
@@ -1039,10 +1031,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnumber);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hnumber() */
 
@@ -1066,12 +1054,9 @@
     CONSTR(FUNC, "Hnewref");
     filerec_t  *file_rec;	   /* file record */
     uint16      ref;		   /* the new ref */
-    uint16      ret_value = 0; /* 0 is invalid ref */
+    uint16      ret_value = DFREF_NONE;
+    uint32      i_ref;        /* index for FOR loop */
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnewref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file record id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -1086,10 +1071,10 @@
       { /* otherwise, search for an empty ref */
         /* incredibly slow but unlikely situation */
 /* This could possibly get replaced with some sort of bit-vector manipulation -QAK */
-        for (ref = 1; ref <= MAX_REF; ref++)
+        for (i_ref = 1; i_ref <= (uint32)MAX_REF; i_ref++)
           {
             dd_t *dd_ptr=NULL;
-      
+            ref = (uint16)i_ref; 
             if (HTIfind_dd(file_rec, (uint16) DFTAG_WILDCARD, ref, &dd_ptr, DF_FORWARD) == FAIL)
               {
                ret_value = ref; /* set return value to ref found */
@@ -1099,16 +1084,12 @@
       } /* end else */
 
 done:
-  if(ret_value == 0)   /* Zero is invalid ref */
+  if(ret_value == DFREF_NONE)
     { /* Error condition cleanup */
 
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnewref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hnewref() */
 
@@ -1135,12 +1116,8 @@
     tag_info   *tinfo_ptr; /* pointer to the info for a tag */
     tag_info  **tip_ptr;   /* ptr to the ptr to the info for a tag */
     uint16      base_tag = BASETAG(tag); /* corresponding base tag (if the tag is special) */
-    uint16      ret_value = 0; /* 0 is invalid ref */
+    uint16      ret_value = DFREF_NONE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htagnewref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file record id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -1163,10 +1140,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htagnewref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Htagnewref() */
 
@@ -1206,10 +1179,6 @@
     dd_t       *dd_ptr;		   /* ptr to current ddlist searched */
     intn    ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hfind);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of the access id */
     HEclear();
     if (file_id == FAIL || /* search_ref > MAX_REF || */ find_tag == NULL
@@ -1245,10 +1214,6 @@
       } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_Hfind);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }	/* end Hfind() */
 
@@ -1346,10 +1311,6 @@
   atom_t      ddid;            /* ID for the DD */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HDreuse_tagref);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file record id */
   HEclear();
 
@@ -1388,10 +1349,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_HDreuse_tagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end HDreuse_tagref */
 
@@ -1420,10 +1377,6 @@
   atom_t      ddid;         /* ID for the DD */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hdeldd);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file record id */
   HEclear();
   file_rec = HAatom_object(file_id);
@@ -1445,10 +1398,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_Hdeldd);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hdeldd */
 
@@ -1635,7 +1584,7 @@
 
     /* Fill the block with NIL tags */
     list[0].tag = DFTAG_NULL;
-    list[0].ref = 0; /* invalid ref */
+    list[0].ref = DFREF_NONE;
     list[0].length = INVALID_LENGTH;
     list[0].offset = INVALID_OFFSET;
     list[0].blk = block;
@@ -1650,10 +1599,8 @@
             HGOTO_ERROR(DFE_NOSPACE, FAIL);
 
         p = tbuf;
-        UINT16ENCODE(p, (uint16) DFTAG_NULL);
-        UINT16ENCODE(p, (uint16) 0); /* invalid ref */
-        INT32ENCODE(p, (int32) INVALID_LENGTH);
-        INT32ENCODE(p, (int32) INVALID_OFFSET);
+	DDENCODE(p, (uint16) DFTAG_NULL, (uint16) DFREF_NONE,
+	    (int32) INVALID_LENGTH, (int32) INVALID_OFFSET);
         HDmemfill(p,tbuf,DD_SZ,(uint32)(ndds-1));
 
         if (HP_write(file_rec, tbuf, ndds * DD_SZ) == FAIL)
@@ -2045,10 +1992,7 @@
           HGOTO_ERROR(DFE_SEEKERROR, FAIL);
   
         p = tbuf;
-        UINT16ENCODE(p, dd_ptr->tag);
-        UINT16ENCODE(p, dd_ptr->ref);
-        INT32ENCODE(p, dd_ptr->offset);
-        INT32ENCODE(p, dd_ptr->length);
+	DDENCODE(p, dd_ptr->tag, dd_ptr->ref, dd_ptr->offset, dd_ptr->length);
         if (HP_write(file_rec, tbuf, DD_SZ) == FAIL)
           HGOTO_ERROR(DFE_WRITEERROR, FAIL);
       } /* end else */

Modified: packages/libhdf4/trunk/hdf/src/hfileff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/hfileff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hfileff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: hfileff.f,v 1.11 1999/04/27 19:58:49 epourmal Exp $
+C $Id: hfileff.f,v 1.13 2001/10/01 21:53:47 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     hfileFf.f
@@ -155,3 +155,22 @@
      .                      len(error_message))
       return
       end
+C-----------------------------------------------------------------------------
+C Name: heprntf
+C Purpose: prints values from the error stack 
+C Inputs:  filename - name of the output file; if length of the
+C          filename is 0, then output goes to stdout.  
+C          print_levels - number of levels to print 
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C
+C Remarks: This routine always prints to the standard output.
+C-----------------------------------------------------------------------------*/
+
+      integer function heprntf(filename, print_levels)
+      integer print_levels 
+      character*(*) filename
+      
+      integer heprntc
+      heprntf = heprntc(filename, print_levels,len(filename))
+      return
+      end

Modified: packages/libhdf4/trunk/hdf/src/hlimits.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hlimits.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hlimits.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hlimits.h,v 1.17 2000/05/05 20:51:11 epourmal Exp $ */
+/* $Id: hlimits.h,v 1.18 2002/04/04 01:04:48 bmribler Exp $ */
 
 /*+ hlimits.h
    *** This file contains all hard coded limits for the library
@@ -179,6 +179,9 @@
 #define MAX_NC_NAME MIN(256,MIN(VSNAMELENMAX,VGNAMELENMAX)) */
 
 #define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_NC_CLASS 128         /* max length of a class name - added this
+        because 128 was used commonly in SD for class name, and this will help
+        changing the class name variable declaration much easier - BMR 4/1/02*/
 #define MAX_VAR_DIMS 32          /* max per variable dimensions */
 
 /* ----------------- Constants for MFGR interface --------------------- */

Modified: packages/libhdf4/trunk/hdf/src/hproto.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/hproto.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/hproto.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hproto.h,v 1.184 2000/02/25 19:13:02 epourmal Exp $ */
+/* $Id: hproto.h,v 1.197 2005/01/09 20:54:05 mcgrath Exp $ */
 
 #ifndef _H_PROTO
 #define _H_PROTO
@@ -427,6 +427,12 @@
                 (int32 aid, int32 *length, int32 *first_length, int32 *block_length,
                  int32 *number_blocks);
 
+    HDFLIBAPI intn HLsetblockinfo
+                (int32 aid, int32 block_size, int32 num_blocks);
+
+    HDFLIBAPI intn HLgetblockinfo
+                (int32 aid, int32* block_size, int32* num_blocks);
+
 /*
    ** from hextelt.c
  */
@@ -448,6 +454,12 @@
                  comp_model_t model_type, model_info * m_info,
                  comp_coder_t coder_type, comp_info * c_info);
 
+    HDFLIBAPI intn HCPgetcompress
+                (int32 file_id, uint16 data_tag, uint16 data_ref, 
+		 comp_coder_t *coder_type, comp_info * c_info);
+
+    HDFPUBLIC intn HCget_config_info ( comp_coder_t coder_type, uint32 *compression_config_info);
+
     HDFLIBAPI int32 HCPquery_encode_header(comp_model_t model_type, model_info * m_info,
              comp_coder_t coder_type, comp_info * c_info);
 
@@ -457,7 +469,11 @@
     HDFLIBAPI intn HCPdecode_header(uint8 *p, comp_model_t *model_type, model_info * m_info,
              comp_coder_t *coder_type, comp_info * c_info);
 
+/*
+   ** from cszip.c
+ */
 
+     HDFLIBAPI intn HCPsetup_szip_parms ( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims);
 /*
    ** from hbuffer.c
  */
@@ -2040,9 +2056,11 @@
 #   define HERR_FNAMES
 #ifdef DF_CAPFNAMES
 #   define nheprnt   FNAME(HEPRNT)
+#   define nheprntc   FNAME(HEPRNTC)
 #   define nhestringc FNAME(HESTRINGC)
 #else
 #   define nheprnt   FNAME(heprnt)
+#   define nheprntc   FNAME(heprntc)
 #   define nhestringc FNAME(hestringc)
 #endif                          /* DF_CAPFNAMES */
 #endif                          /* HERR_FNAMES */
@@ -2050,6 +2068,9 @@
     HDFLIBAPI      FRETVAL(void) nheprnt
                 (intf  * print_levels);
 
+    HDFLIBAPI      FRETVAL(intf) nheprntc
+                (_fcd filename, intf  * print_levels, intf *namelen);
+
     HDFLIBAPI      FRETVAL(intf) nhestringc
 				(intf *error_code,_fcd error_message, intf *len);
 /*
@@ -2263,7 +2284,7 @@
 naffcreate(intf *an_id, intf *atype);
 
 HDFLIBAPI FRETVAL(intf)
-nafselect(intf *an_id, intf *index, intf *atype);
+nafselect(intf *an_id, intf *idx, intf *atype);
 
 HDFLIBAPI FRETVAL(intf)
 nafnumann(intf *an_id, intf *atype, intf *etag, intf *eref);
@@ -2284,7 +2305,7 @@
 nafendaccess(intf *ann_id);
 
 HDFLIBAPI FRETVAL(intf)
-nafgettagref(intf *an_id, intf *index, intf *type, intf *tag, intf *ref);
+nafgettagref(intf *an_id, intf *idx, intf *type, intf *tag, intf *ref);
 
 HDFLIBAPI FRETVAL(intf)
 nafidtagref(intf *ann_id, intf *tag, intf *ref);
@@ -2311,7 +2332,7 @@
 
 HDFLIBAPI int32 ANcreatef(int32 an_id, ann_type type);
 
-HDFLIBAPI int32 ANselect(int32 an_id, int32 index, ann_type type);
+HDFLIBAPI int32 ANselect(int32 an_id, int32 idx, ann_type type);
 
 HDFLIBAPI intn  ANnumann(int32 an_id, ann_type type, uint16 elem_tag, 
                       uint16 elem_ref);
@@ -2327,7 +2348,7 @@
 
 HDFLIBAPI intn  ANendaccess(int32 ann_id);
 
-HDFLIBAPI int32 ANget_tagref(int32 an_id, int32 index, ann_type type,
+HDFLIBAPI int32 ANget_tagref(int32 an_id, int32 idx, ann_type type,
                           uint16 *ann_tag, uint16 *ann_ref);
 
 HDFLIBAPI int32 ANid2tagref(int32 an_id, uint16 *ann_tag, uint16 *ann_ref);
@@ -2384,7 +2405,9 @@
 # define nmgcwcchnk        FNAME(MGCWCCHNK)
 # define nmgcwchnk         FNAME(MGCWCHNK)
 # define nmgcscompress     FNAME(MGCSCOMPRESS)
+# define nmgcgcompress     FNAME(MGCGCOMPRESS)
 # define nmglt2rf         FNAME(MGLT2RF)
+# define nmgcgnluts       FNAME(MGCGNLUTS)
 # else                                  /* !sl */
 #  define nmgistrt      FNAME(MGISTRT)
 #  define nmgifinf      FNAME(MGIFINF)
@@ -2425,7 +2448,9 @@
 # define nmgcwcchnk        FNAME(MGCWCCHNK)
 # define nmgcwchnk         FNAME(MGCWCHNK)
 # define nmgcscompress     FNAME(MGCSCOMPRESS)
+# define nmgcgcompress     FNAME(MGCGCOMPRESS)
 # define nmglt2rf         FNAME(MGLT2RF)
+# define nmgcgnluts       FNAME(MGCGNLUTS)
 # endif
 #else  /* !DF_CAPFNAMES */
 # if defined(UNIX386) || (!(defined INTEL86) && !(defined WIN32))
@@ -2468,7 +2493,9 @@
 # define nmgcwcchnk        FNAME(mgcwcchnk)
 # define nmgcwchnk         FNAME(mgcwchnk)
 # define nmgcscompress     FNAME(mgcscompress)
+# define nmgcgcompress     FNAME(mgcgcompress)
 # define nmglt2rf         FNAME(mglt2rf)
+# define nmgcgnluts       FNAME(mgcgnluts)
 # else                                    /* !sl */
 #  define nmgistrt      FNAME(mgistrt)
 #  define nmgifinf      FNAME(mgifinf)
@@ -2509,7 +2536,9 @@
 # define nmgcwcchnk        FNAME(mgcwcchnk)
 # define nmgcwchnk         FNAME(mgcwchnk)
 # define nmgcscompress     FNAME(mgcscompress)
+# define nmgcgcompress     FNAME(mgcgcompress)
 # define nmglt2rf         FNAME(mglt2rf)
+# define nmgcgnluts       FNAME(mgcgnluts)
 # endif
 
 #endif /* DF_CAPFNAMES */
@@ -2523,7 +2552,7 @@
 nmgirimg(intf * riid, intf *start, intf *stride, intf *count, VOIDP data);
 
 HDFLIBAPI FRETVAL(intf)     /* !sl */
-nmgignat(intf * riid, intf *index, VOIDP data);
+nmgignat(intf * riid, intf *idx, VOIDP data);
 
 HDFLIBAPI FRETVAL(intf)
 nmgstart(intf * fid);
@@ -2538,7 +2567,7 @@
 nmgicreat(intf * grid, _fcd name, intf *ncomp, intf *nt, intf *il, intf dimsizes[2], intf *nlen);
 
 HDFLIBAPI FRETVAL(intf)
-nmgselct(intf * grid, intf *index);
+nmgselct(intf * grid, intf *idx);
 
 HDFLIBAPI FRETVAL(intf)
 nmgin2ndx(intf * grid, _fcd name, intf *nlen);
@@ -2605,16 +2634,16 @@
 nmgisattr(intf * riid, _fcd name, intf *nt, intf *count, void * data, intf *nlen);
 
 HDFLIBAPI FRETVAL(intf)
-nmgatinf(intf * riid, intf *index, _fcd name, intf *nt, intf *count);
+nmgatinf(intf * riid, intf *idx, _fcd name, intf *nt, intf *count);
 
 HDFLIBAPI FRETVAL(intf)
-nmggcatt(intf * riid, intf *index, _fcd data);
+nmggcatt(intf * riid, intf *idx, _fcd data);
 
 HDFLIBAPI FRETVAL(intf)
-nmggnatt(intf * riid, intf *index, void * data);
+nmggnatt(intf * riid, intf *idx, void * data);
 
 HDFLIBAPI FRETVAL(intf)
-nmggattr(intf * riid, intf *index, void * data);
+nmggattr(intf * riid, intf *idx, void * data);
 
 HDFLIBAPI FRETVAL(intf)
 nmgifndat(intf * riid, _fcd name, intf *nlen);
@@ -2644,8 +2673,14 @@
        nmgcscompress(intf *id, intf *comp_type, intf *comp_prm);
 
     HDFLIBAPI FRETVAL (intf)
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm);
+
+    HDFLIBAPI FRETVAL (intf)
        nmglt2rf(intf *id);
 
+    HDFLIBAPI FRETVAL (intf)
+       nmgcgnluts(intf *id);
+
 /* Multi-file Raster C-routines found in mfgr.c */
 HDFLIBAPI intn rigcompare(void * k1, void * k2, intn cmparg);
 
@@ -2658,13 +2693,15 @@
 HDFLIBAPI int32 GRcreate(int32 grid,const char *name,int32 ncomp,int32 nt,int32 il,
     int32 dimsizes[2]);
 
-HDFLIBAPI int32 GRselect(int32 grid,int32 index);
+HDFLIBAPI int32 GRselect(int32 grid,int32 idx);
 
 HDFLIBAPI int32 GRnametoindex(int32 grid,const char *name);
 
 HDFLIBAPI intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32 *il,
     int32 dimsizes[2],int32 *n_attr);
 
+HDFLIBAPI intn GRgetnluts(int32 riid);
+
 HDFLIBAPI intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],
     int32 count[2],void * data);
 
@@ -2681,7 +2718,7 @@
 
 HDFLIBAPI intn GRreqimageil(int32 riid,intn il);
 
-HDFLIBAPI int32 GRgetlutid(int32 riid,int32 index);
+HDFLIBAPI int32 GRgetlutid(int32 riid,int32 idx);
 
 HDFLIBAPI uint16 GRluttoref(int32 lutid);
 
@@ -2697,13 +2734,15 @@
 
 HDFLIBAPI intn GRsetaccesstype(int32 riid,uintn accesstype);
 
-HDFLIBAPI intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo);
+HDFLIBAPI intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo);
 
+HDFLIBAPI intn GRgetcompress(int32 riid,comp_coder_t* comp_type,comp_info *cinfo);
+
 HDFLIBAPI intn GRsetattr(int32 id,const char *name,int32 attr_nt,int32 count,const void * data);
 
-HDFLIBAPI intn GRattrinfo(int32 id,int32 index,char *name,int32 *attr_nt,int32 *count);
+HDFLIBAPI intn GRattrinfo(int32 id,int32 idx,char *name,int32 *attr_nt,int32 *count);
 
-HDFLIBAPI intn GRgetattr(int32 id,int32 index,void * data);
+HDFLIBAPI intn GRgetattr(int32 id,int32 idx,void * data);
 
 HDFLIBAPI int32 GRfindattr(int32 id,const char *name);
 
@@ -2991,28 +3030,6 @@
      int32 flags      /* IN: flags = 0, HDF_CACHEALL */);
 
 
-/* For Pablo wrapper functions */
-
-#if defined HAVE_PABLO || defined PABLO
-HDFLIBAPI int HDFinitIOTrace(char *traceFileName, intn detail, intn lifetime,
-                          intn timeWindow, float64 timeWindowSize,
-                          intn regionTrace, intn regionSize,
-                          uint16 procTraceMask );
-HDFLIBAPI int HDFendIOTrace(void);
-
-#ifndef PABLO_FNAMES
-#   define PABLO_FNAMES
-#ifdef DF_CAPFNAMES
-#   define nihinitiotrace FNAME(IHINITIOTRACE)
-#   define nhendiotrace   FNAME(HENDIOTRACE)
-#else  /* !DF_CAPFNAMES */
-#   define nihinitiotrace FNAME(ihinitiotrace)
-#   define nhendiotrace   FNAME(hendiotrace)
-#endif /* DF_CAPFNAMES */
-#endif /* PABLO_FNAMES */
-
-#endif /* HAVE_PABLO || PABLO*/
-
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME
@@ -3195,6 +3212,15 @@
     HDFLIBAPI int32 VSfindclass
                 (HFILEID f, const char  * vsclass);
 
+    HDFLIBAPI intn VSsetblocksize
+                (int32 vkey, int32 block_size);
+
+    HDFLIBAPI intn VSsetnumblocks
+                (int32 vkey, int32 num_blocks);
+
+    HDFLIBAPI intn VSgetblockinfo
+                (int32 vkey, int32* block_size, int32* num_blocks);
+
     HDFLIBAPI void Vsetzap
                 (void);
 
@@ -3393,19 +3419,19 @@
                 (int32 vkey);
 
     HDFLIBAPI char *VFfieldname
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldtype
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldisize
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldesize
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldorder
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI intn VSsetexternalfile
 		(int32 vkey, const char *filename, int32 offset);
@@ -3517,6 +3543,9 @@
 #   define  nvsfncpk    FNAME(VSFNCPK)
 #   define  nvdtrc      FNAME(VDTRC)
 #   define  nvscfcls    FNAME(VSCFCLS)
+#   define  nvscsetblsz FNAME(VSCSETBLSZ)
+#   define  nvscsetnmbl FNAME (VSCSETNMBL)
+#   define  nvscgblinfo FNAME(VSCGBLINFO)
 #  else                                /* !sl */
 #   define  ndfivopn FNAME(DFIVOPN)
 #   define  ndfvclos FNAME(DFVCLOS)
@@ -3599,6 +3628,9 @@
 #   define  nvsfncpk    FNAME(VSFNCPK)
 #   define  nvdtrc      FNAME(VDTRC)
 #   define  nvscfcls    FNAME(VSCFCLS)
+#   define  nvscsetblsz FNAME(VSCSETBLSZ)
+#   define  nvscsetnmbl FNAME (VSCSETNMBL)
+#   define  nvscgblinfo FNAME(VSCGBLINFO)
 #  endif
 #else                           /* !DF_CAPFNAMES */
 # if defined(UNIX386) || (!(defined INTEL86) && !(defined WIN32))
@@ -3683,6 +3715,9 @@
 #   define  nvsfncpk    FNAME(vsfncpk)
 #   define  nvdtrc      FNAME(vdtrc)
 #   define  nvscfcls    FNAME(vscfcls)
+#   define  nvscsetblsz FNAME(vscsetblsz)
+#   define  nvscsetnmbl FNAME (vscsetnmbl)
+#   define  nvscgblinfo FNAME(vscgblinfo)
 #  else                            /* !sl */
 #   define  ndfivopn FNAME(dfivopn)
 #   define  ndfvclos FNAME(dfvclos)
@@ -3765,6 +3800,9 @@
 #   define  nvsfncpk    FNAME(vsfncpk)
 #   define  nvdtrc      FNAME(vdtrc)
 #   define  nvscfcls    FNAME(vscfcls)
+#   define  nvscsetblsz FNAME(vscsetblsz)
+#   define  nvscsetnmbl FNAME (vscsetnmbl)
+#   define  nvscgblinfo FNAME(vscgblinfo)
 #  endif
 #endif                          /* DF_CAPFNAMES */
 #endif                          /* VG_FNAMES */
@@ -3890,19 +3928,19 @@
                 (intf  * vkey);
 
     HDFLIBAPI      FRETVAL(intf) nvffnamec
-                (intf  * vkey, intf  *index, _fcd fname, intf *len);
+                (intf  * vkey, intf  *idx, _fcd fname, intf *len);
 
     HDFLIBAPI      FRETVAL(intf) nvfftype
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffisiz
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffesiz
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffordr
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvsfrdc
                 (intf  * vkey, _fcd  cbuf, intf  * nelt,
@@ -4016,26 +4054,35 @@
     HDFLIBAPI      FRETVAL(intf) nvsqfnelt
                 (intf * vkey, intf * nelt);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfintr
+    HDFLIBAPI      FRETVAL(intf) nvsqfintr
                 (intf * vkey, intf * interlace);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfldsc
+    HDFLIBAPI      FRETVAL(intf) nvsqfldsc
                 (intf * vkey, _fcd fields, intf *fieldslen);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfvsiz
+    HDFLIBAPI      FRETVAL(intf) nvsqfvsiz
                 (intf * vkey, intf * size);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqnamec  
+    HDFLIBAPI      FRETVAL(intf) nvsqnamec  
                 (intf * vkey, _fcd name, intf *namelen);
 
-    HDFLIBAPI      FRETVAL(intf)nvsfccpk
+    HDFLIBAPI      FRETVAL(intf) nvsfccpk
                 (intf *vs, intf *packtype, _fcd buflds, intf *buf, intf *bufsz,
         intf *nrecs, _fcd pckfld, _fcd fldbuf, intf *buflds_len, intf *fld_len);
 
-    HDFLIBAPI      FRETVAL(intf)nvsfncpk
+    HDFLIBAPI      FRETVAL(intf) nvsfncpk
                 (intf *vs, intf *packtype, _fcd buflds, intf *buf, intf *bufsz,
         intf *nrecs, _fcd pckfld, intf *fldbuf, intf *buflds_len, intf *fld_len);
 
+    HDFLIBAPI      FRETVAL(intf) nvscsetblsz
+                (intf *id, intf *block_size);
+
+    HDFLIBAPI      FRETVAL(intf) nvscsetnmbl
+                (intf *id, intf *num_blocks);
+
+    HDFLIBAPI      FRETVAL(intf) nvscgblinfo
+                (intf *id, intf *block_size, intf *num_blocks);
+
 /* 
   ** from vattrf.c
  */

Modified: packages/libhdf4/trunk/hdf/src/linklist.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/linklist.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/linklist.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: linklist.c,v 1.4 1999/06/16 21:11:06 dwells Exp $ */
+/* $Id: linklist.c,v 1.5 2005/01/09 20:54:06 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_linklist_c
-#endif
-
 /*
 FILE
     linklist.c - Internal storage routines for handling generic linked lists
@@ -87,10 +83,6 @@
     CONSTR(FUNC, "HULcreate_list");	/* for HERROR */
     list_head_t *ret_value=NULL;     /* ptr to the linked list "head" node */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULcreate_list);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Allocate the head information */
@@ -114,10 +106,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULcreate_list);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULcreate_list() */
 
@@ -143,10 +131,6 @@
         *next_node;                 /* next node in the list */
     intn ret_value=SUCCEED;         /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULdestroy_list);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,FAIL);
@@ -170,10 +154,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULdestroy_list);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULdestroy_list() */
 
@@ -198,10 +178,6 @@
     node_info_t *new_node;          /* new node to insert into the list */
     intn ret_value=SUCCEED;         /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULadd_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || obj==NULL)
         HGOTO_ERROR(DFE_ARGS,FAIL);
@@ -252,10 +228,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULadd_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULadd_node() */
 
@@ -279,10 +251,6 @@
     node_info_t *curr_node;         /* current node we are on */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULsearch_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || srch_func==NULL || key==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -301,10 +269,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULsearch_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULsearch_node() */
 
@@ -326,10 +290,6 @@
     CONSTR(FUNC, "HULfirst_node");	/* for HERROR */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULfirst_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -347,10 +307,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULfirst_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULfirst_node() */
 
@@ -371,10 +327,6 @@
     CONSTR(FUNC, "HULnext_node");	/* for HERROR */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULnext_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -393,10 +345,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULnext_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULnext_node() */
 
@@ -422,10 +370,6 @@
         *prev_node;                 /* previous node we looked at */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULremove_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || srch_func==NULL || key==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -453,10 +397,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULremove_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULremove_node() */
 

Modified: packages/libhdf4/trunk/hdf/src/mcache.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/mcache.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mcache.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -44,10 +44,10 @@
  *****************************************************************************/ 
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.3 $";
+static char RcsId[] = "@(#)$Revision: 1.4 $";
 #endif
 
-/* $Id: mcache.c,v 1.3 1996/10/28 15:21:39 koziol Exp $ */
+/* $Id: mcache.c,v 1.4 2005/01/03 22:18:43 mcgrath Exp $ */
 
 /*
  *  NOTE:
@@ -620,6 +620,7 @@
                 if (((mp->pgin)(mp->pgcookie, pgno-1, bp->page)) == FAIL)
                   {
                       HEreport("mcache_get: error reading chunk=%d\n",(intn)pgno-1);
+                      lp = NULL; /* don't clobber the cache! */
                       ret_value = RET_ERROR;
                       goto done;
                   }
@@ -627,6 +628,7 @@
           else
             {
                 HEreport("mcache_get: reading fcn not set,chunk=%d\n",(intn)pgno-1);
+                lp = NULL;
                 ret_value = RET_ERROR;
                 goto done;
             }

Modified: packages/libhdf4/trunk/hdf/src/mfan.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/mfan.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mfan.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.52 $";
+static char RcsId[] = "@(#)$Revision: 1.53 $";
 #endif
 
-/* $Id: mfan.c,v 1.52 1999/06/16 21:11:08 dwells Exp $ */
+/* $Id: mfan.c,v 1.53 2005/01/09 20:54:07 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfan_c
-#endif
-
 /*-----------------------------------------------------------------------------
  * File:     mfan.c
  * Author:   GeorgeV
@@ -1356,10 +1352,6 @@
     filerec_t  *file_rec = NULL;		/* file record pointer */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANstart);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1380,10 +1372,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANstart);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANstart() */
 
@@ -1415,10 +1403,6 @@
     filerec_t  *file_rec  = NULL;  /* file record pointer */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANfileinfo);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1470,10 +1454,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANfileinfo);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANfileinfo() */
 
@@ -1497,10 +1477,6 @@
     ANnode    *ann_node  = NULL;
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANend);
-#endif /* HAVE_PABLO */
-  
     /* Clear error stack */
     HEclear();
 
@@ -1613,10 +1589,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANend);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANend() */
 
@@ -1647,16 +1619,8 @@
 #endif /* LATER */
     int32    ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANcreate);
-#endif /* HAVE_PABLO */
-
     ret_value = (ANIcreate(an_id, elem_tag, elem_ref, type));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANcreate);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANcreate() */
 
@@ -1687,10 +1651,6 @@
     uint16 ann_ref;
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANcreatef);
-#endif /* HAVE_PABLO */
-
     /* deal with type */
     switch((ann_type)type)
       {
@@ -1717,10 +1677,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANcreatef);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANcreateann() */
 
@@ -1752,10 +1708,6 @@
     ANentry   *ann_entry = NULL;
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANselect);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1793,10 +1745,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANselect);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANselect() */
 
@@ -1829,10 +1777,6 @@
     CONSTR(FUNC, "ANnumann");
     intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANnumann);
-#endif /* HAVE_PABLO */
-
     /* deal with invalid types */
     if(type == AN_FILE_LABEL || type == AN_FILE_DESC)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1847,10 +1791,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANnumann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANnumann() */
 
@@ -1884,10 +1824,6 @@
     CONSTR(FUNC, "ANannlist");
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANannlist);
-#endif /* HAVE_PABLO */
-
     /* deal with invalid types */
     if(type == AN_FILE_LABEL || type == AN_FILE_DESC)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1902,10 +1838,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANannlist);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANannlist() */
 
@@ -1931,15 +1863,7 @@
 #endif /* LATER */
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANannlen);
-#endif /* HAVE_PABLO */
-
     ret_value =  ANIannlen(ann_id);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANannlen);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANannlen() */
 
@@ -1968,15 +1892,7 @@
 #endif /* LATER */
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANwriteann);
-#endif /* HAVE_PABLO */
-
     ret_value = ANIwriteann(ann_id, ann, annlen);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANwriteann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANwriteann() */
 
@@ -2005,15 +1921,7 @@
 #endif /* LATER */
     int32   ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANreadann);
-#endif /* HAVE_PABLO */
-
     ret_value = ANIreadann(ann_id, ann, maxlen);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANreadann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANreadann() */
 
@@ -2038,18 +1946,9 @@
     CONSTR(FUNC, "ANendaccess");    /* for HERROR */
 #endif /* LATER */
     intn  ret_value = SUCCEED;
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANendaccess);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     ann_id=ann_id;
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANendaccess);
-#endif /* HAVE_PABLO */
-
-
     return ret_value;
 } /* ANendaccess() */
 

Modified: packages/libhdf4/trunk/hdf/src/mfgr.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/mfgr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mfgr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.77 $";
+static char RcsId[] = "$Revision: 1.91 $";
 #endif
 
-/* $Id: mfgr.c,v 1.77 2000/11/16 15:41:04 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfgr_c
-#endif
+/* $Id: mfgr.c,v 1.91 2005/02/14 00:03:09 bmribler Exp $ */
 
 /*
 FILE
@@ -82,6 +79,8 @@
     - Maps a RI name to an index which is returned.
 intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32 *il,int32 dimsizes[2],int32 *n_attr)
     - Gets information about an RI which has been selected/created.
+intn GRgetnluts(int32 riid)
+    - Get the number of palettes (LUTs) for an image
 intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],int32 count[2],void * data)
     - Writes image data to an RI.  Partial dataset writing and subsampling is
         allowed, but only with the dimensions of the dataset (ie. no UNLIMITED
@@ -129,8 +128,10 @@
     - Makes the image data of an RI into an external element special element.
 intn GRsetaccesstype(int32 riid,uintn accesstype)
     - Sets the access for an RI to be either serial or parallel I/O.
-intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo)
     - Makes the image data of an RI into a compressed special element.
+intn GRgetcompress(int32 riid,comp_coder_t* comp_type,comp_info *cinfo)
+    - Retrieves the compression information of a raster image's data.
 
 Attribute Functions:
 intn GRsetattr(int32 dimid|riid|grid,char *name,int32 attr_nt,int32 count,void * data)
@@ -164,7 +165,15 @@
 
 #define MFGR_MASTER
 #include "hdf.h"
+#include "hlimits.h"
 
+#ifdef  H4_GR_SZIP
+/* not supported for GR */
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+#include "szlib.h"
+#endif
+#endif
+
 /* Local pre-processor macros */
 #define XDIM    0
 #define YDIM    1
@@ -191,6 +200,8 @@
 
 PRIVATE intn GRIgetaid(ri_info_t *img_ptr, intn acc_perm);
 
+PRIVATE intn GRIisspecial_type(int32 file_id, uint16 tag, uint16 ref);
+
 /*--------------------------------------------------------------------------
  NAME
     rigcompare
@@ -323,7 +334,87 @@
     return((gr_info_t *)(t==NULL ? NULL : *t));
 } /* end Get_grfile() */
 
-        
+/*--------------------------------------------------------------------------
+ NAME
+    GRIisspecial_type
+ PURPOSE
+    Returns the special type if the given element is special.
+ USAGE
+    intn GRIisspecial_type(file_id, tag, ref)
+        int32 file_id;		IN: file id
+        uint16 tag;		IN: tag of the element
+        uint16 ref;		IN: ref of the element
+ RETURNS
+    Special type:
+	SPECIAL_LINKED
+	SPECIAL_EXT
+	SPECIAL_COMP
+	SPECIAL_VLINKED
+	SPECIAL_CHUNKED
+	SPECIAL_BUFFERED
+	SPECIAL_COMPRAS
+    or 0 if the element is not special element.
+ DESCRIPTION
+    Called internally by the GRIget_image_list to allow a chunked or 
+    linked-block element to proceed eventhough its offset is 0.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+
+  *** Only called by library routines, should _not_ be called externally ***
+
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE intn
+GRIisspecial_type(int32 file_id, uint16 tag, uint16 ref)
+{
+    CONSTR(FUNC, "GRIisspecial_type");
+    accrec_t* access_rec=NULL;/* access element record */
+    int32     aid;
+    intn      ret_value=0;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired for its special information */
+    aid = Hstartread(file_id, tag, ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* only return the valid special code, anything else return 0 */
+    switch (access_rec->special)
+    {
+	case SPECIAL_LINKED:
+	case SPECIAL_EXT:
+	case SPECIAL_COMP:
+	case SPECIAL_VLINKED:
+	case SPECIAL_CHUNKED:
+	case SPECIAL_BUFFERED:
+	case SPECIAL_COMPRAS:
+	    ret_value = access_rec->special;
+	    break;
+	default:
+	    ret_value = 0;
+    } /* switch */
+
+    if (Hendaccess(aid)== FAIL)
+        HERROR(DFE_CANTENDACCESS);
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+	/* end access to the aid if it's been accessed */
+	if (aid != 0)
+	    if (Hendaccess(aid)== FAIL)
+		HERROR(DFE_CANTENDACCESS);
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}   /* GRIisspecial_type */
+
 /* -------------------------- New_grfile ------------------------ */
 /*
    Creates gr_info_t structure and adds it to the tree
@@ -662,9 +753,23 @@
           if(img_info[i].img_tag!=DFTAG_NULL)
               for (j = i+1; j < curr_image; j++)
                 {
+		  /* if their refs are different, they're not duplicate, skip */
+		  if(img_info[i].img_ref == img_info[j].img_ref)
                     if(img_info[j].img_tag!=DFTAG_NULL)
-                        if ((img_info[i].offset!= INVALID_OFFSET && img_info[i].offset!=0)
-                            && img_info[i].offset == img_info[j].offset)
+		      {
+                        /* If the element is special, get its type, to allow
+                           linked block or chunked images to go into the if
+                           statement below in order for the duplicate image be
+                           eliminated - bug #814, BMR Feb, 2005 */
+                        intn special_type = GRIisspecial_type(file_id,img_info[i
+].img_tag,img_info[i].img_ref);
+
+                        if (((img_info[i].offset!= INVALID_OFFSET && img_info[i]
+.offset!=0)
+                                && img_info[i].offset == img_info[j].offset) ||
+                             (img_info[i].offset==0
+                                && (special_type == SPECIAL_LINKED ||
+                                    special_type == SPECIAL_CHUNKED)))
                           {
                               /* eliminate the oldest tag from the match */
                               switch(img_info[i].img_tag) {
@@ -701,6 +806,7 @@
                                 } /* end switch */
                               nimages--;  /* if duplicate found, decrement the number of images */
                           } /* end if */
+                     } /* end if */
                 } /* end for */
       } /* end for */
 #ifdef QAK
@@ -1492,9 +1598,6 @@
     gr_info_t *gr_ptr;          /* ptr to the new GR information for a file */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRstart);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -1567,9 +1670,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRstart);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRstart() */
 
@@ -1600,9 +1700,6 @@
     gr_info_t *gr_ptr;          /* ptr to the GR information for a file */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRfileinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -1627,9 +1724,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRfileinfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRfileinfo() */
 
@@ -2074,9 +2168,6 @@
                                 that may return a ref or a FAIL - BMR */
 
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRend);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2314,9 +2405,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRend);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRend() */
 
@@ -2350,9 +2438,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRselect);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2383,9 +2468,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRselect);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRselect() */
 
@@ -2428,9 +2510,6 @@
     int32 temp_ref;     /* used to hold the returned value from a function
                                 that may return a ref or a FAIL - BMR */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRcreate);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -2521,9 +2600,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRcreate);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRcreate() */
 
@@ -2556,9 +2632,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-	TRACE_ON(PABLO_mask,ID_GRnametoindex);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2587,9 +2660,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRnametoindex);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRnametoindex() */
 
@@ -2630,9 +2700,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetiminfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -2678,14 +2745,67 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetiminfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetiminfo() */
 
 /*--------------------------------------------------------------------------
  NAME
+    GRgetnluts
+
+ PURPOSE
+    Get the number of palettes (LUTs) for an image
+
+ USAGE
+    intn GRgetnluts(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    The number of palettes on success, FAIL (-1) on failure
+
+ DESCRIPTION
+    Determines the number of palettes for an image (0 or 1 for now).  In the
+    future, if multiple palettes are supported, this function may return
+    values greater than 1.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn GRgetnluts(int32 riid)
+{
+    CONSTR(FUNC, "GRgetnluts");   /* for HERROR */
+    ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    intn  ret_value = FAIL;
+
+    /* clear error stack and check validity of args */
+    HEclear();
+
+    /* check the validity of the RI ID */
+    if (HAatom_group(riid)!=RIIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+    
+    /* locate LUT's object in hash table */
+    if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(riid)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    if(ri_ptr->lut_ref==DFREF_WILDCARD) /* check for no palette defined currently */
+        ret_value=0;
+    else        /* we've got a valid palette currently */
+        ret_value=1;
+
+done:
+  if(ret_value == FAIL)   
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+} /* end GRgetnluts() */
+
+/*--------------------------------------------------------------------------
+ NAME
     GRwriteimage
 
  PURPOSE
@@ -2732,15 +2852,17 @@
     void * *img_data;            /* pointer to the converted image data to write */
     uintn pixel_mem_size,       /* size of a pixel in memory */
         pixel_disk_size;        /* size of a pixel on disk */
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn status;
     intn convert=FALSE;         /* true if machine NT != NT to be written */
     uint8 platnumsubclass;      /* class of this NT for this platform */
     intn new_image=FALSE;       /* whether we are writing a new image out */
     intn switch_interlace=FALSE;/* whether the memory interlace needs to be switched around */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwriteimage);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -2783,6 +2905,34 @@
     gr_ptr=ri_ptr->gr_ptr;
     hdf_file_id=gr_ptr->hdf_file_id;
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    }
+    }
 #ifdef QAK
 printf("%s: stride[XDIM,YDIM]=%ld, %ld\n",FUNC,stride[XDIM],stride[YDIM]);
 printf("%s: start[XDIM,YDIM]=%ld, %ld\n",FUNC,start[XDIM],start[YDIM]);
@@ -3235,9 +3385,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRwriteimage);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRwriteimage() */
 
@@ -3291,11 +3438,13 @@
     uintn pixel_mem_size;       /* size of a pixel in memory */
     intn convert;               /* true if machine NT != NT to be written */
     uint8 platnumsubclass;      /* class of this NT for this platform */
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn status;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadimage);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3331,6 +3480,34 @@
     gr_ptr=ri_ptr->gr_ptr;
     hdf_file_id=gr_ptr->hdf_file_id;
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    }
+    }
     if(stride[XDIM]==1 && stride[YDIM]==1)
       { /* solid block of data */
           solid_block=TRUE;
@@ -3550,9 +3727,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreadimage);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreadimage() */
 
@@ -3585,9 +3759,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRendaccess);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3642,9 +3813,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRendaccess);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRendaccess() */
 
@@ -3676,9 +3844,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     uint16  ret_value = 0; /* FAIL? */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRidtoref);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3715,9 +3880,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRidtoref);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRidtoref() */
 
@@ -3752,9 +3914,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreftoindex);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3783,9 +3942,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreftoindex);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreftoindex() */
 
@@ -3822,9 +3978,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreqlutil);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3847,9 +4000,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreqlutil);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreqlutil() */
 
@@ -3886,9 +4036,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_GRreqimageil);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3911,9 +4058,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreqimageil);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreqimageil() */
 
@@ -3947,9 +4091,6 @@
     CONSTR(FUNC, "GRgetlutid");   /* for HERROR */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetlutid);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3966,9 +4107,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetlutid);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetlutid() */
 
@@ -4002,9 +4140,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     uint16 ret_value = 0;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRluttoref);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4025,9 +4160,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-       TRACE_OFF(PABLO_mask, ID_GRluttoref);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRluttoref() */
 
@@ -4063,9 +4195,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetlutinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4077,17 +4206,16 @@
     if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(lutid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
 
-    if(ri_ptr->lut_ref==DFREF_WILDCARD) /* check for no palette defined currently */
-      {
-          if(ncomp!=NULL)
-              *ncomp=0;
-          if(nt!=NULL)
-              *nt=DFNT_NONE;
-          if(il!=NULL)
-              *il=-1;
-          if(nentries!=NULL)
-              *nentries=0;
-      } /* end if */
+    if(ri_ptr->lut_ref==DFREF_WILDCARD) { /* check for no palette defined currently */
+        if(ncomp!=NULL)
+            *ncomp=0;
+        if(nt!=NULL)
+            *nt=DFNT_NONE;
+        if(il!=NULL)
+            *il=-1;
+        if(nentries!=NULL)
+            *nentries=0;
+    } /* end if */
     else        /* we've got a valid palette currently */
       {
           if(ncomp!=NULL)
@@ -4107,10 +4235,7 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetlutinfo);
-#endif /* HAVE_PABLO */
-  return ret_value;
+    return ret_value;
 } /* end GRgetlutinfo() */
 
 /*--------------------------------------------------------------------------
@@ -4147,9 +4272,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwritelut);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4164,7 +4286,8 @@
     hdf_file_id=ri_ptr->gr_ptr->hdf_file_id;
 
     /* Check if this is compatible with older-style palettes */
-    if(ncomps==3 && nt==DFNT_UINT8 && il==MFGR_INTERLACE_PIXEL && nentries==256)
+    if(ncomps==3 && (nt==DFNT_UINT8 ||nt==DFNT_UCHAR8) && 
+		    il==MFGR_INTERLACE_PIXEL && nentries==256)
       {
           /* Check if LUT exists already */
           if(ri_ptr->lut_tag!=DFTAG_NULL && ri_ptr->lut_ref!=DFREF_WILDCARD)
@@ -4208,9 +4331,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRwritelut);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRwritelut() */
 
@@ -4244,9 +4364,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadlut);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4295,9 +4412,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreadlut);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreadlut() */
 
@@ -4332,9 +4446,6 @@
     int32 tmp_aid;  /* AID returned from HXcreate() */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetexternalfile);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4383,9 +4494,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-   TRACE_OFF(PABLO_mask, ID_GRsetexternalfile);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetexternalfile() */
 
@@ -4421,9 +4529,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetaccesstype);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4447,14 +4552,64 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetaccesstype);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetaccesstype() */
 
+
+#ifdef H4_GR_SZIP
+/* not supported */
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
 /*--------------------------------------------------------------------------
  NAME
+    GRsetup_szip_parms( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+
+ PURPOSE
+    Set up the szip parameters
+
+ USAGE
+    intn GRsetaccesstype( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+       ri_info_t *ri_ptr;  IN: the RI object 
+       comp_info *c_info;  IN/OUT: the compression info (szip) 
+       int32 *cdims;       IN: chunk dims if chunked, else NULL
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Sets the computed szip parameters before calling HCcreate.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn 
+GRsetup_szip_parms( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+{
+int32 nt;
+int32 ndims;
+int32 ncomp;
+int32 xdims[MAX_VAR_DIMS];
+    intn       ret_value = SUCCEED;
+
+
+	ndims = 2;
+	xdims[0] = ri_ptr->img_dim.xdim;
+	xdims[1] = ri_ptr->img_dim.ydim;
+
+	nt = ri_ptr->img_dim.nt;
+	ncomp = ri_ptr->img_dim.ncomps;
+
+        ret_value = HCPsetup_szip_parms( c_info, nt, ncomp, ndims, xdims, cdims);
+
+done:
+	return(ret_value);
+}
+#endif
+#endif
+
+/*--------------------------------------------------------------------------
+ NAME
     GRsetcompress
 
  PURPOSE
@@ -4462,9 +4617,9 @@
 
  USAGE
     intn GRsetcompress(riid,comp_type,cinfo)
-        int32 riid;         IN: RI ID from GRselect/GRcreate
-        int32 comp_type;    IN: type of compression, from list in hcomp.h
-        comp_info *cinfo;   IN: compression specific information
+        int32 riid;         	IN: RI ID from GRselect/GRcreate
+        comp_coder_t comp_type;	IN: type of compression
+        comp_info *cinfo;   	IN: compression specific information
 
  RETURNS
     SUCCEED/FAIL
@@ -4478,24 +4633,25 @@
  EXAMPLES
  REVISION LOG
 --------------------------------------------------------------------------*/
-intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo)
 {
     CONSTR(FUNC, "GRsetcompress");   /* for HERROR */
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    comp_info cinfo_x;
+    uint32 comp_config;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetcompress);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
+    HDmemcpy(&cinfo_x,cinfo,sizeof(comp_info));
     /* check the validity of the RI ID */
     if (HAatom_group(riid)!=RIIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
     
     /* Check the validity of the compression type */
-    if ((comp_type < 0 || comp_type >= COMP_CODE_INVALID) && comp_type!=COMP_CODE_JPEG)
+    if ((comp_type < COMP_CODE_NONE || comp_type >= COMP_CODE_INVALID) 
+	&& comp_type!=COMP_CODE_JPEG)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* locate RI's object in hash table */
@@ -4506,6 +4662,37 @@
     if (ri_ptr->use_buf_drvr)
         HGOTO_ERROR(DFE_CANTMOD, FAIL);
 
+    /* Check that the compression method is enabled */
+    HCget_config_info(comp_type, &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	    HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+
+    /* SZIP is not supported for GR */
+    if (comp_type==COMP_CODE_SZIP) 
+        HGOTO_ERROR(DFE_CANTMOD, FAIL);
+
+#ifdef  H4_GR_SZIP
+/* not supported */
+#ifndef H4_HAVE_LIBSZ
+    /* probably covered by above */
+    if (comp_type==COMP_CODE_SZIP) 
+        HGOTO_ERROR(DFE_CANTMOD, FAIL);
+#else
+    if (comp_type==COMP_CODE_SZIP)  {
+    /* szip is enabled, check and set up szip parms */
+	if (GRsetup_szip_parms( ri_ptr, &cinfo_x, NULL) == FAIL) {
+	    HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	}
+    }
+#endif
+#endif
+
     /* Mark the image as being compressed and cache args */
     if(comp_type==COMP_CODE_JPEG)
       {
@@ -4524,7 +4711,7 @@
       } /* end else */
 
     /* Store compression parameters */
-    HDmemcpy(&(ri_ptr->cinfo),cinfo,sizeof(comp_info));
+    HDmemcpy(&(ri_ptr->cinfo),&cinfo_x,sizeof(comp_info));
 
     /* Mark the image as needing to be a buffered special element */
     ri_ptr->use_buf_drvr=1;
@@ -4543,14 +4730,98 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetcompress);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetcompress() */
 
 /*--------------------------------------------------------------------------
  NAME
+    GRgetcompress
+
+ PURPOSE
+    Get the compression information of a raster image's data.
+
+ USAGE
+    intn GRgetcompress(riid,comp_type,cinfo)
+        int32 riid;		   IN: RI ID from GRselect/GRcreate
+        comp_coder_t* comp_type;   OUT: type of compression
+        comp_info* cinfo;	   OUT: retrieved compression information
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    This routine gets the compression type of the given RI's data, then
+    retrieves the appropriate information into the provided compression
+    info structure.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    JPEG information is currently not retrievable because the JPEG 
+    parameters, 'quality' and 'force_baseline', are irreversibly 
+    mapped to a quantization table.  Thus, only the correct compression 
+    type will be returned; cinfo will only contain 0s.
+
+ EXAMPLES
+ REVISION LOG
+    July 2001: Added to fix bug #307 - BMR
+--------------------------------------------------------------------------*/
+intn GRgetcompress(int32 riid, comp_coder_t* comp_type, comp_info* cinfo)
+{
+    CONSTR(FUNC, "GRgetcompress");   /* for HGOTO_ERROR */
+    ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    int32 file_id;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    intn  ret_value = SUCCEED;
+
+    /* clear error stack and check validity of args */
+    HEclear();
+
+    /* check the validity of the RI ID */
+    if (HAatom_group(riid) != RIIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* and check the output arguments */
+    if (comp_type == NULL || cinfo == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* locate RI's object in hash table */
+    if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(riid)))
+        HGOTO_ERROR(DFE_BADPTR, FAIL);
+
+    file_id = ri_ptr->gr_ptr->hdf_file_id;	/* temporary use */
+
+    /* If the compression scheme used was JPEG, return the compression type
+       and 0 for the 'quality' and 'force_baseline' parameters, because 
+       these parameters are currently not possible to be retrieved. */
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	*comp_type = COMP_CODE_JPEG;
+	cinfo->jpeg.quality = 0;
+	cinfo->jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	ret_value = HCPgetcompress(file_id, ri_ptr->img_tag, ri_ptr->img_ref,
+                                comp_type, cinfo);
+	if (ret_value == FAIL)
+	    HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+
+done:
+  if(ret_value == 0)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* end GRgetcompress() */
+
+/*--------------------------------------------------------------------------
+ NAME
     GRsetattr
 
  PURPOSE
@@ -4593,9 +4864,6 @@
     intn is_riid=FALSE;         /* whether we had a RIID */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4829,9 +5097,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetattr() */
 
@@ -4871,9 +5136,6 @@
     at_info_t *at_ptr;          /* ptr to the attribute to work with */
     intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRattrinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4929,9 +5191,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRattrinfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRattrinfo() */
 
@@ -4971,9 +5230,6 @@
     int32 at_size;              /* size in bytes of the attribute data */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -5054,9 +5310,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetattr() */
 
@@ -5093,9 +5346,6 @@
     at_info_t *at_ptr;          /* ptr to the attribute to work with */
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRfindattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -5139,9 +5389,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRfindattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRfindattr() */
 
@@ -5496,6 +5743,7 @@
     uintn      pixel_disk_size;      /* size of a pixel on disk */
     void *      fill_pixel = NULL;    /* converted value for the filled pixel */
     int32      at_index;             /* attribute index for the fill value */
+    uint32     comp_config;
     int32      ndims    = 0;         /* # dimensions i.e. rank */
     uint8      nlevels  = 1;         /* default # levels is 1 */
     intn       i;                    /* loop variable */
@@ -5503,9 +5751,6 @@
     gr_info_t *gr_ptr;               /* ptr to the file GR information for this image */
     intn       ret_value = SUCCEED;  /* return value */
 
-#ifdef HAVE_PABLO
-	TRACE_ON(PABLO_mask,ID_GRsetchunk);
-#endif /* HAVE_PABLO */
 
 #ifdef CHK_DEBUG
     fprintf(stderr,"GRsetchunk: called  \n");
@@ -5513,6 +5758,7 @@
     /* clear error stack and check validity of args */
     HEclear();
 
+    memset(chunk,0,sizeof(chunk[0]));
     /* Check some args */
 
     /* check the validity of the RI ID */
@@ -5555,13 +5801,54 @@
           chunk[0].minfo = &minfo; /* dummy */
           break;
       case (HDF_CHUNK | HDF_COMP):
+      /*  EIP 9/12/03 
+       *  We have to take special care if SZIP library is not available;
+       *  Fow all other compression types do
+       */
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
+
+    /* Check that the compression encoder is available */
+    HCget_config_info((comp_coder_t )(cdef->comp.comp_type), &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+                 HGOTO_ERROR(DFE_BADCODER,FAIL); 
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+                 HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+    }
+      if ((comp_coder_t)cdef->comp.comp_type != COMP_CODE_SZIP) {
           cdims = cdef->comp.chunk_lengths;
           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
           chunk[0].cinfo = &cdef->comp.cinfo; 
           chunk[0].minfo = &minfo; /* dummy */
+       }
+       else /* requested compression is SZIP */
+	 /* SZIP not supported for GR */
+		HGOTO_ERROR(DFE_CANTMOD, FAIL);
+#ifdef H4_GR_SZIP
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+          {
+            cdims = cdef->comp.chunk_lengths;
+            chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
+            chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
+            chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
+    	    HDmemcpy(&cinfo,&(cdef->comp.cinfo),sizeof(comp_info));
+            chunk[0].minfo = &minfo; /* dummy */
+	    if (GRsetup_szip_parms( ri_ptr, &cinfo, cdims) == FAIL) 
+                HGOTO_ERROR(DFE_INTERNAL,FAIL); 
+            chunk[0].cinfo = &cinfo; 
+	}
+#else                         /* we do not have the SZIP library */
+          {
+/* covered by new test above ??*/
+		HGOTO_ERROR(DFE_CANTMOD, FAIL);
+          }
+#endif /* H4_HAVE_LIBSZ */
+#endif
+
           break;
       case (HDF_CHUNK | HDF_NBIT): /* don't support NBIT for GRs */
           ret_value = FAIL;
@@ -5736,9 +6023,6 @@
     if (chunk[0].pdims != NULL)
         HDfree(chunk[0].pdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRsetchunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRsetchunk */
 
@@ -5783,9 +6067,6 @@
     intn            i;                    /* loop variable */
     intn            ret_value = SUCCEED;  /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetchunkinfo);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -5864,9 +6145,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRgetchunkinfo);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRgetchunkinfo() */
 
@@ -5878,8 +6156,8 @@
  DESCRIPTION
      This routine writes a whole chunk of data to the chunked GR 
      specified by chunk 'origin' for the given GR and can be used
-     instead of GRwritedata() when this information is known. This
-     routine has less overhead and is much faster than using GRwritedata().
+     instead of GRwriteimage() when this information is known. This
+     routine has less overhead and is much faster than using GRwriteimage().
 
      Origin specifies the co-ordinates of the chunk according to the chunk
      position in the overall chunk array.
@@ -5914,12 +6192,14 @@
     int8       platnumsubclass; /* the machine type of the current platform */
     uintn      convert;         /* whether to convert or not */
     intn       i;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn       status;
     intn       switch_interlace = FALSE;/* whether the memory interlace needs to be switched around */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwritechunk);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -5954,8 +6234,36 @@
 #ifdef CHK_DEBUG
     fprintf(stderr,"%s: ri_ptr->img_aid =%d \n", FUNC, ri_ptr->img_aid);
 #endif
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    } 
+   }
 
-    /* inquire about element */
+   /* inquire about element */
     ret_value = Hinquire(ri_ptr->img_aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
       {
@@ -6055,9 +6363,6 @@
     if (img_data != NULL)
         HDfree(img_data);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRwritechunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRwritechunk() */
 
@@ -6104,12 +6409,14 @@
     int8       platnumsubclass; /* the machine type of the current platform */
     uintn      convert;         /* whether to convert or not */
     intn       i;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn       status;
     intn       switch_interlace = FALSE;/* whether the memory interlace needs to be switched around */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadchunk);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -6145,6 +6452,34 @@
     fprintf(stderr,"%s: ri_ptr->img_aid =%d \n", FUNC, ri_ptr->img_aid);
 #endif
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    } 
+   }
     /* inquire about element */
     ret_value = Hinquire(ri_ptr->img_aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -6251,9 +6586,6 @@
     if (img_data != NULL)
         HDfree(img_data);
 
-#ifdef HAVE_PABLO
-	TRACE_OFF(PABLO_mask,ID_GRreadchunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRreadchunk() */
 
@@ -6318,9 +6650,6 @@
     int16      special;              /* Special code */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetchunkcache);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -6376,9 +6705,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRsetchunkcache);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRsetchunkcache() */
 

Modified: packages/libhdf4/trunk/hdf/src/mfgr.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/mfgr.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mfgr.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: mfgr.h,v 1.21 1999/02/06 03:21:48 koziol Exp $ */
+/* $Id: mfgr.h,v 1.22 2001/09/26 20:47:34 bmribler Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfgr.h
@@ -115,7 +115,7 @@
     uintn use_buf_drvr;         /* access to image needs to be through the buffered special element driver */
     uintn use_cr_drvr;          /* access to image needs to be through the compressed raster special element driver */
     uintn comp_img;             /* whether to compress image data */
-    int32 comp_type;            /* compression type */
+    comp_coder_t comp_type;     /* compression type */
     comp_info cinfo;            /* compression information */
     uintn ext_img;              /* whether to make image data external */
     char *ext_name;             /* name of the external file */

Modified: packages/libhdf4/trunk/hdf/src/mfgrf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/mfgrf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mfgrf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,3 +1,4 @@
+
 /****************************************************************************
  * NCSA HDF                                                                 *
  * Software Development Group                                               *
@@ -11,10 +12,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.15 $";
+static char RcsId[] = "@(#)$Revision: 1.21 $";
 #endif
 
-/* $Id: mfgrf.c,v 1.15 2000/08/29 13:55:36 koziol Exp $ */
+/* $Id: mfgrf.c,v 1.21 2003/12/10 21:13:24 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfsdf.c
@@ -46,7 +47,8 @@
  *  mgrclut:    Call GRreadlut to read a character palette from the file
  *  mgsxfil:    Call GRsetexternalfile to move an image into an external file
  *  mgsactp:    Call GRsetaccesstype to set the access type for an image
- *  mgscomp:    Call GRsetcompress to compress an image in the file [Later]
+ *  mgscomp:    Call GRsetcompress to compress an image in the file 
+ *  mggcomp:    Call GRgetcompress to get image compression information 
  *  mgisattr:    Call GRsetattr to write an attribute for an object
  *  mgiscatt:   Call GRsetattr to write a char attribute for an obj.
  *  mgatinf:    Call GRattrinfo get information about an attribute
@@ -1122,7 +1124,7 @@
  *                      COMP_CODE_RLE  = 1
  *                      COMP_CODE_SKPHUFF = 3
  *                      COMP_CODE_DEFLATE = 4
- *                      COMP_CODE_JPEG    = 6
+ *                      COMP_CODE_JPEG    = 7 
  *          comp_prm:   compression parameters array
  *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
  *                            Adaptive Huffman compression algorithm
@@ -1145,7 +1147,7 @@
 {
     int32 riid;               /*  GR id               */
     comp_info c_info;         /* compression info     */
-    int32 c_type;              /* compression type definition */
+    comp_coder_t c_type;              /* compression type definition */
 
     int CASE;
     intf ret;
@@ -1191,6 +1193,84 @@
 
 }   
 /*-------------------------------------------------------------------------
+ * Name:    mgcgcompress
+ * Puporse: Call GRgetcompress
+ * Inputs:  id: access id to GR
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *                      COMP_CODE_JPEG    = 7 
+ *          comp_prm:   compression parameters array
+ *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          comp_prm[0]=deflate_level:    GZIP  compression parameter
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nmgcgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int CASE;
+    intf ret = -1;
+    intn c_ret;
+
+
+    c_ret = GRgetcompress(*id, &c_type, &c_info);
+
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+         ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+         ret = 0;
+         break;
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = (intf)c_info.skphuff.skp_size;
+          ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = (intf)c_info.deflate.level;
+          ret = 0;
+          break;
+
+       case COMP_CODE_JPEG:      /* JPEG compression */  
+          *comp_type = 7;
+          ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+     } /*end CASE */
+    } /*end if */
+    return(ret);
+
+}   
+/*-------------------------------------------------------------------------
  * Name:    mglt2rf
  * Puporse: Call GRluttoref
  * Inputs:  id: LUT id returned by GRgetlutid(mggltid) 
@@ -1212,3 +1292,26 @@
    ret = GRluttoref ( *id );
    return(ret);
 }
+/*-------------------------------------------------------------------------
+ * Name:    mgcgnluts
+ * Puporse: Call GRgetnluts
+ * Inputs:  id: image identifier
+ * Returns: number of palettes on success and -1 if fails.
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgnluts(intf *id)
+#else
+       nmgcgnluts( id)
+       intf *id;
+#endif /* PROTOTYPE */
+{
+   intf ret = -1;
+   intn c_ret;
+
+   c_ret = GRgetnluts ( *id );
+   if(c_ret >= 0) ret = c_ret;
+   return(ret);
+}

Modified: packages/libhdf4/trunk/hdf/src/mfgrff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/mfgrff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/mfgrff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfgrff.f,v 1.8 2000/02/15 19:50:10 epourmal Exp $
+C $Id: mfgrff.f,v 1.12 2003/12/10 21:13:25 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     mfgrff.f
@@ -346,7 +346,7 @@
 C                            COMP_CODE_RLE =1
 C                            COMP_CODE_SKPHUFF = 3
 C                            COMP_CODE_DEFLATE = 4
-C                            COMP_CODE_JPEG    = 6
+C                            COMP_CODE_JPEG    = 7 
 C                   comp_prm  - compression parameters array
 C                   Huffman:   comp_prm(1) = skphuff_skp_size
 C                   GZIP:      comp_prm(1) = deflate_level       
@@ -366,4 +366,50 @@
          return
          end
 
+C-------------------------------------------------------------------------
+C        Name:      mggcompress
+C        Purpose:   gets compression information about GR image
+C        Inputs:    riid      - access ID to GR
+C        Outputs:  comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4
+C                            COMP_CODE_JPEG    = 7 
+C                   comp_prm  - compression parameters array
+C                   Huffman:   comp_prm(1) = skphuff_skp_size
+C                   GZIP:      comp_prm(1) = deflate_level       
+C        Returns:   0 on success, -1 on failure
+C        Calls:     mgcgcompress (C stub for GRgetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggcompress(riid, comp_type, comp_prm)
+
+         INTEGER riid, comp_type, comp_prm(1)
+         INTEGER mgcgcompress 
+
+         mggcompress = mgcgcompress(riid, comp_type,
+     .                              comp_prm)
+         return
+         end
+C-------------------------------------------------------------------------
+C        Name:      mggnluts
+C        Purpose:   gets number of palettes (LUTs) for an image
+C        Inputs:    riid      - access ID to GR
+C        Returns:   Number of palettes on success (0 or 1), -1 on failure
+C        Calls:     mgcgnluts (C stub for GRgetnluts function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggnluts(riid)
+
+         INTEGER riid
+         INTEGER mgcgnluts 
+
+         mggnluts = mgcgnluts(riid)
+         return
+         end
+
            
+           

Modified: packages/libhdf4/trunk/hdf/src/src.inc
===================================================================
--- packages/libhdf4/trunk/hdf/src/src.inc	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/src.inc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 # *                                                                          *
 # ***************************************************************************
 #
-# $Id: src.inc,v 1.33 1999/02/06 03:21:48 koziol Exp $
+# $Id: src.inc,v 1.35 2003/12/10 21:13:25 epourmal Exp $
 #
 # ##################################################################
 #
@@ -33,7 +33,7 @@
 H_HDRS=hfile.h hdf.h hdfi.h herr.h hproto.h hcomp.h hconv.h hbitio.h \
        tbbt.h crle.h cnbit.h mstdio.h cnone.h cskphuff.h cdeflate.h \
        hlimits.h hntdefs.h htags.h hkit.h hcompi.h bitvect.h atom.h \
-       dynarray.h linklist.h hchunks.h vattr.h
+       dynarray.h linklist.h hchunks.h vattr.h cszip.h
 
 DF_HDRS=df.h dfi.h dfstubs.h dfufp2i.h
 DFAN_HDRS=dfan.h
@@ -47,7 +47,7 @@
 HCSRCS=hfile.c herr.c hblocks.c hbuffer.c hcompri.c hextelt.c hkit.c hdfalloc.c \
     hcomp.c hbitio.c tbbt.c hdfalloc.c hcomp.c crle.c cnbit.c mstdio.c cnone.c \
     cskphuff.c cdeflate.c bitvect.c atom.c hfiledd.c dynarray.c linklist.c \
-    glist.c hchunks.c mcache.c 
+    glist.c hchunks.c mcache.c cszip.c
 
 VCSRCS=vg.c vrw.c vio.c vparse.c vconv.c vsfld.c vgp.c vhi.c vattr.c
 
@@ -67,7 +67,7 @@
 HCOBJS=hfile.o herr.o hblocks.o hbuffer.o hcompri.o hextelt.o hkit.o hdfalloc.o \
     hcomp.o hbitio.o tbbt.o crle.o cnbit.o mstdio.o cnone.o cskphuff.o \
     cdeflate.o bitvect.o atom.o hfiledd.o dynarray.o linklist.o glist.o \
-    hchunks.o mcache.o
+    hchunks.o mcache.o cszip.o
 
 VCOBJS=vg.o vrw.o vio.o vparse.o vconv.o vsfld.o vgp.o vhi.o vattr.o
 

Modified: packages/libhdf4/trunk/hdf/src/trace.h
===================================================================
--- packages/libhdf4/trunk/hdf/src/trace.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/trace.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,10 +1,6 @@
-#ifdef HAVE_PABLO 
-#include "ProcIDs.h"
-#else
 #define HDF_TRACE_ON( eventID )
 #define HDF_TRACE_OFF( eventID, p1, p2, p3 )
 #define HDF_MASK_TRACE_ON( mask, eventID )
 #define HDF_MASK_TRACE_OFF( mask, eventID, p1, p2, p3 )
 #define TRACE_ON(mask, eventID)
 #define TRACE_OFF(mask, eventID )
-#endif /* HAVE_PABLO */

Modified: packages/libhdf4/trunk/hdf/src/vattr.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vattr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vattr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,13 +11,10 @@
  *******************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.16 $";
+static char RcsId[] = "@(#)$Revision: 1.19 $";
 #endif
 
-/* $Id: vattr.c,v 1.16 1999/06/16 21:11:12 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vattr_c
-#endif
+/* $Id: vattr.c,v 1.19 2005/01/09 20:54:11 mcgrath Exp $ */
 
 /**************************************************************
 *
@@ -209,10 +206,6 @@
      int32 ret_value = SUCCEED;
      intn i, found = 0;
 
-#ifdef PABLO
-     TRACE_ON(PABLO_mask,ID_VSfindex);
-#endif
-     
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -249,10 +242,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSfindex);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }       /* VSfindex */
 
@@ -295,19 +284,26 @@
      int32 nattrs, ret_value = SUCCEED;
      int32 attr_vs_ref, fid, attr_vsid;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
+
+     /* check if id is valid vdata */
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+     /* check for null attribute name */
+     if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
      /* locate vs' index in vstab */
      if (NULL == (vs_inst = (vsinstance_t *)HAatom_object(vsid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
      if (NULL == (vs = vs_inst->vs))
         HGOTO_ERROR(DFE_NOVS, FAIL);
+
+     /* check for read access */
+     if (vs->access == 'r')
+        HGOTO_ERROR(DFE_BADATTACH, FAIL);
+
      w = &(vs->wlist);
      /* check field index */
      if ((findex >= w->n || findex < 0) && (findex != _HDF_VDATA))
@@ -378,10 +374,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSsetattr */
 /* ------------------------------------------------ 
@@ -406,10 +398,6 @@
     VDATA *vs;
     int32 ret_value = SUCCEED;
     
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSnattrs);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -427,10 +415,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-       TRACE_OFF(PABLO_mask, ID_VSnattrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSnattrs */
 
@@ -459,10 +443,6 @@
     vs_attr_t *vs_alist;
     intn i, nattrs, t_attrs;
  
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfnattrs);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -491,10 +471,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfnattrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSfattrs */
               
@@ -525,13 +501,15 @@
      int32 ret_value = FAIL;
      intn i, nattrs, a_index, found;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSfindattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
+     /* check if id is valid vdata */
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
+
+     /* check for null attribute name */
+     if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
      /* locate vs' index in vstab */
      if (NULL == (vs_inst = (vsinstance_t *)HAatom_object(vsid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -588,10 +566,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfindattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfindattr */
 
@@ -629,10 +603,6 @@
      DYN_VWRITELIST *w;
      char *fldname;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSattrinfo);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -696,10 +666,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_VSattrinfo);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSattrinfo */
 
@@ -731,10 +697,6 @@
      int32 n_recs, il;
      char fields[FIELDNAMELENMAX+1];
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSgetattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -797,10 +759,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-             TRACE_OFF(PABLO_mask, ID_VSgetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSgetattr */
 
@@ -824,10 +782,6 @@
      VDATA    *vs;
      int32  ret_value = FALSE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSisattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FALSE);
@@ -845,10 +799,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_VSisattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSisattr */
 
@@ -888,14 +838,16 @@
     int32 attr_vs_ref,fid, vsid;
     intn i;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vsetattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
+
+    /* check if id is valid vgroup */
     if (HAatom_group(vgid)!=VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null attribute name */
+    if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* locate vg's index in vgtab */
     if (NULL == (v = (vginstance_t *) HAatom_object(vgid)))
         HGOTO_ERROR(DFE_VTAB, FAIL);
@@ -971,10 +923,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Vsetattr);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vsetattr */
 
@@ -1003,10 +951,6 @@
     int16 vg_version;
     int32 ret_value = FAIL;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetversion);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid)!=VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1028,10 +972,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vgetversion);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vgetversion */
 
@@ -1053,10 +993,6 @@
     vginstance_t *v;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vnattrs);
-#endif  /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1078,10 +1014,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vnattrs);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vnattrs */
 
@@ -1109,13 +1041,16 @@
     int32 ret_value = FAIL;
     intn i, found;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vfindattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
+
+    /* check if id is valid vgroup */
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* check for null attribute name */
+    if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* locate vg's index in vgtab */
     if (NULL == (v = (vginstance_t *)HAatom_object(vgid)))
        HGOTO_ERROR(DFE_VTAB, FAIL);
@@ -1155,10 +1090,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Vfindattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vfindattr */
         
@@ -1196,10 +1127,6 @@
     int32 fid, vsid;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vattrinfo);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1250,10 +1177,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vattrinfo);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vattrinfo */
 
@@ -1283,10 +1206,6 @@
     int32 n_recs, il;
     int32 ret_value = SUCCEED;
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vgetattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1333,10 +1252,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vgetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vgetattr */
 

Modified: packages/libhdf4/trunk/hdf/src/vg.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vg.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vg.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.55 $";
+static char RcsId[] = "@(#)$Revision: 1.62 $";
 #endif
 /* vg.c,v 1.15.4.1 1993/10/26 19:25:07 georgev Exp */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vg_c
-#endif
-
 /*
 FILE  
      vg.c
@@ -44,6 +40,10 @@
                        the vgroup with the specified class
      VSfindclass    -- looks in the file and returns the ref of the vdata 
                        with specified class
+     VSsetblocksize -- sets the block size of the linked-block element.
+     VSsetnumblocks -- sets the number of blocks for a linked-block element.
+     VSgetblockinfo -- retrieves the block size and the number of blocks 
+		       of a linked-block element.
      Vsetzap        -- maintaind for back compatibility
 PRIVATE FUNCTIONS
      matchnocase    -- compares to strings, ignoring case
@@ -115,10 +115,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSelts");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSelts);
-#endif /* HAVE_PABLO */
-
     /* make sure vdata key is part of vdata group */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -142,10 +138,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSelts);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSelts */
 
@@ -168,10 +160,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetinterlace");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSgetinterlace);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -195,10 +183,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSgetinterlace);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetinterlace */
 
@@ -222,10 +206,6 @@
     intn         ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetinterlace");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetinterlace);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -264,10 +244,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSsetinterlace);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetinterlace */
 
@@ -293,9 +269,10 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetfields");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetfields);
-#endif /* HAVE_PABLO */
+    /* check if a NULL field list is passed in, then return with
+       error (found while fixing bug #554) - BMR 4/30/01 */
+    if (fields == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
@@ -330,10 +307,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetfields */
 
@@ -364,10 +337,6 @@
     intn          ret_value = SUCCEED;
     CONSTR(FUNC, "VSfexist");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfexist);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -422,10 +391,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfexist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSfexist */
 
@@ -454,10 +419,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSsizeof");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsizeof);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -507,10 +468,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsizeof);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsizeof */
 
@@ -554,14 +511,14 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetname);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null vdata name */
+    if (vsname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -595,10 +552,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetname */
 
@@ -626,14 +579,14 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetclass);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null vdata class */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -667,10 +620,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetclass */
 
@@ -694,10 +643,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetname);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -725,10 +670,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetname */
 
@@ -752,14 +693,14 @@
     int32     ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetclass);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check user allocated space */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -779,10 +720,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetclass */
 
@@ -810,10 +747,6 @@
   intn status;
   CONSTR(FUNC, "VSinquire");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSinquire);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -853,10 +786,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSinquire);
-#endif /* HAVE_PABLO */
-
     return ret_value;   /* ok */
 
 }   /* VSinquire */
@@ -888,10 +817,6 @@
     int32   ret_value = SUCCEED;
     CONSTR(FUNC, "VSlone");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSlone);
-#endif /* HAVE_PABLO */
-
     /* -- allocate local space for vdata refs, init to zeros -- */
     if (NULL == (lonevdata = (uint8 *) HDcalloc(MAX_REF , sizeof(uint8))))
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -940,10 +865,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSlone);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSlone */
 
@@ -974,10 +895,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "Vlone");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vlone);
-#endif /* HAVE_PABLO */
-
     /* -- allocate space for vgroup refs, init to zeroes -- */
     if (NULL == (lonevg = (uint8 *) HDcalloc(MAX_REF , sizeof(uint8))))
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -1027,10 +944,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vlone );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vlone */
 
@@ -1055,13 +968,11 @@
     vginstance_t *v = NULL;
     VGROUP       *vg = NULL;
     int32       ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "Vfind");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfind);
-#endif /* HAVE_PABLO */
+    /* check for null vgroup name */
+    if (vgname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vgroups in file */
     while (FAIL != (vgid = Vgetid(f, vgid)))
@@ -1086,10 +997,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vfind );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Vfind */
 
@@ -1114,13 +1021,11 @@
     vsinstance_t *v = NULL;
     VDATA        *vs = NULL;
     int32 ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "VSfind");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfind);
-#endif /* HAVE_PABLO */
+    /* check for null vdata name */
+    if (vsname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vdatas in file */
     while (FAIL != (vsid = VSgetid(f, vsid)))
@@ -1145,10 +1050,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfind);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfind */
 
@@ -1173,13 +1074,11 @@
     vginstance_t *v = NULL;
     VGROUP       *vg = NULL;
     int32       ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "Vfindclass");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfindclass);
-#endif /* HAVE_PABLO */
+    /* check for null vgroup class */
+    if (vgclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vgroups in file */
     while (FAIL != (vgid = Vgetid(f, vgid)))
@@ -1204,10 +1103,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vfindclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;    
 }	/* Vfindclass */
 
@@ -1232,13 +1127,11 @@
     vsinstance_t *v = NULL;
     VDATA        *vs = NULL;
     int32        ret_value = 0;
-#ifdef LATER
-    CONSTR(FUNC, "VSfind");
-#endif
+    CONSTR(FUNC, "VSfindclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfindclass);
-#endif /* HAVE_PABLO */
+    /* check for null vdata class */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vdatas in file */
     while (FAIL != (vsid = VSgetid(f, vsid)))
@@ -1263,13 +1156,197 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfindclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfindclass */
 
+/* ----------------------------------------------------------------- 
+NAME
+   VSsetblocksize -- sets the block size of the linked-block element.
+
+USAGE
+   intn VSsetblocksize(vkey, block_size)
+   int32 vkey;		IN: vdata key
+   int32 block_size	IN: length to be used for each linked-block
+   
+DESCRIPTION
+   Sets the size of the blocks, that are after the first block, of a 
+   linked-block element used for storing a vdata.  This routine is 
+   to be called before the first write to the vdata to change the block 
+   size from the default value HDF_APPENDABLE_BLOCK_LEN (4096).  Once the
+   linked-block element is created, the block size cannot be changed.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSsetblocksize(	int32 vkey, /* IN: vdata key */
+		int32 block_size) /* length to be used for each linked-block */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSsetblocksize");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if the given vdata id is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual setting */
+    if (HLsetblockinfo(vs->aid, block_size, -1) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSsetblocksize */
+
+/* ----------------------------------------------------------------- 
+NAME
+   VSsetnumblocks -- sets the number of blocks for a linked-block element.
+
+USAGE
+   intn VSsetnumblocks(vkey, num_blocks)
+   int32 vkey;		IN: vdata key
+   int32 num_blocks	IN: number of blocks to be used for the linked-block
+			    element
+   
+DESCRIPTION
+   Sets the number of blocks of a linked-block element used for storing
+   a vdata.  This routine is to be called before the first write to the
+   vdata to change the number of blocks from the default value
+   HDF_APPENDABLE_BLOCK_NUM (16).  Once the linked-block element is
+   created, the number of blocks cannot be changed.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSsetnumblocks( int32 vkey, /* IN: vdata key */
+		int32 num_blocks) /* number of blocks the element can have */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSsetnumblocks");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if the given vdata id is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual setting */
+    if (HLsetblockinfo(vs->aid, -1, num_blocks) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSsetnumblocks */
+
+/* ----------------------------------------------------------------- 
+NAME
+   VSgetblockinfo -- retrieves the block size and the number of blocks 
+		     of a linked-block element.
+
+USAGE
+   intn VSgetblockinfo(vkey, block_size, num_blocks)
+   int32 vkey		IN: vdata key
+   int32* block_size	OUT: the linked-block size
+   int32* num_blocks	OUT: the number of blocks the element has
+   
+DESCRIPTION
+   Retrieves the block size and the number of blocks of a linked-block
+   element used for storing a vdata.  A NULL can be passed in for
+   unwanted value.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSgetblockinfo(int32 vkey, /* IN: vdata id */
+               int32* block_size, /* OUT: length used for each linked-block */
+               int32* num_blocks) /* OUT: number of blocks the element has */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSgetblockinfo");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if vdata is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual retrieval */
+    if (HLgetblockinfo(vs->aid, block_size, num_blocks) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSgetblockinfo */
+
 /* ------------------------------- Vsetzap -------------------------------- */
 /*
  * Vsetzap: Useless now. Maintained for back compatibility.

Modified: packages/libhdf4/trunk/hdf/src/vgf.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vgf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vgf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.42 $";
+static char RcsId[] = "@(#)$Revision: 1.44 $";
 #endif
 
-/* $Id: vgf.c,v 1.42 2000/02/29 21:35:30 koziol Exp $ */
+/* $Id: vgf.c,v 1.44 2001/09/27 15:55:02 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
   FUNCTION NAMEING CONVENTION:(For the most part true)
@@ -1453,3 +1453,86 @@
        HDfree(class_name);
        return(ret);
 } 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetblsz
+ *       Purpose:   calls VSsetblocksize
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetblsz( intf *id , intf *block_size)
+#else
+       nvscsetblsz (id, block_size)
+               intf   *id;
+               intf   *block_size;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+       intn c_ret;	
+
+       c_ret = VSsetblocksize( *id, *block_size);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetnmbl
+ *       Purpose:   calls VSsetnumblocks
+ *       Inputs:    id    -  vdata identifier
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetnmbl( intf *id , intf *num_blocks)
+#else
+       nvscsetnmbl (id, num_blocks)
+               intf   *id;
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret;
+       intn  c_ret;
+
+       c_ret = VSsetnumblocks( *id, *num_blocks);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscgblinfo
+ *       Purpose:   calls VSgetblockinfo
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscgblinfo( intf *id , intf *block_size, intf *num_blocks)
+#else
+       nvscgblinfo (id, block_size, num_blocks)
+               intf   *id;
+               intf   *block_size; 
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+        intn c_ret;
+	int32 c_block_size;
+        int32 c_num_blocks;
+
+       c_ret = VSgetblockinfo( *id, &c_block_size, &c_num_blocks);
+       if (c_ret == 0) {
+       		*block_size = c_block_size;
+       	        *num_blocks = c_num_blocks;
+       	      	ret = 0;
+       }
+       return(ret);
+} 

Modified: packages/libhdf4/trunk/hdf/src/vgff.f
===================================================================
--- packages/libhdf4/trunk/hdf/src/vgff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vgff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: vgff.f,v 1.24 2000/02/25 19:13:01 epourmal Exp $ 
+C $Id: vgff.f,v 1.27 2001/09/27 15:55:02 epourmal Exp $ 
 C     
 c **************************************************************************
 c *
@@ -769,3 +769,62 @@
      .                      len(field_name)) 
          return 
          end
+C-------------------------------------------------------------------------
+C        Name:      vsfsetblsz
+C        Purpose:   sets the block size of the linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   block_size - size of each block
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetblsz (C stub for VSsetblocksize function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetblsz(id, block_size)
+C
+         INTEGER id, block_size
+         INTEGER vscsetblsz
+C
+         vsfsetblsz = vscsetblsz(id, block_size) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfsetnmbl
+C        Purpose:   sets the number of blocks for a linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   num_blocks - number of blocks to be used for the linked-block
+C                                elements
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetnmbl (C stub for VSsetnumblocks function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetnmbl(id, num_blocks)
+C
+         INTEGER id, num_blocks
+         INTEGER vscsetnmbl
+C
+         vsfsetnmbl = vscsetnmbl(id, num_blocks) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfgetblinfo
+C        Purpose:   retrieves the block size and the number of blocks
+C                   of a linked-block element.
+C        Inputs:    id       -  vdata identifier
+C        Outputs:   block_size - the linked-block size
+C                   num_blocks - number of blocks the element has
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscgetblinfo (C stub for VSgetblockinfo function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfgetblinfo(id, block_size, num_blocks)
+C
+         INTEGER id, num_blocks, block_size
+         INTEGER vscgblinfo
+C
+         vsfgetblinfo = vscgblinfo(id, block_size, num_blocks) 
+         return 
+         end

Modified: packages/libhdf4/trunk/hdf/src/vgp.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vgp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vgp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.96 $";
+static char RcsId[] = "@(#)$Revision: 1.97 $";
 #endif
 
-/* $Id: vgp.c,v 1.96 1999/06/16 21:11:16 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vgp_c
-#endif
-
+/* $Id: vgp.c,v 1.97 2005/01/09 20:54:12 mcgrath Exp $ */
 /*****************************************************************************
 
  file - vgp.c
@@ -705,10 +701,6 @@
     intn   ret_value = SUCCEED;
     CONSTR(FUNC, "Vinitialize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinitialize);
-#endif /* HAVE_PABLO */
-  
     /* clear error stack */
     HEclear();
 
@@ -730,10 +722,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinitialize);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Vinitialize() */
 
@@ -755,10 +743,6 @@
   intn    ret_value = SUCCEED;
   CONSTR(FUNC, "Vfinish");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfinish);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -773,10 +757,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vfinish);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Vfinish() */
 
@@ -906,10 +886,6 @@
     uint8 *bb = NULL;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_vpackvg);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -984,10 +960,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_vpackvg);
-#endif /* HAVE_PABLO */
- 
   return ret_value;
 }   /* vpackvg */
 
@@ -1017,10 +989,6 @@
     int32 ret_value = SUCCEED;
     CONSTR(FUNC, "vunpackvg");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_vunpackvg);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1099,10 +1067,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_vunpackvg);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 
 }   /* vunpackvg */
@@ -1213,10 +1177,6 @@
     atom_t      ret_value = FAIL;
     CONSTR(FUNC, "Vattach");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vattach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1317,10 +1277,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vattach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vattach */
 
@@ -1353,10 +1309,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vdetach");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vdetach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1435,10 +1387,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vdetach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vdetach */
 
@@ -1471,10 +1419,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "Vinsert");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinsert);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1555,10 +1499,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinsert);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vinsert */
 
@@ -1662,10 +1602,6 @@
     intn       ret_value = FALSE;
     CONSTR(FUNC, "Vinqtagref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinqtagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1698,10 +1634,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinqtagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vinqtagref */
 
@@ -1740,10 +1672,6 @@
     If the case of duplicate tag/ref pairs the user can call Vinqtagref() 
     to see if there are more occurences and then delete them. */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vdeletetagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1821,10 +1749,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_Vdeletetagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vdeletetagref */
 
@@ -1848,10 +1772,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vntagrefs");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vntagrefs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1877,10 +1797,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vntagrefs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vntagrefs */
 
@@ -1968,10 +1884,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vgettagrefs");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgettagrefs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2006,10 +1918,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgettagrefs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vgettagrefs */
 
@@ -2040,10 +1948,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "Vgettagref");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgettagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2073,10 +1977,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgettagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vgettagref */
 
@@ -2206,10 +2106,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vaddtagref");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vaddtagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2244,10 +2140,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vaddtagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vaddtagref */
 
@@ -2372,10 +2264,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vsetname");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vsetname);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2404,10 +2292,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vsetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vsetname */
 
@@ -2432,9 +2316,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vsetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vsetclass);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -2467,9 +2348,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vsetclass);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vsetclass */
@@ -2617,9 +2495,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetid");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetid);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2671,9 +2546,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetid);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetid */
@@ -2795,9 +2667,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetname);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2825,9 +2694,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetname);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetname */
@@ -2854,9 +2720,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetclass);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2884,9 +2747,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetclass);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetclass */
@@ -2916,9 +2776,6 @@
     intn    ret_value = SUCCEED;
     CONSTR(FUNC, "Vinquire");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vinquire);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2955,9 +2812,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinquire);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vinquire */

Modified: packages/libhdf4/trunk/hdf/src/vhi.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vhi.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vhi.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.26 $";
+static char RcsId[] = "@(#)$Revision: 1.27 $";
 #endif
 
-/* $Id: vhi.c,v 1.26 1999/06/16 21:11:18 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vhi_c
-#endif
-
+/* $Id: vhi.c,v 1.27 2005/01/09 20:54:13 mcgrath Exp $ */
 /*
    * File
    *       vhi.c
@@ -68,14 +64,8 @@
     int32       order = 1;
     int32       ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHstoredata);
-#endif /* HAVE_PABLO */
     ret_value = ((int32)VHstoredatam(f, field, buf, n, datatype, vsname, vsclass, order));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VHstoredata );
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* end VHstoredata */
 
@@ -112,9 +102,6 @@
     int32       vs;
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHstoredatam);
-#endif /* HAVE_PABLO */
 
     if ((vs = VSattach(f, -1, "w")) == FAIL)
         HGOTO_ERROR(DFE_CANTATTACH,FAIL);
@@ -147,9 +134,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VHstoredatam );
-#endif /* HAVE_PABLO */
   return ret_value;
 }   /* VHstoredatam */
 
@@ -188,9 +172,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VHmakegroup");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHmakegroup);
-#endif /* HAVE_PABLO */
 
     if (( vg = Vattach(f, -1, "w"))== FAIL)
         HGOTO_ERROR(DFE_CANTATTACH,FAIL);
@@ -222,9 +203,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VHmakegroup );
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* VHmakegroup */

Modified: packages/libhdf4/trunk/hdf/src/vio.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vio.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vio.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.76 $";
+static char RcsId[] = "@(#)$Revision: 1.77 $";
 #endif
 
-/* $Id: vio.c,v 1.76 1999/06/16 21:11:18 dwells Exp $ */
+/* $Id: vio.c,v 1.77 2005/01/09 20:54:13 mcgrath Exp $ */
 
 /*****************************************************************************
  file - vio.c
@@ -74,10 +74,6 @@
 PRIVATE uint32 Vhbufsize = 0;
 PRIVATE uint8 *Vhbuf = NULL;
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vio_c
-#endif
-
 /* Pointers to the VDATA & vsinstance node free lists */
 static VDATA *vdata_free_list=NULL;
 static vsinstance_t *vsinstance_free_list=NULL;
@@ -419,10 +415,6 @@
     uint8 *bb = NULL;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-         TRACE_ON(PABLO_mask, ID_vpackvs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -527,10 +519,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_vpackvs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* vpackvs */
 
@@ -558,10 +546,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "vunpackvs");
 
-#ifdef HAVE_PABLO
-      TRACE_ON(PABLO_mask, ID_vunpackvs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -714,10 +698,6 @@
     } /* end if */
 
 	  /* Normal function cleanup */
-	#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_vunpackvs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* vunpackvs */
 
@@ -909,9 +889,6 @@
     int32      ret_value = FAIL;
     CONSTR(FUNC, "VSattach");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSattach);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -1056,9 +1033,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSattach);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }	/* VSattach */
@@ -1098,10 +1072,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSdetach");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSdetach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1219,10 +1189,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSdetach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSdetach */
 
@@ -1245,10 +1211,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VSappendable");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSappendable);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1280,10 +1242,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSappendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSappendable */
 
@@ -1311,10 +1269,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetid");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSgetid);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1363,10 +1317,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSgetid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetid */
 
@@ -1594,10 +1544,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSdelete");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSdelete);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1635,9 +1581,5 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSdelete);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSdelete */

Modified: packages/libhdf4/trunk/hdf/src/vrw.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vrw.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vrw.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.52 $";
+static char RcsId[] = "@(#)$Revision: 1.53 $";
 #endif
 
-/* $Id: vrw.c,v 1.52 1999/06/16 21:11:19 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vrw_c
-#endif
+/* $Id: vrw.c,v 1.53 2005/01/09 20:54:15 mcgrath Exp $ */
 
 /***********************************************************************
 *
@@ -111,10 +108,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSseek");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSseek);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -151,10 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VSseek );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSseek */
 
@@ -201,10 +190,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VSread");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSread);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -479,10 +464,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask,ID_VSread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSread */
 
@@ -533,10 +514,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSwrite");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSwrite);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -819,10 +796,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VSwrite );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSwrite */
 

Modified: packages/libhdf4/trunk/hdf/src/vsfld.c
===================================================================
--- packages/libhdf4/trunk/hdf/src/vsfld.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/src/vsfld.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.66 $";
+static char RcsId[] = "@(#)$Revision: 1.70 $";
 #endif
 
-/* $Id: vsfld.c,v 1.66 1999/06/16 21:11:21 dwells Exp $ */
+/* $Id: vsfld.c,v 1.70 2005/01/09 20:54:16 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vsfld_c
-#endif
-
 /*****************************************************************************
 * vsetf.c
 * Part of the HDF VSet interface.
@@ -95,9 +91,10 @@
     intn       ret_value = FAIL;
     CONSTR(FUNC, "VSsetfields");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSsetfields);
-#endif /* HAVE_PABLO */
+    /* check if a NULL field list is passed in, then return with
+       error (bug #554) - BMR 4/30/01 */
+    if (fields == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -121,115 +118,118 @@
      * write to an empty vdata : set the write list but do not set the
      *   read list cuz there is nothing there to read yet...
      */
-    if ((vs->access == 'w') && (vs->nvertices == 0))
+    if (vs->access == 'w')
        {
-          wlist=&(vs->wlist);
-          if (wlist->n == 0) /* fields not set yet, Sept. 96. */
-            /* do not re-set fields if they were already set. */
-          {
-              wlist->ivsize = 0;
-              wlist->n = 0;
+        if (vs->nvertices == 0)
+           {
+              wlist=&(vs->wlist);
+              if (wlist->n == 0) /* fields not set yet, Sept. 96. */
+                /* do not re-set fields if they were already set. */
+              {
+                  wlist->ivsize = 0;
+                  wlist->n = 0;
 
-          /* allocate space for the internal WRITELIST structures */
-              /* Allocate buffer to hold all the int16/uint16 arrays */
-              if((wlist->bptr=HDmalloc(sizeof(uint16)*(size_t)(ac*5)))==NULL)
-                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
+              /* allocate space for the internal WRITELIST structures */
+                  /* Allocate buffer to hold all the int16/uint16 arrays */
+                  if((wlist->bptr=HDmalloc(sizeof(uint16)*(size_t)(ac*5)))==NULL)
+                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
 
-              /* Use buffer to support the other arrays */
-              wlist->type=(int16 *)wlist->bptr;
-              wlist->off=(uint16 *)wlist->type+ac;
-              wlist->isize=wlist->off+ac;
-              wlist->order=wlist->isize+ac;
-              wlist->esize=wlist->order+ac;
-              if((wlist->name=HDmalloc(sizeof(char *)*(size_t)ac))==NULL)
-                {
-                  HDfree(wlist->bptr);
-                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                } /* end if */
+                  /* Use buffer to support the other arrays */
+                  wlist->type=(int16 *)wlist->bptr;
+                  wlist->off=(uint16 *)wlist->type+ac;
+                  wlist->isize=wlist->off+ac;
+                  wlist->order=wlist->isize+ac;
+                  wlist->esize=wlist->order+ac;
+                  if((wlist->name=HDmalloc(sizeof(char *)*(size_t)ac))==NULL)
+                    {
+                      HDfree(wlist->bptr);
+                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                    } /* end if */
 
-              for (i = 0; i < ac; i++)
-                {
-                    found = FALSE;
-                /* --- first look in the user's symbol table --- */
-                    for (j = 0; j < vs->nusym; j++)
-                        if (!HDstrcmp(av[i], vs->usym[j].name))
-                          {
-                              found = TRUE;
-                            
-                              if((wlist->name[wlist->n]=HDstrdup(vs->usym[j].name))==NULL)
-                               {
-                                  HDfree(wlist->name);
-                                  HDfree(wlist->bptr);
-                                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                                } /* end if */
-                              order = vs->usym[j].order;
-                              wlist->type[wlist->n] = vs->usym[j].type;
-                              wlist->order[wlist->n] = order;
+                  for (i = 0; i < ac; i++)
+                    {
+                        found = FALSE;
+                    /* --- first look in the user's symbol table --- */
+                        for (j = 0; j < vs->nusym; j++)
+                            if (!HDstrcmp(av[i], vs->usym[j].name))
+                              {
+                                  found = TRUE;
+                                
+                                  if((wlist->name[wlist->n]=HDstrdup(vs->usym[j].name))==NULL)
+                                   {
+                                      HDfree(wlist->name);
+                                      HDfree(wlist->bptr);
+                                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                                    } /* end if */
+                                  order = vs->usym[j].order;
+                                  wlist->type[wlist->n] = vs->usym[j].type;
+                                  wlist->order[wlist->n] = order;
 
-                              value = order * DFKNTsize(vs->usym[j].type | DFNT_NATIVE);
-                              if (value == FAIL)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->esize[wlist->n] = (uint16) value;
+                                  value = order * DFKNTsize(vs->usym[j].type | DFNT_NATIVE);
+                                  if (value == FAIL)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->esize[wlist->n] = (uint16) value;
 
-                              value = order * vs->usym[j].isize;
-                              if (value > MAX_FIELD_SIZE)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->isize[wlist->n] = (uint16) value;
+                                  value = order * vs->usym[j].isize;
+                                  if (value > MAX_FIELD_SIZE)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->isize[wlist->n] = (uint16) value;
 
-                              value = (int32) wlist->ivsize + (int32) (wlist->isize[wlist->n]);
-                              if (value > MAX_FIELD_SIZE)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->ivsize = (uint16) value;
+                                  value = (int32) wlist->ivsize + (int32) (wlist->isize[wlist->n]);
+                                  if (value > MAX_FIELD_SIZE)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->ivsize = (uint16) value;
 
-                              wlist->n++;
-                              break;
-                          }
+                                  wlist->n++;
+                                  break;
+                              }
 
-                /* --- now look in the reserved symbol table --- */
-                    if (!found)
-                      {
-                          for (j = 0; j < (intn)NRESERVED; j++)
-                              if (!HDstrcmp(av[i], rstab[j].name))
-                                {
-                                    found = TRUE;
+                    /* --- now look in the reserved symbol table --- */
+                        if (!found)
+                          {
+                              for (j = 0; j < (intn)NRESERVED; j++)
+                                  if (!HDstrcmp(av[i], rstab[j].name))
+                                    {
+                                        found = TRUE;
 
-                                    if((wlist->name[wlist->n]=HDstrdup(rstab[j].name))==NULL)
-                                      {
-                                        HDfree(wlist->name);
-                                        HDfree(wlist->bptr);
-                                        HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                                      } /* end if */
-                                    order = rstab[j].order;
-                                    wlist->type[wlist->n] = rstab[j].type;
-                                    wlist->order[wlist->n] = order;
-                                    value = order * DFKNTsize(rstab[j].type | DFNT_NATIVE);
-                                    if (value == FAIL)
-                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                                    wlist->esize[wlist->n] = (uint16) value;
-                                    wlist->isize[wlist->n] = (uint16) (order * rstab[j].isize);
-                                    wlist->ivsize += (uint16) (wlist->isize[wlist->n]);
-                                    wlist->n++;
-                                    break;
-                                }
-                      }
-                    if (!found)     /* field is not a defined field - error  */
-                        HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                }
+                                        if((wlist->name[wlist->n]=HDstrdup(rstab[j].name))==NULL)
+                                          {
+                                            HDfree(wlist->name);
+                                            HDfree(wlist->bptr);
+                                            HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                                          } /* end if */
+                                        order = rstab[j].order;
+                                        wlist->type[wlist->n] = rstab[j].type;
+                                        wlist->order[wlist->n] = order;
+                                        value = order * DFKNTsize(rstab[j].type | DFNT_NATIVE);
+                                        if (value == FAIL)
+                                          HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                        wlist->esize[wlist->n] = (uint16) value;
+                                        wlist->isize[wlist->n] = (uint16) (order * rstab[j].isize);
+                                        wlist->ivsize += (uint16) (wlist->isize[wlist->n]);
+                                        wlist->n++;
+                                        break;
+                                    }
+                          }
+                        if (!found)     /* field is not a defined field - error  */
+                            HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                    }
 
-          /* *********************************************************** */
-          /* compute and save the fields' offsets */
-               for (uj = 0, i = 0; i < wlist->n; i++)
-                {
-                    wlist->off[i] = (uint16) uj;
-                    uj += wlist->isize[i];
-                }
+              /* *********************************************************** */
+              /* compute and save the fields' offsets */
+                   for (uj = 0, i = 0; i < wlist->n; i++)
+                    {
+                        wlist->off[i] = (uint16) uj;
+                        uj += wlist->isize[i];
+                    }
 
-              vs->marked = TRUE; /* mark vdata as being modified */
-              vs->new_h_sz = TRUE; /* mark vdata header size being changed */
+                  vs->marked = TRUE; /* mark vdata as being modified */
+                  vs->new_h_sz = TRUE; /* mark vdata header size being changed */
 
-              HGOTO_DONE(SUCCEED); /* OK */
-          } /* if wlist->n == 0 */
-      }     /* writing to empty vdata */
+                  HGOTO_DONE(SUCCEED); /* OK */
+              } /* if wlist->n == 0 */
+          } /* writing to empty vdata */
+      } /* writing to vdata */
 
     /*
      *   No matter the access mode, if there are elements in the VData
@@ -271,10 +271,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSsetfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetfields */
 
@@ -297,10 +293,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "VSfdefine");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSfdefine);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
@@ -386,10 +378,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfdefine);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSfdefine */
 
@@ -406,10 +394,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFnfields");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFnfields);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -430,10 +414,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VFnfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VFnfields */
 
@@ -453,10 +433,6 @@
     char       *ret_value = NULL; /* FAIL */
     CONSTR(FUNC, "VFfieldname");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldname);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,NULL);
 
@@ -480,10 +456,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_VFfieldname);;
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldname */
 
@@ -501,10 +473,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfeildtype");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldtype);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -528,10 +496,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-      TRACE_OFF(PABLO_mask, ID_VFfieldtype);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldtype */
 
@@ -550,10 +514,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldisize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldisize);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -577,10 +537,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_VFfieldisize);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldisize */
 
@@ -599,10 +555,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldesize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldesize);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -626,11 +578,7 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_VFfieldesize);
 
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldesize */
 
@@ -648,10 +596,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldorder");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldorder);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -675,10 +619,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VFfieldorder);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VFfieldorder */
 
@@ -822,10 +762,6 @@
        int32 *offs; /* offset of buf fields in buf */
     }  blist;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfpack);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vsid)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
     /* locate vs' index in vgtab */
@@ -980,10 +916,6 @@
     if (fbufps != NULL)
        HDfree(fbufps);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfpack);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }       /* VSfpack */
 /*--------------------------------------------------------- */

Copied: packages/libhdf4/trunk/hdf/test/MAKECOM.OLD (from rev 832, packages/libhdf4/branches/upstream/current/hdf/test/MAKECOM.OLD)
===================================================================
--- packages/libhdf4/trunk/hdf/test/MAKECOM.OLD	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/test/MAKECOM.OLD	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,182 @@
+$!
+$!
+$! File to build the test files in the HDF test suite
+$!
+$!
+$! The following constants should probably be defined
+$!   only once in the main HDF MAKE.COM...
+$!
+$! define/nolog hdf$lib [-.lib]df
+$! define/nolog hdf$include [-.include]
+$! define/nolog sys$clib sys$library:vaxcrtl
+$!
+$ type sys$input
+  **  Making H level test programs **
+$!
+$ type sys$input
+        Making tlinkage
+$ cc/define=VMS/include=hdf$include   tlinkage
+$ link tlinkage, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thfile
+$ cc/define=VMS/include=hdf$include   thfile
+$ link thfile, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thfile1
+$ cc/define=VMS/include=hdf$include   thfile1
+$ link thfile1, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thblocks
+$ cc/define=VMS/include=hdf$include   thblocks
+$ link thblocks, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thextelt
+$ cc/define=VMS/include=hdf$include   thextelt
+$ link thextelt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making terr
+$ cc/define=VMS/include=hdf$include   terr
+$ link terr, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tvers
+$ cc/define=VMS/include=hdf$include   tvers
+$ link tvers, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input 
+  **  Making C interface test programs **
+$!
+$ type sys$input
+        Making trig
+$ cc/define=VMS/include=hdf$include   trig
+$ link trig, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdmms
+$ cc/define=VMS/include=hdf$include   tsdmms
+$ link tsdmms, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnmms
+$ cc/define=VMS/include=hdf$include   tsdnmms
+$ link tsdnmms, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnt
+$ cc/define=VMS/include=hdf$include   tsdnt
+$ link tsdnt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnnt
+$ cc/define=VMS/include=hdf$include   tsdnnt
+$ link tsdnnt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tan
+$ cc/define=VMS/include=hdf$include   tan
+$ link tan, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanfile
+$ cc/define=VMS/include=hdf$include   tanfile
+$ link tanfile, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tv1
+$ cc/define=VMS/include=hdf$include   tv1
+$ link tv1, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tv2
+$ cc/define=VMS/include=hdf$include   tv2
+$ link tv2, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making egchi
+$ cc/define=VMS/include=hdf$include   egchi
+$ link egchi, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tstubs
+$ cc/define=VMS/include=hdf$include   tstubs
+$ link tstubs, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdstr
+$ cc/define=VMS/include=hdf$include   tsdstr
+$ link tsdstr, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tlitend
+$ cc/define=VMS/include=hdf$include   tlitend
+$ link tlitend, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input 
+  **  Making Fortran interface test programs **
+$!
+$ type sys$input
+        Making tr8F
+$ fortran tr8F.f
+$ link tr8F, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making t24F
+$ fortran t24F.f
+$ link t24F, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tpF
+$ fortran tpF.f
+$ link tpF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdmmsF
+$ fortran tsdmmsF.f
+$ link tsdmmsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnmmsF
+$ fortran tsdnmmsF.f
+$ link tsdnmmsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdntF
+$ fortran tsdntF.f
+$ link tsdntF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnntF
+$ fortran tsdnntF.f
+$ link tsdnntF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanF
+$ fortran tanF.f
+$ link tanF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanfileF
+$ fortran tanfileF.f
+$ link tanfileF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making egfhi
+$ fortran egfhi.f
+$ link egfhi, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tstubsF
+$ fortran tstubsF.f
+$ link tstubsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdstrF
+$ fortran tsdstrF.f
+$ link tsdstrF, hdf$lib/lib, sys$clib/lib
+$!
+

Copied: packages/libhdf4/trunk/hdf/test/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/hdf/test/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/hdf/test/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/test/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,46 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+AM_CPPFLAGS=-I$(top_srcdir)/hdf/src
+
+#############################################################################
+##                              Testing                                    ##
+#############################################################################
+
+if HDF_BUILD_FORTRAN
+TESTS = testhdf fortest
+check_PROGRAMS = testhdf fortest fortestF
+else
+TESTS = testhdf
+check_PROGRAMS = testhdf
+endif
+
+testhdf_SOURCES = an.c anfile.c bitio.c blocks.c buffer.c chunks.c comp.c   \
+                  conv.c extelt.c file.c file1.c litend.c macros.c man.c    \
+                  mgr.c nbit.c rig.c sdmms.c sdnmms.c sdstr.c slab.c tbv.c  \
+                  tdupimgs.c testhdf.c tree.c tszip.c tvattr.c tvset.c      \
+		  tvsfpack.c vers.c
+testhdf_LDADD = ../src/libdf.a
+testhdf_DEPENDENCIES = testdir ../src/libdf.a
+
+if HDF_BUILD_FORTRAN
+fortest_SOURCES = fortest.c
+fortest_LDADD = ../src/libdf.a
+fortest_DEPENDENCIES = testdir fortestF ../src/libdf.a
+
+fortestF_SOURCES = forsupff.f forsupf.c fortestF.f manf.f mgrf.f slabwf.f   \
+                   t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f          \
+                   tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f        \
+                   tvattrf.f tvsetf.f
+fortestF_LDADD = ../src/libdf.a
+fortestF_DEPENDENCIES = testdir ../src/libdf.a
+endif
+
+testdir:
+	-mkdir testdir
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = fortest.arg Fortran_err.dat testdir/t5.hdf

Modified: packages/libhdf4/trunk/hdf/test/Makefile.in
===================================================================
--- packages/libhdf4/trunk/hdf/test/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,420 +1,599 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.38 1999/01/13 19:19:37 koziol Exp $
-#
-# ##################################################################
-#
-#                          ABOUT THIS MAKEFILE
-#
-# This makefile creates HDF test programs.  There are three categories
-# of test programs:
-#
-#              application layer C test programs
-#              application layer FORTRAN test programs
-#              lower level C test programs
-#
-# The application layer C test programs are:
-#
-#          trig    (8-bit, 24-bit raster image sets and palette interface)
-#          tsdnt  (scientific data sets, data only)
-#          tsdnnt (same as tdfsd_nt with native number types)
-#          tsdmms (scientific data sets, data, max/min and scales)
-#          tsdnmms(same as tdfsd_mms with native number types)
-#          tsdstr (data and dimension strings: label, unit, format and coordsys)
-#          tan     (annotations for HDF objects)
-#          tanfile (annotations for HDF files)
-#          tstubs  (emulation of old lower level i/o routines)
-#
-# The application layer FORTRAN test programs are:
-#
-#          tr8F     (8-bit raster image sets)
-#          t24F     (24-bit raster image sets)
-#          tpF      (Palettes)
-#          tsdntF   (scientific data sets, data only)
-#          tsdnntF  (same as tdfsd_nntF except all data types are native
-#                           machine number types)
-#          tsdmmsF  (scientific data sets, data, max/min and scales)
-#          tsdnmmsF (same as tdfsd_mmsF with native number types)
-#          tsdstrF  (data and dimenstrings: label, unit, format and coordsys)
-#          tanF     (annotations for HDF objects)
-#          tanfileF (annotations for HDF files)
-#          tstubsF  (emulation of old lower level i/o routines)
-#
-# Vset test programs:
-#
-#          tvset.c  (the basic vgroup and vdata creation routines)
-#          tvsfpack.c (pack/unpack field values into/from a vdata buf)
-#          egfhi.f  (Fortran version of egchi.c)
-#          tvsetf.f (Fortran version of tvset.c)
-#          tvattrf.f (Fortran version of tvattr.c)
-# The lower level C test programs are:
-#
-#              vers.c     (get version string from an HDF file)
-#              thfile     (basic i/o)
-#              terr       (error handling)
-#              thblocks   (linked blocks)
-#              thextelt   (i/o involving external files)
-#              tvers      (storing and retrieving version strings)
-#              thlinkage  (linkage of functions)
-#
-# Hyperslab C test programs
-#              slabw      (write data as 5 slabs )
-#              slab1w     (write data as first 3 of 5 slabs )
-#              slab2w     (write data as last 2 of 5 slabs )
-#              slab3w     (write data as 24 slabs i.e. each element )
-#              slab4w     (write data as 1 slab )
-#              slabwf     (write data as 5 slabs )
-#
-# Hyperslab Fortran test programs
-#              slabw      (write data as 5 slabs )
-#              slab1wf    (write data as first 3 of 5 slabs )
-#              slab2wf    (write data as last 2 of 5 slabs )
-#              slab3wf    (write data as 24 slabs i.e. each element )
-#              slab4wf    (write data as 1 slab )
-#
-# ##################################################################
-#
-#                      HOW TO USE THIS MAKEFILE
-#
-# You need libdf.so to compile any of these test programs.  You will
-# also need selected header files as described below.
-#
-# To compile the application layer C test programs, enter "make ctests".
-# If there are test programs that you do not want to compile, do this
-# by removing them from the lines "COBJS=" and "CSRCS=" below.
-# You need access to the header files indicated in the "CHDRS=" line
-# below to compile these programs.
-#
-# To compile the application layer FORTRAN test programs, enter
-# "make ftests".  You need access to the header files indicated in
-# the "FHDRS=" line below to compile these programs.
-# If there are test programs that you do not want to compile, do this
-# by removing them from the lines "FOBJS=" and "FSRCS=" below.
-#
-# To compile the lower level C test programs, enter "make htests".
-# You need access to the header files indicated in the "HHDRS=" line
-# below to compile these programs.  If there are test programs that
-# you do not want to compile, do this by removing them from the lines
-# "HOBJS=" and "HSRCS=" below.
-#
-# To remove all object files created by this makefile, enter "make clean"
-#
-# ##################################################################
-#
-#                       PORTING INSTRUCTIONS
-#
-# You must modify the lines containing the symbol "==>" to make
-# this makefile compatible with your platform.
-#
-# ##################################################################
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-INSTALL = $${srcroot}/install.sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+AM_CPPFLAGS = -I$(top_srcdir)/hdf/src
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+ at HDF_BUILD_FORTRAN_TRUE@TESTS = testhdf fortest
+ at HDF_BUILD_FORTRAN_FALSE@TESTS = testhdf
+ at HDF_BUILD_FORTRAN_TRUE@check_PROGRAMS = testhdf fortest fortestF
+ at HDF_BUILD_FORTRAN_FALSE@check_PROGRAMS = testhdf
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+testhdf_SOURCES = an.c anfile.c bitio.c blocks.c buffer.c chunks.c comp.c   \
+                  conv.c extelt.c file.c file1.c litend.c macros.c man.c    \
+                  mgr.c nbit.c rig.c sdmms.c sdnmms.c sdstr.c slab.c tbv.c  \
+                  tdupimgs.c testhdf.c tree.c tszip.c tvattr.c tvset.c      \
+		  tvsfpack.c vers.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+testhdf_LDADD = ../src/libdf.a
+testhdf_DEPENDENCIES = testdir ../src/libdf.a
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ at HDF_BUILD_FORTRAN_TRUE@fortest_SOURCES = fortest.c
+ at HDF_BUILD_FORTRAN_TRUE@fortest_LDADD = ../src/libdf.a
+ at HDF_BUILD_FORTRAN_TRUE@fortest_DEPENDENCIES = testdir fortestF ../src/libdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_SOURCES = forsupff.f forsupf.c fortestF.f manf.f mgrf.f slabwf.f   \
+ at HDF_BUILD_FORTRAN_TRUE@                   t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f          \
+ at HDF_BUILD_FORTRAN_TRUE@                   tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f        \
+ at HDF_BUILD_FORTRAN_TRUE@                   tvattrf.f tvsetf.f
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_LDADD = ../src/libdf.a
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_DEPENDENCIES = testdir ../src/libdf.a
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+DISTCLEANFILES = fortest.arg Fortran_err.dat testdir/t5.hdf
+subdir = hdf/test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+ at HDF_BUILD_FORTRAN_TRUE@check_PROGRAMS = testhdf$(EXEEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	fortest$(EXEEXT) fortestF$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@check_PROGRAMS = testhdf$(EXEEXT)
+am__fortest_SOURCES_DIST = fortest.c
+ at HDF_BUILD_FORTRAN_TRUE@am_fortest_OBJECTS = fortest.$(OBJEXT)
+fortest_OBJECTS = $(am_fortest_OBJECTS)
+ at HDF_BUILD_FORTRAN_FALSE@fortest_DEPENDENCIES =
+fortest_LDFLAGS =
+am__fortestF_SOURCES_DIST = forsupff.f forsupf.c fortestF.f manf.f \
+	mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f \
+	tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f tvattrf.f \
+	tvsetf.f
+ at HDF_BUILD_FORTRAN_TRUE@am_fortestF_OBJECTS = forsupff.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	forsupf.$(OBJEXT) fortestF.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	manf.$(OBJEXT) mgrf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	slabwf.$(OBJEXT) t24f.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tanf.$(OBJEXT) tanfilef.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tpf.$(OBJEXT) tr8f.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdmmsf.$(OBJEXT) tsdnmmsf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdnntf.$(OBJEXT) tsdntf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdstrf.$(OBJEXT) tstubsf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tvattrf.$(OBJEXT) tvsetf.$(OBJEXT)
+fortestF_OBJECTS = $(am_fortestF_OBJECTS)
+ at HDF_BUILD_FORTRAN_FALSE@fortestF_DEPENDENCIES =
+fortestF_LDFLAGS =
+am_testhdf_OBJECTS = an.$(OBJEXT) anfile.$(OBJEXT) bitio.$(OBJEXT) \
+	blocks.$(OBJEXT) buffer.$(OBJEXT) chunks.$(OBJEXT) \
+	comp.$(OBJEXT) conv.$(OBJEXT) extelt.$(OBJEXT) file.$(OBJEXT) \
+	file1.$(OBJEXT) litend.$(OBJEXT) macros.$(OBJEXT) man.$(OBJEXT) \
+	mgr.$(OBJEXT) nbit.$(OBJEXT) rig.$(OBJEXT) sdmms.$(OBJEXT) \
+	sdnmms.$(OBJEXT) sdstr.$(OBJEXT) slab.$(OBJEXT) tbv.$(OBJEXT) \
+	tdupimgs.$(OBJEXT) testhdf.$(OBJEXT) tree.$(OBJEXT) \
+	tszip.$(OBJEXT) tvattr.$(OBJEXT) tvset.$(OBJEXT) \
+	tvsfpack.$(OBJEXT) vers.$(OBJEXT)
+testhdf_OBJECTS = $(am_testhdf_OBJECTS)
+testhdf_LDFLAGS =
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/an.Po ./$(DEPDIR)/anfile.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/bitio.Po ./$(DEPDIR)/blocks.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/buffer.Po ./$(DEPDIR)/chunks.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/comp.Po ./$(DEPDIR)/conv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/extelt.Po ./$(DEPDIR)/file.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/file1.Po ./$(DEPDIR)/forsupf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/fortest.Po ./$(DEPDIR)/litend.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/macros.Po ./$(DEPDIR)/man.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mgr.Po ./$(DEPDIR)/nbit.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/rig.Po ./$(DEPDIR)/sdmms.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/sdnmms.Po ./$(DEPDIR)/sdstr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/slab.Po ./$(DEPDIR)/tbv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tdupimgs.Po ./$(DEPDIR)/testhdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tree.Po ./$(DEPDIR)/tszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tvattr.Po ./$(DEPDIR)/tvset.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tvsfpack.Po ./$(DEPDIR)/vers.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__fortest_SOURCES_DIST) $(am__fortestF_SOURCES_DIST) \
+	$(testhdf_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(fortest_SOURCES) $(fortestF_SOURCES) $(testhdf_SOURCES)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+all: all-am
 
-# ############# End of system configuration section. ###############
+.SUFFIXES:
+.SUFFIXES: .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/test/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+fortest$(EXEEXT): $(fortest_OBJECTS) $(fortest_DEPENDENCIES) 
+	@rm -f fortest$(EXEEXT)
+	$(LINK) $(fortest_LDFLAGS) $(fortest_OBJECTS) $(fortest_LDADD) $(LIBS)
+fortestF$(EXEEXT): $(fortestF_OBJECTS) $(fortestF_DEPENDENCIES) 
+	@rm -f fortestF$(EXEEXT)
+	$(F77LINK) $(fortestF_LDFLAGS) $(fortestF_OBJECTS) $(fortestF_LDADD) $(LIBS)
+testhdf$(EXEEXT): $(testhdf_OBJECTS) $(testhdf_DEPENDENCIES) 
+	@rm -f testhdf$(EXEEXT)
+	$(LINK) $(testhdf_LDFLAGS) $(testhdf_OBJECTS) $(testhdf_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ==> where is your HDF library (libdf.so) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC= $(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+distclean-compile:
+	-rm -f *.tab.c
 
-# ==> where is your PABLO include files
-PABLO_HINC= $(srcdir)/../pablo
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/an.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/anfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bitio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/blocks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/buffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chunks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/comp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/conv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/extelt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file1.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/forsupf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fortest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/litend.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macros.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/man.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nbit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rig.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdmms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdnmms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdstr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/slab.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tbv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tdupimgs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testhdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tree.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvset.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvsfpack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vers.Po at am__quote@
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-ALL_CFLAGS = $(CFLAGS) $(FMPOOL_FLAGS) -I$(HDFINC)
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-MANIFEST = $(DISTFILES)
+.f.o:
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-DISTFILES = Makefile.in bitio.dat litend.dat nbit.dat tmgr.dat win32tst.mak \
-	$(CSRCS) $(FSRCS) $(CHDRS) gentest.c
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-CHDRS= tproto.h tutils.h
+ETAGS = etags
+ETAGSFLAGS =
 
-CSRCS= 	rig.c sdstr.c blocks.c an.c anfile.c extelt.c file.c file1.c vers.c \
-	sdmms.c sdnmms.c slab.c litend.c tvset.c comp.c bitio.c tree.c macros.c \
-	conv.c nbit.c man.c mgr.c testhdf.c tbv.c tvsfpack.c chunks.c tvattr.c \
-    buffer.c
+CTAGS = ctags
+CTAGSFLAGS =
 
-COBJS= rig.o sdstr.o blocks.o an.o anfile.o extelt.o file.o file1.o vers.o \
-	sdmms.o sdnmms.o slab.o litend.o tvset.o comp.o bitio.o tree.o macros.o \
-	conv.o nbit.o man.o mgr.o testhdf.o tbv.o tvsfpack.o chunks.o tvattr.o \
-    buffer.o
+tags: TAGS
 
-FSRCS= fortest.c fortestF.f forsupff.f forsupf.c \
-	manf.f mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f \
-	tsdmmsf.f tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f \
-        tvsetf.f, tvattrf.f
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-FOBJS = fortestF.o forsupff.o forsupf.o \
-	manf.o mgrf.o slabwf.o t24f.o tanf.o tanfilef.o tpf.o tr8f.o \
-	tsdmmsf.o tsdnmmsf.o tsdnntf.o tsdntf.o tsdstrf.o tstubsf.o  \
-        tvsetf.o tvattrf.o
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-#CFORSUPSRCS = forsupf.c
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-FTESTS = fortest fortestF
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-#CFORSUPOBJS = forsupf.o
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-TESTF = fortest.o
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list='$(TESTS)'; \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xpass=`expr $$xpass + 1`; \
+	        failed=`expr $$failed + 1`; \
+	        echo "XPASS: $$tst"; \
+	      ;; \
+	      *) \
+	        echo "PASS: $$tst"; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xfail=`expr $$xfail + 1`; \
+	        echo "XFAIL: $$tst"; \
+	      ;; \
+	      *) \
+	        failed=`expr $$failed + 1`; \
+	        echo "FAIL: $$tst"; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      echo "SKIP: $$tst"; \
+	    fi; \
+	  done; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="All $$all tests passed"; \
+	    else \
+	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all tests failed"; \
+	    else \
+	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    skipped="($$skip tests were not run)"; \
+	    test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  echo "$$dashes"; \
+	  echo "$$banner"; \
+	  test -n "$$skipped" && echo "$$skipped"; \
+	  test -n "$$report" && echo "$$report"; \
+	  echo "$$dashes"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# directory used by extelt test.
-TESTDIR = testdir
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) nofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) rall ; \
-	esac
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
 
-rall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) testhdf $(FTESTS) gentest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" testhdf $(FTESTS) gentest; \
-	fi
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-nofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) testhdf gentest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" testhdf gentest; \
-	fi
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+clean-generic:
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-debug: ptesthdf
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-$(HDFLIB)/libdf.so:
-#	cd $(HDFLIB); echo Making \`$(TARG)\' in `pwd`; \
-#	$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG); 
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) $*.c 
-#
-.c.o: 
-	$(CC) $(ALL_CFLAGS) -c $*.c 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-.f.o:
-	$(FC) $(FFLAGS) -c $*.f 
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-$(COBJS) $(TESTF) $(FTESTS): $(FRC)
+dvi: dvi-am
 
-$(FOBJS): fortest.inc
+dvi-am:
 
-#$(FTESTS): $(FOBJS) $(CFORSUPOBJS) $(FFORSUPOBJS) $(HDFLIB)/libdf.so $(JPEGLIB)/libjpeg.so $(ZLIBLIB)/libz.so
-#	$(FC) $(FFLAGS) $@.o -o $@ $(CFORSUPOBJS) $(FFORSUPOBJS) $(HDFLIB)/libdf.so $(JPEGLIB)/libjpeg.so $(ZLIBLIB)/libz.so
+info: info-am
 
-#$(FTESTS): $(FRC)
+info-am:
 
-test-hdf::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) test-hdfnofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) atest-hdf ; \
-	esac
+install-data-am:
 
-atest-hdf: testhdf $(FTESTS)
-	-$(RM) $(RMFLAGS) *.hdf 
-	LD_LIBRARY_PATH=../src ./testhdf
-	-$(RM) $(RMFLAGS) *.hdf 
-	LD_LIBRARY_PATH=../src ./fortest
+install-exec-am:
 
-test-hdfnofortran: testhdf
-	-$(RM) $(RMFLAGS) *.hdf 
-	LD_LIBRARY_PATH=../src ./testhdf
+install-info: install-info-am
 
-test-hdffortran: $(FTESTS) fortest.sav
-	-$(RM) $(RMFLAGS) *.hdf 
-	LD_LIBRARY_PATH=../src ./fortest > fortest.out
-	@cmp fortest.out fortest.sav && echo "*** Fortran tests passed ***";
+install-man:
 
-qtesthdf: $(COBJS) $(HDFLIB)/libdf.so
-	quantify $(CC) $(ALL_CFLAGS) -o qtesthdf $(COBJS) -L$(HDFSRC) -ldf -ljpeg -lz -lm
+installcheck-am:
 
-ptesthdf: $(COBJS) $(HDFLIB)/libdf.so
-	purify $(CC) $(ALL_CFLAGS) -o ptesthdf $(COBJS)  -L$(HDFSRC) -ldf -ljpeg -lz -lm
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-testhdf.tc: $(COBJS) $(HDFLIB)/libdf.so
-	proof $(CC) $(ALL_CFLAGS) -o testhdf.tc $(COBJS)  -L$(HDFSRC) -ldf -ljpeg -lz -lm
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-testhdf: $(COBJS) $(HDFLIB)/libdf.so
-	$(CC) $(ALL_CFLAGS) -o testhdf $(COBJS) -L$(HDFSRC) -ldf -ljpeg -lz -lm
-	test -d $(TESTDIR) || mkdir $(TESTDIR)
+mostlyclean: mostlyclean-am
 
-fortestF: $(FOBJS) $(HDFLIB)/libdf.so
-ifeq ($(NOFORTRANINSOLIB),)
-	$(FC) $(FFLAGS) -o $@ $(FOBJS) -L$(HDFSRC) -ldf -ljpeg -lz -lm
-else
-	$(FC) $(FFLAGS) -o $@ $(FOBJS) -static -L$(HDFSRC) -ldf -dynamic -ljpeg -lz -lm
-endif
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-fortest: $(HDFLIB)/libdf.so fortest.c $(CHDRS)
-	$(CC) $(ALL_CFLAGS) -o fortest fortest.c -L$(HDFSRC) -ldf -ljpeg -lz -lm
+pdf: pdf-am
 
-gentest: gentest.c $(HDFLIB)/libdf.so
-	$(CC) $(ALL_CFLAGS) gentest.c -o gentest -L$(HDFSRC) -ldf -ljpeg -lz -lm
+pdf-am:
 
-ftests: $(FTESTS)
+ps: ps-am
 
-clean: 
-	-$(RM) $(RMFLAGS) $(COBJS) testhdf $(FOBJS) $(FTESTS) \
-	core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg $(TESTDIR)/*
+ps-am:
 
-distclean: 
-	-$(RM) $(RMFLAGS) $(COBJS) testhdf $(FOBJS) $(FTESTS) \
-	core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg $(TESTDIR)/* \
-	config.status Makefile
+uninstall-am: uninstall-info-am
 
-depend: 
-	makedepend -I$(HDFINC) *.c
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-info-am
 
-saber:	$(CSRCS)
-	 #load $(ALL_CFLAGS) $(CSRCS) 
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/test
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'tests' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes tests"
-	@echo "make nofortran - makes HDF tests excluding fortran tests"
-	@echo "make testhdf   - makes HDF C test program "
-	@echo "make fortest   - makes HDF Fortran test program "
-	@echo "make test-hdf          - run HDF tests " 
-	@echo "make test-hdfnofortran - run HDF tests except the fortran test " 
-	@echo "make test-hdffortran   - run HDF fortran tests only " 
-	@echo "make clean     - cleans up tests (both C and Fortran)"
-	@echo "make distclean - cleans up HDF tests including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+testdir:
+	-mkdir testdir
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Modified: packages/libhdf4/trunk/hdf/test/an.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/an.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/an.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.18 $";
 #endif
 
-/* $Id: an.c,v 1.17 1996/11/11 20:39:45 koziol Exp $ */
+/* $Id: an.c,v 1.18 2005/01/16 21:44:10 mcgrath Exp $ */
 
 /***********************************************************
 *
@@ -35,7 +35,7 @@
 #define MAXLEN_DESC  1000
 #define ROWS           10
 #define COLS           10
-#define REPS            2   /* number of data sets to write to file */
+#define REPS            32/*2*/   /* number of data sets to write to file */
 
 static VOID gen2Dfloat
             (int height, int width, float *data);
@@ -237,3 +237,97 @@
           HDfree((VOIDP) indesc);
       }
 }
+
+
+void
+test_an_2(void)
+{
+    char        labsds[MAXLEN_LAB], labris[MAXLEN_LAB], descsds[MAXLEN_DESC],
+                descris[MAXLEN_DESC];
+    uint8       pal[768];
+    uint8      *image, *newimage;
+    uint16      refnum;
+    int32       ret;
+    intn        rank;
+    int         j;
+    int32       dimsizes[2];
+    float      *data;
+
+/* set up object labels and descriptions */
+
+    HDstrcpy(labsds, "Object label #1: sds");
+    HDstrcpy(labris, "Object label #2: image");
+    HDstrcpy(descsds, "Object Descr #1: 1  2  3  4  5  6  7  8  9 10 11 12 \n");
+    HDstrcat(descsds, "             13 14 15 16 17 18 19 20 **END SDS DESCR**\n");
+    HDstrcpy(descris, "Object Descr #2: A B C D E F G H I J K L \n");
+    HDstrcat(descris, "                M N O **END IMAGE DESCR **\n");
+
+/***** generate float array and image *****/
+
+    data = (float *) HDmalloc(ROWS * COLS * sizeof(float));
+    image = (uint8 *) HDmalloc(ROWS * COLS * sizeof(char));
+    newimage = (uint8 *) HDmalloc(ROWS * COLS * sizeof(char));
+
+    dimsizes[0] = ROWS;
+    dimsizes[1] = COLS;
+
+    gen2Dfloat(ROWS, COLS, data);
+    genimage(ROWS, COLS, data, image);
+
+    ret = DFSDsetdims(2, dimsizes);
+    RESULT("DFSDsetdims");
+
+/********  Write labels and descriptions *********/
+    MESSAGE(5, printf("***  Writing labels and descriptions with SDS and RIS ***\n");
+        );
+    for (j = 0; j < REPS; j++)
+      {
+
+          /* write out scientific data set */
+          ret = DFSDadddata(TESTFILE, 2, dimsizes, (VOIDP) data);
+          RESULT("DFSDadddata");
+
+          if ((j % 3) != 0)
+            {   /* write out annotations for 2 out of every 3 */
+                refnum = DFSDlastref();
+                ret = DFANputlabel(TESTFILE, DFTAG_SDG, refnum, labsds);
+                RESULT("DFANputlabel");
+                ret = DFANputdesc(TESTFILE, DFTAG_SDG, refnum,
+                                  descsds, (int32)HDstrlen(descsds));
+                RESULT("DFANputdesc");
+            }
+
+          ret = DFR8addimage(TESTFILE, (VOIDP) image, COLS, ROWS, 0);
+          RESULT("DFR8addimage");
+          refnum = DFR8lastref();
+          ret = DFANputlabel(TESTFILE, DFTAG_RIG, refnum, labris);
+          RESULT("DFANputlabel");
+          ret = DFANputdesc(TESTFILE, DFTAG_RIG, refnum, descris, (int32)HDstrlen(descris));
+          RESULT("DFANputdesc");
+      }
+
+/********  Read labels and descriptions *********/
+
+    MESSAGE(5, printf("*** Reading labels and descriptions for SDS and RIS ***\n");
+        );
+
+    for (j = 0; j < REPS; j++)
+      {
+
+          ret = DFSDgetdims(TESTFILE, &rank, dimsizes, 3);
+          RESULT("DFSDgetdims");
+          refnum = DFSDlastref();
+
+          if ((j % 3) != 0)     /* read in annotations for 2 out of every 3 */
+              check_lab_desc(DFTAG_SDG, refnum, labsds, descsds);
+
+          ret = DFR8getimage(TESTFILE, newimage, (int32) COLS, (int32) ROWS, pal);
+          RESULT("DFR8getimage");
+          refnum = DFR8lastref();
+          check_lab_desc(DFTAG_RIG, refnum, labris, descris);
+      }
+
+    HDfree((VOIDP) data);
+    HDfree((VOIDP) image);
+    HDfree((VOIDP) newimage);
+}

Modified: packages/libhdf4/trunk/hdf/test/bitio.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/bitio.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/bitio.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -30,10 +30,10 @@
    10/19/93 - Started coding.
  */
 
-/* $Id: bitio.c,v 1.21 1999/02/19 23:28:57 koziol Exp $ */
+/* $Id: bitio.c,v 1.22 2003/12/10 21:13:32 epourmal Exp $ */
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.21 $";
+static char RcsId[] = "@(#)$Revision: 1.22 $";
 #endif
 
 #include "tproto.h"
@@ -158,13 +158,22 @@
     uint32      tempbuf;
     intn        i;
     uint8      *test_ptr;
+    char        datafile[512] = "";
+    char       *srcdir = getenv("srcdir");
 
     SEED((uintn) time(NULL));
 
     MESSAGE(6, printf("Testing bitio read routines\n");
         );
 
-    fid = Hopen(DATAFILE_NAME, DFACC_READ, 0);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE_NAME) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE_NAME);
+
+    fid = Hopen(datafile, DFACC_READ, 0);
     CHECK(fid, FAIL, "Hopen");
 
     ret = Hgetelement(fid, DATA_TAG_1, DATA_REF_1, inbuf);
@@ -175,7 +184,7 @@
 
     MESSAGE(8, printf("Reading 8 bits at a time\n");
         );
-    fid = Hopen(DATAFILE_NAME, DFACC_READ, 0);
+    fid = Hopen(datafile, DFACC_READ, 0);
     CHECK(fid, FAIL, "Hopen");
 
     bitid1 = Hstartbitread(fid, DATA_TAG_1, DATA_REF_1);

Modified: packages/libhdf4/trunk/hdf/test/extelt.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/extelt.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/extelt.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.24 $";
+static char RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
-/* $Id: extelt.c,v 1.24 1998/12/08 21:37:50 koziol Exp $ */
+/* $Id: extelt.c,v 1.25 2003/12/10 21:13:32 epourmal Exp $ */
 
 /*
  * These is a first pass at rewriting how these tests for exteranl 

Modified: packages/libhdf4/trunk/hdf/test/forsupf.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/forsupf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/forsupf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.3 $";
+static char RcsId[] = "$Revision: 1.4 $";
 #endif
 
-/* $Id: forsupf.c,v 1.3 1996/06/22 23:07:24 acheng Exp $ */
+/* $Id: forsupf.c,v 1.4 2003/12/10 21:13:32 epourmal Exp $ */
 
 #include "hdf.h"
 #include "fortest.h"
@@ -67,3 +67,41 @@
     return (ret);
 }   /* end nhisystem() */
 
+/*-----------------------------------------------------------------------------
+ * Name:    fixname
+ * Purpose: Fix name for srcdir build and test
+ * Inputs:  IN: name - original namea 
+ *          IN: name_len - name length
+ *          IN/OUT: name_out - buffer to hold modified name
+ *          IN/OUT: name_out_len - length of the buffer, and length of modified
+ *                  string. 
+ * Returns: 0 on success and -1 on failure  
+ * Users:   HDF Fortran programmers
+ *---------------------------------------------------------------------------*/
+
+FRETVAL(intf)
+nfixnamec(_fcd name, intf *name_len, _fcd name_out, intf *name_len_out)
+{
+    char       *c_name;
+    intf        ret;
+
+    char    testfile[1024] = "";
+    char   *srcdir = getenv("srcdir");
+
+    c_name = HDf2cstring(name, (intn) *name_len);
+    if (!c_name) return(FAIL);
+
+    /* Here comes Bill's code */
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(c_name) + 1) < sizeof(testfile))) {
+        strcpy(testfile, srcdir);
+        strcat(testfile, "/");
+    }
+    strcat(testfile, c_name);
+    *name_len_out = (intf) strlen(testfile);
+    HDpackFstring(testfile, _fcdtocp(name_out), *name_len_out);
+ 
+    ret = 0;
+    HDfree(c_name);
+    return (ret);
+}   /* end nfixname() */

Modified: packages/libhdf4/trunk/hdf/test/forsupff.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/forsupff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/forsupff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: forsupff.f,v 1.11 1997/10/24 17:27:55 acheng Exp $
+C $Id: forsupff.f,v 1.12 2003/12/10 21:13:32 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     forsupff.f
@@ -311,3 +311,21 @@
       retcode = hisystem(cmd, len(cmd))
       return
       end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE fixname(name, name_out, name_out_len)
+C     Takes care of srcdir build
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine fixname(name, name_out, name_out_len)
+      implicit none
+
+      character*(*)  name
+      character*(*)  name_out
+      integer retcode, fixnamec, name_out_len
+
+      retcode = fixnamec(name, len(name), name_out, name_out_len)
+      return
+      end

Modified: packages/libhdf4/trunk/hdf/test/fort_ps/forsupffp.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/fort_ps/forsupffp.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fort_ps/forsupffp.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,357 +1,383 @@
-C****************************************************************************
-C* NCSA HDF                                                                 *
-C* Software Development Group                                               *
-C* National Center for Supercomputing Applications                          *
-C* University of Illinois at Urbana-Champaign                               *
-C* 605 E. Springfield, Champaign IL 61820                                   *
-C*                                                                          *
-C* For conditions of distribution and use, see the accompanying             *
-C* hdf/COPYING file.                                                        *
-C*                                                                          *
-C****************************************************************************
-C
-C $Id: forsupffp.f,v 1.2 1998/06/12 21:54:12 epourmal Exp $
-C
-C------------------------------------------------------------------------------
-C File:     forsupffp.f
-C Purpose:  Fortran support routines for Fortran test routines
-C Invokes:  Nothing currently...
-C Contents: 
-C Remarks: none
-C------------------------------------------------------------------------------
-
-
-C------------------------------------------------------------------------------
-C Name: RESULT
-C Purpose:  Report on success of HDF routines
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine RESULT(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          print *, routine, ' SUCCESSFUL'
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: VERIFY
-C Purpose:  Report on success of HDF routines, using verbosity
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine VERIFY(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          if (verbosity .ge. VERBO_HI) then
-              print *, routine, ' SUCCESSFUL'
-          endif
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: VRFY
-C Purpose:  Report on success of HDF routines, using verbosity
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C-----------------------------------------------------------------------------
-      subroutine VRFY(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          if (verbosity .ge. VERBO_HI) then
-              print *, routine, ' SUCCESSFUL'
-          endif
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: MESSAGE
-C Purpose:  Print something, depending on the verbosity level
-C Inputs:   
-C       priority: priority of message (lower values have higher priority)
-C       out_str: string to output
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine MESSAGE(priority, out_str)
-      implicit none
-      include 'fortest.inc'
-
-      integer priority
-      character*(*)  out_str
-
-      if (priority .le. Verbosity) then
-          print *, out_str
-      endif
-
-      return
-      end
-
-
-C***************************************************************
-C
-C  gen2Dfloat:  generate 2-D data array 
-C
-C***************************************************************
-      subroutine gen2Dfloat(height, width, data)
-      implicit none
-      include 'fortest.inc'
-
-      integer   height, width
-      real data(height,width)
-
-      integer i, j
-
-C     store one value per row, increasing by one for each row 
-      do 110 i=1, height
-          do 100 j=1, width
-             data(i, j) = float(i)
-  100     continue
-  110 continue
-      return
-      end
-
-
-C***************************************************************
-C
-C  genimage:  generate image from 2-D float array
-C
-C***************************************************************
-      subroutine genimage(height, width, data, image)
-      implicit none
-      include 'fortest.inc'
-
-      integer   height, width
-      real      data(height, width)
-      character image(height, width)
-
-      integer i, j
-      real   max, min, multiplier
-
-      max = data(1,1)
-      min = data(1,1)
-      do 110 i=1, height
-          do 100 j=1, width
-             if (max .gt. data(i,j)) max = data(i,j)
-             if (min .lt. data(i,j)) min = data(i,j)
-  100     continue
-  110 continue
-
-C     store one value per row, increasing by one for each row 
-      multiplier = 255.0 /(max-min)
-      do 210 i=1, height
-          do 200 j=1, width
-             image(i,j) = char( int((data(i,j)-min) * multiplier) )
-  200     continue
-  210 continue
-      return 
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE errchkio
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine errchkio(err1, err2, err3, num_err, msg)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer err1, err2, err3, num_err
-      character*(*)  msg
-
-      if (err1.eq.FAIL .or. err2.eq.FAIL .or. err3.eq.FAIL) then
-          num_err = num_err + 1
-          print *
-          print *,'>>> Test failed for ',msg, ' <<<'
-          print *, '  err1=',err1, '   err2=',err2, '   err3=',err3
-      else
-          if (verbosity .ge. VERBO_HI) then
-	      print *,'Test passed for ', msg
-	  endif
-      endif
-
-      return
-      end
-
-      
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE errchkarr
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine errchkarr(err1, err2, err3, num_err, type)
-      implicit none
-      include 'fortest.inc'
-
-      integer err1, err2, err3, num_err
-      character*(*)  type
-      
-      if (err1 .eq. 1) then
-        print *, '>>> Test failed for ', type, ' array' 
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' array'
-	  endif
-      endif
-
-      if (err2 .eq. 1) then
-        print *, '>>> Test failed for ',type, ' scales.'
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' scales.'
-	  endif
-      endif
-
-      if (err3 .eq. 1) then
-        print *, '>>> Test failed for ', type, ' max/min.'
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' max/min.'
-	  endif
-      endif
-
-      return
-      end
-
-       
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE err_check
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine err_check(err, num_err, type)
-      implicit none
-      include 'fortest.inc'
-
-      integer err, num_err
-      character*(*) type
-
-      if (err .eq. 1) then 
-  	print *,'>>> Test failed for ',type, ' array.'
-        num_err = num_err+1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *,'Test passed for ', type, ' array.'
-	  endif
-      endif
-
-      return
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE ptestban
-C     Print the Test banner
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine ptestban(action, name)
-      implicit none
-      include 'fortest.inc'
-
-      character*(*) action, name
-
-      if (Verbosity .ge. VERBO_DEF) then
-	call MESSAGE(VERBO_LO,
-     +     '=====================================')
-	print *, action, ' -- ', name
-	call MESSAGE(VERBO_LO,
-     +     '=====================================')
-      endif
-
-      return
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE hsystem(cmd)
-C     Print the Test banner
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine hsystem(cmd)
-      implicit none
-
-      character*(*) cmd
-      integer retcode
-C		integer hisystem
-      INTERFACE 
-	   INTEGER FUNCTION hisystem(cmd, cmdlen)
-	     !MS$ATTRIBUTES C, reference,alias:'_HISYSTEM' :: hisystem
-	     !DEC$ ATTRIBUTES reference :: cmd
-	     character*(*) cmd
-	     integer cmdlen
-	   END FUNCTION hisystem
-	END INTERFACE
-
-      retcode = hisystem(cmd, len(cmd))
-      return
-      end
+C****************************************************************************
+C* NCSA HDF                                                                 *
+C* Software Development Group                                               *
+C* National Center for Supercomputing Applications                          *
+C* University of Illinois at Urbana-Champaign                               *
+C* 605 E. Springfield, Champaign IL 61820                                   *
+C*                                                                          *
+C* For conditions of distribution and use, see the accompanying             *
+C* hdf/COPYING file.                                                        *
+C*                                                                          *
+C****************************************************************************
+C
+C $Id: forsupffp.f,v 1.3 2003/12/10 21:13:39 epourmal Exp $
+C
+C------------------------------------------------------------------------------
+C File:     forsupffp.f
+C Purpose:  Fortran support routines for Fortran test routines
+C Invokes:  Nothing currently...
+C Contents: 
+C Remarks: none
+C------------------------------------------------------------------------------
+
+
+C------------------------------------------------------------------------------
+C Name: RESULT
+C Purpose:  Report on success of HDF routines
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine RESULT(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          print *, routine, ' SUCCESSFUL'
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: VERIFY
+C Purpose:  Report on success of HDF routines, using verbosity
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine VERIFY(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          if (verbosity .ge. VERBO_HI) then
+              print *, routine, ' SUCCESSFUL'
+          endif
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: VRFY
+C Purpose:  Report on success of HDF routines, using verbosity
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C-----------------------------------------------------------------------------
+      subroutine VRFY(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          if (verbosity .ge. VERBO_HI) then
+              print *, routine, ' SUCCESSFUL'
+          endif
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: MESSAGE
+C Purpose:  Print something, depending on the verbosity level
+C Inputs:   
+C       priority: priority of message (lower values have higher priority)
+C       out_str: string to output
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine MESSAGE(priority, out_str)
+      implicit none
+      include 'fortest.inc'
+
+      integer priority
+      character*(*)  out_str
+
+      if (priority .le. Verbosity) then
+          print *, out_str
+      endif
+
+      return
+      end
+
+
+C***************************************************************
+C
+C  gen2Dfloat:  generate 2-D data array 
+C
+C***************************************************************
+      subroutine gen2Dfloat(height, width, data)
+      implicit none
+      include 'fortest.inc'
+
+      integer   height, width
+      real data(height,width)
+
+      integer i, j
+
+C     store one value per row, increasing by one for each row 
+      do 110 i=1, height
+          do 100 j=1, width
+             data(i, j) = float(i)
+  100     continue
+  110 continue
+      return
+      end
+
+
+C***************************************************************
+C
+C  genimage:  generate image from 2-D float array
+C
+C***************************************************************
+      subroutine genimage(height, width, data, image)
+      implicit none
+      include 'fortest.inc'
+
+      integer   height, width
+      real      data(height, width)
+      character image(height, width)
+
+      integer i, j
+      real   max, min, multiplier
+
+      max = data(1,1)
+      min = data(1,1)
+      do 110 i=1, height
+          do 100 j=1, width
+             if (max .gt. data(i,j)) max = data(i,j)
+             if (min .lt. data(i,j)) min = data(i,j)
+  100     continue
+  110 continue
+
+C     store one value per row, increasing by one for each row 
+      multiplier = 255.0 /(max-min)
+      do 210 i=1, height
+          do 200 j=1, width
+             image(i,j) = char( int((data(i,j)-min) * multiplier) )
+  200     continue
+  210 continue
+      return 
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE errchkio
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine errchkio(err1, err2, err3, num_err, msg)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer err1, err2, err3, num_err
+      character*(*)  msg
+
+      if (err1.eq.FAIL .or. err2.eq.FAIL .or. err3.eq.FAIL) then
+          num_err = num_err + 1
+          print *
+          print *,'>>> Test failed for ',msg, ' <<<'
+          print *, '  err1=',err1, '   err2=',err2, '   err3=',err3
+      else
+          if (verbosity .ge. VERBO_HI) then
+	      print *,'Test passed for ', msg
+	  endif
+      endif
+
+      return
+      end
+
+      
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE errchkarr
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine errchkarr(err1, err2, err3, num_err, type)
+      implicit none
+      include 'fortest.inc'
+
+      integer err1, err2, err3, num_err
+      character*(*)  type
+      
+      if (err1 .eq. 1) then
+        print *, '>>> Test failed for ', type, ' array' 
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' array'
+	  endif
+      endif
+
+      if (err2 .eq. 1) then
+        print *, '>>> Test failed for ',type, ' scales.'
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' scales.'
+	  endif
+      endif
+
+      if (err3 .eq. 1) then
+        print *, '>>> Test failed for ', type, ' max/min.'
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' max/min.'
+	  endif
+      endif
+
+      return
+      end
+
+       
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE err_check
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine err_check(err, num_err, type)
+      implicit none
+      include 'fortest.inc'
+
+      integer err, num_err
+      character*(*) type
+
+      if (err .eq. 1) then 
+  	print *,'>>> Test failed for ',type, ' array.'
+        num_err = num_err+1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *,'Test passed for ', type, ' array.'
+	  endif
+      endif
+
+      return
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE ptestban
+C     Print the Test banner
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine ptestban(action, name)
+      implicit none
+      include 'fortest.inc'
+
+      character*(*) action, name
+
+      if (Verbosity .ge. VERBO_DEF) then
+	call MESSAGE(VERBO_LO,
+     +     '=====================================')
+	print *, action, ' -- ', name
+	call MESSAGE(VERBO_LO,
+     +     '=====================================')
+      endif
+
+      return
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE hsystem(cmd)
+C     Print the Test banner
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine hsystem(cmd)
+      implicit none
+
+      character*(*) cmd
+      integer retcode
+C		integer hisystem
+      INTERFACE 
+	   INTEGER FUNCTION hisystem(cmd, cmdlen)
+	     !MS$ATTRIBUTES C, reference,alias:'_HISYSTEM' :: hisystem
+	     !DEC$ ATTRIBUTES reference :: cmd
+	     character*(*) cmd
+	     integer cmdlen
+	   END FUNCTION hisystem
+	END INTERFACE
+
+      retcode = hisystem(cmd, len(cmd))
+      return
+      end
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE fixname(name, name_out, name_out_len)
+C     Takes care of srcdir build
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine fixname(name, name_out, name_out_len)
+      implicit none
+
+      character*(*)  name
+      character*(*)  name_out
+      integer  retcode, name_out_len
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: fixname
+	!MS$endif
+      INTERFACE
+      INTEGER FUNCTION fixnamec(name, len_name, name_out, name_out_len)
+           !MS$ATTRIBUTES C,reference,alias:'_FIXNAMEC' :: fixnamec
+	     !DEC$ ATTRIBUTES reference :: name, name_out
+           integer len_name, name_out_len
+	     character*(*) name, name_out
+         END FUNCTION fixnamec
+       END INTERFACE
+      retcode = fixnamec(name, len(name), name_out, name_out_len)
+      return
+      end

Modified: packages/libhdf4/trunk/hdf/test/fort_ps/fortest.arg
===================================================================
--- packages/libhdf4/trunk/hdf/test/fort_ps/fortest.arg	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fort_ps/fortest.arg	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,5 +1,7 @@
 Cleanup del *.hdf
 Test manf
 Test mgrf
+Test grcompress
 Test vsetf
+Test vsblock
 Test vattrf

Modified: packages/libhdf4/trunk/hdf/test/fort_ps/fortestFp.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/fort_ps/fortestFp.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fort_ps/fortestFp.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,4 +1,4 @@
-C $Id: fortestFp.f,v 1.1 1997/05/22 23:25:22 sxu Exp $
+C $Id: fortestFp.f,v 1.2 2001/09/26 19:58:31 epourmal Exp $
 C Interface to invoke tests for HDF Fortran interfaces.
 
 	Program main
@@ -209,6 +209,11 @@
 	    call mgrf(retcode)
 	    return
 	endif
+	
+	if (param .EQ. 'grcompress')  then
+            call test_grcompress(retcode)
+            return
+        endif  
 
 C	if (param .EQ. 'p') then
 C	    call tpf(retcode)
@@ -250,6 +255,11 @@
 	    return
 	endif
 
+	if (param .EQ. 'vsblock') then
+	    call tvsetblock(retcode)
+	    return
+	endif
+
 	if (param .EQ. 'vattrf') then
 	    call tvattrf(retcode)
 	    return

Modified: packages/libhdf4/trunk/hdf/test/fort_ps/manpf.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/fort_ps/manpf.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fort_ps/manpf.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: manpf.f,v 1.2 1999/04/02 18:34:33 ptlu Exp $
+C $Id: manpf.f,v 1.6 2001/10/02 21:31:33 epourmal Exp $
 C
       subroutine manf (number_failed)
 C
@@ -37,6 +37,12 @@
 
 C      integer dssdims, dsadata, dslref, dsgdims
 C      integer d8aimg, DFR8lastref, d8gimg
+C
+      integer hishdf, hestringf, heprntf
+      character*80 error_message
+      integer fileh
+      character*15 ERR_FILE
+      parameter (ERR_FILE = 'Fortran_err.dat')
 
       integer numberfailed, ISFIRST, NOTFIRST, MAXLENLAB
       integer MAXLEN_DESC, ROWS, COLS, REPS
@@ -302,6 +308,36 @@
           print *,'***** ',numberfailed,' TESTS FAILED ***** '
       endif
 
+C ***** Test if the file fname is an HDF file
+C
+C
+      ret = hishdf(TESTFILE)
+      if (ret .ne. 1) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HISHDF function failed'
+      endif
+      ret = hestringf(0, error_message)
+       if (ret .ne. 0) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HESTRINGF function failed'
+      endif
+
+C
+C     Call hishdf with  file not being an hdf file. Call should return
+C     0 
+C
+      ret = hishdf('manf.f')
+      if (ret .ne. 0) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HISHDF function failed'
+      endif
+C
+C *****  end of hishdf test
+C
+      fileh = hopen('nonexist', DFACC_READ,0)
+      ret = heprntf(ERR_FILE, 0)
+      ret = hclose(fileh)
+      ret = heprntf(ERR_FILE, 0)
       return
       end
 
@@ -324,12 +360,11 @@
       parameter ( MAXLENLAB =    30,
      *            MAXLEN_DESC =  500 )
 
+
       integer  inlablen, indesclen, ret
 
       integer affileinfo, afnumann, afannlist, afannlen
       integer afreadann, afstart, afend, afendaccess, hopen, hclose
-      integer hishdf, hestring
-      character*80 error_message
 
       integer fileh, anh
       integer nflabs, nfdescs, nolabs, nodescs
@@ -346,32 +381,6 @@
       AN_FILE_LABEL = 2
       AN_FILE_DESC  = 3
 
-C ***** Test if the file fname is an HDF file
-C
-C
-      ret = hishdf(fname)
-      if (ret .ne. 1) then
-          num_failed = num_failed + 1
-          write(*,*) "HISHDF function failed"
-      endif
-      ret = hestring(0, error_message)
-       if (ret .ne. 0) then
-          num_failed = num_failed + 1
-          write(*,*) "HESTRING function failed"
-      endif
-
-C
-C     Call hishdf with  file not being an hdf file. Call should return
-C     0 
-C
-      ret = hishdf("manf.f")
-      if (ret .ne. 0) then
-          num_failed = num_failed + 1
-          write(*,*) "HISHDF function failed"
-      endif
-C
-C *****  end of hishdf test
-C
 C *****start annotation access on file *****
       fileh = hopen(fname, DFACC_READ,0)
       ret = fileh

Modified: packages/libhdf4/trunk/hdf/test/fortest.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/fortest.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fortest.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.36 $";
+static char RcsId[] = "@(#)$Revision: 1.39 $";
 #endif
 
-/* $Id: fortest.c,v 1.36 1998/03/04 21:36:03 acheng Exp $ */
+/* $Id: fortest.c,v 1.39 2003/12/10 21:13:33 epourmal Exp $ */
 
 #define TESTMASTER
 
@@ -89,8 +89,9 @@
     num_tests=InitTest("sdnt", "tsdntf", "");
     num_tests=InitTest("sdstr", "tsdstrf", "");
     num_tests=InitTest("vsetf", "tvsetf", "");
+    num_tests=InitTest("vsetblock", "tvsetblock", "");
     num_tests=InitTest("vattrf", "tvattrf", "");
-#ifdef DEC_ALPHA
+#if defined DEC_ALPHA || (defined SUN && defined _LP64) || defined __ia64  ||defined AIX5L64
     printf("   Skipping stubs\n");
 #else
     num_tests=InitTest("stubs", "tstubsf", "");

Modified: packages/libhdf4/trunk/hdf/test/fortest.h
===================================================================
--- packages/libhdf4/trunk/hdf/test/fortest.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fortest.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: fortest.h,v 1.3 1997/05/22 23:36:55 sxu Exp $ */
+/* $Id: fortest.h,v 1.4 2003/12/10 21:13:33 epourmal Exp $ */
 
 #ifndef __FORTEST_H
 #define __FORTEST_H
@@ -22,15 +22,18 @@
 #ifdef DF_CAPFNAMES
 #  define ngetverb      FNAME(GETVERB)
 #  define nhisystem       FNAME(HISYSTEM)
+#  define nfixnamec        FNAME(FIXNAMEC) 
 #else  /* !DF_CAPFNAMES */
 #  define ngetverb      FNAME(getverb)
 #  define nhisystem       FNAME(hisystem)
+#  define nfixnamec        FNAME(fixnamec) 
 #endif /* DF_CAPFNAMES */
 
 /* FORTRAN support C-stubs for FORTRAN interface tests */
 
 extern FRETVAL(intf) ngetverb(void);
 extern FRETVAL(intf) nhisystem(_fcd cmd, intf *cmdlen);
+extern FRETVAL(intf) nfixname(_fcd name, intf *name_len, _fcd name_out, intf *name_len_out);
 
 #endif /* __FORTEST_H */
 

Modified: packages/libhdf4/trunk/hdf/test/fortestF.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/fortestF.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/fortestF.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,4 +1,4 @@
-C $Id: fortestF.f,v 1.19 1999/05/04 17:36:31 koziol Exp $
+C $Id: fortestF.f,v 1.20 2001/09/24 21:57:46 epourmal Exp $
 C Interface to invoke tests for HDF Fortran interfaces.
 
 	Program main
@@ -266,6 +266,11 @@
 	    return
 	endif
 
+	if (param .EQ. 'vsetblock') then
+	    call tvsetblock(retcode)
+	    return
+	endif
+
 	if (param .EQ. 'vattrf') then
 	    call tvattrf(retcode)
 	    return

Modified: packages/libhdf4/trunk/hdf/test/litend.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/litend.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/litend.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.18 $";
 #endif
 
-/* $Id: litend.c,v 1.17 1996/11/11 20:39:55 koziol Exp $ */
+/* $Id: litend.c,v 1.18 2003/12/10 21:13:33 epourmal Exp $ */
 
 #include "tproto.h"
 
@@ -83,11 +83,21 @@
     float64 *data_f64;
     int ret;
 
+    char        filename[512] = "";
+    char       *srcdir = getenv("srcdir");
+
     MESSAGE(5,printf("Testing Little-Endian Read Routines\n"););
 
     MESSAGE(10,printf("Testing Little-Endian INT8 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(FILENAME) + 1) < sizeof(filename))) {
+        strcpy(filename, srcdir);
+        strcat(filename, "/");
+    }
+    strcat(filename, FILENAME);
+
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT8 data were incorrect\n");
@@ -102,7 +112,7 @@
           } /* end if */
         else {
             data_i8=(int8 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int8));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i8);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i8);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i8,data_i8,CDIM_X*CDIM_Y*sizeof(int8))) {
@@ -115,7 +125,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT8 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT8 data were incorrect\n");
@@ -130,7 +140,7 @@
           } /* end if */
         else {
             data_u8=(uint8 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint8));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u8);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u8);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u8,data_u8,CDIM_X*CDIM_Y*sizeof(uint8))) {
@@ -143,7 +153,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian INT16 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT16 data were incorrect\n");
@@ -158,7 +168,7 @@
           } /* end if */
         else {
             data_i16=(int16 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int16));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i16);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i16);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i16,data_i16,CDIM_X*CDIM_Y*sizeof(int16))) {
@@ -171,7 +181,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT16 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT16 data were incorrect\n");
@@ -186,7 +196,7 @@
           } /* end if */
         else {
             data_u16=(uint16 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint16));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u16);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u16);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u16,data_u16,CDIM_X*CDIM_Y*sizeof(uint16))) {
@@ -199,7 +209,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian INT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT32 data were incorrect\n");
@@ -214,7 +224,7 @@
           } /* end if */
         else {
             data_i32=(int32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i32,data_i32,CDIM_X*CDIM_Y*sizeof(int32))) {
@@ -227,7 +237,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT32 data were incorrect\n");
@@ -242,7 +252,7 @@
           } /* end if */
         else {
             data_u32=(uint32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u32,data_u32,CDIM_X*CDIM_Y*sizeof(uint32))) {
@@ -255,7 +265,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian FLOAT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for FLOAT32 data were incorrect\n");
@@ -270,7 +280,7 @@
           } /* end if */
         else {
             data_f32=(float32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(float32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_f32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_f32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_f32,data_f32,CDIM_X*CDIM_Y*sizeof(float32))) {
@@ -283,7 +293,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian FLOAT64 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for FLOAT64 data were incorrect\n");
@@ -298,7 +308,7 @@
           } /* end if */
         else {
             data_f64=(float64 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(float64));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_f64);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_f64);
             RESULT("DFSDgetdata");
 
 #if defined CONVEXNATIVE

Modified: packages/libhdf4/trunk/hdf/test/manf.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/manf.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/manf.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: manf.f,v 1.22 2000/02/29 20:38:04 epourmal Exp $
+C $Id: manf.f,v 1.23 2001/10/01 21:53:57 epourmal Exp $
 C
       subroutine manf (number_failed)
 C
@@ -323,12 +323,14 @@
       integer MAXLENLAB, MAXLEN_DESC
       parameter ( MAXLENLAB =    30,
      *            MAXLEN_DESC =  500 )
+      character*15 ERR_FILE
+      parameter (ERR_FILE = 'Fortran_err.dat')
 
       integer  inlablen, indesclen, ret
 
       integer affileinfo, afnumann, afannlist, afannlen
       integer afreadann, afstart, afend, afendaccess, hopen, hclose
-      integer hishdff, hestringf
+      integer hishdff, hestringf, heprntf
       character*80 error_message
 
       integer fileh, anh
@@ -380,7 +382,8 @@
 C *****  end of hishdff test
 C
 C *****start annotation access on file *****
-
+      fileh = hopen('nonexist', DFACC_READ,0)
+      ret = heprntf(ERR_FILE, 0)
       fileh = hopen(fname, DFACC_READ,0)
       ret = fileh
       call VRFY(ret, 'hopen', num_failed)
@@ -479,6 +482,8 @@
       call VRFY(ret, 'afend', num_failed)
       ret = hclose(fileh)
       call VRFY(ret, 'hclose', num_failed)
+      ret = hclose(fileh)
+      ret = heprntf(ERR_FILE, 0)
 
 
       return

Modified: packages/libhdf4/trunk/hdf/test/mgr.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/mgr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/mgr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.30 $";
+static char RcsId[] = "$Revision: 1.39 $";
 #endif
 
-/* $Id: mgr.c,v 1.30 2000/11/16 15:41:36 koziol Exp $ */
+/* $Id: mgr.c,v 1.39 2005/02/14 00:08:13 bmribler Exp $ */
 
 /***********************************************************
 *
@@ -360,7 +360,15 @@
             2. GRgetattr
         C. GRfindattr
     VIII. Old-Style Raster Image Access
+        A. Read data from RLE compressed image
+        B. Create RLE compressed image & write to it (not implemented)
+        C. Read data from 8-bit JPEG compressed image
+        D. Create 8-bit JPEG compressed image & write to it
+        E. Read data from 24-bit JPEG compressed image
+        F. Create 24-bit JPEG compressed image & write to it
     IX. Compressed image Functions
+    X.  Chunking write/read test
+
         
 */
 
@@ -382,12 +390,21 @@
     int32 n_datasets;       /* number of datasets */
     int32 n_attrs;          /* number of attributes */
     int32 ret;              /* generic return value */
+    char datafile[512] = "";
+    char *srcdir = getenv("srcdir");
 
     /* Output message about test being performed */
     MESSAGE(6, printf("Testing Multi-file Raster Initialization routines\n"););
 
     MESSAGE(8, printf("Try creating a new file and checking it out\n"););
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE);
+
     /* Ok, now create a new file */
     fid=Hopen(TESTFILE,DFACC_RDWR,0);
     CHECK(fid,FAIL,"Hopen");
@@ -418,7 +435,7 @@
 
     /* Ok, now check an existing file */
 
-    fid=Hopen(DATAFILE,DFACC_READ,0);
+    fid=Hopen(datafile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Try initializing the GR interface */
@@ -2279,12 +2296,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char datafile[512] = "";
+    char *srcdir = getenv("srcdir");
 
 /* B2b1 - Read/Write images - with real Data - Existing Image - Whole Image */
     MESSAGE(8, printf("Check out I/O from Existing Image - Whole Image\n"););
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE);
+
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(DATAFILE,DFACC_READ,0);
+    fid=Hopen(datafile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Try initializing the GR interface */
@@ -2645,7 +2671,7 @@
 /****************************************************************
 **
 **  test_mgr_image(): Multi-file Raster Image I/O Test Routine
-** 
+**  II. Create Images
 **      A. GRcreate/GRselect/GRendaccess w/GRgetiminfo
 **      B. Write/Read images
 **          1. With no Data
@@ -2883,6 +2909,10 @@
         ret=GRgetiminfo(riid,name,&ncomp,&nt,&il,dimsizes,&n_attr);
         CHECK(ret,FAIL,"GRgetiminfo");
 
+        /* Get the number of palettes */
+        ret=GRgetnluts(riid);
+        VERIFY(ret,0,"GRgetnluts");
+
         lutid=GRgetlutid(riid,0);
         CHECK(lutid,FAIL,"GRgetlutid");
         
@@ -3383,12 +3413,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldrlefile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDRLEFILE) + 1) < sizeof(oldrlefile))) {
+        strcpy(oldrlefile, srcdir);
+        strcat(oldrlefile, "/");
+    }
+    strcat(oldrlefile, OLDRLEFILE);
+
 /* A - Read RLE compressed data from old raster image file */
     MESSAGE(8, printf("Read RLE compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDRLEFILE,DFACC_RDWR,0);
+    fid=Hopen(oldrlefile,DFACC_RDWR,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3444,12 +3483,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldgreyjpegfile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDGREYJPEGFILE) + 1) < sizeof(oldgreyjpegfile))) {
+        strcpy(oldgreyjpegfile, srcdir);
+        strcat(oldgreyjpegfile, "/");
+    }
+    strcat(oldgreyjpegfile, OLDGREYJPEGFILE);
+
 /* C - Read 8-bit JPEG compressed data from old raster image file */
     MESSAGE(8, printf("Read 8-bit JPEG compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDGREYJPEGFILE,DFACC_READ,0);
+    fid=Hopen(oldgreyjpegfile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3498,12 +3546,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldjpegfile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDJPEGFILE) + 1) < sizeof(oldjpegfile))) {
+        strcpy(oldjpegfile, srcdir);
+        strcat(oldjpegfile, "/");
+    }
+    strcat(oldjpegfile, OLDJPEGFILE);
+
 /* E - Read 24-bit JPEG compressed data from old raster image file */
     MESSAGE(8, printf("Read 24-bit JPEG compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDJPEGFILE,DFACC_READ,0);
+    fid=Hopen(oldjpegfile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3583,7 +3640,13 @@
 #define GZIPFILE    "gr_gzip.hdf"
 #define JPEGFILE    "gr_jpeg.hdf"
 
-/* Sub-tests for test_mgr_compress() */
+/* Sub-tests for test_mgr_compress():
+   - test_mgr_compress_a: Create/Write/Read gzip compressed image
+   - test_mgr_compress_b: Create/Write/Read 8-bit JPEG compressed image
+   - test_mgr_compress_c: Create/Read/Write 24-bit JPEG compressed Image
+   - test_get_compress:   Retrieve various compression information of 
+				compressed Image 
+*/
 static void test_mgr_compress_a(int flag)
 {
     int32 fid;              /* HDF file ID */
@@ -3603,7 +3666,7 @@
 
     {
         int32 riid;     /* RI ID for the new image */
-        int32 comp_type;            /* Compression method */
+        comp_coder_t comp_type;            /* Compression method */
         comp_info cinfo;            /* Compression parameters */
         int32 dims[2]={10,10};    /* dimensions for the empty image */
         uint8 image[10][10]; /* space for the image data */
@@ -3742,7 +3805,7 @@
 
     {
         int32 riid;     /* RI ID for the new image */
-        int32 comp_type;            /* Compression method */
+        comp_coder_t comp_type;            /* Compression method */
         comp_info cinfo;            /* Compression parameters */
         int32 dims[2]={10,10};    /* dimensions for the empty image */
         int32 dims_out[2];          /* Buffer for retrieving dimensions */
@@ -4023,14 +4086,542 @@
  
 } /* end test_mgr_compress_c() */
 
+/*--------------------------------------------------------------------------
+    The following 2 routines are added when bug# 307 was fixed:
+
+    - test_get_compress: tests the new functionality, getting compression
+                information of compressed image data.  The test
+        + creates a file and four compressed images written to the file,
+          then closes the file.
+        + re-opens the file, then reads and verifies each image's
+          compression information
+        The four images are created using the following compression
+        methods in that order: RLE, Skipping Huffman, Deflate, and JPEG.
+        For simplicity, all four images use the same data sample.
+
+    - make_comp_image: is a helper that test_get_compress uses to create
+                several compressed images.
+
+ -BMR (Sept 7, 01)
+--------------------------------------------------------------------------*/
+
+#define	COMPFILE	"gr_comp.hdf"
+#define	RLE_IMAGE	"Image with RLE Compression"
+#define	DEFLATE_IMAGE	"Image with Deflate Compression"
+#define	SKPHUFF_IMAGE	"Image with Skphuff Compression"
+#define	JPEG_IMAGE	"Image with JPEG Compression"
+#define	DEFLATE_LEVEL		7  /* arbitrary */
+#define	SKPHUFF_SKIPSIZE	28  /* arbitrary */
+
+intn make_comp_image( 
+		int32 grid,
+		char* img_name,
+		comp_coder_t comp_type,    /* Compression method */
+		comp_info* cinfo)    /* Compression parameters */
+{
+    int32 riid;         /* RI ID of the working image */
+    int32 dims[2]={10,10};	/* dimensions for the empty image */
+    uint8 image_data[10][10];	/* space for the image data */
+    int32 start[2];		/* start of image data to grab */
+    int32 stride[2];	/* stride of image data to grab */
+    intn i,j;		/* indices */
+    intn ret_value;        /* generic return value */
+
+    /* Initialize data we are going to write out */
+    for (i = 0; i < 10; i++)
+        for (j = 0; j < 10; j++)
+            image_data[i][j] = (uint8) (i + j + 10);
+
+    /* Create the image */
+    riid = GRcreate(grid, img_name, 1, DFNT_UINT8, MFGR_INTERLACE_PIXEL, dims);
+    CHECK(riid, FAIL, "GRcreate");
+
+    /* Set the compression as provided */
+    ret_value = GRsetcompress(riid, comp_type, cinfo);
+    CHECK(ret_value, FAIL, "GRsetcompress");
+
+    /* Write the image out */
+    start[0] = start[1] = 0;
+    stride[0] = stride[1] = 1;
+    ret_value = GRwriteimage(riid, start, stride, dims, image_data);
+    CHECK(ret_value, FAIL, "GRwriteimage");
+
+    /* Close the image */
+    ret_value = GRendaccess(riid);
+    CHECK(ret_value, FAIL, "GRendaccess");
+
+    return ret_value;
+}
+
+static void test_get_compress(int flag)
+{
+    int32 fid;          /* HDF file ID */
+    int32 grid;         /* GRID for the interface */
+    int32 riid;     	/* RI ID of the working image */
+    comp_coder_t comp_type;    /* Compression method */
+    comp_info cinfo;    /* Compression parameters - union */
+    intn status;        /* generic return value */
+
+/* D - Retrieve compression information of compressed images */
+    MESSAGE(8, printf("Verify the compression information of compressed images\n"););
+
+    /*
+     * Create a new file and several images with different compression
+     * schemes then close the images and the file
+     */
+
+    /* Create an hdf file, and initiate the GR interface */
+    fid = Hopen(COMPFILE, DFACC_CREATE, 0);
+    CHECK(fid, FAIL, "Hopen");
+
+    grid = GRstart(fid);
+    CHECK(grid, FAIL, "GRstart");
+
+    /* Create and write 4 images, with RLE, deflate, skipping huffman,
+       and JPEG compression methods. */
+
+    /* No compression info for the RLE image */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    /* Create and write the first compressed image in this file */
+    make_comp_image(grid, RLE_IMAGE, COMP_CODE_RLE, &cinfo);
+
+    /* Set the compression info for the second image with skipping 
+       huffman method */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.skphuff.skp_size = SKPHUFF_SKIPSIZE;
+
+    /* Create and write the second compressed image in this file */
+    make_comp_image(grid, SKPHUFF_IMAGE, COMP_CODE_SKPHUFF, &cinfo);
+
+    /* Set the compression info for the third image with deflate method */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.deflate.level = DEFLATE_LEVEL;
+
+    /* Create and write the third compressed image in this file */
+    make_comp_image(grid, DEFLATE_IMAGE, COMP_CODE_DEFLATE, &cinfo);
+
+    /* Set the compression method for the fourth image */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.jpeg.quality = 100;	/* won't be able to retrieved anyway */
+    cinfo.jpeg.force_baseline = 1;
+
+    /* Create and write the fourth compressed image in this file */
+    make_comp_image(grid, JPEG_IMAGE, COMP_CODE_JPEG, &cinfo);
+
+    /* Terminate access to the GR interface and close the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Re-open the file COMPFILE, and retrieve the compression information
+     * of its two images 
+     */
+    fid = Hopen(COMPFILE, DFACC_READ, 0);
+    CHECK(fid, FAIL, "Hopen");
+
+    grid = GRstart(fid);
+    CHECK(grid, FAIL, "GRstart");
+
+    /* get access to the first image */
+    riid = GRselect(grid, 0);
+    CHECK(riid, FAIL, "GRselect");
+
+    /* First image uses RLE compression method, so no info will be
+       retrieved */
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_RLE, "GRgetcompress");
+
+    /* end access to the first image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get the compression info of the second image, and then check 
+     * the values against the values set earlier, which are:
+     *		comp_type = COMP_CODE_SKPHUFF 
+     *		skp_size = SKPHUFF_SKIPSIZE
+     */
+
+    /* get access to the second image */
+    riid = GRselect(grid, 1);
+    CHECK(riid, FAIL, "GRselect");
+
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_SKPHUFF, "GRgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, SKPHUFF_SKIPSIZE, "GRgetcompress");
+
+    /* end access to the second image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get the compression info of the third image, and then check 
+       the values against the values set earlier, which are:
+		comp_type = COMP_CODE_DEFLATE 
+		level = DEFLATE_LEVEL
+    */
+
+    /* get access to the third image */
+    riid = GRselect(grid, 2);
+    CHECK(riid, FAIL, "GRselect");
+
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_DEFLATE, "GRgetcompress");
+    VERIFY(cinfo.deflate.level, DEFLATE_LEVEL, "GRgetcompress");
+
+    /* Terminate access to the third image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get access to the fourth image */
+    riid = GRselect(grid, 3);
+    CHECK(riid, FAIL, "GRselect");
+
+    /* get the compression info of the second image, but only check 
+       the compression type value against that being set earlier 
+       ('quality' and 'force_baseline' are currently not retrievable) */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_JPEG, "GRgetcompress");
+    VERIFY(cinfo.jpeg.quality, 0, "GRgetcompress");
+    VERIFY(cinfo.jpeg.force_baseline, 0, "GRgetcompress");
+
+    /* Terminate access to the third image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access and close the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+} /* end test_get_compress */
+
+/*--------------------------------------------------------------------------
+    The test routine test_mgr_chunk_compress is added when bug# 307 was 
+    fixed.
+
+    test_mgr_chunk_compress tests the new functionality, getting 
+    compression information of compressed chunked image data.  It 
+        + creates the file CHKCOMPFILE and adds four compressed chunked 
+	  images to it, then closes the file.
+        + re-opens the file, then reads and verifies each chunked image's
+          compression information
+        The first image is only chunked and not compressed.
+        The last three chunked images are compressed using the following
+        methods in that order: RLE, Skipping Huffman, Deflate.
+        For simplicity, all four images use the same data sample.
+    Note: At this time JPEG is not working correctly for chunked images,
+    but when it is, its tests should be added to this routines (and to 
+    test_mgr_chunkwr_pixelone as well) appropriately, i.e. another image 
+    should be added to the image list.
+
+ -BMR (Oct 7, 01)
+--------------------------------------------------------------------------*/
+
+static void 
+test_mgr_chunk_compress()
+{
+#define  CHKCOMPFILE  "gr_chunkcomp.hdf"
+#define  X_LENGTH     10    /* number of columns in the image */
+#define  Y_LENGTH     6     /* number of rows in the image */
+#define  N_COMPS      3     /* number of components in the image */
+#define  N_IMAGES     4     /* number of images tested used - 5 comp. methods */
+
+   /************************* Variable declaration **************************/
+
+   intn  status;         /* status for functions returning an intn */
+   int32 file_id,        /* HDF file identifier */
+         gr_id,          /* GR interface identifier */
+         ri_id[N_IMAGES],       /* raster image identifier */
+         origin[2],      /* start position to write for each dimension */
+         dim_sizes[2],   /* dimension sizes of the image array */
+         interlace_mode, /* interlace mode of the image */
+         data_type,      /* data type of the image data */
+         comp_flag,      /* compression flag */
+         index,
+         img_num;
+   int32 start[2],
+         stride[2],
+         edge[2];
+   comp_info cinfo;    /* Compression parameters - union */
+
+   comp_coder_t comp_type;
+   int16 data_out[3*Y_LENGTH*X_LENGTH];
+   char *image_name[] = { "Image_NO", "Image_RL", "Image_Sk", "Image_DF"};
+   HDF_CHUNK_DEF chunk_def[N_IMAGES];
+   int16 chunk_buf[18];
+
+   int16 chunk00[] = {        110, 111, 112, 120, 121, 122,
+                              130, 131, 132, 140, 141, 142,
+                              150, 151, 152, 160, 161, 162 };
+ 
+   int16 chunk01[] = {    210, 211, 212, 220, 221, 222,
+                          230, 231, 232, 240, 241, 242,
+                          250, 251, 252, 260, 261, 262};
+ 
+   int16 chunk14[] = {    1010, 1011, 1012, 1020, 1021, 1022,
+                          1030, 1031, 1032, 1040, 1041, 1042,
+                          1050, 1051, 1052, 1060, 1061, 1062};
+
+   int16 data[]    = {
+                110, 111, 112, 120, 121, 122, 210, 211, 212, 220, 221, 222, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 131, 132, 140, 
+                141, 142, 230, 231, 232, 240, 241, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, 152, 160, 161, 162, 250, 251, 
+                252, 260, 261, 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                1010, 1011, 1012, 1020, 1021, 1022, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1030, 1031, 1032, 1040, 1041, 
+                1042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 1050, 1051, 1052, 1060, 1061, 1062 }; 
+
+
+   /********************** End of variable declaration **********************/
+   /*
+   * Create and open the file.
+   */
+   file_id = Hopen (CHKCOMPFILE, DFACC_CREATE, 0);
+   CHECK(file_id, FAIL, "Hopen");
+
+   /*
+   * Initialize the GR interface.
+   */
+   gr_id = GRstart (file_id);
+   CHECK(gr_id, FAIL, "GRstart");
+
+   /*
+   * Set the data type, interlace mode, and dimensions of the image.
+   */
+   data_type = DFNT_INT16;
+   interlace_mode = MFGR_INTERLACE_PIXEL;
+   dim_sizes[0] = Y_LENGTH;
+   dim_sizes[1] = X_LENGTH;
+
+   for (img_num = 0; img_num < N_IMAGES; img_num++ ) {  
+
+   /*
+   * Create the raster image array.
+   */
+   ri_id[img_num] = GRcreate (gr_id, image_name[img_num], N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+   CHECK(ri_id[img_num], FAIL, "GRcreate");
+
+   /* 
+   * Create chunked image array.
+   */
+   switch (img_num) {
+	case 0: 
+		comp_flag = HDF_CHUNK;
+		chunk_def[img_num].chunk_lengths[0] = 3;
+		chunk_def[img_num].chunk_lengths[1] = 2;
+		break;
+	case 1 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_RLE;
+		break;
+	case 2 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_SKPHUFF;
+		chunk_def[img_num].comp.cinfo.skphuff.skp_size = 2;
+		break;
+	case 3 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_DEFLATE;
+		chunk_def[img_num].comp.cinfo.deflate.level = 6;
+		break;
+#ifdef NOT_WORKING
+	/* JPEG compression for chunked images is not working correctly 
+	   yet.  Add test here when it is */
+	case 4 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_JPEG;
+		chunk_def[img_num].comp.cinfo.jpeg.quality = 5;
+		chunk_def[img_num].comp.cinfo.jpeg.force_baseline = 8;
+		break;
+#endif
+	default:
+		printf("Error\n");
+		break;
+
+   } /* end switch */
+    
+   status = GRsetchunk(ri_id[img_num], chunk_def[img_num], comp_flag);
+   CHECK(status, FAIL, "GRsetchunk");
+
+   /*
+   * Write first data chunk ( 0, 0 ). 
+   */
+   origin[0] = origin[1] = 0;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk00);
+   CHECK(status, FAIL, "GRwritechunk");
+
+   /*
+   * Write second data chunk ( 0, 1 ). 
+   */
+   origin[0] = 0; origin[1] = 1;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk01);
+   CHECK(status, FAIL, "GRwritechunk");
+
+   /*
+   * Write third data chunk ( 1, 4 ). 
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk14);
+   CHECK(status, FAIL, "GRwritechunk");
+   /*
+   * Read third chunk back.
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRreadchunk(ri_id[img_num], origin, (VOIDP)chunk_buf);
+   CHECK(status, FAIL, "GRreadchunk");
+
+   /*
+   * Terminate access to the GR interface and close the HDF file.
+   */
+   status = GRendaccess (ri_id[img_num]);
+   CHECK(status, FAIL, "GRendaccess");
+ }  /* end for*/
+
+   status = GRend (gr_id);
+   CHECK(status, FAIL, "GRend");
+   status = Hclose (file_id);
+   CHECK(status, FAIL, "Hclose");
+
+    /* 
+    * Open the file.
+    */
+
+    file_id = Hopen (CHKCOMPFILE, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+   /*
+   * Initialize the GR interface.
+   */
+   gr_id = GRstart (file_id);
+   CHECK(gr_id, FAIL, "GRstart");
+
+   for (img_num = 0; img_num < N_IMAGES; img_num++ ) {  
+
+   /*
+   * Find the index of the specified image.
+   */
+   index = GRnametoindex(gr_id, image_name[img_num]);
+   CHECK(index, FAIL, "GRnametoindex");
+   
+   /* 
+   * Select the image.
+   */
+   ri_id[img_num] = GRselect(gr_id, index);
+   CHECK(ri_id[img_num], FAIL, "GRselect");
+
+   /*
+   * Get and verify the image's compression information
+   */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id[img_num], &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    switch (img_num) {
+	case 0: 
+	    VERIFY(comp_type, COMP_CODE_NONE, "GRgetcompress");
+	    break;
+	case 1 :
+	    VERIFY(comp_type, COMP_CODE_RLE, "GRgetcompress");
+	    break;
+	case 2 :
+	    VERIFY(comp_type, COMP_CODE_SKPHUFF, "GRgetcompress");
+	    VERIFY(cinfo.skphuff.skp_size, 
+		   chunk_def[img_num].comp.cinfo.skphuff.skp_size, "GRgetcompress");
+	    break;
+	case 3 :
+	    VERIFY(comp_type, COMP_CODE_DEFLATE, "GRgetcompress");
+	    VERIFY(cinfo.deflate.level, 
+		   chunk_def[img_num].comp.cinfo.deflate.level, "GRgetcompress");
+	    break;
+#ifdef NOT_WORKING
+	/* JPEG is not working correctly yet.  Add test here when it is */
+	case 4 :  /* only return comp type for JPEG */
+	    VERIFY(comp_type, COMP_CODE_JPEG, "GRgetcompress");
+	    break;
+#endif
+	default:
+	    printf("Error\n");
+	    break;
+   } /* end switch */
+
+   /*
+   * Read third chunk back.
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRreadchunk(ri_id[img_num], origin, (VOIDP)chunk_buf);
+   CHECK(status, FAIL, "GRreadchunk");
+   if (0 != HDmemcmp(chunk_buf, chunk14 , sizeof(chunk14)))
+      {
+            MESSAGE(3, printf("Error in reading chunk at line %d\n",__LINE__););
+            MESSAGE(3, printf("Image #%d\n", (int)img_num););
+            num_errs++;
+      } /* end if */
+   /*
+   * Read the whole image.
+   */
+   start[0] = start[1] = 0;
+   stride[0] = stride[1] = 1;
+   edge[0] = Y_LENGTH;
+   edge[1] = X_LENGTH;
+   status = GRreadimage(ri_id[img_num], start, stride, edge, (VOIDP)data_out);
+   CHECK(status, FAIL, "GRreadimage");
+   if (0!= HDmemcmp(data_out, data, sizeof(data)))
+      {
+            MESSAGE(3, printf("%d: Error reading data for the whole image\n",__LINE__););
+            MESSAGE(3, printf("%d: Compression method\n", (int)img_num););
+            num_errs++;
+      } /* end if */
+
+   status = GRendaccess (ri_id[img_num]);
+   CHECK(status, FAIL, "GRendaccess");
+
+   } /* end for */    
+   /*
+   * Terminate access to the GR interface and close the HDF file.
+   */
+   status = GRend (gr_id);
+   CHECK(status, FAIL, "GRend");
+   status = Hclose (file_id);
+   CHECK(status, FAIL, "Hclose");
+}  /* end of test_mgr_chunk_compress */
+
+
 /****************************************************************
 **
 **  test_mgr_compress(): Multi-file Raster Compression tests
 ** 
-**  VIII. Compressed image tests
+**  IX. Compressed image tests
 **      A. Create/Read/Write gzip compressed Image
 **      B. Create/Read/Write 8-bit JPEG compressed Image
 **      C. Create/Read/Write 24-bit JPEG compressed Image
+**      D. Retrieve various compression information of compressed Image
+**	E. Retrieve various compression info. of compressed, chunked images
 ** 
 ****************************************************************/
 static void
@@ -4042,6 +4633,7 @@
     test_mgr_compress_a(flag);
     test_mgr_compress_b(flag);
     test_mgr_compress_c(flag);
+    test_get_compress(flag);
 
 }   /* end test_mgr_compress() */
 
@@ -4055,12 +4647,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char gr_r24file[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(GR_R24FILE) + 1) < sizeof(gr_r24file))) {
+        strcpy(gr_r24file, srcdir);
+        strcat(gr_r24file, "/");
+    }
+    strcat(gr_r24file, GR_R24FILE);
+
 /* A - Write/Read DF24 image */
     MESSAGE(8, printf("Operate on DF24 images\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(GR_R24FILE,DFACC_READ,0);
+    fid=Hopen(gr_r24file,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -4127,7 +4728,7 @@
 **
 **  test_mgr_r24(): Multi-file Raster/DF24 Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DF24 Compatibility Tests
+**  X. Multi-File Raster/DF24 Compatibility Tests
 **      A. Read/Write DF24 Image
 ** 
 ****************************************************************/
@@ -4262,7 +4863,7 @@
 **
 **  test_mgr_r8(): Multi-file Raster/DF8 Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DF8 Compatibility Tests
+**  XI. Multi-File Raster/DF8 Compatibility Tests
 **      A. Read/Write DF8 Image with palette
 ** 
 ****************************************************************/
@@ -4302,12 +4903,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char gr_r24file[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(GR_R24FILE) + 1) < sizeof(gr_r24file))) {
+        strcpy(gr_r24file, srcdir);
+        strcat(gr_r24file, "/");
+    }
+    strcat(gr_r24file, GR_R24FILE);
+
 /* A - Write/Read DFP palette */
     MESSAGE(8, printf("Operate on DFP palette\n"););
 
     /* Open up the existing datafile and get the palette information from it */
-    fid=Hopen(GR_R24FILE,DFACC_READ,0);
+    fid=Hopen(gr_r24file,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -4374,7 +4984,7 @@
 **
 **  test_mgr_pal(): Multi-file Raster/DFP Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DFP Compatibility Tests
+**  XII. Multi-File Raster/DFP Compatibility Tests
 **      A. Read/Write DFP palettes
 ** 
 ****************************************************************/
@@ -4402,7 +5012,7 @@
     *                COMP_CODE_DEFLATE
     * and PIXEL interlace mode.
     */                    
-#define  FILE_NAME     "ChunkedGR.hdf"
+#define  CHUNKFILE     "ChunkedGR.hdf"
 #define  X_LENGTH      10    /* number of columns in the image */
 #define  Y_LENGTH      6     /* number of rows in the image */
 #define  N_COMPS       3     /* number of components in the image */
@@ -4459,7 +5069,7 @@
    /*
    * Create and open the file.
    */
-   file_id = Hopen (FILE_NAME, DFACC_WRITE, 0);
+   file_id = Hopen (CHUNKFILE, DFACC_WRITE, 0);
    CHECK(file_id, FAIL, "Hopen");
 
    /*
@@ -4571,7 +5181,7 @@
     * Open the file.
     */
 
-    file_id = Hopen (FILE_NAME, DFACC_WRITE, 0); 
+    file_id = Hopen (CHUNKFILE, DFACC_WRITE, 0); 
     CHECK(file_id, FAIL, "Hopen");
 
    /*
@@ -4593,6 +5203,7 @@
    */
    ri_id[i] = GRselect(gr_id, index);
    CHECK(ri_id[i], FAIL, "GRselect");
+
    /*
    * Read third chunk back.
    */
@@ -4895,8 +5506,8 @@
 **
 **  test_mgr_chunkwr(): GR chunking test 
 ** 
-**  X. GR write/read chunking test with enabled compression and
-**     different interlace modes.
+**  XIII. GR write/read chunking test with enabled compression and
+**       different interlace modes.
 **
 **      A. Write/read GR chunks with different kinds of compressions
 **         and PIXEL Interlace Mode  (test_mgr_chunkrw_pixel) 
@@ -4910,6 +5521,7 @@
     MESSAGE(6, printf("Testing GR chunking WRITE/READ\n"););
     
     test_mgr_chunkwr_pixelone();
+    test_mgr_chunk_compress();
     test_mgr_chunkwr_pixel(0);
     test_mgr_chunkwr_pixel(1);
     test_mgr_chunkwr_pixel(2);
@@ -4926,17 +5538,22 @@
 {
     /*
         Each major outline portion has it's own main function:
-        I. Interface Initialization     - test_mgr_init
-        II. Create Images               - test_mgr_image
-        III. ID/Ref/Index Functions     - test_mgr_index
-        IV. Interlace Functions         - test_mgr_interlace
-        V. Palette Functions            - test_mgr_lut
-        VI. Special Element Functions   - test_mgr_special
-        VII. Atribute Functions         - test_mgr_attr
+        I. Interface Initialization      - test_mgr_init
+        II. Create Images                - test_mgr_image
+        III. ID/Ref/Index Functions      - test_mgr_index
+        IV. Interlace Functions          - test_mgr_interlace
+        V. Palette Functions             - test_mgr_lut
+        VI. Special Element Functions    - test_mgr_special
+        VII. Atribute Functions          - test_mgr_attr
         VIII. Access to old-style images - test_mgr_old
-        VIII. Compressed images         - test_mgr_compress
-        X.  Chunking write/read test 
-            with enabled compression    - test_mgr_chunkwr
+        IX. Compressed Image Functions   - test_mgr_compress
+        X. DF24 Compatibility tests      - test_mgr_r24
+        XI. DF8 Compatibility tests      - test_mgr_r8
+	XII. DFP Compatibility tests     - test_mgr_pal
+        XIII.  Chunking write/read test
+            with enabled compression     - test_mgr_chunkwr
+	XIV. Szip Compression test       - test_mgr_szip
+
     */
 
     /* Output message about test being performed */
@@ -4954,9 +5571,23 @@
     test_mgr_compress(0);
     test_mgr_r24(0);
     test_mgr_r8(0);
-    test_mgr_chunkwr();
 #ifdef LATER
     test_mgr_pal(0);    /* read in old-style DFP palette tests */
 #endif /* LATER */
+    test_mgr_chunkwr();
+
+#ifdef H4_GR_SZIP
+/* szip not supported for GR */
+#ifdef H4_HAVE_LIBSZ
+
+    test_mgr_szip();   /* write/read with szip compression */
+#else                  /* skip szip test it and report */
+    printf("         -- ***** GR SZIP test skipped *****\n");
+#endif
+#endif
+
+    /* Added after fixing bug #814 to test eliminating of duplicate images */
+    test_mgr_dup_images();
+
 }   /* test_mgr() */
 

Modified: packages/libhdf4/trunk/hdf/test/mgrf.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/mgrf.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/mgrf.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mgrf.f,v 1.27 2000/10/02 19:46:30 epourmal Exp $
+C $Id: mgrf.f,v 1.34 2004/12/21 15:57:05 epourmal Exp $
 C
        subroutine mgrf (num_err)
 C
@@ -42,6 +42,8 @@
 	integer mgatinf, mggattr, mgfndat
       integer mgscatt, mgsnatt, mggcatt, mggnatt
       integer mgwcimg, mgrcimg
+      integer mggnluts
+      
       integer MFGR_INTERLACE_PIXEL, MFGR_INTERLACE_LINE,
      *      MFGR_INTERLACE_COMPONENT
 
@@ -100,6 +102,7 @@
       character attr_c(6), attr2_c(6)
       character cbuf(2,3,4), icbuf(2,3,4)
       integer i, j, k, ret, number_failed
+      integer n_pal
 
       DATA attr_c/'A','T','T','R','_','C'/
       DATA cbuf/'A','B','C','D','E','F','G','H','I','J','K','L',
@@ -134,7 +137,7 @@
       do 157 i=1,2
           do 156 j=1,3
              do 155 k=1,4
-                 icbuf(k, j, i) = ' '
+                 icbuf(i,j,k) = ' '
 155          continue
 156       continue
 157   continue
@@ -241,7 +244,11 @@
       call VRFY(index,'mgn2ndx',number_failed)
       ri_id = mgselct(gr_id,index)
       call VRFY(ri_id,'mgselct',number_failed)
-
+      n_pal = mggnluts(ri_id)
+      call VRFY(ri_id,'mggnluts',number_failed)
+      if(n_pal .ne. 1) then
+         print *, 'Wrong number of palettes returned for IMAGE1'
+      endif
 C Get info about the image
       call MESSAGE(5,'Getting image information')
       ret = mggiinf(ri_id,IMAGE2,n_comp,nt,il,dims,n_attrs)
@@ -318,6 +325,11 @@
       call VRFY(index,'mgn2ndx',number_failed)
       ri_id = mgselct(gr_id,index)
       call VRFY(ri_id,'mgselct',number_failed)
+      n_pal = mggnluts(ri_id)
+      call VRFY(ri_id,'mggnluts',number_failed)
+      if(n_pal .ne. 0) then
+         print *,'Wrong number of palettes returned for IMAGEC'
+      endif
 
 C Get info about the image
       call MESSAGE(5,'Getting image information')
@@ -808,7 +820,7 @@
 C
 C---GR compression function 
 C
-      integer mgscompress
+      integer mgscompress, mggcompress
 C
       integer hopen, hclose
       integer DFACC_CREATE, 
@@ -828,8 +840,8 @@
 C
 C---Compression types and parameters arrays 
 C
-      integer comp_type(N_COMP_TYPES)
-      integer comp_prm(N_COMP_ARG)
+      integer comp_type(N_COMP_TYPES), comp_type_out
+      integer comp_prm(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
 C
 C---Compression parameters
 C
@@ -847,8 +859,8 @@
      .          COMP_CODE_RLE     = 1,
      .          COMP_CODE_SKPHUFF = 3,
      .          COMP_CODE_DEFLATE = 4,
-     .          COMP_CODE_JPEG = 6)
-      parameter (DEFLATE_LEVEL = 1,
+     .          COMP_CODE_JPEG = 7)
+      parameter (DEFLATE_LEVEL = 6,
      .           SKPHUFF_SKP_SIZE = 2)
       parameter (JPEG_QUALITY = 100,
      .           JPEG_COMPATIBILITY = 1)
@@ -1036,7 +1048,7 @@
          print *, 'mgstart failed for', i_comp, '-th data set'
          err_grcompress = err_grcompress +1
       endif 
-      do 2000 i_comp=1, N_COMP_TYPES - 1
+      do 2000 i_comp=1, N_COMP_TYPES 
       index = mgn2ndx(gr_id, name(i_comp))
       if(index .eq. -1 ) then
          print *, 'mgn2ndx failed for',  name(i_comp), ' data set'
@@ -1049,6 +1061,53 @@
          goto 1999
       endif 
 C
+C  Find out type of compression used and compression parameters.
+C
+       status = mggcompress(ri_id(i_comp), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'mggcompress failed for', i, ' -th dataset'
+                err_grcompress = err_grcompress + 1
+            endif
+            if (name(i_comp) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+
+            endif
+            if (name(i_comp) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Jpcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_JPEG) then
+            print *, 'wrong compression type for Jpcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            goto 1111
+            endif
+C
 C     Read the stored data to the image array.
 C
       start(1) = 0
@@ -1077,7 +1136,7 @@
 50    continue
 60    continue
 
-  
+1111  continue  
 C
 C     Terminate access to the array.
 C
@@ -1129,7 +1188,8 @@
 C---GR interface functions
 C
       integer mgstart, mgcreat, mgsnatt,
-     .        mgrdimg, mgn2ndx, mgselct, mgendac, mgend, mgfinfo
+     .        mgrdimg, mgn2ndx, mgselct, mgendac, mgend, mgfinfo,
+     .        mggcompress
 C
 C---GR chunking functions 
 C
@@ -1156,7 +1216,9 @@
 C---Compression types and parameters arrays 
 C
       integer comp_type(N_COMP_TYPES), comp_type_out(N_COMP_TYPES)
+      integer comp_typegr
       integer comp_prm(N_COMP_ARG)
+      integer comp_prm_out(N_COMP_ARG)
 C
 C---Compression parameters
 C
@@ -1171,8 +1233,8 @@
      .          COMP_CODE_RLE     = 1,
      .          COMP_CODE_SKPHUFF = 3,
      .          COMP_CODE_DEFLATE = 4)
-      parameter (DEFLATE_LEVEL = 1,
-     .           SKPHUFF_SKP_SIZE = 2)
+      parameter (DEFLATE_LEVEL = 6,
+     .           SKPHUFF_SKP_SIZE = 3)
 C
 C---Data
 C 
@@ -1228,38 +1290,29 @@
 C 
       data chunk11 / 110, 111, 112, 120, 121, 122,
      .                130, 131, 132, 140, 141, 142,
-     .                150, 151, 152, 160, 161, 162/, 
-     .      chunk21 /
-     .                210, 211, 212, 220, 221, 222,
+     .                150, 151, 152, 160, 161, 162/
+      data chunk21 /  210, 211, 212, 220, 221, 222,
      .                230, 231, 232, 240, 241, 242,
-     .                250, 251, 252, 260, 261, 262
-     .              /,
-     .      chunk52 /
-     .                1010, 1011, 1012, 1020, 1021, 1022,
+     .                250, 251, 252, 260, 261, 262/
+      data chunk52 / 1010, 1011, 1012, 1020, 1021, 1022,
      .                1030, 1031, 1032, 1040, 1041, 1042,
-     .                1050, 1051, 1052, 1060, 1061, 1062
-     .              /,
-     .      data_org /
-     .                110, 111, 112, 120, 121, 122, 
-     .                210, 211, 212, 220, 221, 222, 0,
-     .                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                 0, 0, 0, 0, 0, 0, 0, 
-     .                130, 131, 132, 140,
-     .                141, 142, 230, 231, 232, 240, 241, 242, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                150, 151, 152, 160, 161, 162, 250, 251,
-     .                252, 260, 261, 262, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                1010, 1011, 1012, 1020, 1021, 1022, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                1030, 1031, 1032, 1040, 1041,
-     .                1042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 1050, 1051, 1052, 1060, 1061, 1062 /
+     .                1050, 1051, 1052, 1060, 1061, 1062/
+      data data_org /
+     .     110, 111, 112, 120, 121, 122, 210, 211, 212, 220, 221, 222,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 130, 131, 132, 140, 141, 142,
+     .     230, 231, 232, 240, 241, 242, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+     .     150, 151, 152, 160, 161, 162, 250, 251, 252, 260, 261, 262,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 1010, 1011, 1012, 1020, 1021, 1022, 
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+     .     1030, 1031, 1032, 1040, 1041, 1042, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 1050, 1051, 1052, 1060, 1061, 1062/
 C
 C  Initialize compression argument array
 C
@@ -1438,6 +1491,44 @@
          err_grwrchunk = err_grwrchunk +1
          goto 2000 
       endif 
+      status = mggcompress(ri_id(i_comp), comp_typegr, comp_prm_out)
+      if (status .eq. -1) then
+      print *, 'mggcompress failed for', i, ' -th dataset'
+         err_grwrchunk = err_grwrchunk +1
+      endif
+      
+            if (name(i_comp) .eq. 'Nocomp_data') then
+                if (comp_typegr .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Rlcomp_data') then
+                if (comp_typegr .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Hucomp_data') then
+                if (comp_typegr .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+
+            endif
+            if (name(i_comp) .eq. 'Gzcomp_data') then
+                if (comp_typegr .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
 C
 C     Read the stored data to the image array.
 C

Modified: packages/libhdf4/trunk/hdf/test/nbit.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/nbit.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/nbit.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -32,10 +32,10 @@
    1/19/94 - Started coding
  */
 
-/* $Id: nbit.c,v 1.17 1996/11/11 20:39:59 koziol Exp $ */
+/* $Id: nbit.c,v 1.21 2003/12/10 21:13:35 epourmal Exp $ */
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.21 $";
 #endif
 
 #include "tproto.h"
@@ -201,7 +201,7 @@
           test_val = (uint8) (outbuf[i] & NBIT_MASK1);
           if ((uint8) inbuf[i] != (uint8) test_val)
             {
-                printf("Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit1: Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -267,7 +267,7 @@
       {
           if ((int8) inbuf[i] != (int8) outbuf[i])
             {
-                printf("Wrong data at %d, out %d in %d\n", i, outbuf[i], inbuf[i]);
+                printf("test_nbit2: Wrong data at %d, out %d in %d\n", i, outbuf[i], inbuf[i]);
                 errors++;
             }
       }
@@ -344,7 +344,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit3: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -428,7 +428,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit4: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -513,7 +513,7 @@
 #ifndef TESTING
           if ((uint32) test_in != (uint32) test_out)
             {
-                printf("Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
+                printf("test_nbit5: Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
                 errors++;
             }
 #else
@@ -598,7 +598,7 @@
 #ifndef TESTING
           if ((int32) test_in != (int32) test_out)
             {
-                printf("Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
+                printf("test_nbit6: Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
                 errors++;
             }
 #else
@@ -670,7 +670,7 @@
           test_val = (uint8) ((outbuf[i] & NBIT_MASK7A) | NBIT_MASK7B);
           if ((uint8) inbuf[i] != (uint8) test_val)
             {
-                printf("Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit7: Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -738,7 +738,7 @@
           test_val = (int8) (outbuf[i] | NBIT_MASK8);
           if ((int8) inbuf[i] != (int8) test_val)
             {
-                printf("Wrong data at %d, out (%d:%x)%d in %d\n", i, outbuf[i], outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit8: Wrong data at %d, out (%d:%x)%d in %d\n", i, outbuf[i], outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -819,7 +819,7 @@
 #ifndef TESTING
           if ((uint16) test_in != (uint16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit9: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -899,7 +899,22 @@
 
     for (i = 0; i < NBIT_SIZE10; i++)
       {
-          test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
+/* intel windows c++ compiler has a bug when masking outbuf[i], it extends the
+ * signed bit to all bits of higher 16 bit, so don't use MASK for intel windows
+ * c++ compiler. Kent Yang 09/02/02
+ * The same error occur in the Unix Intel Compiler. Albert Cheng 10/26/02
+ */
+/* Apparently Intel compiler bug was fixed and the fix below causes problems
+ * when optimization is used. We decided to go to the original code that
+ * works now with Intel 7.0 and Intel 7.1 compilers on both UNIX and Windows  
+ * EIP 12/2/03
+#if (defined __INTEL_COMPILER || defined __ICL)
+     test_out = (int16)(outbuf[i] | NBIT_MASK10A);
+#else
+     test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
+#endif
+*/
+     test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
           test_in = (int16) (inbuf[i] & NBIT_MASK10B);
 /* The following ifdef block fixes a compiler bug on the */
 /* HP9000, leave it in! -QAK */
@@ -913,7 +928,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit10: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -998,7 +1013,7 @@
 #ifndef TESTING
           if ((uint32) test_in != (uint32) test_out)
             {
-                printf("Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
+                printf("test_nbit11: Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
                 errors++;
             }
 #else
@@ -1083,7 +1098,7 @@
 #ifndef TESTING
           if ((int32) test_in != (int32) test_out)
             {
-                printf("Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
+                printf("test_nbit12: Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
                 errors++;
             }
 #else

Modified: packages/libhdf4/trunk/hdf/test/t24f.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/t24f.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/t24f.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: t24f.f,v 1.10 1997/10/24 17:28:00 acheng Exp $
+C $Id: t24f.f,v 1.11 2004/12/21 15:57:06 epourmal Exp $
 C
       subroutine t24f (number_failed)
       implicit none
@@ -229,7 +229,7 @@
       do 600 i=1, 2
           do 580 j=1, 2
               do 560 k = 1, 3
-                  if (in2(k,j,i) .ne. buf2(k,j,i)) then
+                  if (in2(j,i,k) .ne. buf2(j,i,k)) then
                       print *, 'Error at  ', k, j, i
                   endif
 560           continue

Copied: packages/libhdf4/trunk/hdf/test/tdupimgs.c (from rev 832, packages/libhdf4/branches/upstream/current/hdf/test/tdupimgs.c)
===================================================================
--- packages/libhdf4/trunk/hdf/test/tdupimgs.c	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/test/tdupimgs.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,164 @@
+#include "hdf.h"
+#include <stdio.h>
+#include "tutils.h"
+
+#define FILE_NAME     "gr_double_test.hdf"
+#define IMAGE_COMP    "Compressed Image"
+#define IMAGE_CHUNK   "Chunked Image"
+#define IMAGE_CMP_CHK "Comp_Chunked Image"
+#define  N_COMPS  3  /* number of components in the image */
+#define N_IMAGES  3  /* currently, 3 images in the file, must be updated as needed */
+#define X_LENGTH 10
+#define Y_LENGTH 10
+
+extern void test_mgr_dup_images()
+{
+    int32 fid, grid, riid, index, il = MFGR_INTERLACE_PIXEL;
+    int32 ncomp=1; 
+    int32 start[2], stride[2], edges[2],dims[2];
+    uint8 image_data[X_LENGTH][Y_LENGTH]; 
+    intn i, j; 
+    intn status; 
+    int32 n_datasets;       /* number of datasets */
+    int32 n_attrs;          /* number of attributes */
+
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Testing eliminating duplicate images\n"););
+
+    MESSAGE(8, printf("Try creating a new file and checking it out\n"););
+
+    /* Create the file. */
+    fid = Hopen(FILE_NAME, DFACC_CREATE, 0); 
+    CHECK(fid, FAIL,"Hopen");
+
+    /* Initiate the GR interface. */
+    grid = GRstart(fid); 
+    CHECK(grid, FAIL, "GRstart");
+
+    /* Define the location, pattern, and size of the data set */
+    dims[0] = X_LENGTH;
+    dims[1] = Y_LENGTH;
+    for (i = 0; i < 2; i++) 
+    {
+	start[i] = 0; 
+	edges[i] = dims[i]; 
+    }
+
+    /* Initialize data we are going to write out, same for all images */
+    for (i = 0; i < Y_LENGTH; i++)
+	for (j = 0; j < X_LENGTH; j++)
+	    image_data[i][j] = (uint8) (i + j);
+
+    /**** Make an image with compressed data ****/
+    {
+	HDF_CHUNK_DEF c_def; 
+	comp_info cinfo;
+	int32 comp_type;
+
+        /* Create the first image in this file */
+        riid=GRcreate(grid, IMAGE_COMP, 1, DFNT_UINT8, il, dims);
+        CHECK(riid, FAIL, "GRcreate");
+
+        /* Set the compression method for the image */
+        comp_type=COMP_CODE_DEFLATE;
+        cinfo.deflate.level=7;
+        status = GRsetcompress(riid, comp_type, &cinfo);
+        CHECK(status, FAIL, "GRsetcompress");
+
+        /* Write the whole image out */
+        start[0]=start[1]=0;
+        stride[0]=stride[1]=1;
+        status = GRwriteimage(riid, start, stride, dims, image_data);
+        CHECK(status, FAIL, "GRreadimage");
+
+        /* Close the image */
+        status = GRendaccess(riid);
+	CHECK(status, FAIL, "GRendaccess");
+    }
+
+    /**** Make an image with chunked  data ****/
+    {
+	int32 comp_flag;
+	HDF_CHUNK_DEF c_def; 
+
+	/* Create the second image */
+	riid=GRcreate(grid, IMAGE_CHUNK, N_COMPS, DFNT_UINT8, il, dims);
+	CHECK(riid, FAIL, "GRcreate");
+
+	/* Make it chunked image */
+	comp_flag = HDF_CHUNK;
+	c_def.chunk_lengths[0] = 3;
+	c_def.chunk_lengths[1] = 2;
+
+	status = GRsetchunk(riid, c_def, comp_flag);
+	CHECK(status, FAIL, "GRsetchunk");
+
+	/* Write data to the entire image */
+	start[0]=start[1]=0;
+	stride[0]=stride[1]=1;
+	status = GRwriteimage(riid, start, stride, dims, image_data);
+	CHECK(status, FAIL, "GRwriteimage");
+
+	/* Terminate access to this image */
+	status = GRendaccess (riid);
+	CHECK(status, FAIL, "GRendaccess");
+    } /* finish creating an image with chunked data */
+
+    /**** Make a GR image with chunked and DEFLATE compressed data */
+    {
+	int32 comp_type, comp_flag;
+	HDF_CHUNK_DEF c_def; 
+	comp_info cinfo;
+
+	/* Create the image */
+	riid = GRcreate(grid, IMAGE_CMP_CHK, 3, DFNT_UINT8, il, dims); 
+	CHECK(riid, FAIL, "GRcreate");
+
+	/* Define the location, pattern, and size of the data set */
+	for (i = 0; i < 2; i++) 
+	{ 
+	    c_def.comp.chunk_lengths[i]=dims[i]/2; 
+	} 
+
+	/* Set info for compression/chunk */
+	c_def.comp.comp_type = COMP_CODE_DEFLATE;
+	comp_flag = HDF_CHUNK|HDF_COMP;
+	c_def.comp.cinfo.deflate.level = 9;
+	status = GRsetchunk(riid,c_def,comp_flag);
+	CHECK(status, FAIL, "GRsetchunk");
+
+	/* Write the stored data to the image array */
+	status = GRwriteimage(riid, start, NULL, edges, (VOIDP)image_data);
+	CHECK(status, FAIL, "GRwriteimage");
+
+	/* Terminate access to the image */
+	status = GRendaccess(riid);
+	CHECK(status, FAIL, "GRendaccess");
+    }
+
+    /* Terminate access to the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Open the file again and check its info */
+    fid = Hopen(FILE_NAME, DFACC_READ, 0); 
+    CHECK(fid, FAIL, "Hopen");
+
+    /* Initiate the GR interface. */
+    grid = GRstart(fid); 
+    CHECK(grid, FAIL, "GRstart");
+
+    /* There currently should only be 3 images in the file */
+    status = GRfileinfo(grid,&n_datasets,&n_attrs);
+    CHECK(status, FAIL, "GRfileinfo");
+    VERIFY(n_datasets, N_IMAGES, "GRfileinfo");
+
+    /* Terminate access to the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+}
+

Modified: packages/libhdf4/trunk/hdf/test/testhdf.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/testhdf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/testhdf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.46 $";
+static char RcsId[] = "@(#)$Revision: 1.48 $";
 #endif
 
-/* $Id: testhdf.c,v 1.46 1999/01/13 19:19:39 koziol Exp $ */
+/* $Id: testhdf.c,v 1.48 2005/01/16 21:44:10 mcgrath Exp $ */
 
 /*
    FILE
@@ -162,6 +162,7 @@
     InitTest("sdstr", test_tsdstr, "DATASTRINGS");
     InitTest("slabs", test_slab, "HYPERSLAB INTERFACE");
     InitTest("anot", test_an, "ANNOTATIONS");
+    InitTest("anot_2", test_an_2, "UPDATE ANNOTATIONS");
     InitTest("anfile", test_anfile, "FILE ANNOTATIONS");
     InitTest("manot", test_man, "MULTI-ANNOTATIONS");
     InitTest("nbit", test_nbit, "N-Bit Dataset Interface");
@@ -334,6 +335,6 @@
 #endif  /* OLD_WAY */
 #endif  /* VMS */
       }     /* end if */
-    exit(0);
-    return (0);
+    exit(num_errs);
+    return num_errs;
 }   /* end main() */

Modified: packages/libhdf4/trunk/hdf/test/tproto.h
===================================================================
--- packages/libhdf4/trunk/hdf/test/tproto.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/tproto.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: tproto.h,v 1.27 1999/01/13 19:19:40 koziol Exp $ */
+/* $Id: tproto.h,v 1.28 2005/01/16 21:44:11 mcgrath Exp $ */
 
 #ifndef _TPROTO_H
 #define _TPROTO_H
@@ -19,6 +19,7 @@
 #include "tutils.h"
 
 void        test_an(void);
+void        test_an_2(void);
 void        test_anfile(void);
 void        test_man(void);
 void        test_hblocks(void);

Copied: packages/libhdf4/trunk/hdf/test/tszip.c (from rev 832, packages/libhdf4/branches/upstream/current/hdf/test/tszip.c)
===================================================================
--- packages/libhdf4/trunk/hdf/test/tszip.c	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/test/tszip.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1155 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/*
+ *  SZIP support eliminated for HDF4.2R1
+ */
+#ifdef H4_GR_SZIP
+#include <hdf.h>
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+#include "tutils.h"
+
+
+/*
+ *  NOTE: these tests should be elaborated:
+ *     - use NN and EC options
+ *     - bigger datasets
+ *     - more data types
+ */     
+
+#define  FILE_NAME8     "RI_8_sziped.hdf"
+#define  FILE_NAME16    "RI_16_sziped.hdf"
+#define  FILE_NAME32    "RI_32_sziped.hdf"
+#define  FILE_NAMEfl32  "RI_fl32_sziped.hdf"
+#define  FILE_NAMEfl64  "RI_fl64_sziped.hdf"
+#define  WIDTH 		10    /* number of columns in the image */
+#define  LENGTH		6     /* number of rows in the image */
+#define  N_COMPS	3     /* number of components in the image */
+#define  IMAGE_NAME 	"Sziped_Image"
+
+/* 
+ * Sub-tests for test_mgr_szip():
+ *  test_szip_RI8bit()
+ *  test_szip_RI16bit()
+ *  test_szip_RI32bit()
+ *  test_szip_RIfl32bit()
+ *  test_szip_RIfl64bit()
+ */
+
+/* 
+ * Write/Read szip compressed image with 8-bit integer data
+ */
+static void 
+test_szip_RI8bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    uint32 comp_config;
+    comp_info cinfo;    /* Compression parameters - union */
+ 
+    comp_coder_t comp_type;
+    int8 out_data[LENGTH][WIDTH][N_COMPS];
+    int8 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME8, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT8;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("test_szip_RI8bit(): %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the file to
+       flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+
+    file_id = Hopen (FILE_NAME8, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI8bit */
+
+/* 
+ * Write/Read szip compressed image with 16-bit integer data
+ */
+static void 
+test_szip_RI16bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+uint32 comp_config;
+
+    comp_coder_t comp_type;
+    int16 out_data[LENGTH][WIDTH][N_COMPS];
+    int16 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME16, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT16;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+ 
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RI16: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAME16, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI16bit */
+
+/* 
+ * Write/Read szip compressed image with 32-bit integer data
+ */
+static void 
+test_szip_RI32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+uint32 comp_config;
+
+    comp_coder_t comp_type;
+    int32 out_data[LENGTH][WIDTH][N_COMPS];
+    int32 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+   /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME32, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT32;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+ 
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RI32: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+
+    file_id = Hopen (FILE_NAME32, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI32bit */
+
+/* 
+ * Write/Read szip compressed image with 32-bit floating point data
+ */
+static void 
+test_szip_RIfl32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+    uint32 comp_config;
+
+    comp_coder_t comp_type;
+    float32 out_data[LENGTH][WIDTH][N_COMPS];
+    float32 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0,  0.0,
+                 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 
+		 0.0,  0.0,  0.0,  0.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 50.0, 51.0, 52.0, 
+		53.0, 54.0, 55.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 30.0, 31.0, 32.0, 33.0, 34.0, 
+		35.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 70.0, 71.0, 72.0, 
+		73.0, 74.0, 75.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0};
+
+
+   /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+
+    /* Create and open the file for sziped data */
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAMEfl32, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_FLOAT32;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+ 
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RIflt32: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAMEfl32, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RIfl32bit */
+
+/* 
+ * Write/Read szip compressed image with 64-bit floating point data
+ */
+static void 
+test_szip_RIfl64bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+    uint32 comp_config;
+
+    comp_coder_t comp_type;
+    float64 out_data[LENGTH][WIDTH][N_COMPS];
+    float64 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0,  0.0,
+                 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 
+		 0.0,  0.0,  0.0,  0.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 50.0, 51.0, 52.0, 
+		53.0, 54.0, 55.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 30.0, 31.0, 32.0, 33.0, 34.0, 
+		35.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 70.0, 71.0, 72.0, 
+		73.0, 74.0, 75.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+
+    /* Create and open the file for sziped data */
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAMEfl64, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_FLOAT64;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+ 
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+ 
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+ 
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RIflt 64: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAMEfl64, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RIfl64bit */
+
+/*
+* This function tests GR chunking write/read operations for the
+* szip compressions
+*/                    
+#define  CHKSZIPFILE	"RIchunkedsziped.hdf"
+#define  WIDTH_CH	10    /* number of columns in the image */
+#define  LENGTH_CH	 6    /* number of rows in the image */
+
+static void 
+test_szip_chunk()
+{
+#ifdef H4_HAVE_LIBSZ
+
+    /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       /* raster image identifier */
+          origin[2],      /* start position to write for each dimension */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          comp_flag,      /* compression flag */
+          index;
+    int32 start[2],
+          stride[2],
+          edge[2];
+    comp_info cinfo_out;    /* Compression parameters - union */
+    uint32 comp_config;
+    comp_coder_t comp_type;
+    int8 data_out[N_COMPS*LENGTH_CH*WIDTH_CH];
+    char *image_name = "Image_chunked_sziped";
+    HDF_CHUNK_DEF chunk_def;
+    int8 chunk_buf[18];
+
+    /* 
+     * Initialize data for RI
+     */
+    int8 chunk00[] = {10, 11, 12, 13, 14, 15,
+                      20, 21, 22, 23, 24, 25,
+                      30, 31, 32, 33, 34, 35 };
+ 
+ 
+    int8 chunk01[] = {40, 41, 42, 43, 44, 45,
+                      50, 51, 52, 53, 54, 55,
+                      60, 61, 62, 63, 64, 65};
+ 
+    int8 chunk14[] = {70, 71, 72, 73, 74, 75,
+                      80, 81, 82, 83, 84, 85,
+                      90, 91, 92, 93, 94, 95};
+
+    int8 data[]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    /* Create and open the file for chunked and sziped data. */
+    file_id = Hopen (CHKSZIPFILE, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface. */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image. */
+    data_type = DFNT_INT8;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+ 
+    /* Create the raster image array. */
+    ri_id = GRcreate (gr_id, image_name, N_COMPS, data_type, 
+                      interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate");
+ 
+    /* Create chunked image array. */
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    chunk_def.comp.chunk_lengths[0] = 3;
+    chunk_def.comp.chunk_lengths[1] = 2;
+    chunk_def.comp.comp_type = COMP_CODE_SZIP;
+    chunk_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    chunk_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.pixels = 0;
+    chunk_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    chunk_def.comp.cinfo.szip.bits_per_pixel = 0;
+ 
+    status = GRsetchunk(ri_id, chunk_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetchunk");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip RI chunk: %s\n",SKIP_STR););
+       return;  
+    }
+
+    /* Write first data chunk ( 0, 0 ). */
+    origin[0] = origin[1] = 0;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk00);
+    CHECK(status, FAIL, "GRwritechunk");
+ 
+    /* Write second data chunk ( 0, 1 ). */
+    origin[0] = 0; origin[1] = 1;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk01);
+    CHECK(status, FAIL, "GRwritechunk");
+
+    /* Write third data chunk ( 1, 4 ). */
+    origin[0] = 1; origin[1] = 4;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk14);
+    CHECK(status, FAIL, "GRwritechunk");
+
+    /* Terminate accesses and close the HDF file. */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file.  */
+    file_id = Hopen (CHKSZIPFILE, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface. */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+ 
+    /* Find the index of the specified image. */
+    index = GRnametoindex(gr_id, image_name);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image. */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information. */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo_out,  0, sizeof(cinfo_out)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo_out);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Read first chunk back and compare with input chunk. */
+    origin[0] = 0; origin[1] = 0;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk00 , sizeof(chunk00)))
+    {
+	printf("Error in reading chunk 00\n" );
+        num_errs++;
+    }
+
+    /* Read second chunk back and compare with input chunk. */
+    origin[0] = 0; origin[1] = 1;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk01 , sizeof(chunk01)))
+    {
+        printf("Error in reading chunk 01\n" );
+        num_errs++;
+    }
+
+    /* Read third chunk back and compare with input chunk. */
+    origin[0] = 1; origin[1] = 4;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk14 , sizeof(chunk14)))
+    {
+        printf("Error in reading chunk 14\n" );
+        num_errs++;
+    }
+
+    /* Read the whole image. */
+    start[0] = start[1] = 0;
+    stride[0] = stride[1] = 1;
+    edge[0] = LENGTH_CH;
+    edge[1] = WIDTH_CH;
+    status = GRreadimage(ri_id, start, stride, edge, (VOIDP)data_out);
+    CHECK(status, FAIL, "GRreadimage");
+    if (0!= HDmemcmp(data_out, data, sizeof(data)))
+    {
+        printf("Error in reading the whole image \n" );
+        num_errs++;
+    }
+
+    /* Terminate accesses and close the HDF file. */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+#endif
+}  /* end of test_szip_chunk */
+
+/****************************************************************
+ * 
+ *   test_mgr_szip(): SZIP Compression tests
+ * 
+ *   XIV. GR write/read szip compression tests with different data types
+ *        and with chunked data
+ *       A. Write/Read szip compressed image with 8-bit integer data type
+ *       B. Write/Read szip compressed image with 16-bit integer data type
+ *       C. Write/Read szip compressed image with 32-bit integer data type
+ *       D. Write/Read szip compressed image with 32-bit floating point data type
+ *       E. Write/Read szip compressed image with 64-bit floating point data type
+ *       F. Write/Read image with chunked and sziped data
+ * 
+ * ****************************************************************/
+extern void
+test_mgr_szip()
+{
+#ifdef H4_HAVE_LIBSZ
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Testing GR szip compression WRITE/READ\n"););
+
+    test_szip_RI8bit();
+    test_szip_RI16bit();
+    test_szip_RI32bit();
+    test_szip_RIfl32bit();
+    test_szip_RIfl64bit();
+    test_szip_chunk();
+#else
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Skipping GR szip compression WRITE/READ\n"););
+#endif
+} 
+#endif

Modified: packages/libhdf4/trunk/hdf/test/tvattr.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/tvattr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/tvattr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  *******************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.11 $";
+static char RcsId[] = "@(#)$Revision: 1.12 $";
 #endif
 
-/* $Id: tvattr.c,v 1.11 1998/02/02 18:44:52 pharten Exp $ */
+/* $Id: tvattr.c,v 1.12 2004/11/05 05:19:14 bmribler Exp $ */
 
 /**************************************************************
 *
@@ -384,6 +384,24 @@
          num_errs++;
          return FAIL;
   }
+  /* attach again with "r" access to test VSsetattr on "r" access vdata 
+     BMR - Nov 4, 2004 */
+  if (FAIL == (vsref = VSfind(fid, VSNAME0)))  {
+         num_errs++;
+         return FAIL;
+      }
+  if (FAIL == (vsid = VSattach(fid, vsref, "r")))  {
+         num_errs++;
+         return FAIL;
+      }
+  if (FAIL != VSsetattr(vsid, 1, "NO ATTRIBUTE", DFNT_FLOAT32,1, &attr4[1])) {
+         num_errs++;
+         printf(">>> VSsetattr did not fail on read access vdata.\n");
+      }
+  if (FAIL == VSdetach(vsid)) {
+         num_errs++;
+         return FAIL;
+  }
    /* create vgroup and add attrs */
    if (FAIL == (vgid = (Vattach(fid, -1, "w"))))   {
          num_errs++;

Modified: packages/libhdf4/trunk/hdf/test/tvattrf.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/tvattrf.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/tvattrf.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -19,7 +19,7 @@
 C   *
 C***************************************************
 C
-C $Id: tvattrf.f,v 1.15 1998/03/05 00:24:46 pharten Exp $
+C $Id: tvattrf.f,v 1.16 2003/12/10 21:13:36 epourmal Exp $
 C
 C **************************************************
 C *
@@ -39,6 +39,8 @@
 
       integer number_failed
 
+      integer len_in
+      character*1024 ifn_out
       character*20 myname, ifn, ofn
       parameter (myname = 'vattrf',
      +           ifn = 'tvattr.dat' ,
@@ -57,6 +59,7 @@
       integer nattrs, itype, icount, imsize, vsver
       integer fid1, vsid, vgid, vsref, vgref
       integer ret, findex, vsbuf, aindex
+      integer fixname
 C
 C iattri is for int32 values
 C iattrs is for int16 values
@@ -95,7 +98,9 @@
       call ptestban('Testing', myname)
 C      number_failed = 0
 C Open the file 
-      fid1 = hopen(ifn, DFACC_RDWR, 0)
+      len_in = len(ifn_out)
+      ret = fixname(ifn, ifn_out, len_in)
+      fid1 = hopen(ifn_out(1:len_in), DFACC_RDWR, 0)
       call VRFY(fid1, 'hopen', number_failed)
       ret = vfstart(fid1)
       call VRFY(ret, 'vfstart', number_failed)

Modified: packages/libhdf4/trunk/hdf/test/tvset.c
===================================================================
--- packages/libhdf4/trunk/hdf/test/tvset.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/tvset.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.35 $";
+static char RcsId[] = "@(#)$Revision: 1.37 $";
 #endif
 
-/* $Id: tvset.c,v 1.35 1998/12/08 21:37:53 koziol Exp $ */
+/* $Id: tvset.c,v 1.37 2001/07/03 05:27:40 bmribler Exp $ */
 
 /*
  *
@@ -37,6 +37,7 @@
 #define FNAME2   "tvset2.hdf"
 #define EXTFNM	 "tvsetext.hdf"
 #define EMPTYNM  "tvsempty.hdf"
+#define BLKINFO  "tvsblkinfo.hdf"
 
 #define FIELD1       "FIELD_name_HERE"
 #define FIELD1_UPPER "FIELD_NAME_HERE"
@@ -47,6 +48,7 @@
 #define FL "FLOATS"
 #define MX "STATION_NAME,VALUES,FLOATS"
 #define EMPTY_VDATA "Empty"
+#define APPENDABLE_VDATA "Appendable"
 
 static int32 write_vset_stuff(void);
 static int32 read_vset_stuff(void);
@@ -245,6 +247,11 @@
     status=VSfdefine(vs1, FIELD1, DFNT_FLOAT32, 1);
     CHECK(status,FAIL,"VSfdefine");
 
+    /* Verify that VSsetfields will return FAIL when passing in a NULL
+       for field name list (bug #554) - BMR 5/17/01 */
+    status = VSsetfields(vs1, NULL);
+    VERIFY(status, FAIL, "VSsetfields");
+
     status = VSsetfields(vs1, FIELD1);
     if (status == FAIL)
       {
@@ -1665,7 +1672,6 @@
 
 } /* test_vdeletetagref */
 
-
 static void
 test_emptyvdata(void)
 {
@@ -1736,6 +1742,12 @@
     status=VFnfields(vs1);
     VERIFY(status,0,"VFnfields");
 
+    /* Verify that VSgetfields will return FAIL when passing in a NULL
+       for field name list (from bug #554), although this might never 
+       happen - BMR 5/17/01 */
+    status = VSgetfields(vs1, NULL);
+    VERIFY(status, FAIL, "VSgetfields");
+
     status=VSgetfields(vs1,fields);
     CHECK(status,FAIL,"VSgetfields");
 
@@ -1838,6 +1850,203 @@
 
 } /* test_emptyvdata() */
 
+/*************************** test_blockinfo ***************************
+
+This test routine creates an hdf file, "Block_info.hdf", and creates
+and writes two vdatas in a way that one of the vdatas will be promoted
+to a linked-block element.
+
+The first vdata is named "Appendable Vdata", contains 10 records, and 
+belongs to a class, named "Linked-block Vdata".  The fields of the vdata 
+include "Field1", "Field2", and "Field3" and all data are integer.  
+"Field1" has an order of 3, "Field2" has an order of 1, and "Field3" has 
+an order of 2.
+
+The second vdata named "Another Vdata", contains 5 records, and also
+belongs to class "Linked-block Vdata".  This vdata has only one field
+of order 1 and its data are integer.
+
+The test writes 5 records to the first vdata, "Appendable Vdata", then
+creates and writes the second vdata, "Another Vdata", then, writes 
+another 5 records to the first vdata.  The purpose of the second vdata 
+is to cause the subsequent write to the first vdata, "Appendable Vdata", 
+to promote the vdata to a linked-block element.
+
+***********************************************************************/
+
+#define FILE_NAME	"Block_info.hdf"
+#define APPENDABLE_VD	"Appendable Vdata"
+#define ANOTHER_VD	"Another Vdata"
+#define CLASS_NAME	"Linked-block Vdata"
+#define FIELD1_NAME	"Field1"	/* contains three integers */
+#define FIELD2_NAME	"Field2"	/* contains one integer */
+#define FIELD3_NAME	"Field3"	/* contains two integers */
+#define	FIELD_NAME_LIST	"Field1,Field2,Field3"
+#define ANOTHER_FD	"Another field"	/* contains one integer */
+#define	ANOTHER_FD_LIST	"Another field"
+#define N_RECORDS	5	/* number of records to be written to the
+				   vdatas at every write */
+#define ORDER_1 	3	/* order of first field of 1st vdata */
+#define ORDER_2 	1	/* order of second field of 1st vdata */
+#define ORDER_3 	2	/* order of third field of 1st vdata */
+#define N_VALS_PER_REC_2   1    /* # of values per record in the 2nd vdata */
+#define N_VALS_PER_REC_1 (ORDER_1+ORDER_2+ORDER_3) /* # of vals/rec. in 1st vd*/
+#define	BLOCK_SIZE	128	/* arbitrary number for block size */
+#define	NUM_BLOCKS	8	/* arbitrary number for number of blocks */
+
+static void
+test_blockinfo(void) 
+{
+   intn	 status_n;	/* returned status for functions returning an intn  */
+   int32 status_32;	/* returned status for functions returning an int32 */
+   int16 rec_num;	/* current record number */
+   int32 file_id, vdata1_id, vdata2_id,
+	 vdata_ref = -1,  /* ref number of a vdata, set to -1 to create  */
+   	 num_of_records,  /* number of records actually written to vdata */
+         data_buf1[N_RECORDS][N_VALS_PER_REC_1], /* for first vdata's data */
+	 data_buf2[N_RECORDS][N_VALS_PER_REC_2], /* for second vdata's data */
+	 block_size, num_blocks; /* retrieved by VSgetblockinfo */
+
+    /* Create the HDF file for data used in this test routine */
+    file_id = Hopen (FILE_NAME, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the VS interface */
+    status_n = Vstart (file_id);
+    CHECK(status_n, FAIL, "Vstart");
+
+    /* Create the first vdata */
+    vdata1_id = VSattach (file_id, vdata_ref, "w");
+    CHECK(vdata1_id, FAIL, "VSattach");
+
+    /* Set name and class name of the vdata. */
+    status_32 = VSsetname (vdata1_id, APPENDABLE_VD);
+    CHECK(status_32, FAIL, "VSsetname");
+    status_32 = VSsetclass (vdata1_id, CLASS_NAME);
+    CHECK(status_32, FAIL, "VSsetclass");
+
+    /* Introduce each field's name, data type, and order.  This is the first
+      part in defining a field.  */
+    status_n = VSfdefine (vdata1_id, FIELD1_NAME, DFNT_INT32, ORDER_1);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSfdefine (vdata1_id, FIELD2_NAME, DFNT_INT32, ORDER_2);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSfdefine (vdata1_id, FIELD3_NAME, DFNT_INT32, ORDER_3);
+    CHECK(status_n, FAIL, "VSfdefine");
+
+    /* Finalize the definition of the fields. */
+    status_n = VSsetfields (vdata1_id, FIELD_NAME_LIST);
+    CHECK(status_n, FAIL, "VSsetfields");
+
+    /* 
+     * Buffer the data by the record for fully interlaced mode.  Note that the
+     * first three elements contain the three values of the first field, the
+     * fourth element contains the value of the second field, and the last two
+     * elements contain the two values of the third field.
+     */
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf1[rec_num][0] = 1 + rec_num;
+        data_buf1[rec_num][1] = 2 + rec_num;
+        data_buf1[rec_num][2] = 3 + rec_num;
+        data_buf1[rec_num][3] = 10 + rec_num;
+        data_buf1[rec_num][4] = 10;
+        data_buf1[rec_num][5] = 65;
+    }
+
+    /* Test for invalid arguments passed in these functions */
+    status_n = VSsetblocksize(vdata1_id, -2);
+    VERIFY(status_n, FAIL, "VSsetblocksize");
+    status_n = VSsetnumblocks(vdata1_id, 0);
+    VERIFY(status_n, FAIL, "VSsetnumblocks");
+
+    /* Set the block size and the number of blocks the first vdata */
+    status_n = VSsetblocksize(vdata1_id, BLOCK_SIZE);
+    CHECK(status_n, FAIL, "VSsetblocksize");
+    status_n = VSsetnumblocks(vdata1_id, NUM_BLOCKS);
+    CHECK(status_n, FAIL, "VSsetnumblocks");
+
+    /* Write the data from data_buf1 to the vdata with full interlacing mode. */
+    num_of_records = VSwrite(vdata1_id, (uint8 *)data_buf1, N_RECORDS, 
+				FULL_INTERLACE);
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata1_id");
+
+    /******************************************************************
+     * Creates and writes another vdata right after APPENDABLE_VDATA.
+     * This will cause the storage of APPENDABLE_VDATA to be promoted to a
+     * linked-block element if a subsequent write to APPENDABLE_VDATA occurs. 
+     ******************************************************************/
+ 
+    /* Create another vdata. */
+    vdata2_id = VSattach (file_id, vdata_ref, "w");
+    CHECK(vdata2_id, FAIL, "VSattach");
+
+    /* Set name and class name of the vdata. */
+    status_32 = VSsetname (vdata2_id, ANOTHER_VD);
+    CHECK(status_32, FAIL, "VSsetname");
+    status_32 = VSsetclass (vdata2_id, CLASS_NAME);
+    CHECK(status_32, FAIL, "VSsetclass");
+
+    /* Define the vdata's field. */
+    status_n = VSfdefine (vdata2_id, ANOTHER_FD, DFNT_INT32, ORDER_2);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSsetfields (vdata2_id, ANOTHER_FD_LIST);
+    CHECK(status_n, FAIL, "VSsetfields");
+
+    /* Buffer the data for ANOTHER_VDATA */
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf2[rec_num][0] = 100 + rec_num;
+    }
+
+    /* Write the data from data_buf2 to the second vdata with full 
+       interlacing mode. */
+    num_of_records = VSwrite(vdata2_id, (uint8 *)data_buf2, N_RECORDS, 
+				FULL_INTERLACE);
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata2_id");
+
+    /******************************************************************
+     * Writes more data to APPENDABLE_VDATA, i.e. first vdata.  Its
+     * storage will be promoted to a linked-block element.
+     ******************************************************************/
+
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf1[rec_num][0] = 10 + rec_num;
+        data_buf1[rec_num][1] = 20 + rec_num;
+        data_buf1[rec_num][2] = 30 + rec_num;
+        data_buf1[rec_num][3] = 100 + rec_num;
+        data_buf1[rec_num][4] = 100;
+        data_buf1[rec_num][5] = 650;
+    }
+
+    /* Write the data from data_buf1 to the vdata with full interlacing mode. */
+    num_of_records = VSwrite(vdata1_id, (uint8 *)data_buf1, N_RECORDS, 
+				FULL_INTERLACE); 
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata1_id");
+
+    /* Retrieve the first vdata's block size and number of blocks and 
+       verify them */
+    status_n = VSgetblockinfo (vdata1_id, &block_size, &num_blocks);
+    CHECK(status_n, FAIL, "VSsetfields");
+    VERIFY(block_size, BLOCK_SIZE, "VSgetblockinfo");
+    VERIFY(num_blocks, NUM_BLOCKS, "VSgetblockinfo");
+
+    /* Terminate access to the vdatas and to the VS interface, then 
+       close the HDF file. */
+    status_32 = VSdetach (vdata1_id);
+    CHECK(status_32, FAIL, "Vdetach");
+
+    status_32 = VSdetach (vdata2_id);
+    CHECK(status_32, FAIL, "Vdetach");
+
+    status_n = Vend (file_id);
+    CHECK(status_n, FAIL, "Vend");
+
+    status_32 = Hclose (file_id);
+    CHECK(status_32, FAIL, "Hclose");
+} /* test_blockinfo() */
+
 /* main test driver */
 void
 test_vsets(void)
@@ -1864,5 +2073,8 @@
     /* test Vdatas with no fields defined */
     test_emptyvdata();
 
+    /* test functionality about set/get linked-block information */
+    test_blockinfo();
+
 }   /* test_vsets */
 

Modified: packages/libhdf4/trunk/hdf/test/tvsetf.f
===================================================================
--- packages/libhdf4/trunk/hdf/test/tvsetf.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/test/tvsetf.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -18,7 +18,7 @@
 C*
 C*
 C*********************************************************************
-C $Id: tvsetf.f,v 1.22 1999/01/22 22:45:09 epourmal Exp $
+C $Id: tvsetf.f,v 1.24 2005/02/09 22:55:28 epourmal Exp $
 C*********************************************************************
 C      test vset Fortran data types
 C
@@ -545,3 +545,170 @@
 
       return
       end
+C
+C This subroutine tests vsfsetblsz, vsfsetnm, vsfgetinfo functions
+C
+C It creates and writes multi-component Vdata and single-component Vdata; 
+C then it sets sizes and number of blocks
+C for multi-component Vdata's link block and appends to the Vdata.
+C File is then closed and reponened once more; block information
+C is retrieved for the multi-component Vdata.
+C
+      subroutine tvsetblock(number_failed)
+      implicit none
+      character*20 myname
+      parameter (myname = 'vsetblock')
+      integer number_failed
+C
+C     Parameter declaration
+C
+      character*22 FILE_NAME
+      character*9  CLASS1_NAME
+      character*9  CLASS2_NAME
+      character*11 VDATA1_NAME
+      character*12 VDATA2_NAME
+      character*22 FIELD1_NAME
+      character*21 FIELD2_NAME
+      integer      N_RECORDS_1, N_RECORDS_2
+      integer      ORDER_2
+      integer      FULL_INTERLACE
+C
+      parameter (FILE_NAME   = 'Vdatas_blocks_test.hdf',
+     +           CLASS1_NAME = '5x1 Array',
+     +           CLASS2_NAME = '6x4 Array',
+     +           VDATA1_NAME = 'First Vdata',
+     +           VDATA2_NAME = 'Second Vdata',
+     +           FIELD1_NAME = 'Single-component Field',
+     +           FIELD2_NAME = 'Multi-component Field')
+      parameter (N_RECORDS_1 = 5,
+     +           N_RECORDS_2 = 256,
+     +           ORDER_2     = 2,
+     +           FULL_INTERLACE = 0)               
+   
+      integer DFACC_WRITE, DFNT_CHAR8, DFNT_INT32
+      parameter (DFACC_WRITE = 2,
+     +           DFNT_CHAR8  = 4,
+     +           DFNT_INT32  = 24)
+      integer BLOCK_SIZE, NUM_BLOCKS
+      parameter (BLOCK_SIZE = 256,
+     +           NUM_BLOCKS = 3)
+      
+C
+C     Function declaration
+C
+      integer hopen, hclose
+      integer vfstart, vhfscd, vhfsdm, vfend 
+      integer vsfsetblsz, vsfsetnmbl, vsfgetblinfo
+      integer vsfatch, vsfdtch, vsffnd, vsfwrt, vsfrd, vsfseek
+
+C
+C**** Variable declaration *******************************************
+C
+      integer   status, return_flag
+      integer   file_id
+      integer   vdata1_ref, vdata2_ref 
+      integer   vdata2_id 
+      character vdata1_buf(N_RECORDS_1)
+      integer   vdata2_buf(ORDER_2, N_RECORDS_2)
+      integer   buf(ORDER_2)
+      integer   i, j
+      integer   block_size_out, num_blocks_out
+      integer   n_records
+      data vdata1_buf /'V','D','A','T','A'/
+C
+C**** End of variable declaration ************************************
+      call ptestban('Testing', myname)
+C
+C     Initialize vdata2_buf
+C
+      do i = 1, N_RECORDS_2
+         do j = 1, ORDER_2
+            vdata2_buf(j,i) = j + i
+         enddo
+      enddo
+C
+C
+C     Open the HDF file for writing.
+C
+      file_id = hopen(FILE_NAME, DFACC_WRITE, 0)
+      call VRFY(file_id,'hopen',number_failed)
+C
+C     Initialize the VS interface.
+C
+      status = vfstart(file_id) 
+      call VRFY(status,'vfstart',number_failed)
+C
+C     Create multi-component vdata and populate it with data from vdata2_buf array.
+C     
+      vdata2_ref = vhfsdm(file_id, FIELD2_NAME, vdata2_buf, N_RECORDS_2,
+     +                    DFNT_INT32, VDATA2_NAME, CLASS2_NAME,
+     +                    ORDER_2)
+      call VRFY(vdata2_ref,'vhfsdm',number_failed)
+C
+C     Create single-component vdata and populate it with data from vdata1_buf array.
+C     
+      vdata1_ref = vhfscd(file_id, FIELD1_NAME, vdata1_buf, N_RECORDS_1,
+     +                    DFNT_CHAR8, VDATA1_NAME, CLASS1_NAME)
+      call VRFY(vdata1_ref,'vhfscd',number_failed)
+C
+C     Terminate access to the VS interface and close the HDF file.
+C
+      status = vfend(file_id)
+      call VRFY(status,'vfend',number_failed)
+      status = hclose(file_id)
+      call VRFY(status,'hclose',number_failed)
+      if (number_failed .gt. 0) goto 1000
+C
+C     Reopen the HDF file for writing.
+C
+      file_id = hopen(FILE_NAME, DFACC_WRITE, 0)
+      call VRFY(file_id,'hopen',number_failed)
+C
+C     Initialize the VS interface.
+C
+      status = vfstart(file_id) 
+      call VRFY(status,'vfstart',number_failed)
+C
+C     Attach to the multi-component Vdata
+C
+      vdata2_ref = vsffnd(file_id, VDATA2_NAME) 
+      call VRFY(vdata2_ref,'vsffnd',number_failed)
+      vdata2_id = vsfatch(file_id, vdata2_ref, 'w')
+      status = vsfsetblsz(vdata2_id, BLOCK_SIZE) 
+      call VRFY(status,'vsfsetblsz',number_failed)
+      status = vsfsetnmbl(vdata2_id, NUM_BLOCKS) 
+      call VRFY(status,'vsfsetblnm',number_failed)
+C
+C     Append to the multi-component Vdata 
+C
+      n_records = vsfseek(vdata2_id, N_RECORDS_2-1)
+      call VRFY(n_records,'vsfseek',number_failed)
+      n_records = 1
+      status = vsfrd(vdata2_id, buf, n_records, FULL_INTERLACE)
+      call VRFY(status,'vsfrd',number_failed)
+       
+      n_records = N_RECORDS_2
+      status = vsfwrt(vdata2_id, vdata2_buf, n_records,
+     +                FULL_INTERLACE)
+      if (status .ne. N_RECORDS_2) then
+          number_failed = number_failed + 1
+          call MESSAGE(3,'Wrong number of records added ')
+          call MESSAGE(3,'Append to multi-component Vdata failed ')
+      endif
+      call VRFY(vdata2_id,'vsfatch',number_failed)
+      status = vsfgetblinfo(vdata2_id, block_size_out, num_blocks_out)
+      if (block_size_out .ne. BLOCK_SIZE .or. 
+     +    num_blocks_out .ne. NUM_BLOCKS) then
+          call MESSAGE(3,'Linked-block info is wrong ')
+          number_failed = number_failed + 1
+      endif
+      status = vsfdtch(vdata2_id)
+      call VRFY(status,'vsfdtch',number_failed)
+      status = vfend(file_id)
+      call VRFY(status,'vfend',number_failed)
+      status = hclose(file_id)
+      call VRFY(status,'hclose',number_failed)
+
+1000  continue
+      return
+      end

Copied: packages/libhdf4/trunk/hdf/util/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/hdf/util/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,106 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+AM_CPPFLAGS=-I$(top_srcdir)/hdf/src
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = gif2hdf hdf2gif hdf2jpeg hdf24to8 hdf8to24 hdfcomp hdfed     \
+               hdfls hdfpack hdftopal hdftor8 hdfunpac jpeg2hdf paltohdf    \
+               r8tohdf ristosds vmake vshow 
+
+if HDF_BUILD_FORTRAN
+bin_SCRIPTS = h4redeploy h4cc h4fc
+else
+bin_SCRIPTS = h4redeploy h4cc
+endif
+
+gif2hdf_SOURCES = gif2hdf.c gif2mem.c gifread.c decompress.c writehdf.c
+gif2hdf_LDADD = ../src/libdf.a
+gif2hdf_DEPENDENCIES = ../src/libdf.a
+
+hdf2gif_SOURCES = hdf2gif.c hdfgifwr.c
+hdf2gif_LDADD = ../src/libdf.a
+hdf2gif_DEPENDENCIES = ../src/libdf.a
+
+hdf2jpeg_SOURCES = hdf2jpeg.c
+hdf2jpeg_LDADD = ../src/libdf.a
+hdf2jpeg_DEPENDENCIES = ../src/libdf.a
+
+hdf24to8_SOURCES = hdf24to8.c
+hdf24to8_LDADD = ../src/libdf.a
+hdf24to8_DEPENDENCIES = ../src/libdf.a
+
+hdf8to24_SOURCES = hdf8to24.c
+hdf8to24_LDADD = ../src/libdf.a
+hdf8to24_DEPENDENCIES = ../src/libdf.a
+
+hdfcomp_SOURCES = hdfcomp.c
+hdfcomp_LDADD = ../src/libdf.a
+hdfcomp_DEPENDENCIES = ../src/libdf.a
+
+hdfed_SOURCES = he_cntrl.c he_disp.c he_file.c he_main.c
+hdfed_LDADD = ../src/libdf.a
+hdfed_DEPENDENCIES = ../src/libdf.a
+
+hdfls_SOURCES = hdfls.c
+hdfls_LDADD = ../src/libdf.a
+hdfls_DEPENDENCIES = ../src/libdf.a
+
+hdfpack_SOURCES = hdfpack.c
+hdfpack_LDADD = ../src/libdf.a
+hdfpack_DEPENDENCIES = ../src/libdf.a
+
+hdftopal_SOURCES = hdftopal.c
+hdftopal_LDADD = ../src/libdf.a
+hdftopal_DEPENDENCIES = ../src/libdf.a
+
+hdftor8_SOURCES = hdftor8.c
+hdftor8_LDADD = ../src/libdf.a
+hdftor8_DEPENDENCIES = ../src/libdf.a
+
+hdfunpac_SOURCES = hdfunpac.c
+hdfunpac_LDADD = ../src/libdf.a
+hdfunpac_DEPENDENCIES = ../src/libdf.a
+
+jpeg2hdf_SOURCES = jpeg2hdf.c
+jpeg2hdf_LDADD = ../src/libdf.a
+jpeg2hdf_DEPENDENCIES = ../src/libdf.a
+
+paltohdf_SOURCES = paltohdf.c
+paltohdf_LDADD = ../src/libdf.a
+paltohdf_DEPENDENCIES = ../src/libdf.a
+
+r8tohdf_SOURCES = r8tohdf.c
+r8tohdf_LDADD = ../src/libdf.a
+r8tohdf_DEPENDENCIES = ../src/libdf.a
+
+ristosds_SOURCES = ristosds.c
+ristosds_LDADD = ../src/libdf.a
+ristosds_DEPENDENCIES = ../src/libdf.a
+
+vmake_SOURCES = vmake.c
+vmake_LDADD = ../src/libdf.a
+vmake_DEPENDENCIES = ../src/libdf.a
+
+vshow_SOURCES = vshow.c
+vshow_LDADD = ../src/libdf.a
+vshow_DEPENDENCIES = ../src/libdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check:  $(bin_PROGRAMS)
+	sh ./testutil.sh $(target_canonical)
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = gif_hdf_temp/bttrfly.hdf gif_hdf_temp/skull.gif    \
+                 gif_hdf_temp/SunWheel.hdf

Modified: packages/libhdf4/trunk/hdf/util/Makefile.in
===================================================================
--- packages/libhdf4/trunk/hdf/util/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,280 +1,698 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.24 2000/06/26 19:51:31 rushabh Exp $
-#
-# ##################################################################
-#
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+AM_CPPFLAGS = -I$(top_srcdir)/hdf/src
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = gif2hdf hdf2gif hdf2jpeg hdf24to8 hdf8to24 hdfcomp hdfed     \
+               hdfls hdfpack hdftopal hdftor8 hdfunpac jpeg2hdf paltohdf    \
+               r8tohdf ristosds vmake vshow 
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ at HDF_BUILD_FORTRAN_TRUE@bin_SCRIPTS = h4redeploy h4cc h4fc
+ at HDF_BUILD_FORTRAN_FALSE@bin_SCRIPTS = h4redeploy h4cc
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+gif2hdf_SOURCES = gif2hdf.c gif2mem.c gifread.c decompress.c writehdf.c
+gif2hdf_LDADD = ../src/libdf.a
+gif2hdf_DEPENDENCIES = ../src/libdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+hdf2gif_SOURCES = hdf2gif.c hdfgifwr.c
+hdf2gif_LDADD = ../src/libdf.a
+hdf2gif_DEPENDENCIES = ../src/libdf.a
 
-# The echo command.
-ECHO = echo
+hdf2jpeg_SOURCES = hdf2jpeg.c
+hdf2jpeg_LDADD = ../src/libdf.a
+hdf2jpeg_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+hdf24to8_SOURCES = hdf24to8.c
+hdf24to8_LDADD = ../src/libdf.a
+hdf24to8_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+hdf8to24_SOURCES = hdf8to24.c
+hdf8to24_LDADD = ../src/libdf.a
+hdf8to24_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
+hdfcomp_SOURCES = hdfcomp.c
+hdfcomp_LDADD = ../src/libdf.a
+hdfcomp_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+hdfed_SOURCES = he_cntrl.c he_disp.c he_file.c he_main.c
+hdfed_LDADD = ../src/libdf.a
+hdfed_DEPENDENCIES = ../src/libdf.a
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+hdfls_SOURCES = hdfls.c
+hdfls_LDADD = ../src/libdf.a
+hdfls_DEPENDENCIES = ../src/libdf.a
 
-# ############# End of system configuration section. ###############
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+hdfpack_SOURCES = hdfpack.c
+hdfpack_LDADD = ../src/libdf.a
+hdfpack_DEPENDENCIES = ../src/libdf.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+hdftopal_SOURCES = hdftopal.c
+hdftopal_LDADD = ../src/libdf.a
+hdftopal_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your HDF library (libdf.so) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC=$(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+hdftor8_SOURCES = hdftor8.c
+hdftor8_LDADD = ../src/libdf.a
+hdftor8_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your PABLO include files
-PABLO_HINC= $(srcdir)/../pablo
+hdfunpac_SOURCES = hdfunpac.c
+hdfunpac_LDADD = ../src/libdf.a
+hdfunpac_DEPENDENCIES = ../src/libdf.a
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+jpeg2hdf_SOURCES = jpeg2hdf.c
+jpeg2hdf_LDADD = ../src/libdf.a
+jpeg2hdf_DEPENDENCIES = ../src/libdf.a
 
-#Where are the utility includes
-UTILINC=$(srcdir)
+paltohdf_SOURCES = paltohdf.c
+paltohdf_LDADD = ../src/libdf.a
+paltohdf_DEPENDENCIES = ../src/libdf.a
 
-ALL_CFLAGS = $(CFLAGS) $(FMPOOL_FLAGS) -I$(HDFINC) -I$(UTILINC)
+r8tohdf_SOURCES = r8tohdf.c
+r8tohdf_LDADD = ../src/libdf.a
+r8tohdf_DEPENDENCIES = ../src/libdf.a
 
-OTHERDIRS = fixatr testfiles
+ristosds_SOURCES = ristosds.c
+ristosds_LDADD = ../src/libdf.a
+ristosds_DEPENDENCIES = ../src/libdf.a
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in README.TST $(UTILSRCS) $(UTILHDRS) $(FIXATRS) $(TESTFILES)
+vmake_SOURCES = vmake.c
+vmake_LDADD = ../src/libdf.a
+vmake_DEPENDENCIES = ../src/libdf.a
 
-# Utilities
-UTILSRCS = hdf24to8.c hdfcomp.c hdfls.c hdfpack.c hdftopal.c hdftor8.c paltohdf.c \
-        r8tohdf.c ristosds.c vmake.c vshow.c hdf8to24.c hdf2jpeg.c jpeg2hdf.c fp2hdf.c \
-	hdfunpac.c he_main.c he_cntrl.c he_disp.c he_file.c fptest.c gif2hdf.c \
-	writehdf.c gif2mem.c gifread.c decompress.c hdf2gif.c hdfgifwr.c
+vshow_SOURCES = vshow.c
+vshow_LDADD = ../src/libdf.a
+vshow_DEPENDENCIES = ../src/libdf.a
 
-UTILHDRS = he.h he_proto.h gif.h
 
-FIXATRS = fixatr/README fixatr/command.for fixatr/common.for fixatr/fixatr.cld \
-	fixatr/fixatr.hlp fixatr/makefix.com fixatr/parse.mar fixatr/rformat.for
+#############################################################################
+#############################################################################
+DISTCLEANFILES = gif_hdf_temp/bttrfly.hdf gif_hdf_temp/skull.gif    \
+                 gif_hdf_temp/SunWheel.hdf
 
+subdir = hdf/util
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES = h4cc h4fc h4redeploy testutil.sh
+bin_PROGRAMS = gif2hdf$(EXEEXT) hdf2gif$(EXEEXT) hdf2jpeg$(EXEEXT) \
+	hdf24to8$(EXEEXT) hdf8to24$(EXEEXT) hdfcomp$(EXEEXT) \
+	hdfed$(EXEEXT) hdfls$(EXEEXT) hdfpack$(EXEEXT) \
+	hdftopal$(EXEEXT) hdftor8$(EXEEXT) hdfunpac$(EXEEXT) \
+	jpeg2hdf$(EXEEXT) paltohdf$(EXEEXT) r8tohdf$(EXEEXT) \
+	ristosds$(EXEEXT) vmake$(EXEEXT) vshow$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-TESTFILES = testfiles/README testfiles/head.r24.Z testfiles/jpeg_img.jpg \
-	testfiles/ntcheck.hdf testfiles/palette.raw testfiles/storm110.hdf \
-	testfiles/storm110.raw testfiles/storm120.hdf testfiles/storm120.raw \
-	testfiles/storm130.hdf testfiles/storm130.raw testfiles/storm140.raw \
-	testfiles/test.cdf testfiles/test.hdf
+am_gif2hdf_OBJECTS = gif2hdf.$(OBJEXT) gif2mem.$(OBJEXT) \
+	gifread.$(OBJEXT) decompress.$(OBJEXT) writehdf.$(OBJEXT)
+gif2hdf_OBJECTS = $(am_gif2hdf_OBJECTS)
+gif2hdf_LDFLAGS =
+am_hdf24to8_OBJECTS = hdf24to8.$(OBJEXT)
+hdf24to8_OBJECTS = $(am_hdf24to8_OBJECTS)
+hdf24to8_LDFLAGS =
+am_hdf2gif_OBJECTS = hdf2gif.$(OBJEXT) hdfgifwr.$(OBJEXT)
+hdf2gif_OBJECTS = $(am_hdf2gif_OBJECTS)
+hdf2gif_LDFLAGS =
+am_hdf2jpeg_OBJECTS = hdf2jpeg.$(OBJEXT)
+hdf2jpeg_OBJECTS = $(am_hdf2jpeg_OBJECTS)
+hdf2jpeg_LDFLAGS =
+am_hdf8to24_OBJECTS = hdf8to24.$(OBJEXT)
+hdf8to24_OBJECTS = $(am_hdf8to24_OBJECTS)
+hdf8to24_LDFLAGS =
+am_hdfcomp_OBJECTS = hdfcomp.$(OBJEXT)
+hdfcomp_OBJECTS = $(am_hdfcomp_OBJECTS)
+hdfcomp_LDFLAGS =
+am_hdfed_OBJECTS = he_cntrl.$(OBJEXT) he_disp.$(OBJEXT) \
+	he_file.$(OBJEXT) he_main.$(OBJEXT)
+hdfed_OBJECTS = $(am_hdfed_OBJECTS)
+hdfed_LDFLAGS =
+am_hdfls_OBJECTS = hdfls.$(OBJEXT)
+hdfls_OBJECTS = $(am_hdfls_OBJECTS)
+hdfls_LDFLAGS =
+am_hdfpack_OBJECTS = hdfpack.$(OBJEXT)
+hdfpack_OBJECTS = $(am_hdfpack_OBJECTS)
+hdfpack_LDFLAGS =
+am_hdftopal_OBJECTS = hdftopal.$(OBJEXT)
+hdftopal_OBJECTS = $(am_hdftopal_OBJECTS)
+hdftopal_LDFLAGS =
+am_hdftor8_OBJECTS = hdftor8.$(OBJEXT)
+hdftor8_OBJECTS = $(am_hdftor8_OBJECTS)
+hdftor8_LDFLAGS =
+am_hdfunpac_OBJECTS = hdfunpac.$(OBJEXT)
+hdfunpac_OBJECTS = $(am_hdfunpac_OBJECTS)
+hdfunpac_LDFLAGS =
+am_jpeg2hdf_OBJECTS = jpeg2hdf.$(OBJEXT)
+jpeg2hdf_OBJECTS = $(am_jpeg2hdf_OBJECTS)
+jpeg2hdf_LDFLAGS =
+am_paltohdf_OBJECTS = paltohdf.$(OBJEXT)
+paltohdf_OBJECTS = $(am_paltohdf_OBJECTS)
+paltohdf_LDFLAGS =
+am_r8tohdf_OBJECTS = r8tohdf.$(OBJEXT)
+r8tohdf_OBJECTS = $(am_r8tohdf_OBJECTS)
+r8tohdf_LDFLAGS =
+am_ristosds_OBJECTS = ristosds.$(OBJEXT)
+ristosds_OBJECTS = $(am_ristosds_OBJECTS)
+ristosds_LDFLAGS =
+am_vmake_OBJECTS = vmake.$(OBJEXT)
+vmake_OBJECTS = $(am_vmake_OBJECTS)
+vmake_LDFLAGS =
+am_vshow_OBJECTS = vshow.$(OBJEXT)
+vshow_OBJECTS = $(am_vshow_OBJECTS)
+vshow_LDFLAGS =
+SCRIPTS = $(bin_SCRIPTS)
 
-UTILS = hdf24to8 hdfcomp hdfls hdfpack hdftopal hdftor8 paltohdf \
-        r8tohdf ristosds  vmake vshow hdf8to24 hdf2jpeg jpeg2hdf fp2hdf \
-	hdfunpac gif2hdf hdf2gif
 
-GHOBJ = gif2hdf.o writehdf.o gif2mem.o gifread.o decompress.o
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/decompress.Po ./$(DEPDIR)/gif2hdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/gif2mem.Po ./$(DEPDIR)/gifread.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdf24to8.Po ./$(DEPDIR)/hdf2gif.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdf2jpeg.Po ./$(DEPDIR)/hdf8to24.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfcomp.Po ./$(DEPDIR)/hdfgifwr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfls.Po ./$(DEPDIR)/hdfpack.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdftopal.Po ./$(DEPDIR)/hdftor8.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfunpac.Po ./$(DEPDIR)/he_cntrl.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/he_disp.Po ./$(DEPDIR)/he_file.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/he_main.Po ./$(DEPDIR)/jpeg2hdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/paltohdf.Po ./$(DEPDIR)/r8tohdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/ristosds.Po ./$(DEPDIR)/vmake.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vshow.Po ./$(DEPDIR)/writehdf.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(gif2hdf_SOURCES) $(hdf24to8_SOURCES) $(hdf2gif_SOURCES) \
+	$(hdf2jpeg_SOURCES) $(hdf8to24_SOURCES) $(hdfcomp_SOURCES) \
+	$(hdfed_SOURCES) $(hdfls_SOURCES) $(hdfpack_SOURCES) \
+	$(hdftopal_SOURCES) $(hdftor8_SOURCES) $(hdfunpac_SOURCES) \
+	$(jpeg2hdf_SOURCES) $(paltohdf_SOURCES) $(r8tohdf_SOURCES) \
+	$(ristosds_SOURCES) $(vmake_SOURCES) $(vshow_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am h4cc.in h4fc.in \
+	h4redeploy.in testutil.sh.in
+SOURCES = $(gif2hdf_SOURCES) $(hdf24to8_SOURCES) $(hdf2gif_SOURCES) $(hdf2jpeg_SOURCES) $(hdf8to24_SOURCES) $(hdfcomp_SOURCES) $(hdfed_SOURCES) $(hdfls_SOURCES) $(hdfpack_SOURCES) $(hdftopal_SOURCES) $(hdftor8_SOURCES) $(hdfunpac_SOURCES) $(jpeg2hdf_SOURCES) $(paltohdf_SOURCES) $(r8tohdf_SOURCES) $(ristosds_SOURCES) $(vmake_SOURCES) $(vshow_SOURCES)
 
-HGOBJ = hdf2gif.o hdfgifwr.o
+all: all-am
 
-HEOBJ = he_main.o he_cntrl.o he_disp.o he_file.o
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/util/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+h4cc: $(top_builddir)/config.status h4cc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+h4fc: $(top_builddir)/config.status h4fc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+h4redeploy: $(top_builddir)/config.status h4redeploy.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+testutil.sh: $(top_builddir)/config.status testutil.sh.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
 
-PROGS = $(UTILS) hdfed
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-#all: hdfed utils fp2hdf fptest
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) hdfed utils fp2hdf fptest ; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdfed utils fp2hdf fptest ; \
-	fi
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+gif2hdf$(EXEEXT): $(gif2hdf_OBJECTS) $(gif2hdf_DEPENDENCIES) 
+	@rm -f gif2hdf$(EXEEXT)
+	$(LINK) $(gif2hdf_LDFLAGS) $(gif2hdf_OBJECTS) $(gif2hdf_LDADD) $(LIBS)
+hdf24to8$(EXEEXT): $(hdf24to8_OBJECTS) $(hdf24to8_DEPENDENCIES) 
+	@rm -f hdf24to8$(EXEEXT)
+	$(LINK) $(hdf24to8_LDFLAGS) $(hdf24to8_OBJECTS) $(hdf24to8_LDADD) $(LIBS)
+hdf2gif$(EXEEXT): $(hdf2gif_OBJECTS) $(hdf2gif_DEPENDENCIES) 
+	@rm -f hdf2gif$(EXEEXT)
+	$(LINK) $(hdf2gif_LDFLAGS) $(hdf2gif_OBJECTS) $(hdf2gif_LDADD) $(LIBS)
+hdf2jpeg$(EXEEXT): $(hdf2jpeg_OBJECTS) $(hdf2jpeg_DEPENDENCIES) 
+	@rm -f hdf2jpeg$(EXEEXT)
+	$(LINK) $(hdf2jpeg_LDFLAGS) $(hdf2jpeg_OBJECTS) $(hdf2jpeg_LDADD) $(LIBS)
+hdf8to24$(EXEEXT): $(hdf8to24_OBJECTS) $(hdf8to24_DEPENDENCIES) 
+	@rm -f hdf8to24$(EXEEXT)
+	$(LINK) $(hdf8to24_LDFLAGS) $(hdf8to24_OBJECTS) $(hdf8to24_LDADD) $(LIBS)
+hdfcomp$(EXEEXT): $(hdfcomp_OBJECTS) $(hdfcomp_DEPENDENCIES) 
+	@rm -f hdfcomp$(EXEEXT)
+	$(LINK) $(hdfcomp_LDFLAGS) $(hdfcomp_OBJECTS) $(hdfcomp_LDADD) $(LIBS)
+hdfed$(EXEEXT): $(hdfed_OBJECTS) $(hdfed_DEPENDENCIES) 
+	@rm -f hdfed$(EXEEXT)
+	$(LINK) $(hdfed_LDFLAGS) $(hdfed_OBJECTS) $(hdfed_LDADD) $(LIBS)
+hdfls$(EXEEXT): $(hdfls_OBJECTS) $(hdfls_DEPENDENCIES) 
+	@rm -f hdfls$(EXEEXT)
+	$(LINK) $(hdfls_LDFLAGS) $(hdfls_OBJECTS) $(hdfls_LDADD) $(LIBS)
+hdfpack$(EXEEXT): $(hdfpack_OBJECTS) $(hdfpack_DEPENDENCIES) 
+	@rm -f hdfpack$(EXEEXT)
+	$(LINK) $(hdfpack_LDFLAGS) $(hdfpack_OBJECTS) $(hdfpack_LDADD) $(LIBS)
+hdftopal$(EXEEXT): $(hdftopal_OBJECTS) $(hdftopal_DEPENDENCIES) 
+	@rm -f hdftopal$(EXEEXT)
+	$(LINK) $(hdftopal_LDFLAGS) $(hdftopal_OBJECTS) $(hdftopal_LDADD) $(LIBS)
+hdftor8$(EXEEXT): $(hdftor8_OBJECTS) $(hdftor8_DEPENDENCIES) 
+	@rm -f hdftor8$(EXEEXT)
+	$(LINK) $(hdftor8_LDFLAGS) $(hdftor8_OBJECTS) $(hdftor8_LDADD) $(LIBS)
+hdfunpac$(EXEEXT): $(hdfunpac_OBJECTS) $(hdfunpac_DEPENDENCIES) 
+	@rm -f hdfunpac$(EXEEXT)
+	$(LINK) $(hdfunpac_LDFLAGS) $(hdfunpac_OBJECTS) $(hdfunpac_LDADD) $(LIBS)
+jpeg2hdf$(EXEEXT): $(jpeg2hdf_OBJECTS) $(jpeg2hdf_DEPENDENCIES) 
+	@rm -f jpeg2hdf$(EXEEXT)
+	$(LINK) $(jpeg2hdf_LDFLAGS) $(jpeg2hdf_OBJECTS) $(jpeg2hdf_LDADD) $(LIBS)
+paltohdf$(EXEEXT): $(paltohdf_OBJECTS) $(paltohdf_DEPENDENCIES) 
+	@rm -f paltohdf$(EXEEXT)
+	$(LINK) $(paltohdf_LDFLAGS) $(paltohdf_OBJECTS) $(paltohdf_LDADD) $(LIBS)
+r8tohdf$(EXEEXT): $(r8tohdf_OBJECTS) $(r8tohdf_DEPENDENCIES) 
+	@rm -f r8tohdf$(EXEEXT)
+	$(LINK) $(r8tohdf_LDFLAGS) $(r8tohdf_OBJECTS) $(r8tohdf_LDADD) $(LIBS)
+ristosds$(EXEEXT): $(ristosds_OBJECTS) $(ristosds_DEPENDENCIES) 
+	@rm -f ristosds$(EXEEXT)
+	$(LINK) $(ristosds_LDFLAGS) $(ristosds_OBJECTS) $(ristosds_LDADD) $(LIBS)
+vmake$(EXEEXT): $(vmake_OBJECTS) $(vmake_DEPENDENCIES) 
+	@rm -f vmake$(EXEEXT)
+	$(LINK) $(vmake_LDFLAGS) $(vmake_OBJECTS) $(vmake_LDADD) $(LIBS)
+vshow$(EXEEXT): $(vshow_OBJECTS) $(vshow_DEPENDENCIES) 
+	@rm -f vshow$(EXEEXT)
+	$(LINK) $(vshow_LDFLAGS) $(vshow_OBJECTS) $(vshow_LDADD) $(LIBS)
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
+	    $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
+	  else :; fi; \
+	done
 
-#nofortran: hdfed utils fp2hdf fptest
-nofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) hdfed utils fp2hdf fptest ; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdfed utils fp2hdf fptest ; \
-	fi
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+distclean-compile:
+	-rm -f *.tab.c
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/decompress.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gif2hdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gif2mem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gifread.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf24to8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf2gif.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf2jpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf8to24.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfgifwr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfls.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfpack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftopal.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftor8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfunpac.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_cntrl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_disp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/jpeg2hdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/paltohdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/r8tohdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ristosds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vmake.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vshow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/writehdf.Po at am__quote@
 
-install: install-prog
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-install-prog: all
-	for p in $(PROGS); do \
-	    $(INSTALL_PROGRAM) \
-		`pwd`/$$p $(bindir)/`$(ECHO) $$p`; \
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
 	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
 
-test-utils:
-	./testutil.sh $(target_canonical)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) $*.c 
-#
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) -I$(UTILINC) -I$(JPEGINC) -I$(ZLIBINC) $*.c 
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-.c.o: he.h he_proto.h $(HDFLIB)/libdf.so $(FRC)
-	$(CC) $(ALL_CFLAGS) -c $<
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-.c: $(HDFLIB)/libdf.so
-	$(CC) $(ALL_CFLAGS) $< -o $@ -L$(HDFLIB) -ldf -ljpeg -lz
+clean-generic:
 
-.f: $(HDFLIB)/libdf.so 
-	$(FC) $(FFLAGS) $< -o $@ -L$(HDFLIB) -ldf -ljpeg -lz
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-hdfed: he.h he_proto.h $(HEOBJ) $(HDFLIB)/libdf.so $(FRC)
-	$(CC) $(ALL_CFLAGS) $(HEOBJ) -o hdfed -L$(HDFLIB) -ldf -ljpeg -lz
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-gif2hdf: gif.h $(GHOBJ) $(HDFLIB)/libdf.so $(FRC)
-	$(CC) $(ALL_CFLAGS) $(GHOBJ) -L$(HDFLIB) -ldf -ljpeg -lz -o gif2hdf
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
-hdf2gif: gif.h $(HGOBJ) $(HDFLIB)/libdf.so $(FRC)
-	$(CC) $(ALL_CFLAGS) $(HGOBJ) -L$(HDFLIB) -ldf -ljpeg -lz -o hdf2gif
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-utils: $(UTILS) $(HDFLIB)/libdf.so $(FRC)
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-$(HEOBJ): $(FRC)
+dvi: dvi-am
 
-$(HDFLIB)/libdf.so:
+dvi-am:
 
-clean:
-	-$(RM) $(RMFLAGS) *.o $(UTILS) hdfed fptest
-	-$(RM) $(RMFLAGS) o* ctx* cb* fptestf 
+info: info-am
 
-distclean:
-	-$(RM) $(RMFLAGS) *.o $(UTILS) hdfed fptest config.status Makefile
-	-$(RM) $(RMFLAGS) o* ctx* cb* fptestf
-depend: 
-	 makedepend -I$(HDFINC) -I$(UTILINC) *.c
+info-am:
 
-saber:	$(SRCS)
-	 #load $(ALL_CFLAGS) -D$(MACHINE) $(SRCS) 
+install-data-am:
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/util
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
 
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
+install-info: install-info-am
 
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'utilities' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes utilities"
-	@echo "make hdfed   - makes hdfed utilitiy"
-	@echo "make test-utils  - tests utilities"
-	@echo "make install     - install HDF utilites, "
-	@echo "make clean     - cleans up tests (both C and Fortran)"
-	@echo "make distclean - cleans up HDF tests including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
+install-man:
 
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+	uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS \
+	install-binSCRIPTS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-binSCRIPTS uninstall-info-am
+
+
+#############################################################################
+#############################################################################
+
+check:  $(bin_PROGRAMS)
+	sh ./testutil.sh $(target_canonical)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Copied: packages/libhdf4/trunk/hdf/util/README.fp2hdf (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf)
===================================================================
--- packages/libhdf4/trunk/hdf/util/README.fp2hdf	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/README.fp2hdf	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,19 @@
+
+This revision of fptohdf, which we are calling fp2hdf,  supports native
+mode floating point (both single and double precision), and 3D floating 
+point data sets.
+
+For these additions we owe our thanks to Bob Weaver and colleagues
+at INEL.
+
+You should be able to compile fp2hdf, as well as the two programs
+for generating test data, by executing "make".  Note: you will
+need to change some of the definitions in the makefile to conform
+to your system.
+
+Except for Makefile, fp2hdf.c, and this README file, all of the
+files in this directory are for testing fp2hdf and illustrating
+its use.
+
+Mike Folk
+

Copied: packages/libhdf4/trunk/hdf/util/README.fp2hdf.test (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf.test)
===================================================================
--- packages/libhdf4/trunk/hdf/util/README.fp2hdf.test	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/README.fp2hdf.test	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,63 @@
+
+
+
+There are two sets of input files for testing fp2hdf.  These files
+are used by the script fp2hdf.test.
+
+I. The first set consists of 2-D data sets that produce images that are 
+cross-hatched with 10 vertical and 10 horizontal lines.  These files
+use the following naming conventions:
+
+   't' prefix means it's a text file
+   'h' prefix means it's an hdf file
+   'h' at the end means horizontal scale is not uniform
+   'v' at the end means vertical scale is not uniform
+   'n' at the end means no scales are stored in the file
+   dimensions are given between  prefix and postfix
+
+The names of the files: (which are stored in the testfiles/fp2hdf directory)
+                    t100x100  
+                    h100x100  
+                    h100x100h 
+                    h100x100hv
+                    h60x75    
+                    h60x75v   
+                    h60x75n   
+
+II. The second set are generated by the programs ftest.c and ftest.F. 
+They are small files with 2-D and 3-D data sets that are easily 
+examined by eye.  Those that begin with the letter 'c' are 
+produced with the program ftest.c, and those that begin with 'f'
+were produced with ftest.F.
+
+                   ctxtr2, type 'TEXT', size 3x4
+                   ctxtr3, type 'TEXT', size 3x4x5
+                   cb32r2, type 'FP32', size 3x4
+                   cb32r3, type 'FP32', size 3x4x5
+                   cb64r2, type 'FP64', size 3x4
+                   cb64r3, type 'FP64', size 3x4x5
+     
+                   ftxtr2, type 'TEXT', size 3x4
+                   ftxtr3, type 'TEXT', size 3x4x5
+                   fb32r2, type 'FP32', size 3x4
+                   fb32r3, type 'FP32', size 3x4x5
+                   fb64r2, type 'FP64', size 3x4
+                   fb64r3, type 'FP64', size 3x4x5
+
+Contents of the arrays:
+
+  row    values start at 11 and increment by 1 => 11, 12, 13
+  column values start at 21 and increment by 2 => 21, 23, 25, 27
+  plane  values start at 51 and increment by 5 => 51, 56, 61, 66, 71
+
+  data element value = row value + column value [+ plane value, if rank=3]
+     
+
+Output files can be examined with hdfls to see if basic
+contents are there.  Those with raster images can be displayed
+using NCSA Image, DataScope, etc.  Those with floating point
+data can be examined using hdfed or DataScope.
+
+
+
+

Modified: packages/libhdf4/trunk/hdf/util/fp2hdf.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/fp2hdf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/fp2hdf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -160,6 +160,11 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifdef WIN32
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
 /*
  * global macros
  */
@@ -355,11 +360,16 @@
     int         token;
     int         state = 0;
 
+    
     const char *err1 = "Invalid number of arguments:  %d.\n";
     const char *err2 = "Error in state table.\n";
     const char *err3 = "No output file given.\n";
     const char *err4 = "Program aborted.\n";
 
+#ifdef WIN32
+	_fmode = _O_BINARY;
+#endif
+
     /*
      * set 'stdout' and 'stderr' to line-buffering mode
      */
@@ -712,7 +722,8 @@
 
     if (in->is_text == TRUE)
       {
-          if (fscanf(strm, "%e", fp32) != 1)
+
+		if (fscanf(strm, "%e", fp32) != 1)
             {
                 (void) fprintf(stderr, err1, infile);
                 goto err;
@@ -720,6 +731,7 @@
       }
     else if (in->is_fp32 == TRUE)
       {
+		
           if (fread((char *) fp32, sizeof(float32), 1, strm) != 1)
             {
                 (void) fprintf(stderr, err1, infile);
@@ -1100,8 +1112,12 @@
                 (void) fprintf(stderr, err2, infile);
                 goto err;
             }
-          if (!HDmemcmp("TEXT", buf, 4) || !HDmemcmp("text", buf, 4))
+          if (!HDmemcmp("TEXT", buf, 4) || !HDmemcmp("text", buf, 4)) {
+#ifdef WIN32
+			  _fmode = _O_TEXT;
+#endif
               in->is_text = TRUE;
+		  }
           else
             {
                 rewind(*strm);
@@ -1120,6 +1136,7 @@
                       (void) fprintf(stderr, err3, infile);
                       goto err;
                   }
+		
             }
       }
 
@@ -1695,7 +1712,7 @@
     /*
      * extract a palette from an HDF file
      */
-    if (!Hishdf(palfile))
+    if (Hishdf(palfile))
       {
           if (DFPgetpal(palfile, pal))
             {

Copied: packages/libhdf4/trunk/hdf/util/fp2hdf.test (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.test)
===================================================================
--- packages/libhdf4/trunk/hdf/util/fp2hdf.test	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/fp2hdf.test	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,128 @@
+#! /bin/csh -f 
+#                   Script for testing fp2hdf
+#
+# The input files used in this script for testing fp2hdf are 
+# described in the file README.test.      
+#
+# Output files can be examined with hdfls to see if basic
+# contents are there.  Those with raster images can be displayed
+# using NCSA Image, DataScope, etc.  Those with floating point
+# data can be examined using hdfed or DataScope.
+# 
+# Note: these tests are not exhaustive.  You may want to add some
+# of your own, especially if you are doing something a little
+# different from what we are testing for.  You may also want to 
+# eliminate some of these tests if they are not relevant.
+# 
+set echo
+# text (100x100) => SDS only 
+./fp2hdf testfiles/fp2hdf/t100x100 -o o1 
+#
+# text => image only
+./fp2hdf testfiles/fp2hdf/t100x100 -o o2 -r
+#
+# text => SDS and image
+./fp2hdf testfiles/fp2hdf/t100x100 -o o3 -r -f
+#
+# hdf (100x100) => SDS and image
+./fp2hdf testfiles/fp2hdf/h100x100 -o o4 -r -f
+#
+# hdf => SDS and image w palette
+./fp2hdf testfiles/fp2hdf/h100x100 -o o5 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf => 200x200 image, pixel replication 
+./fp2hdf testfiles/fp2hdf/h100x100 -o o6 -r -e 200 200
+#
+# hdf => 200x200 image, bilinear interporlation 
+./fp2hdf testfiles/fp2hdf/h100x100 -o o7 -r -i 200 200
+#
+# hdf => 40x120 interpolated image w palette
+./fp2hdf testfiles/fp2hdf/h100x100 -o o8 -r -i 40 120 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf => 40x120 pixel rep image w palette (should generate and error)
+./fp2hdf testfiles/fp2hdf/h100x100 -o o9 -r -e 40 120 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75) => 120x160 pixel rep image w palette
+./fp2hdf testfiles/fp2hdf/h60x75 -o o10 -r -e 120 160 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (100x100, horizontal scale is non-uniform) => SDS and image w palette
+./fp2hdf testfiles/fp2hdf/h100x100h -o o11 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (100x100, horiz and vert scales are non-uniform) => SDS and image w pal
+./fp2hdf testfiles/fp2hdf/h100x100hv -o o12 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75 vert scale is non-uniform) => 120x160 image with palette
+./fp2hdf testfiles/fp2hdf/h60x75v -o o13 -r -e 120 160 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75 no scales) => 120x150 pixel rep image with palette
+./fp2hdf testfiles/fp2hdf/h60x75n -o o14 -r -e 120 150 -p testfiles/fp2hdf/pal.hdf
+#
+# From several files => a file with 100x100 images for all of them
+./fp2hdf testfiles/fp2hdf/t100x100 testfiles/fp2hdf/h100x100 testfiles/fp2hdf/h100x100h testfiles/fp2hdf/h100x100hv testfiles/fp2hdf/h60x75 testfiles/fp2hdf/h60x75v -o o15 -r -e 100 100
+#
+# Now do test on the other set of input files
+#
+# C: text (3x4) => SDS 
+./fp2hdf ctxtr2 -o o20 
+#
+# C: text (3x4x5) => SDS 
+./fp2hdf ctxtr3 -o o21
+#
+# C: binary 32-bit (3x4) => SDS
+./fp2hdf cb32r2 -o o22 
+#
+# C: binary 32-bit (3x4x5) => SDS 
+./fp2hdf cb32r3 -o o23 
+#
+# C: binary 64-bit (3x4) => SDS 
+./fp2hdf cb64r2 -o o24 
+#
+# C: binary 64-bit (3x4x5) => SDS 
+./fp2hdf cb64r3 -o o25 
+#
+# C: text (3x4) => image
+./fp2hdf ctxtr2 -o o26 -raster -e 50 50 
+#
+# C: binary (3x4) => image and SDS
+./fp2hdf cb64r2 -o o27 -raster -i 50 50 -f
+#
+# 
+# Fortran: text (3x4) => SDS 
+./fp2hdf ftxtr2 -o o30 
+#
+# Fortran: text (3x4x5) => SDS 
+./fp2hdf ftxtr3 -o o31
+#
+# Fortran: binary 32-bit (3x4) => SDS
+./fp2hdf fb32r2 -o o32 
+#
+# Fortran: binary 32-bit (3x4x5) => SDS 
+./fp2hdf fb32r3 -o o33 
+#
+# Fortran: binary 64-bit (3x4) => SDS 
+./fp2hdf fb64r2 -o o34 
+#
+# Fortran: binary 64-bit (3x4x5) => SDS 
+./fp2hdf fb64r3 -o o35 
+#
+# Fortran: text (3x4) => image
+./fp2hdf ftxtr2 -o o36 -raster -e 50 50 
+#
+# Fortran: binary (3x4) => image and SDS
+./fp2hdf fb64r2 -o o37 -raster -i 50 50 -f
+#
+# 
+# Compare files o20-o27 with o30-o37.  They should be the same.
+#
+cmp o20 o30
+cmp o21 o31
+cmp o22 o32
+cmp o23 o33
+cmp o24 o34
+cmp o25 o35
+cmp o26 o36
+cmp o27 o37
+
+unset echo
+
+

Modified: packages/libhdf4/trunk/hdf/util/fptest.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/fptest.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/fptest.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,6 +2,11 @@
 #include <stdio.h>
 #include "hdf.h"
 
+#ifdef WIN32
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
 /*
  * Name:
  *      fptest
@@ -122,6 +127,12 @@
      * text file - rank 2 & 3
      */
 
+/* For WINDOWS platform, file mode should be set explicitly. 
+   For text mode, set it to Text; for binary mode, set it to BINARY. */
+
+#ifdef WIN32
+     _fmode = _O_TEXT;
+#endif
     sp = fopen("ctxtr2", "w");
     (void) fprintf(sp, "%s\n", text);
     (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
@@ -165,7 +176,9 @@
     /*
      * binary 32-bit file - rank 2 & 3
      */
-
+#ifdef WIN32                                                                                       
+   _fmode = _O_BINARY;
+#endif 
 #ifndef UNICOS
     sp = fopen("cb32r2", "w");
     (void) fwrite(fp32, sizeof(int), 1, sp);

Modified: packages/libhdf4/trunk/hdf/util/gif2mem.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/gif2mem.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/gif2mem.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -24,7 +24,7 @@
 #include "gif.h"
 #include <hdf.h>
 
-#define VERSION                     "1.00"
+#define GIF_VERSION                     "1.00"
 extern int EndianOrder;
 
 GIFTOMEM

Copied: packages/libhdf4/trunk/hdf/util/h4cc.in (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in)
===================================================================
--- packages/libhdf4/trunk/hdf/util/h4cc.in	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/h4cc.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,214 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+############################################################################
+##                                                                        ##
+## Things You May Have to Modify:                                         ##
+##                                                                        ##
+## If the following paths don't point to the place were HDF4 is installed ##
+## on your system (i.e., you received a binary distribution or moved the  ##
+## files from the originally installed directory to another directory)    ##
+## then modify them accordingly to represent the new paths.               ##
+##                                                                        ##
+############################################################################
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+############################################################################
+##                                                                        ##
+## You shouldn't have to modify anything below this line.                 ##
+##                                                                        ##
+############################################################################
+
+host_os="@host_os@"
+
+prog_name="`basename $0`"
+
+allargs=""
+compile_args=""
+libraries=""
+link_args=""
+link_objs=""
+
+do_link="yes"
+do_compile="no"
+dash_o="no"
+dash_c="no"
+get_output_file="no"
+
+SHOW="eval"
+CCBASE="@CC@"
+CLINKERBASE="@CC@"
+CFLAGS="@CFLAGS@"
+CPPFLAGS="@CPPFLAGS@"
+LDFLAGS="@LDFLAGS@"
+LIBS="@LIBS@"
+
+CC="${HDF4_CC:-$CCBASE}"
+CLINKER="${HDF4_CLINKER:-$CLINKERBASE}"
+
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS] <compile line>"
+  echo "  OPTIONS:"
+  echo "    -help        This help message."
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -prefix=DIR  Prefix directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: $prefix]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  echo "  <compile line>  - the normal compile line options for your compiler."
+  echo "                    $prog_name uses the same compiler you used to compile"
+  echo "                    HDF4. Check with your compiler's man pages for more"
+  echo "                    information on which options are needed."
+  echo " "
+  echo " You can override the compiler, linker, and whether or not to use static"
+  echo " or shared libraries to compile your program by setting the following"
+  echo " environment variables accordingly:"
+  echo " "
+  echo "   HDF4_CC                  -  use a different C compiler"
+  echo "   HDF4_CLINKER             -  use a different linker"
+  echo " "
+  exit 1
+}
+
+if test "$#" = "0"; then
+  # No parameters specified, issue usage statement and exit.
+  usage
+fi
+
+for arg in $@ ; do
+  if test "x$get_output_file" = "xyes"; then
+    link_args="$link_args $arg"
+    output_file="$arg"
+    get_output_file="no"
+    continue
+  fi
+
+  case "$arg" in
+    -c)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+
+      if test "x$do_link" = "xyes" -a -n "$output_file"; then
+        compile_args="$compile_args -o $outputfile"
+      fi
+
+      do_link="no"
+      dash_c="yes"
+      ;;
+    -o)
+      allargs="$allargs $arg"
+      dash_o="yes"
+
+      if test "x$dash_c" = "xyes"; then
+        compile_args="$compile_args $arg"
+      else
+        link_args="$link_args $arg"
+        do_link="yes"
+        get_output_file="yes"
+      fi
+      ;;
+    -E|-M)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+      dash_c="yes"
+      do_link="no"
+      ;;
+    -l*)
+      libraries=" $libraries $arg "
+      allargs="$allargs $arg"
+      ;;
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -help)
+      usage
+      ;;
+    *\"*)
+      qarg="'"$arg"'"
+      allargs="$allargs $qarg"
+      ;;
+    *\'*)
+      qarg='\"'"$arg"'\"'
+      allargs="$allargs $qarg"
+      ;;
+    *)
+      allargs="$allargs $qarg"
+
+      if test -s "$arg"; then
+        ext=`expr "$arg" : '.*\(\..*\)'`
+
+        if test "x$ext" = "x.c"; then
+          do_compile="yes"
+          compile_args="$compile_args $arg"
+          fname=`basename $arg .c`
+          link_objs="$link_objs $fname.o"
+        elif test "x$ext" = "x.o"; then
+          if test "x$dash_c" = "xyes"; then
+            compile_args="$compile_args $arg"
+          else
+            do_link="yes"
+            link_objs="$link_objs $arg"
+          fi
+        elif test "x$ext" = "x.a"; then
+          # This is an archive that we're linking in
+          libraries=" $libraries $arg "
+        else
+          compile_args="$compile_args $arg"
+          link_args="$link_args $arg"
+        fi
+      else
+        compile_args="$compile_args $arg"
+        link_args="$link_args $arg"
+      fi
+      ;;
+  esac
+done
+
+if test "x$do_compile" = "xyes"; then
+  if test "x$dash_c" != "xyes"; then
+    compile_args="-c $compile_args"
+  fi
+
+  $SHOW $CC -I$includedir $CPPFLAGS $CFLAGS $compile_args
+  status=$?
+
+  if test "$status" != "0"; then
+    exit $status
+  fi
+fi
+
+if test "x$do_link" = "xyes"; then
+  libraries=" $libraries -lmfhdf -ldf "
+  link_args="$link_args -L${libdir}"
+
+  for lib in $libraries; do
+    if echo $link_args | grep " $lib " > /dev/null ||
+       echo $link_args | grep " $lib$" > /dev/null; then
+      :
+    else
+      link_args="$link_args $lib "
+    fi
+  done
+
+  # The LIBS are just a bunch of -l* libraries necessary for the HDF4
+  # module. It's okay if they're included twice in the compile line.
+  link_args="$link_args $LIBS"
+
+  $SHOW $CLINKER $CFLAGS $LDFLAGS $link_objs $link_args
+  status=$?
+fi
+
+exit $status

Copied: packages/libhdf4/trunk/hdf/util/h4fc.in (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in)
===================================================================
--- packages/libhdf4/trunk/hdf/util/h4fc.in	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/h4fc.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,213 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+############################################################################
+##                                                                        ##
+## Things You May Have to Modify:                                         ##
+##                                                                        ##
+## If the following paths don't point to the place were HDF4 is installed ##
+## on your system (i.e., you received a binary distribution or moved the  ##
+## files from the originally installed directory to another directory)    ##
+## then modify them accordingly to represent the new paths.               ##
+##                                                                        ##
+############################################################################
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+############################################################################
+##                                                                        ##
+## You shouldn't have to modify anything below this line.                 ##
+##                                                                        ##
+############################################################################
+
+host_os="@host_os@"
+
+prog_name="`basename $0`"
+
+allargs=""
+compile_args=""
+libraries=""
+link_args=""
+link_objs=""
+
+do_link="yes"
+do_compile="no"
+dash_o="no"
+dash_c="no"
+get_output_file="no"
+
+SHOW="eval"
+F77BASE="@F77@"
+F77LINKERBASE="@F77@"
+FFLAGS="@FFLAGS@"
+LDFLAGS="@LDFLAGS@"
+LIBS="@LIBS@"
+
+F77="${HDF4_F77:-$F77BASE}"
+F77LINKER="${HDF4_F77LINKER:-$F77LINKERBASE}"
+
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS] <compile line>"
+  echo "  OPTIONS:"
+  echo "    -help        This help message."
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -prefix=DIR  Prefix directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: $prefix]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  echo "  <compile line>  - the normal compile line options for your compiler."
+  echo "                    $prog_name uses the same compiler you used to compile"
+  echo "                    HDF4. Check with your compiler's man pages for more"
+  echo "                    information on which options are needed."
+  echo " "
+  echo " You can override the compiler, linker, and whether or not to use static"
+  echo " or shared libraries to compile your program by setting the following"
+  echo " environment variables accordingly:"
+  echo " "
+  echo "   HDF4_F77                 -  use a different Fortran 77 compiler"
+  echo "   HDF4_F77LINKER           -  use a different linker"
+  echo " "
+  exit 1
+}
+
+if test "$#" = "0"; then
+  # No parameters specified, issue usage statement and exit.
+  usage
+fi
+
+for arg in $@ ; do
+  if test "x$get_output_file" = "xyes"; then
+    link_args="$link_args $arg"
+    output_file="$arg"
+    get_output_file="no"
+    continue
+  fi
+
+  case "$arg" in
+    -c)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+
+      if test "x$do_link" = "xyes" -a -n "$output_file"; then
+        compile_args="$compile_args -o $outputfile"
+      fi
+
+      do_link="no"
+      dash_c="yes"
+      ;;
+    -o)
+      allargs="$allargs $arg"
+      dash_o="yes"
+
+      if test "x$dash_c" = "xyes"; then
+        compile_args="$compile_args $arg"
+      else
+        link_args="$link_args $arg"
+        do_link="yes"
+        get_output_file="yes"
+      fi
+      ;;
+    -E|-M)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+      dash_c="yes"
+      do_link="no"
+      ;;
+    -l*)
+      libraries=" $libraries $arg "
+      allargs="$allargs $arg"
+      ;;
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -help)
+      usage
+      ;;
+    *\"*)
+      qarg="'"$arg"'"
+      allargs="$allargs $qarg"
+      ;;
+    *\'*)
+      qarg='\"'"$arg"'\"'
+      allargs="$allargs $qarg"
+      ;;
+    *)
+      allargs="$allargs $qarg"
+
+      if test -s "$arg"; then
+        ext=`expr "$arg" : '.*\(\..*\)'`
+        if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
+             "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then       
+          do_compile="yes"
+          compile_args="$compile_args $arg"
+          fname=`basename $arg $ext`
+          link_objs="$link_objs $fname.o"
+        elif test "x$ext" = "x.o"; then
+          if test "x$dash_c" = "xyes"; then
+            compile_args="$compile_args $arg"
+          else
+            do_link="yes"
+            link_objs="$link_objs $arg"
+          fi
+        elif test "x$ext" = "x.a"; then
+          # This is an archive that we're linking in
+          libraries=" $libraries $arg "
+        else
+          compile_args="$compile_args $arg"
+          link_args="$link_args $arg"
+        fi
+      else
+        compile_args="$compile_args $arg"
+        link_args="$link_args $arg"
+      fi
+      ;;
+  esac
+done
+
+if test "x$do_compile" = "xyes"; then
+  if test "x$dash_c" != "xyes"; then
+    compile_args="-c $compile_args"
+  fi
+
+  $SHOW $F77 -I$includedir $FFLAGS $compile_args
+  status=$?
+
+  if test "$status" != "0"; then
+    exit $status
+  fi
+fi
+
+if test "x$do_link" = "xyes"; then
+  libraries=" $libraries -lmfhdf -ldf "
+  link_args="$link_args -L${libdir}"
+
+  for lib in $libraries; do
+    if echo $link_args | grep " $lib " > /dev/null ||
+       echo $link_args | grep " $lib$" > /dev/null; then
+      :
+    else
+      link_args="$link_args $lib "
+    fi
+  done
+
+  # The LIBS are just a bunch of -l* libraries necessary for the HDF4
+  # module. It's okay if they're included twice in the compile line.
+  link_args="$link_args $LIBS"
+
+  $SHOW $F77LINKER $FFLAGS $LDFLAGS $link_objs $link_args
+  status=$?
+fi
+
+exit $status

Copied: packages/libhdf4/trunk/hdf/util/h4redeploy.in (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in)
===================================================================
--- packages/libhdf4/trunk/hdf/util/h4redeploy.in	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/h4redeploy.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,166 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+## Update HDF4 compiler tools after the HDF4 software has been installed
+## in a new location.
+## For help page, use "h5redeploy -help"
+
+# Function definitions
+
+# show help page
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS]"
+  echo "  OPTIONS:"
+  echo "    -help|help   This help message"
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -force       No prompt, just do it"
+  echo "    -prefix=DIR  New directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: current directory]"
+  echo "    -tool=TOOL   Tool to update. TOOL must be in the current"
+  echo "                   directory and writable. [default: $h4tools]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  exit 1
+}
+
+# display variable values
+dump_vars(){
+    echo "====Showing all variable values====="
+    echo prefix=$prefix
+    echo h4tools=$h4tools
+    echo "====End Showing====="
+}
+
+# show actions to be taken
+show_action()
+{
+    echo "Update the following tools because they are now installed at a new directory"
+    for t in $foundtools; do
+	echo "${t}:"
+	echo "   current setting=`sed -e '/^prefix=/s/prefix=//p' -e d $t`"
+	echo "   new     setting="\""$prefix"\"
+    done
+}
+
+
+# Report Error message
+ERROR()
+{
+    echo "***ERROR***"
+    echo "$1"
+}
+
+# Main
+#
+# Initialization
+h4tools="h4cc h4fc"	# possible hdf4 tools
+foundtools=		# tools found and will be modified
+fmode=			# force mode, default is off
+prefix=`(cd ..;pwd)`
+
+# Parse options
+for arg in $@ ; do
+  case "$arg" in
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -tool=*)
+      h4tools="`expr "$arg" : '-tool=\(.*\)'`"
+      ;;
+    -help|help)
+      usage
+      ;;
+    -force)
+      fmode=yes
+      ;;
+    *)
+      ERROR "Unknown Option($arg)"
+      usage
+      exit 1
+      ;;
+  esac
+done
+
+# Sanity checks
+if [ ! -d $prefix ]; then
+    ERROR "prefix($prefix) is not an existing directory"
+    exit 1
+fi
+
+for x in $h4tools; do
+    if [ -f $x ]; then
+	foundtools="$foundtools $x"
+	if [ ! -w $x ]; then
+	    ERROR "h5tool($x) is not writable"
+	    exit 1
+	fi
+    fi
+done
+
+if [ -z "$foundtools" ]; then
+    ERROR "found no tools to modify"
+    exit 1
+fi
+
+# Show actions to be taken and get consent
+show_action
+# Ask confirmation unless fmode is on
+if [ x-$fmode = x- ]; then
+    echo "Continue? (yes/no)"
+    read ansx
+    ans=`echo $ansx | tr "[A-Z]" "[a-z]"`
+    if [ x-$ans != x-yes ]; then
+	echo ABORT.  No tools changed.
+	exit 1
+    fi
+fi
+
+
+# Create the update commands
+CMDFILE=/tmp/h5redeploy.$$
+touch $CMDFILE
+chmod 0600 $CMDFILE
+echo "/^prefix/c"                 >> $CMDFILE
+echo prefix=\""$prefix"\"         >> $CMDFILE
+echo .                            >> $CMDFILE
+(echo w; echo q)                  >> $CMDFILE
+
+
+# Update them
+if [ "$SHOW" = "echo" ]; then
+    echo "===Update commands are:===="
+    cat $CMDFILE
+    echo "===End Update commands====="
+fi
+
+for t in $foundtools; do
+    echo Update $t ...
+    COMMAND="ed - $t"
+    if [ "$SHOW" = "echo" ]; then
+	echo $COMMAND
+    else
+	$COMMAND < $CMDFILE
+    fi
+done
+
+
+# Cleanup
+rm -f $CMDFILE
+exit 0
+
+# Some possible future features to add
+# CCBASE - Name of the alternative C compiler
+# CLINKERBASE - Name of the alternative linker
+# LDFLAGS   - Path to different libraries your application will link with
+#     (this path should include the path to the zlib library)
+# LIBS      - Libraries your application will link with

Modified: packages/libhdf4/trunk/hdf/util/hdf2gif.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/hdf2gif.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/hdf2gif.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -174,11 +174,23 @@
 		
 		status = GRgetiminfo(ri_id , gr_name , &ncomp , &data_type , &interlace_mode , dim_sizes , &num_attrs);
 		if (!(data_type == DFNT_CHAR || data_type == DFNT_UCHAR || data_type == DFNT_INT8 || data_type == DFNT_UINT8 || data_type == DFNT_NINT8 || data_type == DFNT_NUINT8)) {
-			printf("The GR data type appears not to be 8-bit. Trying next image...\n");
+			printf("The GR data type of image %s in the hdf file appears not to be 8-bit. Trying next image...\n", gr_name);
 			continue;
 		}
-
 		
+		/* BUG FIX 601 - pkamat */
+		if (1 != ncomp) {  /* not an 8-bit image */ 
+		  if (3 == ncomp) { /* 24-bit image */
+		    printf("The GR data type of image %s in the hdf file appears to be a 24-bit image. ", gr_name);
+		    printf("Use hdf2jpeg to convert this image. Trying next image... \n");
+		    continue;
+                  }
+		  printf("The GR data type of image %s in the hdf file does not appear to be a 8-bit image. ", gr_name);
+		  printf("Trying next image... \n");	
+		  continue;
+		}	
+		/* End BUG FIX 601 */ 
+		
 		Image = (BYTE *)malloc(dim_sizes[0] * dim_sizes[1]);
 		status = GRreadimage(ri_id , start , stride , dim_sizes , Image);
 		w = dim_sizes[0];

Modified: packages/libhdf4/trunk/hdf/util/hdfcomp.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/hdfcomp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/hdfcomp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.14 $";
+static char RcsId[] = "$Revision: 1.16 $";
 #endif
 
-/* $Id: hdfcomp.c,v 1.14 1996/11/11 20:40:17 koziol Exp $ */
+/* $Id: hdfcomp.c,v 1.16 2003/12/10 21:13:47 epourmal Exp $ */
 
 /*
 *  hdfcomp.c
@@ -58,7 +58,7 @@
         printf("  appended to outfile, if it exists.\n\n");
         printf("Usage:\n");
         printf(" hdfcomp outfile {[-c],[-r],[-i],[-j<quality>]} imagefile ...\n");
-        printf("                 {[-c],[-r],[-i], [-j<quality>]} imagefile\n");
+        printf("                 {[-c],[-r],[-i],[-j<quality>]} imagefile\n");
         printf("         -r: Store without compression (default)\n");
         printf("         -c: Store using RLE compression\n");
         printf("         -i: Store using IMCOMP compression (requires a");

Modified: packages/libhdf4/trunk/hdf/util/hdfpack.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/hdfpack.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/hdfpack.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.26 $";
+static char RcsId[] = "@(#)$Revision: 1.28 $";
 #endif
 
-/* $Id: hdfpack.c,v 1.26 1997/10/25 00:56:30 koziol Exp $ */
+/* $Id: hdfpack.c,v 1.28 2003/12/10 21:13:47 epourmal Exp $ */
 
 /*
    ** FILE
@@ -284,8 +284,8 @@
  */
     qsort((char *) dlist, (size_t)num_desc, sizeof(*dlist), desc_comp);
 
-    oldoff = -1;
-    oldlen = -1;
+    oldoff = -2;
+    oldlen = -2;
     for (i = 0; i < num_desc; i++)
       {
           if (((dlist[i].tag != DFTAG_NULL) && (dlist[i].tag != DFTAG_VERSION))
@@ -531,7 +531,8 @@
           HERROR(DFE_GENAPP);
           hdferror();
       }
-    outaid = Hstartwrite(outfile, BASETAG(dd->tag), dd->ref, dd->length);
+
+    outaid = Hstartaccess(outfile,BASETAG(dd->tag),dd->ref,DFACC_WRITE);
     if (outaid == FAIL)
       {
           HERROR(DFE_GENAPP);

Copied: packages/libhdf4/trunk/hdf/util/testfiles/fp2hdf (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf)

Deleted: packages/libhdf4/trunk/hdf/util/testfiles/head.r24.Z
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/hdf/util/testfiles/head.r24.gz (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.gz)
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/hdf/util/testfiles/head.r8.Z
===================================================================
--- packages/libhdf4/trunk/hdf/util/testfiles/head.r8.Z	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/testfiles/head.r8.Z	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,134 +0,0 @@
-
-H° Áƒ*\È°¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ
-J´¨Ñ£H“*]Ê´©Ó§P£JJµªÒX³æ˜±UÀ«`j‹u+®Y³†]»³¬Ö[Õpõ²µ.¸i¿²Ý3/ÞtÉÜ<C0Ö³wëªåËø¤ßˆ!K\¸°`¸wé’ÕÛ¸³G·usPÎJøò`ȆͪފճkŒnÑžE‹V²àÓ·gV=[1ç×ÀÆF}÷°êÀ˜¹â
-¹0\ºfk·N!hͲ•‹>üvóå©)÷^\½<Ùºš¹Îí<qÕ²¿ÃíZž:W¼†‹K6®<ûõ﵇žh•ýVccA§bšÖ`sžæbÎզ؁&§œs^D¶ {¨… nìU†s&r…![´•F~–]F?8˜ÛŒ’Ù tšmWÖŠU¹usŠÉ#Žjü'b{J¶W…ɝ¤TñEÆàw%9˜–¨Õ˜›–jˆ¨£ò1§ }S2Uå„K’&f‚…çIæ §›sâišmbö˜”i^Åœ•Ñí‰åmZÖ˜ä¢7Ž¸žž$ò9dbͨP¾ÈdžÄ)šå—#‚‰§¨^ÚÙèe~WYbÓ]
-Ô“òEê&Ž£Î©£¸ÖªëŒqê"›»uxŸ«?mèá`©²W'¤ÌBš«–ˆêY'´
-®·jŽËS||vG"ˆx¢Æ¨©¶Æyë®Ô. Ÿ™š8›¶7U)ž¤ÑBV#dÔ’‹o­Œæi®­ûRëè„ln/MsIÚ¦¡Ì.Ûoº
-ã
--Ä_’+ëd¿Âup_¸qXÚ˜³2ìo˜·>ûð¨¢Nlª¸¢æŠùYº1J÷ÑÕf¼âË2¿s§F%)ót®XúŠr
-7óJÆîG¡¡¼nº/ʈ.J4˜D‡<*¹gJ/ŠKÓ<¨Ñ.úlª§W;»h%n>ò³Ð<Ç
-5¸×BGXØ%-ë„6>ڤз²ý¬›oŸ+±®ŸBª0Ð¥‡&Þ5°bŠj*ÉpcívÛ%o®†Û‚K·œQˆ1wÍA¹{Fí–þŠ¾6¿C[MFè'O,X©Ln·ø~ªsô!Á߆¸l憃)x’@
-úÏг}{Ö¢&~™ºs#»wðñ
-lÙ6rùz³¶—Ïoó%[íyá#7ëè’"¾Ì½Ezûži>;úÎGÏ(Û@»áª&:ÓL«MF[]æ7‘
-åG{Œ;Õõt5¸èqî\ü3™›€–2ó
-NâÛؤÄÀ‡àÌ~~£Õ¢¸v>æApÐ\	—Áéá)€ç* æì´®’IB%Îï—š÷°ŒeÏZÞç~@ ö‰oÃaónHEÃ鉅dq,“ƒ *„ryÔ˜Ò…¯«½Ð…4D×CÞ°d0ô¥³¶®8¦)Œ¢dÉJYŽ*gçÂ5fp‰Ul£È<ÂÉñdáŠ$ô¸=…zÜ88½å±± „CéIPÂp‘rDœÅºö>1‘!Y–Èw4™³ð	R¡Cý7=ÿÕP†‚{žíFײ;JP7h‰%›X­Ü”
-kÌ%!—L‰=}LÔeqµ¼9^NjÕq,	2WÚÑ^¼•Û„ÉÉE®ñvŠ„"6ŸÌ&Ê3‘øóN¿"t?…í‘r?™>¥gµèM1p6lž(ýçË%BÏm
-shÅêIæxš´VƒèºŽ6ªT8t!DÙI~˜ç<KfOÁ °‘ºsÙúišŽPŒ½[ÖÜJ2²p£Ü QÉR•ÆðØdhAÏØñåtSc 8º3‡åi'Ífó6QƒbUž«O׉Á‡Bq`â'NÅ4?>õŠ¡âf4ÕC¬rµ\u¡A÷º×•fs›häŸ
-+
-»^õÍŽëáÞ[;¥Ó×ɵ
-j'±ºR£þì« Œ§A3ÏM|u’%ÚÊ~ØC—‘!xj“—²7@%2T›=m¨Vå	ÙÌŠò®µ¦gAéÙ„²/Ÿyò’S‹)³ƒÑ
-ª¼ÒßšÙÍŽ”\n%jÙ“öt”˜
-Ü]C:À©Ñ\[¢×` ·°#Šoµ¹â­1˜˜]£Úõ“”õ*^çëWôµ7}»mb|Ù×/ÅÅÔo¦Ã›éD–Ü|^hyµn6·K_Ü^W
-¸¥¬(9;ÊÍð¶Û”âÉv6Ú;¡SŒa‹QÏÇ3‹mb½xEé_3á_×®¾T(o£ÛÕ­2ø¾±Må>y¨¨Îlqb%Ö<ËÕåÎvºPü*{
-éK×óÀóuò<=ËoÅkí¸Às/;.
-Àê2ælÚ º)»DæŸ;çEf0#Í”}ïn!lÝ
-3ÈvÍïnï
-Oªý—|ŒÛ˜+É…^P!ôaQÖ*ÐŒÁŒèíÁUVC•aìâ(_w”†VAÙKù²û…c´@k›;a/ÐðòÛp
-Ø>‚¶É%ã´£9}×÷Æ–·—…0÷,g6»ø²oÖµ"ÓL†øþò6¯&1§U\ ™sFÂà “Ôhéaõv˜=q­i=ì<¿–¾™­µ•Å}ß<ƒÒÍx5­k=C«0ٯ餭ïKܬ63P\lÐJ7Ñx}3šu‰à^ëÎŽïg%e¼zögn†8§þâÍI´ØzâÝ´À{b=ûFIâÝmB!˜~0ú̯7‘ÕMeZsÚ¡x0Åç<g‡¿w×â%£7áæ7Wbâ•p3V÷gÍN{˜ã3Ô©]%â{×±Ófú!
-JÌá/÷ìÄíêr"3£½Ž²¶9»g¾²tßnî:•Á~â*ÓW
-ƈmœØ¶Þ­M𸧹”9Ù£qii	w7zºc^tö>Zë>/{”¹-l[§y†iºÏé
-FÇÆæ³–6‘¶ÍH`wòÛ¥Tm/HFKykžÐÇnî\Sœ·áV¹Í‹niaÏøí—x¯+/p%?XÓ6à{°×Å4̧—ÝŸKøˆÛ<î³qæ&Ê	÷ÚܶNq§½4°3ZÒ<ïGÀï!Jãu®7³œú+íFÿ°ç¡ «÷Ü£ëX…ƒ¶/îÄ7œÆ3w{Òu[ÓgŒ¶h<·^=lÌp¿v~É£~^ù)SFë±Zβ)I´dÚ¶T6v™‡xcwibGiŽ{*—€Õvb•Çh>—$WpD8_•| ·3‰ålÀ%FiUAWp™·s½·o0Wp[gxöo—æzÔåSêõfëÅp¡€ZwgqO@%×–V·!răþ±BÕcds’A[÷rÇi=7t&ƒ'hi—p(Ö`®çhVØuë–ur¦d½d¡¥ƒ¸â]¨$ †Q|';Bå{—Ekmèp÷0t÷@u÷ 
-éÖvrx}ÑW}–†}m§uèrR8gš–cîF®†²w!³Bå":7¨H½—u?‡bù{K¨„87]²×`xb3&Šq¶u?cÔ[uÇg¡£ˆv-’±ŠrãczîVfÔw‚\Çk»¥èg…ׇ3Hs3y(t¶sbg_—&TôgLЖ‚|œÒŽýuŽˆ—Š+Çkçhãø|;÷Yéø<·€vu˜„lY…3;]òŠx¢ƒq/âS†º³6!•y³×vRHtø'¦H±weVH3¦0øˆ<‡0—xmxI;:ôtÑ8‘åQ:¹~Ä´(\…TwÅrAŽ·¨g÷`yö^p v¹jZ—{êEŠê¶o æf4aÅÖS±ã…úWWMIá…?åÃKl@Ó€‰‡u¸Ö}“v€¹xxÙTyx{‹g—à[.} ¦DEQ‘ S´25	h,õ6½µn‘ÈkëæuÙpa‡}Ñwsžˆg,g…éæv¾7lŒtfˆdQ[†V8Y¸Qh7Z¸`)t—HtÜg¸”6׉qçzïu„:WŽÇm¡Ð‚W$Uƒ\‚‘A b»2GüÒ^\Ň;'—Úf„´¹”)g†çzØèk³7qæ×\ ÷IäFÁgzŸR|ÔñÌòMÊ'*¯¦–{sl(tõɏùt
-É”oÙ^…Ÿ¼˜j']ºiJ¼THè/Çz§…š òaSí”$ê6sè†x;'~X7iù5‚®v™“)€üÈxl8›¿¸U/4Enô/˜5íQ¥VXŠ(˜¥rà×K	s-i‰û(‚â9nàök¹¶—’Ék«·u¼Hg•WUƒG–¦Ã%¨¹0í	Iƒ„¢)6‚’‡ŽÙ¶™¡äpý q&OüXi8’ú4.¹‚Ææ`s5í8GÎxëY/Zã)”;Ïå?÷‰—8xŒgsý ~Ii#h›…‚û˜›æè‹N¦…VÇ•1%˜Ö#:§ùA*Ñ¢~†ÆHV¦ŸiÇ{lGdÞ盲g›Edžs	’x9•Rçpvkõ‡A uKsoˆ¨ž®á3_èw,š6ž6Œ³¸	ý ›'6¨ x„䖏r†v/—uöI—k	ƒm„ªÍ••ÊM®È~¦á%Á1b3˜]‰~µ&™
-ˆ¬•0¨çö‹ X›†‹˜eii7—'I›y{OØI+4=x9á–¯Á«Îr¬YP.¶}k—yýPl–g­Û‘hc7‹Y'—/w[ŸX®µ˜.E=Ö$;pµq³Â¯ô×dFz””EÒÀv'›})gPÖ\/DUxd§„m8¦êu›VGY†2Ãt‘4#"0šJ€È¯hƒ‡Ø’>qd0‰&7t!XÊˆêu+w¹]v—÷9›Ò¥„(8…	:£þ¥5y‡©Ì9AaÊŒ£:°'›_7~§BGt*9Š¾(
-_g‰ü7_FnKx¡Q¹†Ùµ/vmÌxV¯8§t°%Û«¢ÕŠb_ZÊpTÖs—Ȇ.És›VK˜–C×€‡×™x8qœ¶¦¿YŽ£¸ºÒ°nœÅTrãŠùtD"Ëc·!uÎi+ŸÄ¡ûÆ{‘˜„íZª‘ù‰ÒybD˜‹Žˆ’†·¹z• Htn6¼ÛXœ¡GôÀ±½‰q¦V.vâ“jÈJ¬RÈ{¯;ŸÉª ¸‡]«uv™‹»¡£³Õépz›h.%§Ó–t×c*Gk©qR«¾ú?ÚÕ™_véZµ9½Xœ»5¯šÈ¼‡×¾ï«‡Ù•ˆƒ:¨û»¿+›C2:½2o/º«t4˜Î˜;?‡vVùÁn6ªú™¦Ï§müf yºÊzß©¼ò;ÁJ‰lùÁÅÊ–áƒ	˜<†6>ŸgX ÛIz4âÂjpÄXU¬·ÂŠÃÞ§®0éÅÓ{¿…{¼‘©‡7›¸À[¬2œ_—·_Ç3…64P%’+.*°ŒZèJmUöu¨Ã‘x®Ç*~K“¸z[±$wzØ‘›y¸kl¾
-Hµ‡lÄ3¼°=ž
-35Þ5f|¶gk«ˆJaZ«œûÁ„Wllù’Á¿j8ªJŒ}%zÃY±ü¬›ÌÁƒëfÒÐÁáÂF<¨Piž
-3² Û ž1|Ñ¢ƒ´AO¨É3¬ŸnBµ-[¬–ŠÇÁëVµI‚!éÈQ™çŠ¬ynÌLs©·gffv·“§!¥®QXîé¿jVlÅüuF»RWÌ2ü¾ŒvRˆ¬Ï
-‚^×ΩÐÒ9Ã'æ·?3¨÷
-™v¯Wº»µ°,ŠDaÖ7…¨Â
-ºcÔš¸Å_›pÁÅ•x¾µœÄßü¾¼‡¼–'…jrzɷź	Të}¢úÁ÷ªòÜyE&7ˆ®ÞqÏ¡ÒÄH÷œuˆ¾‚\mfVĬ†Ž¸z
-ÍÍîŠz8¨%Ú€ÖÀ‚»3íÆÆ<”kCîtEÒˆ«ÞҝáÑ sfãÊDhwÁ ,ysv¾üu «ÄDè”@ŠÍió»v
-ýY ;¨Ù|ÄâG¬nLµèwñi+e8®>Å|¡V·J°Ð“¡¬„Œ½É(ÇÑÛs›	¿šIÐ\¢
-
-ƒ™“ØÓ÷ amÚašnÜš˜e)®ÌÌ´OVõ]S³–~+È\\•E|”\ÈhÚ,½›iÓ„­Úw=Éĺwiªz‘¸Ó06uºÁŽ}Ä1ˆƒ™ê•¥v©›½ÌNú%\KÑŽÍ	ÐqLÌ2ÈÓm(/XË“üÐÕ
-Ä.Ýv¶8› ¼gnÂiÓÓs½À
-ˆÅYb‡Â~ºÊc)®bVŒÜàÕùuŽiÄ€hRÝ6ÆX­cüך	ÎYÌlקÄ:¼²Öo„Sej¨¼
-ÞÁÉI‡xÂZs|¿½ÞÕŠWÉiF\ƦíÜš¬FÕ*ŒÑ:›]ç’²¬ÃÆÅK‰•P…‚à\ÁŽX¢&§®5;¾PÜX&žÁj2x.u$TŸ;ä]vÐãË[VÑäY}¼„ÕÔÉ‚6Ôæw.q–Û\{yû&Ãýܲþ¼ŒN·$ÒÌLÒ_â²6m¨ÉøÇ/GgèãƯÕ3¼…Úô)ØÔ­qÉsQv;Ÿ^8—gÛJkýf&gèÅŒWâWmmÍjÙ£%e^@«$´’ÇÁÎìŒÚ'&-U«
-w—º€‡t»¹=zy¨¿@wPø²‘e.ÌÓÏ †e¾*mª9á{±$–*¼µÓ\\ãŠ}ƒT	ÓN™À¶u°Igõi±kЪ«™Ál+ép«y 04X¨ÌÅU;iìçè!ëR¬ÇÍ‚6•ÀÎÃKÑÇ}¾tç‡ÇY+¨Ñ¡é•¢È–Q=i¾8¨oÄIyöâ‡6X5çYìÕÉi[6Ü3^ð-ì»W¼Àïlr¹ÙI®6‰þü¸xÒ¡»ˆ‹WéGŒ¢t~zÝÔ¡mx'_÷—2LŸD1ò'NRH¡WÌ×Õ+
-ÄŽjšÍ£#ÍŠAm€}Åœ”Ñ£ÅêžlßïÞqPÆfêÆæålú’Exüòbþ•QÄ‚rù€QŸ|s7u)gfpâi:½JÜÀí?Zœ¦$.ÒÀÄ9«68_­¤ÉìŠS#U¿ã‰³6!˜v|…¢7b'Ó[‡ãYŒ8tÈúˆuۏ¨ì&ª/˜¥vœ„µ(‡1wæÕRÌ¥3&q­S•ä:Ç{‹YH¦'o™eÄêõg*ä_<ˈ]«ãþ,Þcr7Ò¹:¬ÚÆ&ƒ}Ž`l='Šb6=ÎŽ…EPI½˜%;pZ¾¿pTœeg]HОvnvØ›ÆãÅ’CøBÄ ê0è‡Ñ§üTñhO^Ifµdœð=ÆMŽe#)›'$±%Þ`1@™ºk.JŒíì´yҤŽ	¬;0+@lw‚<™=Ê¥¤:=ÜÎjR[,£ê}®ÑN¨Ì¾²:nB ,®,ÖsÜJ-™Ìc¡ôœ†Wµ\N¢5(GݘŠE“ÛàÀá˜"4$ í&È6TDÝ;!:¹§€ˆã'£”¶jFó¸v•]`¦¢Rsâäù59ö˜†ÒY{U5ë,¼“•åˆ]­"S°ÎËÁ¸=e¨¼‰$ùUhíHó6„
-$bb¤êŝLÕ\ÔÉ3J°ig
-:
-Uf¸Ò] 2§pä ƒ. •1b\Èr>Ú¾E’ ƒO
-¡À! áSZ“¥å¤ó³»<Ñè2Ìo‘¨qçåêξh4é"#	€M0à
-ëzYBŽõ"kÝ`b+!Þ@Ð2…	BÀˆÈœ’¡£'ØF£	Z‰v¨;.TÛŒ«ZmyÔh‰jó¿êË‘JÝH—L;~Tª3j¡ÇÛ…oîÛ‰k)ÒØœ:à
-ÊœGžÕ
-¶ñÁ2߁«Æ¿"Ó[lÈ)Û5‹$yD=<üú
-J6ô¨V¹Žl¸/À‘IͳˆH¨¸PQ+8}JàÜŽ¥§jÎE±êyâí¹åÄÖó
-Ô„'\§!EªÂuLÃS…[†8ÈÏ6­žßÁ&Ç‹mL¢ffØ—]ÙJ„„é«Ðu¾Œ”W+2EÖ!›­±ônžù}Ÿñí.Þ“GëCN¥°˜¬¿°pw’aÐy!oæ.¨—¥u£RŽë‰&BÔ–’ó¶zª£lÇn׉ŸµMNE¾¬¹›-Ñ<æߣ“4¦Kò¢¢61ÀÄÂBa¶Ž1Ds+¾9Ü-K¯2‘G'bУ`ñ¤&&«T¡~ÞAÜ$©¶DóU¬bÎgã*B°µh	$xç!}T¬¨Mxs²á§h…ã4žŸ b|D)$á‡ÚÌ¥4Z30Žx‰Ïh*ÐÈ°óPwk²U>Ÿ’CðŸóy3Rõè8‘×[B4Χi
-.¢à‹1ƒ;ÇîÃá‘ñµŒÜâ¾9$ÀF85SÛÏÙ ­ HHÜ[ɹì"³
-?¬ãÄ;§ãtDÏ3!dqL;ñî+*Í´sõ²}[%Ò–0Q	Le¢,5N]y–{àÊ*ËQÑ°F½7IÕò0JTN,Ë°™,g+˜#²Ùdíl:ñBÖ6x—™k3÷GáüA¨ÕTŸƒAf-à,,f·ºtÄAô$•±W%é[¡M¼\a
-ÍŽå2 ðÛ4L£¦4ƒî/åAg®Û|™†¡ „
-¯'¨%Ï9b”¯	5O%jtG„x…Ž:‚™<3R bš:½§‘@Yã6$/ì<;NJʪËò¿t´è=‰˜¯E&½´M
-üpBmƒ3˜‚A$¢q‚¶J&¦>Feþ4ô—è±G,fмÚJÚ
-ž‡€Ü†­¢a¢I¿B‚’F)ñ8'œ›+Uqîø›ŸhœÍ2oÇ#jĪ€Io¹oqb¤pžª¡kTA;dFÎÈñžË 4@l„f'NÕÉóUÕVZ
-5xŸÓóLÅâ…t
-,ñ8Ñ×Âç‘?²ßì›ØŸHÔÑk˜èŠ‰CTGŽj[žH‘…y0Ⱦ¹ìÄ9ìX’
-ŽÀ
-y3kãôSƒk:.¬iwÅÀ±Z‡Aãm¥9—ÇþÜÊš\ÈxmÈ u6˜1X†e¦M|¤kH˜ÏˆSØ…“$Š–*NÑA¹Œ‚¡URÈ*.ã«š8 byÔ6¬ô ­GÑ|+¡Ò¨Q¨8&æD±Z‡ÅfQ¬$f_ˆLH•N¤9¦&[BùU´0 $¾ô™‡±(
-ç?¶2+½šªu'‘N"ßN‡t†e–þ&²Y/ô.b~ªkS¬¬²Y‡J³é\å‚ãE© -Êá_Ü Ãß-B•
-ã(­sà\äüÙc/
-4@üÌã4äb“U‚Úæ}®˜ùš~ns§©*–Å›da1íß̉ûÀ1WØr<óί¥«¯2BÇÏt‹zÂ*
-¸6Éd£˜²öÍQÑË B›h`OT/¬&¿­C`e™›y8çß(˜Î¢CÆbÄÀ®<—ƲB‹…Å»ØÆ«Ù7o…)ÏÁ;¦c¯èˆÒ‚¹ÍPBÏLJbý•PDÓèŽ	Œ#Xcþ]±Ê³6{Λ39ž/Å0ÊQ‘ŒX‰\5)A…©ÿAO™X\ŸRˆt	ã ¹BÝlŒ_‚Ôœž¦V‘x§½¡HëpL°S2°R÷a}§ì’¬­¤F[è²øv(±ßéI#Ã~Æ{¨:»å(©Ì•Ù=³¤;&=cyQj¤Ki4Ç6p’­óBš‡dG&¿b'šGä8óR*XEjÁkU^SwÞ%»ÐѬ³cj 9ñ.¤Èÿ \X‰2e`q_
-;®å2	›àIk~cw’ŒžY·ØLJy:lA®Á'u!#&{¸[ˈ[ê;ðuCh4¼«RAò5¸• TÇ€1®¹“nÓÛ 9{òx0(wT^³0ZHÔ,]³–ø=Ùã	û>¶HlºEoèG+¡®{’–O(#Î×ܹÚ?r
-Ž–5ÊH>™tN-¼Lo‰XI©g§ºÕÜ€‘¯™>‡Ð•q`¦Êa‰$ eÒ kÔi€–E›vô²õûT¹•ÎPžô@ãQ‹¬ˆ²h`³ÂQ6óçOo‘ÔI ÃKà–Ž6`xLG,¤ñêߌpÈ)¥MU¥ðO ÊÉGLó"µA{¼ðD­ËÈG7ÄœyCQ¤š¯îÂ,VË7iB˜4’pÇlYáXJš¹PÝgÄÜ…¬£;ã=%1!"“FIÙ¦Ž4ð,ö&pîÏËÈrÞãw›y„ôäO,*|jhºªx{â‹ÊRcJ4…Gs(˜%æ`Á1•Š¬£aR4¨Ð>’ÑJ>éM2Œ˜y.°“ÌSÒø9f1€{š$faZÔ	¹%8ܱ'ԐŒ[±!L`§ÝeúY>#8´Zsf®nOƒÊ«˜¢¿é-jï2b¹PíX
-{ú;úOƒ	ÊÚqĐoÇéh	‚š’ÀE#9Š B½Mµ!IŒ^Ù9E3ØBœ¹(Ü%VñŒéä"Õ’ÓK¹üŒÙ@D&…ö°†‹Ä÷óŠQœ]RtãE¹(–¡~ö]â,lÜyUøB9ôÈ>–é±*¤W"ï‰×ÐG	dÍ¥+W½ë¹a¿bIe»%N€Ré8V– Õuh=›*H![…&°î=.ÏâÄ«€HEÓÁNEñU/øc{x“y𺩛~£]È*Ý4••îA@Pö"iM¢¿Å§,F;êQ ià`™‹­–Ð1§¶¸P–™!ß"{˜L£Ö+ÛÉ<–ÍM¼-†#pÔ ÛŒEMªVâ{Ö\áep¡!Fìg™Ã‘±¸®\ìZZB‹ÊR3+î%‰¤Æ£ž¶[¹BÚ±¦"&·
-­x¦]F^œê{ ’^Î(D÷\ŠëÅÓ×`•SZÑpßµÙ7q©-Î$a-?í:.êOÐÖœh8Ñ\Õ0Œï¦þ@T”=€lû^B³T»†„
-æ`C0ËÅ…3Ck’„“e§…Èo+¶ù
-
-í;5"]͘„BËÅ÷ᆿ¶ý•å#;Ê‹f›¯k•Ô¬äÁ%(rØæá(NP„\èÄ4’…È.„
-Û@¬4
-º:7°ÃEZ¥Udü߁|ÜŠ`E.«PUîAlµ\UÍ+´“˜cä-nóÔà”.óLA&kÂ8“ÄEÐΞ’&‘ܹo‰‰ñɁåù_¬I㺘r+gÖ9¬÷D’Ú2	UXÞŸ!²dÉ€å\la8†¤
-¥xþSá£h\ÙQ{iAÐÚ0A
-üØÈ–…#ñV†~8ä–éašŸPÌNŒ°* ¼æqUe†Y¢és~N.Ül~)êÓÞ’¯TÁÂŽDZéDš|¦B„癹ˆlç.›ä´J«6I}j¥±l‘Àé&6ácó•+1®C#OõJN-Rí&(Ä”½$ˆð© µµóúF‘ghd–P©»Ë«ªWLa›•gRÏµ„‹^m
-=(áÙ§
-ETS
-d¹’úÞ0‡w¦Žà.gE%þ]N+ÌaÕ©Vx‚ ¶¢ÏAòŠ‹²#ÞŠäÖi´~æã©G÷R6=˜à6x+ِ6f„ÀŸ+GjfI 	'§ó{Ö^:´ôÚ~#8ÞJ¥,ŽS7I>…(Úö9¥x€W+µz÷2Äœ¹áÌþU¤Øë‹zv4C¬!s‚ ‚Êß¡ÊÀRu–DT=&‰#!PÈó<>ŠŠàҁÂ>ÛH%KÕ£â‘Y=¦kSÖ>DTŸÔÙrF–W¤¿ö÷töƒŸ³‰éãôŽòAR(aŽÎOÑ_ÚòœÎá”ÁT´v>JU#)§‹bž×ü+lñy;3H%p"F­IrY°2N%
-[µ%áf¬BNA®÷”d•4+5Dñ0;m*Ý7™1‰Ô"mÆãZ´eúB$EܵOjčÖEñ$'E‰í˜ePêµ&õ6,,ÄžÀ@ŒswÈܘi.®Ë\BäQAa	
-)…Ñ1ɶêâøݾHëØ©\H eãî•š´dÇŠr¨®ø+yCÄë&˜ÁgƒŽ˜VL; JÜ‚:k	V>ñû“á¨@x‚¸÷·jÔSýnÖÁÞbãˆÅ§æyCðXjÄ©(Úì#ä„€ƒ	kc¹\µF¦ WwBy©¤*9Ä83cÕÄüWïk‘DÈ~¯å’?—Ú¢ÆÄöγŠbŽYk|XP[91V“‘îIÆÀyŠÂzŽn	´j‹´g—ø’OÙPTÅÜcº&癚…½©Ø„p&LÈßôTPÝɐ§¸$ìÑGOhBs€X@îTZ6­TPúWHT3—OñòæU?ž@W×5$R*C1é,ØWtÞrB	QN(')5õ¬H¹7=,Ž[åZ*ˆÜʐ–\b Å¬ÉR±Œ™<Ü!÷GYag³ßÉH»ª~¤ÎÒĪf-V8[ÒoÀ'ÜUºÆSuBQú0Ã'ÂüÀ3¤¯FÊè»h–xú_ºC¢ …˜Û€²]+2¹RÅßÕ	™HSÞ…FÑ4=ͤòhe§w-—ÎÍà}G£Ô¥®é%uÆYê„Uýl½L.HBg\éù‡Œœ+îòa¢’e°,XÈk|ȼWÇp:f/ÿgüñå(X€QƒEpƼ4J€¸xSἉ8A&A _\_e!“úK<	ݱٗ§r=*¹å)%š¿²>j˦ƒrª¬îð®ÐC ie
-%`õ6N¼*ý²ö×IaÐcjòøŸóšKéȐ͈L*åËçõžrÁ5^§aa@*9—•mQëP’sòjš¬‰(ت›ɯb•&ÏP…)+ŒMçt,´£X¡Èµw؝Š¦n¯ÙR´›GEߎD¦Å2°}]‹-I“ óIøÒÕª[gNg)Â8ga%±ÅÑ¡9ÝU–“kà	ÆÒk–¬Ð¢Í2ËOqY.ˆž76Ô²\W7,•h¹7­Ž·–8HîüÑEöãÆ…Kdz}.£dÚ#çëÜ%jN5éNI¨Z'æß)4ÒÈML-‰˜M«ÝÍ“&½ªÔF©±cœÊÎÛ¾†â`ÒR 
-8«À½ÉéǍ3ÿâp¶­#}ƒ#ž³Koiß^—‡|”æ‹f}Kk6“䐷lHEE´íÕê…äàK×Ûå\`BNՍb- ÎðÉëƶúJ䐼Cèy£`¤4Û¸!”{œ($6’ó.×”FÛE-—ù@‹ÀàÜÅS¤xÏMû¢yrŒrcSƒUœ!z3¹gØVŽUtعhÎêÞ	$$d¸è“þâP¸f—œÓÓ€c-U˜³ÙXp<µ{›”œÏNU9-U"4¬l“V‘á\Kàà?ŒM!¨€añH!œ¨¿¼˜¬™q¾2—Üc÷1&Õnæ<Óæ^>°`g)2tØ‹èT-ÙÏ‚7v*ZÖ?#Mt¢Å}¢w¼‡Û¸%yL±ŠßÍ)ù“U'°F²Œ‰[.´ŸñW›Ì!u|SÛ|.µ³Jë„Y5«ùñä€{ÐÇóC‚a¢ë$!¡ŸUØùšÛ7GÛñ6‘kfŸÂ°ÝI¥§T'"9¦ÝÿqÒ¥ë(e¨ ³l‡Å´vÀÆãQcþEıXŽè¢•»ŠàBÕÂQýèI·›,}0k·S Ž<ÉË“u6‰JokICç««µC½ð5Gk]cbHâ(ƒ0§¹UZ÷J
-PŸc—.篓ð5ìúsÒÒ#H9SŒ3j%k+ˆÜ[Ðe"TÇ|ÝŠIt³Í]ø¡sÉHâk®A«kž¸Ž£]Æ0e’Imô»UH¬<g•ÒM6ëK>+^ýê;3"i®Ø'c4˜ØMÖ›th˜A6—M‚xš6«¼rtb훩:O*cXžYÝa +Ô³˜ëš`lì^a¢»2,_Œ•ÉŒ÷ÛV!.QKЭaCÉ׸!~ÎސérA6ç†DÓ›Ì;7oÉ1´È~/i4SÂl4ŽX%j7ö² º;©ÆuL€Ë-éƒ4Š‚ƒ ÖÒZ0[92N|”d0QuJ¢VzG#cMâܐP£UúšWg1õ2!髁ÊÃgHPŸ=P,5²:Ù$.U™ÇÆZ'æ’ÀN¼1± 14Oã‹U6 ”„©»ãÑôèá¢qƒó"ššçA#
-=„Ž V®âÜE®IíÔŒ…n'k&ïŠUc+‹Ã«EÇ@ð-:yŒRNñ·:®ux®0·õ]çÑ´´ž†vºO!secÚ¤¶X›&˜!£ ãÚ0O`AÍfyÚ1k³
-²Y·{¸[¡4P“K‹¥åy
-â¾eÏ‚-ÁÛ&·½µQSÅÈA??¿ÇFîú˧¨"±1*ü ÚÓ»nñt«ÁK0ï[󠚇³PM.á<Oi/¹…”Þ¢¯{˜¬fæ½[¬ŒB¡Ç×¼¢-"œ
-´~b¶qqd_Õœ`•¾}0’YÅC^ðÜm¯SŽ¶¢™ƒ¶È“â2ŠN4âNR/{áA©
-¹ñFc¶Î¡ÔŠ)P­ZÇm§èQ ñgÕ“OËsžß¦Wu"¨ÃÉô£Z“¼äVšÄŽA ÃPÑ+Ö_­oæË5N«ë™Îˆ§“€ôŠ‹úieí˜}‰uY,Rb¦óP7´ªi's6J=fÚE*ß¾(ˆáºš
-­ØÙân
-ðCíY4åPáV6\OÔªt:!ÅÝÁ¯
-€f=b6ÿ8ê>AphÑšElñ„3É¡Œ€ËRó*³ÜV$U•ˆF´TÑ.…BV¹v»d́~zöå¹ð˜7éqYÿüÏþÝ&‹ï °¤á$¶§8ìÜ„õ´8Y ÑmK•Ù}¹Mó‘·½¥ÏÜcv”%Ü?G„ÌìŽò’PÛñUZ†7k.•¸?Þ!Œ’w…'Ì€+0¦ÒÑ"c£0q¢ÞîcóyÛ!çÌó´Ü£n’HÑ.€” x0c²¦•fuåIJr>1˜\w™u'|q4EbPµ¨ªí’s‚äÍêb†*å¨pÕ¯ÁežÊJ§Ðë§iN®hÓA˜Þc"f˜×С¶è¥HÜ&á@äÍÕöŽû¢ƒ ™¼‚a"MkyÔW–G…3Oå&2Ç&+)j
-Õá~Ï> & j-²…ª$µzËKA‹µ‘Ñ€SJq˜9™[P¯|m<ñæÙ§†šü9šÌ…DœB«'³ÔÚíV¸ï…î½tšÏ*Hm¹´!(à0v¬ý‚H¢V”o#j0Ü€-@àÒ:
-@‡ú,§ì÷fDUG>Õ—S©ãtæo!½Ô6î‘šoꆽù{ÄÖ-z$*(§G&VÛŽ!uX[
-ѯç³3
-©³¡gê
-gh5:bÝÔ[ÂtõrVF­Âe•±ò%Ø‘Ú=r®Ýœ#h‘²Ë~£óº<pw©ÑôœŽE°Ìüxþ!Õ7¸I‚ãÇœÞâtà–ËsÁÎ9ud³Âƒ˜\@IóÉÓÈÃ$T‡lÐ-9@®ÓYÃ$xº¦Bï y!"w4²Kæƒl(ξÝe„tth^çêÞ7ðTã…©#¦,Y}¦ŒY)‡Ùè
-ñ˜?ÖGEf`<?ÖúÂ\Ú+a!Œvp†!8uE.%ºŠ²Kë€KªBh9k§ÍÊ#¾¸¾ÞÓ¾ysl:,à`8k“u™ahØÑüDÛl §Ü–LÚ¥ŽÐö‰¾X”‰´4t]1·	i:ùh‰º¸1–ÑwU´RÅ´R«j¼”ÇÅ°ÍÍCsoë:F	JÞpî4‰r¶Œœœ¥—â>ÿ›ùó脝s/ØåRª	@LÀIÅí:Öc"¶GìÀ½1Iw=OŽíÚ–ªÔIYIšn—‡ªÒªqâþ•&r€”˜ÓûéI‰«G-H$ñR­úp
-À؁srXy¨d£óØZn¼Dp1V‡ìZ
-ÒR7]G¼Š[§uøÍSÌ€FÊÕÇÕb±»ÓäMU-Œy²ðD"Š‘6cèT~dã‚M$ÆÑbÒlyX±aõ;K” ِf§„epmø\–ÖѲ¬$h‡6£KLF«¨gNˆ
-UÙ´¹çßc3ûà€ƒÊ‡÷±,Üdu{ÚYù–%´T°Ž%s~ñGŸ[Oço88rFK³Æ:äË¢]ÍG=ÉÈrD½€f\W>ü;Íxs¦RÊVÆÔ/ˆ_3t~-Bé"N|x'Ǥ»ÅiFÌV´§¹{_”ÔLðS·NæX‘óDK]N?ÓÓ=VÊÎP7Q ‹&È~EMü„Ù¨ÁÈ4$)/æ¥6#VKëÝ@‚ÃèàdÊׇ£®DCg´ÆÓ:2Ptq„¹Ìþ“üp= ‘õƒ4=Ë›"TÙ”^þƵXÝUÈóÀœ^ØY¤O©á[*Tæ,M
-TÁsä{¢€1Œ†Š#}E¤]S~‰
-ÁLE%%ÙQXL£ãœ}B‡Á„
-âiP ³s	qyfDÙjŽ_¨WÆ5+¿‘® J:G/gº˜I=ÏmVy…„ìCteªM
-u+ ƒ•ð¤¼G
-%W©Ù6gGtÉPPŠðqÏð8žS
-eþœCÓ́Ö-ÃÁ&Ôñ_a˜J·aaLÙˆÛ1Ô@*‡»u;ôYh08-3óE9Å<H[à߃">Ø	ÊÛru0CÊZòÙ|XÄTÓh¤gæÓÊ–FÉQSÇCÆFQûôÎÑpç‚P#Ÿ™lç,ð|.èQ‘“1JÈ	¨Ç´(ä{fF•Q^Í_U÷,6E×ÀÄU
-ê âÿM~ª½ðm%CĆi™A^øÊlp L+“C\|:Ü­Rjð•„uDôíkò”ûHJ.ÈÅG¼)E¶Ðs7°Ñ?S ÛqAU:
-H%   ðÆ*µ
-ö<þ›µ4,Ý<ÒƒÔ’P³™÷ÖPa5˜¨@]!YÚcÉøBt±€ ©Ð4ØZ3 ±áf4J¢€FVÙSqÚS7ý(\éÇó?4cDW²ô­0'¼áÿ
-ZKËê¥Ä4BÞÈEhý]Ö=‡y­.ÒЉÁü±G„À0š¦ãpl-–çÄß1WÝ®²OÒòpÁ•^CÉò@¨q‰dQTGeõÏŒ1ÆÌ6xÆtN†D÷6‚MÁŸ_SÛ<%„dCD]E}€%˜UƒCt‘¶Y?6‘ƒþ…K;;òmmNúŽ¥cmìÇL!Ñ(¹KEzRwÈKñÇ–HˆÂê´é8Oʁ`sÍPÛR8ÕgTDWø"q-hPµ¡	BHÈЗx&(ÑIŤ™C™QcB­Ä<(3Õð7ü[¹ËÕ¸,h@ÑiV½aòÖVB’:R„Š“ü)6SȦÇGn{á?¸A”éÃMÌ$-ìãÀ%?f,'’ANÅEgL}¦šúå+%—24üU1N³6‘p†¢¤Qýx³A´>—Á½´0YRÚ
-ZÙ]†›õisB<RϨ-@.áYkIi6µX"¥Ö±e-­…@µÔ.Íl2ÙnPÐi”R±QÖÈ'ô¤™yá°u˜e®Tøâ)<#b"™¨|ñI¥Ñ»@¨+„Šésݤiˆ˲À$_^
-˜âr`8؉Õü©i/”¤bì9gZq¹
-ZÊG‹r*¬fNÚâÞT‹ˇ¬^‰ÑRiÓPc%ÕDŽ’b“–ÐLÛWAºµ\ԝ1µ|Uµ9涽-| 7W­¥]õ"ä2fØTžš©6mJ
-GºôYÔF»K֔Ŭ;sF?´²I¨Œe8õÅŒ?W7¦	zj½…Ôâ~¡= Y¥ûœ}>¢™sâ	Š<Ù
-UF9hD“´y`
-§‰´çIé˸òiPSµøYy®Ì÷qUL[VE‚eŸ­>ÖVgƒ¨B¯H¬@ÕZüG§DÜ^§̐†áóÙUfK›±i4XÙVQÊ4jI¾€1¶vw‡,´FLÉàË<]ÿŒè™ñ‰p—n5Ô]H/²;çÐUN'³¢ùYÎ]ce'øWEòç,Jb£à€Ø‹…
-’”C`Ði å	ƒ½‡Zm+aj$~<Íï·%@✠ÑTcXZpÃ5L	Ézo|ˆI#d€™X|’îDTü`%VI@À7(HíCqd‰j@ƒ¨@$̈6žÕ	¥Ø-ø|‰…O‡r*t!à4ÿ¸…§Å!äVʍ+ËåxËÜÚ4hWwÁ¬gUÓƒȇ™EåÑ}ƒd™6ä#F˜3–`Ø#P;ŽpvAÐîD!áõ}ÙYõÖ@`94kÆR3€R™4-jQºÂ0ºôˆ€0%ÌIƒ 9 at 0*P4ÅÌtƒgDï²Ñ.¸^`ƒüØ%Qª}Nÿò@Š‘ˆ‚dúéÍ0‘‡Ý{£Âû‘£«Äìi!3ÙEuÕ&à.—_ØjÅçp'ùOï[Að]ô§E‘¬Xn£,Á.•wžÐ¸°#†;ò•aR×$-\cŒ£~p4ó£ý¨žXS …gÄXF†Ö|¶Óœ9VEƒ¨<ÒCA "\ Ýë B‚SåæÄP⁐qypX¾Peu¥×ÂH“Ïm IڐÀÏ¢úèfÆËA8yMðØEDS„±!	Pà1zD\Í¢i”ýK‘'W“E¼)'zäÑ‘­1SiAÛw|
-ÞÎW'1ļ‡¥i-”Û)
-ôÌù£ˆàOÇÒhH§ÅÐÉý“6¤PV°UVÖî£c]K®Òãüt`Ú,ÂzS”í
-Ê› w$'â²Ð¹9zq˜S}h˜@„щ(ÐaP€p¶$öXdT“íd;éB X(¤qÂ}av¤8Öñ"|L_V%Ž·Â¥òmáqƒÝºfäSïKõ(m a@ƒ,!‘ÁoƒWáP!Lî#=cѝŠÁÁöb² ‡½Xº0Ýe•Òö84%>“cÄ8HÎGHƒÇ•BP%±Bd•5H²Áù)–ÏP’4ɵWO¹MŽ$H·6U•}V@÷
-«ÓÓ,”éwÐ}—D‘5|cR)´w½JÏø…W–•æÓ—ü%ZÔáý4(ÄWÀUÁJÁø’±Õ0ÅŒkÔZÕ	ôÐA0JöAÀ6B^AœXUX»£` ªEäèAg%ˆCewZë…E@B)‰SV“õ›+ƒyi?‡¾€ìE)Ì)F¢P‰x÷Š¨?ð(½Çæ°¢yó†Lb‘ÖåfYˆp?ƒú¢¼IxÛR!HÙè–ßåi ^2’uÂ65ÃÜxýÅÁ@ø@@&%ö„RU•k¥")u(’÷e˜8JS+Û\ÉiÞ›ê' xRáѲ-–Q™^"í Ÿõ.i˜Òš@p˜ðåB ÖA^ªÒ"Â	WÈBp@ÎŽ5YAFm,b´"µ `Ž·’cá†[™ÅVò¶p˜aŠ"éíô ¯à ÿÝE^	Dm–£Qmd|}%þßOõbþ£žO©?ðm“ËÏ Fê–MfC`U¡WBGËõ\(ÌŒ÷öeblSs£ÃP<1W9Zú’xWŒ‚”¥_ˆ¸Ça
-
-rQµ8#ˆùT6¬eñÑhš.“´€PÅ’xÒ0dUjâõØÐ’X%=‰E¹`õÛhkŠæE°[Ê”ŠƒFïM˜ÁƒŸy†¸>Õ•ÿW_â$ÆB2šes at fÌŒ¡UAEM¬˜àCFaªC#÷«Lh·ÌqkW@ñ¡kø`Ix;•vNÞ’óCh<æd\Eù/Ì 2.4›Á€YÝ(Aí¦-5(»æ—£L
-/ŽùL— ºI
-5|ùTö™%¡ÙdR+C·g†
-ß_j‚!	æwù_5BÁ›‘D|eEX4q±Äf™]E–—Ægk.³(	Bîç¨Ùi®;E©L¬¡LQ‡ãàUæAöoµ†Ì0pF›¸&¨”I–ÁÂ(TŸÙ…•¿w¹BU(¢Wj‚~N:y=Vœ6¤4&1qUá	HP5ùkVMÁýÃ?¤,§þÈtV“É+´PBu¦e´X†ÉE M~š-¿ùuæšB¤»•U’9'	BÑ/ÁÌùvB›$Bµg¢/zgBàXŠçÞi”^t¦tØ,ž"‹U¹¬M&ã)yNž”gåiy^ž˜gæIŒVšgçéy~ž gè)zŽž¤géizžž¨gê©z®ž9qÅz¾ž°gì){Ξ´gíi{Þž¸gî©{îžC
\ No newline at end of file

Copied: packages/libhdf4/trunk/hdf/util/testfiles/head.r8.gz (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.gz)
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/hdf/util/testutil.sh
===================================================================
--- packages/libhdf4/trunk/hdf/util/testutil.sh	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/testutil.sh	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,424 +0,0 @@
-#!/bin/sh 
-# HDF Utilities Test script
-# Usage: testutil.sh [machine-type]
-
-machinetype="$1"
-
-# Check if target machine supports 32 bits datatype.
-# "true" is TRUE; "" means FALSE.
-case $machinetype in
-    *unicos*) has32="";;
-    *) has32="true";;
-esac
-
-# initialize errors variable
-errors=0
-haserr=0
-
-# setup hdfed command which is used often
-HDFED='./hdfed'
-HDFEDCMD="$HDFED -batch"		# use -batch mode for no prompt
-SED="sed -e /library/,/String/d"  # filter out the library version
-
-echo ""
-echo "=============================="
-echo "HDF Utilities tests started"
-echo "=============================="
-
-# gif2hdf and hdf2gif 
-if [ -f gif2hdf -a -f hdf2gif ]; then
-echo "** Testing gif2hdf and hdf2gif  ***"
-/bin/rm -r gif_hdf_temp
-/bin/mkdir gif_hdf_temp
-./hdf2gif testfiles/skull.hdf  gif_hdf_temp/skull.gif
-./gif2hdf testfiles/SunWheel.gif  gif_hdf_temp/SunWheel.hdf
-./gif2hdf testfiles/bttrfly.gif  gif_hdf_temp/bttrfly.hdf
-else
-echo "** hdf2gif or gif2hdf is not available ***"
-fi
-
-  echo " *********************** NOTE ****************************"
-  echo " Use WEB Browser and JHV to compare "
-  echo " testfiles/SunWheel.gif and testfiles/bttrfly.gif "
-  echo " with gif_hdf_temp/SunWheel.hdf and gif_hdf_temp/bttrfly.hdf"
-  echo " "
-  echo " Use JHV  and WEB Browser to compare "
-  echo " testfiles/skull.hdf and gif_hdf_temp/skull.gif"
-  echo " ********************* END NOTE **************************"
-  echo ""
-  errors=0
-
-# hdf24to8
-if [ -f hdf24to8 -a -f hdftor8 ]; then
-echo "** Testing hdf24to8  ***"
-/bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
-cp testfiles/head.r24.Z testfiles/head.r8.Z .
-uncompress head.r24.Z head.r8.Z
-./hdf24to8 head.r24 head8.hdf
-./hdftor8 head8.hdf
-cmp img001-263.328 head.r8 || errors=1
-/bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
-else
-echo "** hdf24to8 or hdftor8 is not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " hdf24to8 might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo " /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001"
-  echo " cp testfiles/head.r24.Z testfiles/head.r8.Z . "
-  echo " uncompress head.r24.Z head.r8.Z "
-  echo " ./hdf24to8 head.r24 head8.hdf "
-  echo " ./hdftor8 head8.hdf "
-  echo " cmp img001-263.328 head.r8 " 
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-# hdfed
-if [ -f $HDFED ]; then
-echo "** Testing hdfed  ***"
-/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
-cp testfiles/storm110.hdf testfiles/ntcheck.hdf .
-$HDFEDCMD < hdfed.input1 > hdfed.tmp 2>&1
-diff hdfed.tmp hdfed.out1 || errors=1
-/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
-else
-echo "** hdfed not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-   echo " ********* NOTE ***************"
-   echo " hdfed might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-   echo " please run the following by hand to verify "
-   echo " "
-   echo "/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp "
-   echo "cp testfiles/storm110.hdf testfiles/ntcheck.hdf . "
-   echo "$HDFEDCMD < hdfed.input1 >& hdfed.tmp "
-   echo "diff hdfed.tmp hdfed.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# ristosds
-if [ -f ristosds -a -f $HDFED ]; then
-echo "** Testing ristosds  ***"
-/bin/rm -f storm*.hdf hdfed.tmp1
-cp testfiles/storm110.hdf testfiles/storm120.hdf testfiles/storm130.hdf .
-./ristosds storm*.hdf -o storm.hdf > /dev/null 2>&1
-$HDFEDCMD < ristosds.input1 > hdfed.tmp1 2>&1
-diff  hdfed.tmp1 ristosds.out1 || errors=1
-/bin/rm -f storm*.hdf hdfed.tmp1
-else
-echo "** ristosds or hdfed not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " ristosds might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo " /bin/rm -f storm*.hdf hdfed.tmp1 "
-  echo " cp testfiles/storm110.hdf testfiles/storm120.hdf testfiles/storm130.hdf . "
-  echo "./ristosds storm*.hdf -o storm.hdf "
-  echo "$HDFEDCMD < ristosds.input1 >& hdfed.tmp1 "
-  echo " diff  hdfed.tmp1 ristosds.out1"
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-
-#hdfpack
-if [ -f hdfpack -a -f hdfls ]; then
-echo "** Testing hdfpack  ***"
-/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
-cp testfiles/test.hdf .
-./hdfpack test.hdf test.pck
-./hdfpack -b test.hdf test.blk
-(./hdfls test.hdf | $SED ) > hdfls.tmp1 2>&1
-(./hdfls test.pck | $SED ) >> hdfls.tmp1 2>&1
-diff  hdfls.tmp1 hdfpack.out1 || errors=1
-/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
-else
-echo "** hdfpack or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-    echo " ********* NOTE ***************"
-    echo " hdfpack might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1 "
-    echo " cp testfiles/test.hdf . "
-    echo "./hdfpack test.hdf test.pck "
-    echo "./hdfpack -b test.hdf test.blk "
-    echo "(./hdfls test.hdf | $SED ) >& hdfls.tmp1"
-    echo "(./hdfls test.pck | $SED ) >>& hdfls.tmp1"
-    echo " diff hdfls.tmp1 hdfpack.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-    errors=0
-fi
-
-#hdftopal/paltohdf
-if [ -f  hdftopal -a -f paltohdf ]; then
-echo "** Testing hdftopal/paltohdf  ***"
-/bin/rm -f palette.* 
-cp testfiles/palette.raw .
-./paltohdf palette.raw palette.hdf
-./hdftopal palette.hdf palette.raw.new
-cmp palette.raw palette.raw.new || errors=1
-/bin/rm -f palette.* 
-else
-echo "** hdftopal or paltohdf not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " hdftopal or paltohdf might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo " /bin/rm -f palette.* "
-    echo " cp testfiles/palette.raw . "
-    echo "./paltohdf palette.raw palette.hdf "
-    echo "./hdftopal palette.hdf palette.raw.new "
-    echo "cmp palette.raw palette.raw.new "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# r8tohdf/hdftor8
-if [ -f r8tohdf -a -f hdftor8 -a -f hdfls ]; then
-echo "** Testing r8tohdf/hdftor8  ***"
-/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
-cp testfiles/storm*.raw testfiles/palette.raw .
-./r8tohdf 57 57 storm.hdf storm*.raw
-./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
-./hdftor8 storm.hdf
-(./hdfls -l storm.hdf | $SED) > hdfls.tmp2 2>&1
-diff  hdfls.tmp2 hdftor8.out1 || errors=1
-cmp img001-057.057  storm110.raw || errors=1
-cmp img002-057.057  storm120.raw || errors=1
-cmp img003-057.057  storm130.raw || errors=1
-cmp img004-057.057  storm140.raw || errors=1
-/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
-else
-echo "** r8tohdf, hdftor8 or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " r8tohdf or hdftor8 might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005 "
-    echo "cp testfiles/storm*.raw testfiles/palette.raw . "
-    echo "./r8tohdf 57 57 storm.hdf storm*.raw "
-    echo "./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw "
-    echo "./hdftor8 storm.hdf "
-    echo "(./hdfls -l storm.hdf | $SED) >& hdfls.tmp2 "
-    echo " diff hdfls.tmp2 hdftor8.out1 "
-    echo "cmp img001-057.057  storm110.raw "
-    echo "cmp img002-057.057  storm120.raw "
-    echo "cmp img003-057.057  storm130.raw "
-    echo "cmp img004-057.057  storm140.raw "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# hdfcomp
-if [ -f  hdfcomp -a -f hdfls ]; then
-echo "** Testing hdfcomp  ***"
-/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
-cp testfiles/storm*.hdf .
-./hdfcomp allstorms.hdf storm*.hdf
-./hdfcomp allcomp.hdf -c storm*.hdf
-(./hdfls -l allstorms.hdf | $SED) > hdfls.tmp3 2>&1
-(./hdfls -l allcomp.hdf | $SED) >> hdfls.tmp3 2>&1
-diff  hdfls.tmp3 hdfcomp.out1 || errors=1
-/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
-else
-echo "** hdfcomp or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " hdfcomp might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3 "
-    echo "cp testfiles/storm*.hdf . "
-    echo "./hdfcomp allstorms.hdf storm*.hdf "
-    echo "./hdfcomp allcomp.hdf -c storm*.hdf "
-    echo "(./hdfls -l allstorms.hdf | $SED) >& hdfls.tmp3 "
-    echo "(./hdfls -l allcomp.hdf | $SED) >>& hdfls.tmp3 "
-    echo "diff hdfls.tmp3 hdfcomp.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-#jpeg2hdf/hdf2jpeg
-if [ -f jpeg2hdf -a -f hdf2jpeg -a -f hdfls ]; then
-echo "** Testing jpeg2hdf/hdf2jpeg  ***"
-/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
-cp testfiles/jpeg_img.jpg .
-./jpeg2hdf jpeg_img.jpg jpeg.hdf
-./hdf2jpeg jpeg.hdf jpeg2.jpg
-(./hdfls -l jpeg.hdf | $SED) > hdfls.tmp4 2>&1
-diff  hdfls.tmp4 jpeg2hdf.out1 || errors=1
-cmp jpeg_img.jpg jpeg2.jpg || errors=1
-/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
-else
-echo "** jpeg2hdf, hdf2jpeg or hdfls  not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " jpeg2hdf or hdf2jpeg might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4 "
-    echo "cp testfiles/jpeg_img.jpg . "
-    echo "./jpeg2hdf jpeg_img.jpg jpeg.hdf "
-    echo "./hdf2jpeg jpeg.hdf jpeg2.jpg "
-    echo "(./hdfls -l jpeg.hdf | $SED) >& hdfls.tmp4 "
-    echo "diff hdfls.tmp4 jpeg2hdf.out1 "
-    echo "cmp jpeg_img.jpg jpeg2.jpg "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# fp2hdf
-if [ -f fp2hdf -a -f hdfls -a -f $HDFED ]; then
-echo "** Testing fp2hdf  ***"
-if [ ! "$has32" ]; then
-    echo "    $machinetype does not support float32."
-    echo "    float32 tests skipped."
-fi
-
-/bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
-./fptest
-./fp2hdf ctxtr2 -o ctxtr2.hdf
-./fp2hdf ctxtr3 -o ctxtr3.hdf
-if [ "$has32" ]; then
-./fp2hdf cb32r2 -o cb32r2.hdf
-./fp2hdf cb32r3 -o cb32r3.hdf
-fi
-./fp2hdf cb64r2 -o cb64r2.hdf
-./fp2hdf cb64r3 -o cb64r3.hdf
-./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
-./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
-(./hdfls -l ctxtr2.hdf | $SED) > hdfls.tmp5 2>&1
-(./hdfls -l ctxtr3.hdf | $SED) >> hdfls.tmp5 2>&1
-if [ "$has32" ]; then
-(./hdfls -l cb32r2.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb32r3.hdf | $SED) >> hdfls.tmp5 2>&1
-fi
-(./hdfls -l cb64r2.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb64r3.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l ctxtr2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb64r2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
-if [ "$has32" ]; then
-    diff  hdfls.tmp5 fp2hdf.out1 || errors=1
-    $HDFEDCMD < fp2hdf.input1 > hdfed.tmp6 2>&1
-    diff  hdfed.tmp6 fp2hdf.out2 || errors=1
-else
-    diff  hdfls.tmp5 fp2hdf.out1-32 || errors=1
-    $HDFEDCMD < fp2hdf.input1-32 > hdfed.tmp6 2>&1
-    diff  hdfed.tmp6 fp2hdf.out2-32 || errors=1
-fi
-/bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
-else
-echo "** fp2hdf, hdfed or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " fp2hdf might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo "  /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6"
-  echo " ./fptest "
-  echo " ./fp2hdf ctxtr2 -o ctxtr2.hdf "
-  echo " ./fp2hdf ctxtr3 -o ctxtr3.hdf "
-  if [ "$has32" ]; then
-  echo " ./fp2hdf cb32r2 -o cb32r2.hdf "
-  echo " ./fp2hdf cb32r3 -o cb32r3.hdf "
-  fi
-  echo " ./fp2hdf cb64r2 -o cb64r2.hdf "
-  echo " ./fp2hdf cb64r3 -o cb64r3.hdf "
-  echo " ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50 "
-  echo " ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f "
-  echo "( ./hdfls -l ctxtr2.hdf | $SED) >&  hdfls.tmp5 "
-  echo "( ./hdfls -l ctxtr3.hdf | $SED) >>& hdfls.tmp5 "
-  if [ "$has32" ]; then
-  echo "( ./hdfls -l cb32r2.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb32r3.hdf | $SED) >>& hdfls.tmp5 "
-  fi
-  echo "( ./hdfls -l cb64r2.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb64r3.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l ctxtr2_ris.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb64r2_ris.hdf | $SED) >>& hdfls.tmp5 "
-  if [ "$has32" ]; then
-  echo " diff hdfls.tmp5 fp2hdf.out1 "
-  echo " $HDFEDCMD < fp2hdf.input1 >& hdfed.tmp6 "
-  echo " diff hdfed.tmp6 fp2hdf.out2 "
-  else
-  echo " diff hdfls.tmp5 fp2hdf.out1-32 "
-  echo " $HDFEDCMD < fp2hdf.input1-32 >& hdfed.tmp6 "
-  echo " diff hdfed.tmp6 fp2hdf.out2-32 "
-  fi
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-#
-# Check errors result
-if [ $haserr -eq 0 ]; then
-    echo "=============================="
-    echo "HDF Utilities tests passed."
-    echo "=============================="
-else
-    echo "**************************************"
-    echo "HDF Utilities tests encountered errors"
-    echo "**************************************"
-fi
-echo ""
-exit 0

Copied: packages/libhdf4/trunk/hdf/util/testutil.sh.in (from rev 832, packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in)
===================================================================
--- packages/libhdf4/trunk/hdf/util/testutil.sh.in	                        (rev 0)
+++ packages/libhdf4/trunk/hdf/util/testutil.sh.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,434 @@
+#!/bin/sh 
+# HDF Utilities Test script
+# Usage: testutil.sh [machine-type]
+
+srcdir=@srcdir@
+
+machinetype="$1"
+
+# Check if target machine supports 32 bits datatype.
+# "true" is TRUE; "" means FALSE.
+case $machinetype in
+    *unicos*) has32="";;
+    *) has32="true";;
+esac
+
+# initialize errors variable
+errors=0
+haserr=0
+
+# setup hdfed command which is used often
+HDFED='./hdfed'
+HDFEDCMD="$HDFED -batch"		# use -batch mode for no prompt
+SED="sed -e /library/,/String/d"  # filter out the library version
+
+echo ""
+echo "=============================="
+echo "HDF Utilities tests started"
+echo "=============================="
+
+# gif2hdf and hdf2gif 
+if [ -f gif2hdf -a -f hdf2gif ]; then
+  echo "** Testing gif2hdf and hdf2gif  ***"
+  /bin/rm -rf gif_hdf_temp
+  /bin/mkdir gif_hdf_temp
+  ./hdf2gif $srcdir/testfiles/skull.hdf  gif_hdf_temp/skull.gif
+  ./gif2hdf $srcdir/testfiles/SunWheel.gif  gif_hdf_temp/SunWheel.hdf
+  ./gif2hdf $srcdir/testfiles/bttrfly.gif  gif_hdf_temp/bttrfly.hdf
+else
+  echo "** hdf2gif or gif2hdf is not available ***";
+fi
+
+echo " *********************** NOTE ****************************"
+echo " Use WEB Browser and JHV to compare "
+echo " $srcdir/testfiles/SunWheel.gif and $srcdir/testfiles/bttrfly.gif "
+echo " with gif_hdf_temp/SunWheel.hdf and gif_hdf_temp/bttrfly.hdf"
+echo " "
+echo " Use JHV  and WEB Browser to compare "
+echo " $srcdir/testfiles/skull.hdf and gif_hdf_temp/skull.gif"
+echo " ********************* END NOTE **************************"
+echo ""
+
+errors=0
+
+# hdf24to8
+# "uncompress" utiltiy became obsolete; replaced with gunzip EIP 2004/12/01
+if [ -f hdf24to8 -a -f hdftor8 ]; then
+  echo "** Testing hdf24to8  ***"
+  /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
+  #cp $srcdir/testfiles/head.r24.Z $srcdir/testfiles/head.r8.Z .
+  cp $srcdir/testfiles/head.r24.gz $srcdir/testfiles/head.r8.gz .
+  #uncompress head.r24.Z head.r8.Z
+  gunzip head.r24.gz head.r8.gz
+  ./hdf24to8 head.r24 head8.hdf
+  ./hdftor8 head8.hdf
+  cmp img001-263.328 head.r8 || errors=1
+  /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
+else
+  echo "** hdf24to8 or hdftor8 is not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdf24to8 might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001"
+  echo " cp $srcdir/testfiles/head.r24.gz $srcdir/testfiles/head.r8.gz . "
+  echo " gunzip head.r24.gz head.r8.gz "
+  echo " ./hdf24to8 head.r24 head8.hdf "
+  echo " ./hdftor8 head8.hdf "
+  echo " cmp img001-263.328 head.r8 " 
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# hdfed
+if [ -f $HDFED ]; then
+  echo "** Testing hdfed  ***"
+  /bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
+  cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/ntcheck.hdf .
+  $HDFEDCMD < $srcdir/hdfed.input1 > hdfed.tmp 2>&1
+  diff hdfed.tmp $srcdir/hdfed.out1 || errors=1
+  /bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
+else
+  echo "** hdfed not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfed might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp "
+  echo "cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/ntcheck.hdf . "
+  echo "$HDFEDCMD < $srcdir/hdfed.input1 >& hdfed.tmp "
+  echo "diff hdfed.tmp $srcdir/hdfed.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# ristosds
+if [ -f ristosds -a -f $HDFED ]; then
+  echo "** Testing ristosds  ***"
+  /bin/rm -f storm*.hdf hdfed.tmp1
+  cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/storm120.hdf $srcdir/testfiles/storm130.hdf .
+  ./ristosds storm*.hdf -o storm.hdf > /dev/null 2>&1
+  $HDFEDCMD < $srcdir/ristosds.input1 > hdfed.tmp1 2>&1
+  diff  hdfed.tmp1 $srcdir/ristosds.out1 || errors=1
+  /bin/rm -f storm*.hdf hdfed.tmp1
+else
+  echo "** ristosds or hdfed not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " ristosds might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f storm*.hdf hdfed.tmp1 "
+  echo " cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/storm120.hdf $srcdir/testfiles/storm130.hdf . "
+  echo "./ristosds storm*.hdf -o storm.hdf "
+  echo "$HDFEDCMD < $srcdir/ristosds.input1 >& hdfed.tmp1 "
+  echo " diff  hdfed.tmp1 $srcdir/ristosds.out1"
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+
+#hdfpack
+if [ -f hdfpack -a -f hdfls ]; then
+  echo "** Testing hdfpack  ***"
+  /bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
+  cp $srcdir/testfiles/test.hdf .
+  ./hdfpack test.hdf test.pck
+  ./hdfpack -b test.hdf test.blk
+  (./hdfls test.hdf | $SED ) > hdfls.tmp1 2>&1
+  (./hdfls test.pck | $SED ) >> hdfls.tmp1 2>&1
+  diff  hdfls.tmp1 $srcdir/hdfpack.out1 || errors=1
+  /bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
+else
+  echo "** hdfpack or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfpack might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1 "
+  echo " cp $srcdir/testfiles/test.hdf . "
+  echo "./hdfpack test.hdf test.pck "
+  echo "./hdfpack -b test.hdf test.blk "
+  echo "(./hdfls test.hdf | $SED ) >& hdfls.tmp1"
+  echo "(./hdfls test.pck | $SED ) >>& hdfls.tmp1"
+  echo " diff hdfls.tmp1 $srcdir/hdfpack.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+#hdftopal/paltohdf
+if [ -f  hdftopal -a -f paltohdf ]; then
+  echo "** Testing hdftopal/paltohdf  ***"
+  /bin/rm -f palette.* 
+  cp $srcdir/testfiles/palette.raw .
+  ./paltohdf palette.raw palette.hdf
+  ./hdftopal palette.hdf palette.raw.new
+  cmp palette.raw palette.raw.new || errors=1
+  /bin/rm -f palette.* 
+else
+  echo "** hdftopal or paltohdf not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdftopal or paltohdf might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f palette.* "
+  echo " cp $srcdir/testfiles/palette.raw . "
+  echo "./paltohdf palette.raw palette.hdf "
+  echo "./hdftopal palette.hdf palette.raw.new "
+  echo "cmp palette.raw palette.raw.new "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# r8tohdf/hdftor8
+if [ -f r8tohdf -a -f hdftor8 -a -f hdfls ]; then
+  echo "** Testing r8tohdf/hdftor8  ***"
+  /bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
+  cp $srcdir/testfiles/storm*.raw $srcdir/testfiles/palette.raw .
+  ./r8tohdf 57 57 storm.hdf storm*.raw
+  ./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
+  ./hdftor8 storm.hdf
+  (./hdfls -l storm.hdf | $SED) > hdfls.tmp2 2>&1
+  diff  hdfls.tmp2 $srcdir/hdftor8.out1 || errors=1
+  cmp img001-057.057  storm110.raw || errors=1
+  cmp img002-057.057  storm120.raw || errors=1
+  cmp img003-057.057  storm130.raw || errors=1
+  cmp img004-057.057  storm140.raw || errors=1
+  /bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
+else
+  echo "** r8tohdf, hdftor8 or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " r8tohdf or hdftor8 might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005 "
+  echo "cp $srcdir/testfiles/storm*.raw $srcdir/testfiles/palette.raw . "
+  echo "./r8tohdf 57 57 storm.hdf storm*.raw "
+  echo "./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw "
+  echo "./hdftor8 storm.hdf "
+  echo "(./hdfls -l storm.hdf | $SED) >& hdfls.tmp2 "
+  echo " diff hdfls.tmp2 $srcdir/hdftor8.out1 "
+  echo "cmp img001-057.057  storm110.raw "
+  echo "cmp img002-057.057  storm120.raw "
+  echo "cmp img003-057.057  storm130.raw "
+  echo "cmp img004-057.057  storm140.raw "
+  echo " ******* END NOTE *************"
+  echo ""
+ errors=0
+fi
+
+# hdfcomp
+if [ -f  hdfcomp -a -f hdfls ]; then
+  echo "** Testing hdfcomp  ***"
+  /bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
+  cp $srcdir/testfiles/storm*.hdf .
+  ./hdfcomp allstorms.hdf storm*.hdf
+  ./hdfcomp allcomp.hdf -c storm*.hdf
+  (./hdfls -l allstorms.hdf | $SED) > hdfls.tmp3 2>&1
+  (./hdfls -l allcomp.hdf | $SED) >> hdfls.tmp3 2>&1
+  diff  hdfls.tmp3 $srcdir/hdfcomp.out1 || errors=1
+  /bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
+else
+  echo "** hdfcomp or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfcomp might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3 "
+  echo "cp $srcdir/testfiles/storm*.hdf . "
+  echo "./hdfcomp allstorms.hdf storm*.hdf "
+  echo "./hdfcomp allcomp.hdf -c storm*.hdf "
+  echo "(./hdfls -l allstorms.hdf | $SED) >& hdfls.tmp3 "
+  echo "(./hdfls -l allcomp.hdf | $SED) >>& hdfls.tmp3 "
+  echo "diff hdfls.tmp3 $srcdir/hdfcomp.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+#jpeg2hdf/hdf2jpeg
+if [ -f jpeg2hdf -a -f hdf2jpeg -a -f hdfls ]; then
+  echo "** Testing jpeg2hdf/hdf2jpeg  ***"
+  /bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
+  cp $srcdir/testfiles/jpeg_img.jpg .
+  ./jpeg2hdf jpeg_img.jpg jpeg.hdf
+  ./hdf2jpeg jpeg.hdf jpeg2.jpg
+  (./hdfls -l jpeg.hdf | $SED) > hdfls.tmp4 2>&1
+  diff  hdfls.tmp4 $srcdir/jpeg2hdf.out1 || errors=1
+  cmp jpeg_img.jpg jpeg2.jpg || errors=1
+  /bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
+else
+  echo "** jpeg2hdf, hdf2jpeg or hdfls  not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " jpeg2hdf or hdf2jpeg might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4 "
+  echo "cp $srcdir/testfiles/jpeg_img.jpg . "
+  echo "./jpeg2hdf jpeg_img.jpg jpeg.hdf "
+  echo "./hdf2jpeg jpeg.hdf jpeg2.jpg "
+  echo "(./hdfls -l jpeg.hdf | $SED) >& hdfls.tmp4 "
+  echo "diff hdfls.tmp4 $srcdir/jpeg2hdf.out1 "
+  echo "cmp jpeg_img.jpg jpeg2.jpg "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+##
+##  fp2hdf is now called hdfimport, and is in mfhdf/hdfimport
+##
+ # # fp2hdf
+ # if [ -f fp2hdf -a -f hdfls -a -f $HDFED ]; then
+ # echo "** Testing fp2hdf  ***"
+ # if [ ! "$has32" ]; then
+ #     echo "    $machinetype does not support float32."
+ #     echo "    float32 tests skipped."
+ # fi
+ # 
+ # /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+ # ./fptest
+ # ./fp2hdf ctxtr2 -o ctxtr2.hdf
+ # ./fp2hdf ctxtr3 -o ctxtr3.hdf
+ # if [ "$has32" ]; then
+ # ./fp2hdf cb32r2 -o cb32r2.hdf
+ # ./fp2hdf cb32r3 -o cb32r3.hdf
+ # fi
+ # ./fp2hdf cb64r2 -o cb64r2.hdf
+ # ./fp2hdf cb64r3 -o cb64r3.hdf
+ # ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
+ # ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
+ # (./hdfls -l ctxtr2.hdf | $SED) > hdfls.tmp5 2>&1
+ # (./hdfls -l ctxtr3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # if [ "$has32" ]; then
+ # (./hdfls -l cb32r2.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb32r3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # fi
+ # (./hdfls -l cb64r2.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb64r3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l ctxtr2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb64r2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+ # if [ "$has32" ]; then
+ #     diff  hdfls.tmp5 $srcdir/fp2hdf.out1 || errors=1
+ #     $HDFEDCMD < $srcdir/fp2hdf.input1 > hdfed.tmp6 2>&1
+ #     diff  hdfed.tmp6 $srcdir/fp2hdf.out2 || errors=1
+ # else
+ #     diff  hdfls.tmp5 $srcdir/fp2hdf.out1-32 || errors=1
+ #     $HDFEDCMD < $srcdir/fp2hdf.input1-32 > hdfed.tmp6 2>&1
+ #     diff  hdfed.tmp6 $srcdir/fp2hdf.out2-32 || errors=1
+ # fi
+ # /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+ # else
+ # echo "** fp2hdf, hdfed or hdfls not available ***"
+ # fi
+ # 
+ # if [ $errors -eq 1 ]; then
+ #   haserr=1
+ #   echo " ********* NOTE ***************"
+ #   echo " fp2hdf might have failed ***"
+ #   echo " The above errors could be formatting "
+ #   echo " problems which can be ignored "
+ #   echo " please run the following by hand to verify "
+ #   echo " "
+ #   echo "  /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6"
+ #   echo " ./fptest "
+ #   echo " ./fp2hdf ctxtr2 -o ctxtr2.hdf "
+ #   echo " ./fp2hdf ctxtr3 -o ctxtr3.hdf "
+ #   if [ "$has32" ]; then
+ #   echo " ./fp2hdf cb32r2 -o cb32r2.hdf "
+ #   echo " ./fp2hdf cb32r3 -o cb32r3.hdf "
+ #   fi
+ #   echo " ./fp2hdf cb64r2 -o cb64r2.hdf "
+ #   echo " ./fp2hdf cb64r3 -o cb64r3.hdf "
+ #   echo " ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50 "
+ #   echo " ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f "
+ #   echo "( ./hdfls -l ctxtr2.hdf | $SED) >&  hdfls.tmp5 "
+ #   echo "( ./hdfls -l ctxtr3.hdf | $SED) >>& hdfls.tmp5 "
+ #   if [ "$has32" ]; then
+ #   echo "( ./hdfls -l cb32r2.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb32r3.hdf | $SED) >>& hdfls.tmp5 "
+ #   fi
+ #   echo "( ./hdfls -l cb64r2.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb64r3.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l ctxtr2_ris.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb64r2_ris.hdf | $SED) >>& hdfls.tmp5 "
+ #   if [ "$has32" ]; then
+ #   echo " diff hdfls.tmp5 $srcdir/fp2hdf.out1 "
+ #   echo " $HDFEDCMD < $srcdir/fp2hdf.input1 >& hdfed.tmp6 "
+ #   echo " diff hdfed.tmp6 $srcdir/fp2hdf.out2 "
+ #   else
+ #   echo " diff hdfls.tmp5 $srcdir/fp2hdf.out1-32 "
+ #   echo " $HDFEDCMD < $srcdir/fp2hdf.input1-32 >& hdfed.tmp6 "
+ #   echo " diff hdfed.tmp6 $srcdir/fp2hdf.out2-32 "
+ #   fi
+ #   echo " ******* END NOTE *************"
+ #   echo ""
+ #   errors=0
+ # fi
+
+#
+# Check errors result
+if [ $haserr -eq 0 ]; then
+  echo "=============================="
+  echo "HDF Utilities tests passed."
+  echo "=============================="
+else
+  echo "**************************************"
+  echo "HDF Utilities tests encountered errors"
+  echo "**************************************"
+fi
+
+echo ""
+exit $haserr

Modified: packages/libhdf4/trunk/hdf/util/vshow.c
===================================================================
--- packages/libhdf4/trunk/hdf/util/vshow.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/hdf/util/vshow.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char *RcsId[] = "@(#)$Revision: 1.59 $";
+static char *RcsId[] = "@(#)$Revision: 1.61 $";
 #endif
 
-/* $Id: vshow.c,v 1.59 1999/04/23 22:19:11 smitchel Exp $ */
+/* $Id: vshow.c,v 1.61 2003/12/10 21:13:48 epourmal Exp $ */
 
 /*****************************************************************************
 *
@@ -56,6 +56,9 @@
 static int32 fmtfloat
             (char *x);
 
+static int32 fmtulong
+            (char *x);
+
 static int32 fmtlong
             (char *x);
 
@@ -336,6 +339,15 @@
 }
 
 static int32
+fmtulong(char *x)
+{
+    unsigned    l = 0;
+    HDmemcpy(&l, x, sizeof(int32));
+    cn += printf("%u", l);
+    return (1);
+}
+
+static int32
 fmtlong(char *x)
 {
     long        l = 0;
@@ -453,6 +465,9 @@
                     break;
 
                 case DFNT_UINT32:
+                      fmtfn[i] = fmtulong;
+                      break;
+
                 case DFNT_INT32:
                     fmtfn[i] = fmtlong;
                     break;
@@ -652,6 +667,8 @@
                       fmtfn = fmtshort;
                       break;
                  case DFNT_UINT32:
+                      fmtfn = fmtulong;
+                      break;
                  case DFNT_INT32:
                       fmtfn = fmtlong;
                       break;
@@ -761,6 +778,8 @@
                   fmtfn = fmtshort;
                   break;
              case DFNT_UINT32:
+                  fmtfn = fmtulong;
+                  break;
              case DFNT_INT32:
                   fmtfn = fmtlong;
                   break;

Deleted: packages/libhdf4/trunk/install-sh
===================================================================
--- packages/libhdf4/trunk/install-sh	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/install-sh	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,243 +0,0 @@
-#!/bin/sh
-# $Id: install-sh,v 1.2 1996/12/11 21:50:49 acheng Exp $
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-tranformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-# HDF specific change to set umask so that files are created others
-# accessible.
-umask 022
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0

Copied: packages/libhdf4/trunk/man/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/man/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/man/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/man/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1 @@
+man1_MANS = hdf.1 hdfunpac.1

Modified: packages/libhdf4/trunk/man/Makefile.in
===================================================================
--- packages/libhdf4/trunk/man/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/man/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,177 +1,337 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.11 1998/03/06 14:08:54 bljones Exp $
-#
-# ##################################################################
-#
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+man1_MANS = hdf.1 hdfunpac.1
+subdir = man
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  man/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
+
 man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
+tags: TAGS
+TAGS:
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+ctags: CTAGS
+CTAGS:
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-# The echo command.
-ECHO = echo
+clean-generic:
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
+clean-am: clean-generic mostlyclean-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+distclean: distclean-am
+	-rm -f Makefile
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+distclean-am: clean-am distclean-generic
 
-# ############# End of system configuration section. ###############
+dvi: dvi-am
 
-# ==> where is your HDF library (libdf.a) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC=$(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+dvi-am:
 
-# ==> where is your JPEG library (libjpeg.a) located?
-JPEGLIB=$(srcdir)/../jpeg
-JPEGINC=$(srcdir)/../jpeg
+info: info-am
 
-DISTFILES = $(MAN_NROFF_1) 
+info-am:
 
-# Man pages
-MAN_NROFF_1 = hdf.1 hdfunpac.1
-MAN_NROFF_3 =
+install-data-am: install-man
 
-all: docs
+install-exec-am:
 
-nofortran: all
+install-info: install-info-am
 
-rebuild:
-	true
+install-man: install-man1
 
-rebuildnofortran:
-	true
+installcheck-am:
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
 
-install: install-man1 
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-install-man1: 
-	for p in $(MAN_NROFF_1); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(man1dir)/`$(ECHO) $$p`; \
-	done
+mostlyclean: mostlyclean-am
 
-install-man3: 
-	for p in $(MAN_NROFF_3); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(man3dir)/`$(ECHO) $$p`; \
-	done
+mostlyclean-am: mostlyclean-generic
 
-docs:
-	true
+pdf: pdf-am
 
-clean:
-	true
+pdf-am:
 
-distclean:
-	-$(RM) $(RMFLAGS) config.status Makefile
+ps: ps-am
 
-depend: 
-	 true
+ps-am:
 
-saber:	
-	true
+uninstall-am: uninstall-info-am uninstall-man
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = man
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+uninstall-man: uninstall-man1
 
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'utilities' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes man pages"
-	@echo "make install - install HDF man pages "
-	@echo "make clean     - cleans up "
-	@echo "make distclean - cleans up including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
+.PHONY: all all-am check check-am clean clean-generic distclean \
+	distclean-generic distdir dvi dvi-am info info-am install \
+	install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-man1 install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+	uninstall-am uninstall-info-am uninstall-man uninstall-man1
 
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Copied: packages/libhdf4/trunk/mfhdf/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,5 @@
+if HDF_BUILD_FORTRAN
+SUBDIRS=port fortran libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+else
+SUBDIRS=port libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+endif

Modified: packages/libhdf4/trunk/mfhdf/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,730 +1,431 @@
-# $Id: Makefile.in,v 1.24 2000/08/30 00:11:10 wendling Exp $
-#
-#          Makefile to build netcdf library and utilities
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+ at HDF_BUILD_FORTRAN_TRUE@SUBDIRS = port fortran libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+ at HDF_BUILD_FORTRAN_FALSE@SUBDIRS = port libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+subdir = mfhdf
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in INSTALL Makefile.am THANKS
+DIST_SUBDIRS = port fortran libsrc ncdump ncgen dumper hdfimport hdiff \
+	hrepack nctest
+all: all-recursive
 
-SHELL = /bin/sh
-
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
-
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefix)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Default Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(FMPOOL_INC) -I$(NETCDF_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-#PACKAGE		= netcdf
-MANIFEST = $(DISTFILES)
-DISTFILES	= CHANGES COPYRIGHT CUSTOMIZE FAQ INSTALL  \
-		  Makefile.in ORIGIN README THANKS VERSION configure \
-		  configure.in aclocal.m4 msoft.mk
-SUBDIRS		= doc fortran ncdump ncgen nctest libsrc xdr c++ dumper \
-		  pablo
-SUBDIR_TARGETS	= \
-    doc/all                  doc/install     doc/clean     doc/distclean \
-    fortran/all fortran/test fortran/install fortran/clean fortran/distclean \
-    ncdump/all  ncdump/test  ncdump/install  ncdump/clean  ncdump/distclean \
-    ncgen/all   ncgen/test   ncgen/install   ncgen/clean   ncgen/distclean \
-    nctest/all  nctest/test                  nctest/clean  nctest/distclean \
-    libsrc/all  libsrc/test  libsrc/install  libsrc/clean  libsrc/distclean \
-    xdr/all     xdr/test     xdr/install     xdr/clean     xdr/distclean \
-    c++/all                                  c++/clean    c++/distclean \
-    pablo/all                pablo/install   pablo/clean  pablo/distclean \
-    dumper/all  dumper/test  dumper/install  dumper/clean dumper/distclean \
-    ncdump/install-utils  ncgen/install-utils dumper/install-utils \
-    ncdump/install-man    ncgen/install-man   \
-    xdr/install-includes fortran/install-includes libsrc/install-includes
-
-all::		xdr/all fortran/all libsrc/all ncdump/all \
-		ncgen/all nctest/all doc/all dumper/all pablo/all
-libmfhdf::	xdr/all fortran/all libsrc/all
-libmfhdf-inst::	xdr/all fortran/all libsrc/all pablo/all
-test::		xdr/test fortran/test libsrc/test nctest/test ncdump/test \
-		ncgen/test dumper/test
-install::	xdr/install fortran/install libsrc/install ncdump/install \
-		ncgen/install doc/install dumper/install pablo/install
-install-libs::	xdr/install fortran/install libsrc/install  pablo/install
-install-includes::	xdr/install-includes fortran/install-includes libsrc/install-includes 
-install-utils:: ncdump/install-utils ncgen/install-utils dumper/install-utils
-install-man::   doc/install ncdump/install-man ncgen/install-man
-clean::		xdr/clean libsrc/clean fortran/clean ncdump/clean \
-		ncgen/clean nctest/clean doc/clean dumper/clean pablo/clean
-	rm -f netcdf*.tar.Z
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	FC="$(FC)" \
-    FFLAGS="$(FFLAGS)" 
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	FC="$(FC)" \
-    FFLAGS="$(FFLAGS)" 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+CTAGS = ctags
+CTAGSFLAGS =
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+tags: TAGS
 
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
-.c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
-
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
-
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
-
-
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
-
-library::		$(LIB_A)
-
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
 	else \
-	    :; \
-	fi
+	  include_option=--include; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF)'; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic mostlyclean-am
 
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+dvi: dvi-recursive
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi-am:
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+info: info-recursive
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info-am:
 
+install-data-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-exec-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-info: install-info-recursive
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-man:
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+installcheck-am:
 
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+mostlyclean: mostlyclean-recursive
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+mostlyclean-am: mostlyclean-generic
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+pdf: pdf-recursive
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+pdf-am:
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+ps: ps-recursive
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+ps-am:
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+uninstall-am: uninstall-info-am
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+uninstall-info: uninstall-info-recursive
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive distclean \
+	distclean-generic distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+	ps-recursive tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-info-recursive uninstall-recursive
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
-
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
-
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# The `distclean' target appears after the master makefile to prevent
-# making `distclean' in the subdirectories before making `clean'.
-#
-distclean::	doc/distclean \
-		fortran/distclean \
-		ncdump/distclean \
-		dumper/distclean \
-		ncgen/distclean \
-		nctest/distclean \
-		libsrc/distclean \
-		xdr/distclean \
-		c++/distclean \
-		pablo/distclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,47 +0,0 @@
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:16 georgev Exp $
-#
-#          Makefile to build netcdf library and utilities
-
-
-PACKAGE		= netcdf
-MANIFEST	= CHANGES COPYRIGHT CUSTOMIZE FAQ INSTALL MANIFEST \
-		  Makefile.in ORIGIN README THANKS VERSION configure \
-		  configure.in aclocal.m4 msoft.mk
-SUBDIRS		= port doc fortran ncdump ncgen nctest libsrc xdr c++ dumper
-SUBDIR_TARGETS	= \
-    port/all	                             port/clean   port/distclean \
-    doc/all                  doc/install     doc/clean     doc/distclean \
-    fortran/all fortran/test fortran/install fortran/clean fortran/distclean \
-    ncdump/all  ncdump/test  ncdump/install  ncdump/clean  ncdump/distclean \
-    ncgen/all   ncgen/test   ncgen/install   ncgen/clean   ncgen/distclean \
-    nctest/all  nctest/test                  nctest/clean  nctest/distclean \
-    libsrc/all  libsrc/test  libsrc/install  libsrc/clean  libsrc/distclean \
-    xdr/all     xdr/test     xdr/install     xdr/clean     xdr/distclean \
-    c++/all                                  c++/clean    c++/distclean \
-    dumper/all	             dumper/install  dumper/clean dumper/distclean
-
-all::		port/all xdr/all libsrc/all fortran/all ncdump/all \
-		ncgen/all nctest/all doc/all dumper/all
-test::		xdr/test libsrc/test nctest/test fortran/test ncdump/test \
-		ncgen/test
-install::	xdr/install fortran/install libsrc/install ncdump/install \
-		ncgen/install doc/install dumper/install
-clean::		port/clean xdr/clean libsrc/clean fortran/clean ncdump/clean \
-		ncgen/clean nctest/clean doc/clean dumper/clean
-	rm -f netcdf*.tar.Z
-
-include port/master.mk
-
-# The `distclean' target appears after the master makefile to prevent
-# making `distclean' in the subdirectories before making `clean'.
-#
-distclean::	port/distclean  \
-		doc/distclean \
-		fortran/distclean \
-		ncdump/distclean \
-		dumper/distclean \
-		ncgen/distclean \
-		nctest/distclean \
-		libsrc/distclean \
-		xdr/distclean \
-		c++/distclean

Copied: packages/libhdf4/trunk/mfhdf/README.HDF.33 (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/README.HDF.33)
===================================================================
--- packages/libhdf4/trunk/mfhdf/README.HDF.33	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/README.HDF.33	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,41 @@
+This directory contains the HDF/netCDF part of HDF3.3r3
+and Unidata netCDF v2.3.2. The hdf-related programs are
+in libsrc/ and fortran/.
+
+To install HDF/netCDF, you need to edit the file CUSTOMIZE 
+to point at the correct locations for the HDF include files 
+and the base HDF library (i.e. by setting the variables
+HDF_INC and HDF_LIB).
+
+Then all you should have to do is run the script file configure
+(just type: ./configure) and it should set up all the Makefiles
+correctly. A 'make' followed by a 'make test' should build
+the libraries and run the tests.  This works for all 'UNIX'
+platforms including the HP and Cray.
+
+For some older CONVEX systems where the command "uname" is missing,
+you need to setenv for MACHINE (just type: setenv MACHINE C3 )
+before running ./configure.
+
+For SGI R8000 running IRIX_6.0, currently we support 32-bit mode only.
+You need to add -32 option in CFLAGS and FFLAGS in CUSTOMIZE file.
+
+Change:
+
+    CFLAGS=-O 
+    FFLAGS=-O
+
+to:
+
+    CFLAGS="-O -32"
+    FFLAGS="-O -32"
+
+For SOLARIS 2.3 (SunOS 5.2), you need to run ./configure and then edit
+the Makefile in the fortran/ subdirectory so that FFLAG = -xl.
+
+The INSTALL file in this directory and the README files in
+this and subdirectories are good references for netCDF and
+XDR related issues. 
+
+Make.com files are provided in each subdirectory for VMS 
+platforms. 

Deleted: packages/libhdf4/trunk/mfhdf/aclocal.m4
===================================================================
--- packages/libhdf4/trunk/mfhdf/aclocal.m4	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/aclocal.m4	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,270 +0,0 @@
-define(diversion_number, divnum)dnl
-divert(-1)
-
-
-# Check for fill value usage.
-#
-define(UL_FILLVALUES, [dnl
-echo checking for fill value usage
-if test "${OLD_FILLVALUES-}" = yes; then
-    OLD_FILLVALUES=1
-    AC_DEFINE(OLD_FILLVALUES)
-else
-    OLD_FILLVALUES=0
-fi
-AC_SUBST(OLD_FILLVALUES)dnl
-UC_CREATE(libsrc/netcdf.h)dnl
-])
-
-
-# Check endianness.
-#
-define(UL_SWAP, [dnl
-echo checking endianess
-SWAP=
-AC_TEST_PROGRAM([main() {
-    long i = 0;
-    char *ip = (char*)&i;
-    *ip       = 'a';
-    exit(i != 'a'); /* false if little endian or sizeof(long) == sizeof(char) */
-}], [SWAP=-DSWAP])dnl
-AC_SUBST(SWAP)dnl
-])
-
-
-# Check type of 32-bit `network long' integer.
-#
-define([UL_NETLONG], [dnl
-AC_REQUIRE([UC_OS])dnl
-if test "$OS" = unicos; then
-NETLONG=
-else
-echo checking type of netlong
-AC_TEST_PROGRAM([main() {exit(sizeof(long) == 4);}],
-[NETLONG='-DNETLONG=int'], [NETLONG=])
-fi
-AC_SUBST(NETLONG)dnl
-])
-
-
-# Check for XDR header-file directory.
-#
-define(UL_CPP_XDR, [dnl
-echo checking for XDR header-file
-AC_REQUIRE([UC_PREFIX])dnl
-AC_PROVIDE([$0])dnl
-UC_TEST_DIR(CPP_XDR, /usr/[[include]]/rpc /usr/local/[[include]]/rpc \
-    $prefix/[[include]] UC_ABSPATH(xdr), xdr.h,
-    XDR [[[include]]]-directory, -I/usr/[[[include]]]/rpc)dnl
-if test -n "${CPP_XDR-}"; then
-  CPP_XDR=-I${CPP_XDR}
-fi
-])
-
-
-# Ensure a valid XDR library.
-#
-define(UL_LIB_XDR, [dnl
-echo checking XDR library
-AC_REQUIRE([UC_OS])dnl
-AC_PROVIDE([$0])dnl
-case "${OS}" in
-  irix*)	LD_XDR=-lsun
-#                UC_ENSURE(HDF_INC, -DIRIS4)
-                UC_ENSURE(HDF_INC, -cckr);;
-  ultrix*)	LD_XDR=
-#                UC_ENSURE(HDF_INC, -DMIPSEL);;
-  unicos*)	LD_XDR=
-		UC_ENSURE(CPPFLAGS, -DBIG_SHORTS -DBIG_LONGS)
-#                UC_ENSURE(HDF_INC, -DUNICOS);;
-  aix*)         
-#               UC_ENSURE(HDF_INC, -DIBM6000)
-                LD_XDR=;;
-  sunos*)       
-#               UC_ENSURE(HDF_INC, -DSUN)
-                LD_XDR=;;
-  hpux*)        
-#               UC_ENSURE(HDF_INC, -DHP9000)
-                if test -z "$GCC"; then
-                        UC_ENSURE(CPPFLAGS, -Aa)
-                fi
-                LD_XDR=;;
-  osf*)         
-#               UC_ENSURE(HDF_INC, -DDEC_ALPHA)
-		UC_ENSURE(CPPFLAGS, -DBIG_LONGS)
-		UC_ENSURE(CPPFLAGS, -std1)
-                LD_XDR=;;
-  convex*)      
-#               UC_ENSURE(HDF_INC, -DCONVEX)
-                LD_XDR=;;
-  *)		LD_XDR=;;
-esac
-UC_ENSURE(DEFS, ${CPP_XDR-})dnl
-UC_ENSURE(DEFS, ${CPPFLAGS-})dnl
-UC_ENSURE(LIBS, ${LD_XDR-})dnl
-AC_TEST_PROGRAM(dnl
-[
-#undef NDEBUG
-
-#ifdef _AIX
-#   ifndef _ALL_SOURCE
-#     define _ALL_SOURCE
-#   endif
-#endif
-
-#include <assert.h>
-#include <stdio.h>
-#include <types.h>
-#include <xdr.h>
-
-#define TESTFILE	"conftest.xdr"
-#define EPSILON		.0005
-#ifndef FLT_MIN
-#   define    FLT_MIN 1e-37           /* Standard C maximum */
-#endif
-#ifndef FLT_EPSILON
-#   define FLT_EPSILON        1e-5            /* Standard C maximum */
-#endif
-
-main(ac,av)
-    int			ac ;
-    char		*av[] ;
-{
-    int			ii, jj	= 0 ;
-    char		*fname	= ac > 1 ? av[1] : TESTFILE;
-    FILE		*F	= fopen(fname,"w");
-    XDR			xdrs[1] ;
-    unsigned int	count ;
-    unsigned int	szof ;
-
-    /*
-     * The last value below should be a subnormal number on a DECstation,
-     * RS6000, and SPARCstation.  Hopefully, it will catch bad xdr(3)
-     * implementations (such as a VAXstation's) which don't correctly handle
-     * such values.  Such a value should be the last one in the list.
-     */
-    static float	floats[]	= { 100.125, 100.25, 100.375, 
-					    100.5, 100.625, FLT_MIN/32 } ;
-    float *fp , got_af[sizeof(floats)/sizeof(floats[0])] ;
-
-/* create */
-
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_ENCODE) ;
-
-/* populate */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)floats, count, szof, xdr_float)) ;
-
-/* flush, rewind  and reopen */
-
-    assert(fflush((FILE *)xdrs->x_private) != EOF) ; /* xdr_destroy(xdrs) */
-
-    assert(fclose(F) != EOF) ;
-    F = fopen(fname,"r") ;
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_DECODE) ;
-
-/* check */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)got_af, count, szof, xdr_float)) ;
-    for(ii = 0, fp = got_af;
-	ii < count - 1;
-	ii++, fp++) 
-    {
-	assert(*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON)) ;
-    }
-    assert(*fp == 0 || (*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON))) ;
-
-    exit(0) ;
-}
-],dnl
-XDR_LIBOBJS=
-XDR_INSTALL_DEPS=,dnl
-XDR_LIBOBJS="xdr.o xdrfloat.o xdrstdio.o xdrarray.o"
-XDR_INSTALL_DEPS=installed_headers
-LD_XDR=)dnl
-AC_SUBST(XDR_LIBOBJS)dnl
-AC_SUBST(XDR_INSTALL_DEPS)dnl
-AC_SUBST(LD_XDR)dnl
-])
-
-
-# Check for XDR implementation (header file and library).
-#
-define(UL_XDR, [dnl
-AC_REQUIRE([UL_CPP_XDR])dnl
-AC_REQUIRE([UL_LIB_XDR])dnl
-])
-
-
-# Define C macros for function prototyping
-#
-define([UL_PROTOTYPES],
-[AC_COMPILE_CHECK([function prototypes], ,
-extern int foo(int bar);
-, dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -DNO_HAVE_PROTOTYPES)])])
-
-
-# Check for functioning `const' keyword
-#
-define(UL_CONST,
-[AC_COMPILE_CHECK([working const], , [/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-], dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -Dconst=)])])
-
-
-# Define macros for variadic function support
-#
-define(UL_VARIADIC_FUNCTIONS,[dnl
-AC_PROVIDE([$0])dnl
-AC_REQUIRE([UC_PROG_CPP])dnl
-AC_COMPILE_CHECK([variadic function support], , [} 
-#include <stdarg.h>
-int foo(int bar, ...) {
-    va_list     alist;
-    va_start(alist, bar);
-    bar = (int)va_arg(alist, int);
-    va_end(alist);
-    return bar;
-], dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -DNO_STDARG)])])
-
-
-# Check for strerror().
-#
-define(UL_STRERROR, [dnl
-AC_REQUIRE([UC_PROG_FC])dnl
-if test `$WHICH "${FC-}" | wc -w` != 1; then
-AC_FUNC_CHECK(strerror, , [[UC_ENSURE(CPPFLAGS, -DNO_STRERROR)]])dnl
-else
-  echo checking for strerror
-  echo '       CALL STRERROR' > conftest.f
-  if eval "$FC conftest.f > /dev/null 2>&1"; then
-    : true
-  else
-    UC_ENSURE(CPPFLAGS, -DNO_STRERROR)dnl
-  fi
-  rm -rf a.out conftest.f
-fi
-])
-
-
-divert(diversion_number)dnl

Modified: packages/libhdf4/trunk/mfhdf/c++/ncvalues.cc
===================================================================
--- packages/libhdf4/trunk/mfhdf/c++/ncvalues.cc	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/c++/ncvalues.cc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	implementation of classes of typed arrays for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/ncvalues.cc,v 1.2 1993/04/30 20:29:40 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/ncvalues.cc,v 1.2 1993/04/30 20:29:40 koziol Exp $
  *********************************************************************/
 
 #include <iostream.h>		// for debugging

Modified: packages/libhdf4/trunk/mfhdf/c++/ncvalues.hh
===================================================================
--- packages/libhdf4/trunk/mfhdf/c++/ncvalues.hh	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/c++/ncvalues.hh	2007-09-28 21:58:13 UTC (rev 1125)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	interface for classes of typed arrays for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/ncvalues.hh,v 1.2 1993/04/30 20:29:42 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/ncvalues.hh,v 1.2 1993/04/30 20:29:42 koziol Exp $
  *********************************************************************/
 
 #ifndef Ncvalues_def

Modified: packages/libhdf4/trunk/mfhdf/c++/netcdf.cc
===================================================================
--- packages/libhdf4/trunk/mfhdf/c++/netcdf.cc	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/c++/netcdf.cc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	Implements class interface for netCDF over C interface
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/netcdf.cc,v 1.2 1993/04/30 20:29:45 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/netcdf.cc,v 1.2 1993/04/30 20:29:45 koziol Exp $
  *********************************************************************/
 
 #include <string.h>

Modified: packages/libhdf4/trunk/mfhdf/c++/netcdf.hh
===================================================================
--- packages/libhdf4/trunk/mfhdf/c++/netcdf.hh	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/c++/netcdf.hh	2007-09-28 21:58:13 UTC (rev 1125)
@@ -4,7 +4,7 @@
  *
  *   Purpose:   C++ class interface for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/netcdf.hh,v 1.2 1993/04/30 20:29:48 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/netcdf.hh,v 1.2 1993/04/30 20:29:48 koziol Exp $
  *********************************************************************/
 
 #ifndef NETCDF_HH

Deleted: packages/libhdf4/trunk/mfhdf/configure
===================================================================
--- packages/libhdf4/trunk/mfhdf/configure	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/configure	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,1326 +0,0 @@
-#!/bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf.
-# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
-#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
-# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
-# --with-PACKAGE unless this script has special code to handle it.
-
-
-for arg
-do
-  # Handle --exec-prefix with a space before the argument.
-  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
-  # Handle --host with a space before the argument.
-  elif test x$next_host = xyes; then next_host=
-  # Handle --prefix with a space before the argument.
-  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
-  # Handle --srcdir with a space before the argument.
-  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
-  else
-    case $arg in
-     # For backward compatibility, also recognize exact --exec_prefix.
-     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
-	exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
-	next_exec_prefix=yes ;;
-
-     -gas | --gas | --ga | --g) ;;
-
-     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-     -host | --host | --hos | --ho | --h)
-	next_host=yes ;;
-
-     -nfp | --nfp | --nf) ;;
-
-     -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
-        no_create=1 ;;
-
-     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-	prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-	next_prefix=yes ;;
-
-     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
-	srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
-	next_srcdir=yes ;;
-
-     -with-* | --with-*)
-       package=`echo $arg|sed 's/-*with-//'`
-       # Delete all the valid chars; see if any are left.
-       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
-         echo "configure: $package: invalid package name" >&2; exit 1
-       fi
-       eval "with_`echo $package|sed s/-/_/g`=1" ;;
-
-     *) ;;
-    esac
-  fi
-done
-
-trap 'rm -f conftest* core; exit 1' 1 3 15
-
-rm -f conftest*
-compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-unique_file=nctest
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  srcdirdefaulted=yes
-  # Try the directory containing this script, then `..'.
-  prog=$0
-  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
-  test "X$confdir" = "X$prog" && confdir=.
-  srcdir=$confdir
-  if test ! -r $srcdir/$unique_file; then
-    srcdir=..
-  fi
-fi
-if test ! -r $srcdir/$unique_file; then
-  if test x$srcdirdefaulted = xyes; then
-    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
-  else
-    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
-  fi
-  exit 1
-fi
-# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
-# But we can't avoid them for `..', to make subdirectories work.
-case $srcdir in
-  .|/*|~*) ;;
-  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
-esac
- if [ -r CUSTOMIZE ]; then
-  echo reading configuration customizations
-  . ./CUSTOMIZE
-fi
- TRANSFORMEES='port/Makefile port/master.mk'
-POST_PROCESSEES='port/Makefile'
-CPPFLAGS=${CPPFLAGS-"-DNDEBUG"}
-
- CFLAGS=${CFLAGS-"-O"}
-
- 
-if test -z "$OS"; then
-echo checking for type of operating system
-cat << \CAT_EOF > conftest.c
-#ifdef __osf__
-OS_osf
-#endif
-#ifdef _AIX
-OS_aix
-#endif
-#ifdef __DGUX__
-OS_dgux
-#endif
-#ifdef hpux
-OS_hpux
-#endif
-#ifdef NeXT
-OS_nextos
-#endif
-#ifdef sgi
-OS_irix
-#endif
-#ifdef sun
-OS_sunos
-#endif
-#ifdef __FreeBSD__
-OS_freebsd
-#endif
-#ifdef ultrix
-OS_ultrix
-#endif
-#ifdef _UNICOS
-OS_unicos
-#endif
-#ifdef __convex__
-OS_convex
-#endif
-#ifdef masscomp
-OS_rtu
-#endif
-CAT_EOF
-OS=`cc -E conftest.c | sed -n '/^OS_/ {
-  s///p
-  q
-}'`
-rm conftest.c
-if test -z "$OS"; then
-  echo "OS:operating system:sunos" >> conf.missing
-fi
-fi
- case "${OS}" in
-  aix*)    for arg in -D_ALL_SOURCE; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-;;
-  hpux*)   for arg in -D_HPUX_SOURCE; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-;;
-esac
-LIBOBJS=${LIBOBJS-""}
-
- PORT_HEADERS=${PORT_HEADERS-""}
-
- PORT_MANIFEST=${PORT_MANIFEST-""}
-
-
-PORT_SUBDIRS=${PORT_SUBDIRS-""}
-
-
-
-if test -z "$CC"; then
-  echo checking for cc
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/cc; then
-      CC="cc"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$CC" && CC=""
-if test -z "$CC"; then
-  echo "CC:C compiler:/bin/cc" >> conf.missing
-fi
-# Find out if we are using GNU C, under whatever name.
-cat <<EOF > conftest.c
-#ifdef __GNUC__
-  yes
-#endif
-EOF
-${CC-cc} -E conftest.c > conftest.out 2>&1
-if egrep yes conftest.out >/dev/null 2>&1; then
-  GCC=1 # For later tests.
-  CC="$CC -O"
-fi
-rm -f conftest*
- if test -z "$AR"; then
-  echo checking for ar
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ar; then
-      AR="ar"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$AR" && AR=""
-if test -z "$AR"; then
-  echo "AR:library utility:/bin/ar" >> conf.missing
-fi
- if test -z "$RANLIB"; then
-  echo checking for ranlib
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ranlib; then
-      RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$RANLIB" && RANLIB="@:"
-  
-
-echo checking for fill value usage
-if test "${OLD_FILLVALUES-}" = yes; then
-    OLD_FILLVALUES=1
-    DEFS="$DEFS -DOLD_FILLVALUES=1"
-else
-    OLD_FILLVALUES=0
-fi
-  for arg in libsrc/netcdf.h; do
-    case "$TRANSFORMEES" in
-      *$arg*) ;;
-      *)      TRANSFORMEES="${TRANSFORMEES-} $arg";;
-    esac
-  done
-
-
-CFLAGS=${CFLAGS-"-O"}
-
-
-CPPFLAGS=${CPPFLAGS-"-DNDEBUG"}
-
-
-  for arg in -DHDF; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-HDF_INC=${HDF_INC-"-I/hdf/home/chouck/hdf/33/include"}
-
-
-HDF_LIB=${HDF_LIB-"/hdf/home/chouck/hdf/33/lib/libdf.a"}
-
-JPEG_LIB=${JPEG_LIB-"/hdf/home/chouck/hdf/33/jpeg/libjpeg.a"}
-
-
-FFLAGS=${FFLAGS-""}
-
-
-LEX=${LEX-"lex"}
-
-
-YACC=${YACC-"yacc"}
-
-
-XDRFILE=${XDRFILE-"xdrposix"}
-
-
-echo setting the installation prefix
-prefix=`case "${prefix-..}" in 
-  /*) echo ${prefix-..}; exit;;
-   *) echo '/usr/local';
-#
-# Made the default prefix '/usr/local/' - GV
-#   *) path=\`pwd\`/${prefix-..}
-#        tail=
-#        while test -n "$path"; do
-#          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-#          base=/\`basename "$path"\`
-#          tail=/$base$tail
-#          path=\`echo "$path" | sed "s/\/$base//"\`
-#        done;;
-esac
-`
-test -z "$exec_prefix" && exec_prefix=$prefix/bin
-
-
-
-
-if test -z "$MACHINE"; then
-echo checking for type of machine
-MACHINE=`uname -m | tr A-Z a-z`
-if test -z "$MACHINE"; then
-  echo "MACHINE:machine hardware type:sun4c" >> conf.missing
-fi
-fi
-
-
-  for arg in which; do
-    case "$PORT_MANIFEST" in
-      *$arg*) ;;
-      *)      PORT_MANIFEST="${PORT_MANIFEST-} $arg";;
-    esac
-  done
-if test -z "$WHICH"; then
-  echo checking for which
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/which; then
-      WHICH="which"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$WHICH" && WHICH="`case "port" in 
-  /*) echo port; exit;;
-   *) path=\`pwd\`/port
-        tail=
-        while test -n "$path"; do
-          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-          base=/\`basename "$path"\`
-          tail=/$base$tail
-          path=\`echo "$path" | sed "s/\/$base//"\`
-        done;;
-esac
-`/which"
-
-if test "$OS" = ultrix && test "$MACHINE" = vax \
-    && test `$WHICH "$CC"` = /bin/cc; then
-  echo "changing C compiler to \`vcc' because \`cc' floating-point is broken"
-  CC=vcc
-fi
-
-echo checking how to run the C preprocessor
-if test -z "$CPP"; then
-  CPP='${CC-cc} -E'
-  cat > conftest.c <<EOF
-#include <stdio.h>
-EOF
-err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
-if test -z "$err"; then
-  :
-else
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-CPP=`eval echo $CPP`
-echo "#include <stdlib.h>" > conftest.c
-if test `$CPP conftest.c 2> /dev/null | wc -l` = 0; then
-  if test "$CPP" = cpp; then
-    echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work"
-    echo "CPP:C preprocessor:/lib/cpp" >> conf.missing
-  else
-    echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work; setting to \`cpp'"
-    CPP=cpp
-    if test `${WHICH} ${CPP} 2>&1 | wc -w` != 1; then
-      echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work; setting to \`cpp'"
-      CPP=/usr/ccs/lib/cpp
-      if test `${WHICH} ${CPP} 2>&1 | wc -w` != 1; then
-        echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't exist"
-        echo "CPP:C preprocessor:/lib/cpp" >> conf.missing
-      fi
-    fi
-  fi
-fi
-rm -f conftest.c
-
- case "$OS" in
-  hpux*) for p in fort77 fortc f77
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  dgux*) for p in ghf77 f77
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  convex*) for p in f77 fc
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  *)     for p in f77 cf77 #fc
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-esac
-if test -z "$FC"; then
-    for arg in NONE; do
-    case "$FC" in
-      *$arg*) ;;
-      *)      FC="${FC-} $arg";;
-    esac
-  done
-
-  echo "Was unable to find a Fortran compiler on this machine."
-fi
-
-if test -z "$NEQN"; then
-  echo checking for neqn
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/neqn; then
-      NEQN="neqn"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$NEQN" && NEQN="cat"
-test "$NEQN" = cat && 
-  echo 1>&2 "$0: Can't find program \`neqn'; setting to \`cat'"
-
-if test -z "$TBL"; then
-  echo checking for tbl
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/tbl; then
-      TBL="tbl"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$TBL" && TBL="cat"
-test "$TBL" = cat && 
-  echo 1>&2 "$0: Can't find program \`tbl'; setting to \`cat'"
-
-# Make sure to not get the incompatible SysV /etc/install and
-# /usr/sbin/install, which might be in PATH before a BSD-like install,
-# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
-# or the AFS install, which mishandles nonexistent args.  (Sigh.)
-if test -z "$INSTALL"; then
-  echo checking for install
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    case $dir in
-    /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
-    *)
-      if test -f $dir/install; then
-	if grep dspmsg $dir/install >/dev/null 2>&1; then
-	  : # AIX
-	else
-	  INSTALL="$dir/install -c"
-	  INSTALL_PROGRAM='$(INSTALL)'
-	  INSTALL_DATA='$(INSTALL) -m 644'
-	  break
-	fi
-      fi
-      ;;
-    esac
-  done
-  IFS="$saveifs"
-fi
-INSTALL=${INSTALL-cp}
-INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
-INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
-INSTALL_DATA="`echo "${INSTALL_DATA}" | sed 's/644/664/'`"
-
-if test -z "$AR"; then
-  echo checking for ar
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ar; then
-      AR="ar"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$AR" && AR=""
-if test -z "$AR"; then
-  echo "AR:library utility:/bin/ar" >> conf.missing
-fi
-
-if test -z "$MAKEINFO"; then
-  echo checking for makeinfo
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/makeinfo; then
-      MAKEINFO="makeinfo"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$MAKEINFO" && MAKEINFO=""
-
-
-echo checking endianess
-SWAP=
-cat > conftest.c <<EOF
-main() {
-    long i = 0;
-    char *ip = (char*)&i;
-    *ip       = 'a';
-    exit(i != 'a'); /* false if little endian or sizeof(long) == sizeof(char) */
-}
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  SWAP=-DSWAP
-fi
-rm -f conftest*
-if test "$OS" = unicos; then
-NETLONG=
-else
-echo checking type of netlong
-cat > conftest.c <<EOF
-main() {exit(sizeof(long) == 4);}
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  NETLONG='-DNETLONG=int'
-else
-  NETLONG=
-fi
-rm -f conftest*
-fi
-
-echo checking for XDR header-file
-  if test -z "$CPP_XDR"; then
-    for dir in /usr/include/rpc /usr/local/include/rpc \
-    $prefix/include `case "xdr" in 
-  /*) echo xdr; exit;;
-   *) path=\`pwd\`/xdr
-        tail=
-        while test -n "$path"; do
-          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-          base=/\`basename "$path"\`
-          tail=/$base$tail
-          path=\`echo "$path" | sed "s/\/$base//"\`
-        done;;
-esac
-`; do
-      if test -r $dir/xdr.h; then
-        CPP_XDR=$dir
-        break;
-      fi
-    done
-    if test -z "$CPP_XDR"; then
-      echo "CPP_XDR:XDR include-directory:-I/usr/include/rpc" >> conf.missing
-    fi
-  fi
-if test -n "${CPP_XDR-}"; then
-  CPP_XDR=-I${CPP_XDR}
-fi
-
-echo checking XDR library
-case "${OS}" in
-  irix*)	LD_XDR=
-#                 for arg in -DIRIS4; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-#                 for arg in -cckr; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  ultrix*)	LD_XDR=
-#                 for arg in -DMIPSEL; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  unicos*)	LD_XDR=
-		  for arg in -DBIG_SHORTS -DBIG_LONGS; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-#                 for arg in -DUNICOS; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  aix*)           
-#                   for arg in -DIBM6000; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  sunos*)         
-#                   for arg in -DSUN; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  freebsd*)         
-#                   for arg in -DUNIX386; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                # QAK: If FreeBSD has float support (xdr_float & xdr_double)
-                # in it's libc.a someday, change the following line to LD_XDR=;;
-                LD_XDR=../xdr/xdrfloat.o;;
-  hpux*)          
-#               for arg in -DHP9000; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                if test -z "$GCC"; then
-                          for arg in -Aa; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-                fi
-                LD_XDR=;;
-  osf*)           
-#               for arg in -DDEC_ALPHA; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-		  for arg in -DBIG_LONGS; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-		  for arg in -std1; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-                LD_XDR=;;
-  convex*)        
-#               for arg in -DCONVEX; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  *)		LD_XDR=;;
-esac
-  for arg in ${CPP_XDR-}; do
-    case "$DEFS" in
-      *$arg*) ;;
-      *)      DEFS="${DEFS-} $arg";;
-    esac
-  done
-  for arg in ${CPPFLAGS-}; do
-    case "$DEFS" in
-      *$arg*) ;;
-      *)      DEFS="${DEFS-} $arg";;
-    esac
-  done
-  for arg in ${LD_XDR-}; do
-    case "$LIBS" in
-      *$arg*) ;;
-      *)      LIBS="${LIBS-} $arg";;
-    esac
-  done
-cat > conftest.c <<EOF
-
-#undef NDEBUG
-
-#ifdef _AIX
-#   ifndef _ALL_SOURCE
-#     define _ALL_SOURCE
-#   endif
-#endif
-
-#include <assert.h>
-#include <stdio.h>
-#include <types.h>
-#include <xdr.h>
-
-#define TESTFILE	"conftest.xdr"
-#define EPSILON		.0005
-#ifndef FLT_MIN
-#   define    FLT_MIN 1e-37           /* Standard C maximum */
-#endif
-#ifndef FLT_EPSILON
-#   define FLT_EPSILON        1e-5            /* Standard C maximum */
-#endif
-
-main(ac,av)
-    int			ac ;
-    char		*av[] ;
-{
-    int			ii, jj	= 0 ;
-    char		*fname	= ac > 1 ? av[1] : TESTFILE;
-    FILE		*F	= fopen(fname,"w");
-    XDR			xdrs[1] ;
-    unsigned int	count ;
-    unsigned int	szof ;
-
-    /*
-     * The last value below should be a subnormal number on a DECstation,
-     * RS6000, and SPARCstation.  Hopefully, it will catch bad xdr(3)
-     * implementations (such as a VAXstation's) which don't correctly handle
-     * such values.  Such a value should be the last one in the list.
-     */
-    static float	floats[]	= { 100.125, 100.25, 100.375, 
-					    100.5, 100.625, FLT_MIN/32 } ;
-    float *fp , got_af[sizeof(floats)/sizeof(floats[0])] ;
-
-/* create */
-
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_ENCODE) ;
-
-/* populate */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)floats, count, szof, xdr_float)) ;
-
-/* flush, rewind  and reopen */
-
-    assert(fflush((FILE *)xdrs->x_private) != EOF) ; /* xdr_destroy(xdrs) */
-
-    assert(fclose(F) != EOF) ;
-    F = fopen(fname,"r") ;
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_DECODE) ;
-
-/* check */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)got_af, count, szof, xdr_float)) ;
-    for(ii = 0, fp = got_af;
-	ii < count - 1;
-	ii++, fp++) 
-    {
-	assert(*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON)) ;
-    }
-    assert(*fp == 0 || (*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON))) ;
-
-    exit(0) ;
-}
-
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  XDR_LIBOBJS=
-XDR_INSTALL_DEPS=
-else
-  XDR_LIBOBJS="xdr.o xdrfloat.o xdrstdio.o xdrarray.o"
-XDR_INSTALL_DEPS=installed_headers
-LD_XDR=
-fi
-rm -f conftest*
-
-echo checking for function prototypes
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { extern int foo(int bar);
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_HAVE_PROTOTYPES; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-echo checking for working const
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -Dconst=; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-echo checking for variadic function support
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { } 
-#include <stdarg.h>
-int foo(int bar, ...) {
-    va_list     alist;
-    va_start(alist, bar);
-    bar = (int)va_arg(alist, int);
-    va_end(alist);
-    return bar;
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_STDARG; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-# If you can get the Convex or Solaris stuff working, more power to you -QAK
-if test "$OS" = solaris || test "$OS" = convex; then   # for some reason this is not working on Convex and Solaris
-    :
-else
-if test `$WHICH "${FC-}" | wc -w` != 1; then
-echo checking for strerror
-cat > conftest.c <<EOF
-#include <stdio.h>
-#include <string.h>
-main() { exit(0); } 
-t() { 
-#ifdef __stub_strerror
-choke me
-#else
-/* Override any gcc2 internal prototype to avoid an error.  */
-extern char strerror(); strerror();
-#endif
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_STRERROR; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-#endif
-else
-  echo checking for strerror
-  echo '       CALL STRERROR' > conftest.f
-  if eval "$FC conftest.f > /dev/null 2>&1"; then
-    : true
-  else
-      for arg in -DNO_STRERROR; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-  fi
-  rm -rf a.out conftest.f
-fi
-fi	# end Convex/Solaris hack
-
-
-FTPDIR=${FTPDIR-/home/ftp}/pub/sdm
-
-echo checking for package version
-if test -z "$VERSION"; then
-  if test -r VERSION; then \
-    VERSION="`cat VERSION`"
-  else
-    VERSION=
-  fi
-fi
-if test -z "$MAJOR_NO"; then
-  if test -n "$VERSION"; then \
-    MAJOR_NO=`echo $VERSION |
-      sed -n '/^\([0-9][0-9]*\)\.[0-9][0-9]*.*/s//\1/p;q'`
-  else
-    MAJOR_NO=
-  fi
-fi
-if test -z "$MINOR_NO"; then
-  if test -n "$VERSION"; then \
-    MINOR_NO=`echo $VERSION |
-      sed -n '/^[0-9][0-9]*\.\([0-9][0-9]*\).*/s//\1/p;q'`
-  else
-    MINOR_NO=
-  fi
-fi
-
-
-if test -s conf.missing; then
-  cat << CAT_EOF
-
-$0: The following variables need values.  They may be set in
-the environment or in the file CUSTOMIZE.  Variables referring to
-executable programs needn't be set if the relevant directory is added to
-PATH.  In any case, ./configure should probably be rerun.  See file INSTALL
-for details.
-
-CAT_EOF
-  awk -F: 'BEGIN {printf "%-13s%-27s%s\n", "VARIABLE", "MEANING", "EXAMPLE";
-	          printf "%-13s%-27s%s\n", "--------", "-------", "-------"}
-	         {printf "%-13s%-27s%s\n", $1, $2, $3}' conf.missing
-  rm conf.missing
-  exit 1
-fi
-rm -f conf.missing
-
-
-if test -n "$prefix"; then
-  test -z "$exec_prefix" && exec_prefix='${prefix}'
-  prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
-fi
-if test -n "$exec_prefix"; then
-  prsub="$prsub
-s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%\
-exec_prefix\\1=\\2$exec_prefix%"
-fi
-
-trap 'rm -f config.status; exit 1' 1 3 15
-echo creating config.status
-rm -f config.status
-cat > config.status <<EOF
-#!/bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null`:
-#
-# $0 $*
-
-for arg
-do
-  case "\$arg" in
-    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    exec /bin/sh $0 $* ;;
-    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
-  esac
-done
-
-trap 'rm -f \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${TRANSFORMEES-}; exit 1' 1 3 15
-CPPFLAGS='$CPPFLAGS'
-CFLAGS='$CFLAGS'
-OS='$OS'
-LIBOBJS='$LIBOBJS'
-PORT_HEADERS='$PORT_HEADERS'
-PORT_MANIFEST='$PORT_MANIFEST'
-PORT_SUBDIRS='$PORT_SUBDIRS'
-CC='$CC'
-AR='$AR'
-RANLIB='$RANLIB'
-OLD_FILLVALUES='$OLD_FILLVALUES'
-TRANSFORMEES='$TRANSFORMEES'
-HDF_INC='$HDF_INC'
-HDF_LIB='$HDF_LIB'
-JPEG_LIB='$JPEG_LIB'
-FFLAGS='$FFLAGS'
-LEX='$LEX'
-YACC='$YACC'
-XDRFILE='$XDRFILE'
-MACHINE='$MACHINE'
-WHICH='$WHICH'
-CPP='$CPP'
-FC='$FC'
-NEQN='$NEQN'
-TBL='$TBL'
-INSTALL='$INSTALL'
-INSTALL_PROGRAM='$INSTALL_PROGRAM'
-INSTALL_DATA='$INSTALL_DATA'
-MAKEINFO='$MAKEINFO'
-SWAP='$SWAP'
-NETLONG='$NETLONG'
-CPP_XDR='$CPP_XDR'
-DEFS='$DEFS'
-LIBS='$LIBS'
-XDR_LIBOBJS='$XDR_LIBOBJS'
-XDR_INSTALL_DEPS='$XDR_INSTALL_DEPS'
-LD_XDR='$LD_XDR'
-FTPDIR='$FTPDIR'
-VERSION='$VERSION'
-MAJOR_NO='$MAJOR_NO'
-MINOR_NO='$MINOR_NO'
-srcdir='$srcdir'
-DEFS='$DEFS'
-prefix='$prefix'
-exec_prefix='$exec_prefix'
-prsub='$prsub'
-EOF
-cat >> config.status <<\EOF
-
-top_srcdir=$srcdir
-for file in .. \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${TRANSFORMEES-}; do if [ "x$file" != "x.." ]; then
-  srcdir=$top_srcdir
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  dir=`echo $file|sed 's%/[^/][^/]*$%%'`
-  if test "$dir" != "$file"; then
-    test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
-    test ! -d $dir && mkdir $dir
-  fi
-  echo creating $file
-  rm -f $file
-  case $file in
-    *.c|*.h) echo "/* Generated automatically from `echo $file|sed 's|.*/||'`.in by configure. */" > $file;;
-    *) echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file;;
-  esac
-  sed -e "
-$prsub
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CFLAGS@%$CFLAGS%g
-s%@OS@%$OS%g
-s%@LIBOBJS@%$LIBOBJS%g
-s%@PORT_HEADERS@%$PORT_HEADERS%g
-s%@PORT_MANIFEST@%$PORT_MANIFEST%g
-s%@PORT_SUBDIRS@%$PORT_SUBDIRS%g
-s%@CC@%$CC%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@OLD_FILLVALUES@%$OLD_FILLVALUES%g
-s%@TRANSFORMEES@%$TRANSFORMEES%g
-s%@HDF_INC@%$HDF_INC%g
-s%@HDF_LIB@%$HDF_LIB%g
-s%@JPEG_LIB@%$JPEG_LIB%g
-s%@FFLAGS@%$FFLAGS%g
-s%@LEX@%$LEX%g
-s%@YACC@%$YACC%g
-s%@XDRFILE@%$XDRFILE%g
-s%@MACHINE@%$MACHINE%g
-s%@WHICH@%$WHICH%g
-s%@CPP@%$CPP%g
-s%@FC@%$FC%g
-s%@NEQN@%$NEQN%g
-s%@TBL@%$TBL%g
-s%@INSTALL@%$INSTALL%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SWAP@%$SWAP%g
-s%@NETLONG@%$NETLONG%g
-s%@CPP_XDR@%$CPP_XDR%g
-s%@DEFS@%$DEFS%g
-s%@LIBS@%$LIBS%g
-s%@XDR_LIBOBJS@%$XDR_LIBOBJS%g
-s%@XDR_INSTALL_DEPS@%$XDR_INSTALL_DEPS%g
-s%@LD_XDR@%$LD_XDR%g
-s%@FTPDIR@%$FTPDIR%g
-s%@VERSION@%$VERSION%g
-s%@MAJOR_NO@%$MAJOR_NO%g
-s%@MINOR_NO@%$MINOR_NO%g
-s%@srcdir@%$srcdir%g
-s%@DEFS@%$DEFS%
-" $top_srcdir/${file}.in >> $file
-fi; done
-
-EOF
-chmod +x config.status
-test -n "$no_create" || ./config.status
-if test -s conf.missing; then
-  cat << CAT_EOF
-
-$0: The following variables need values.  They may be set in
-the environment or in the file CUSTOMIZE.  Variables referring to
-executable programs needn't be set if the relevant directory is added to
-PATH.  In any case, ./configure should probably be rerun.  See file INSTALL
-for details.
-
-CAT_EOF
-  awk -F: 'BEGIN {printf "%-13s%-27s%s\n", "VARIABLE", "MEANING", "EXAMPLE";
-	          printf "%-13s%-27s%s\n", "--------", "-------", "-------"}
-	         {printf "%-13s%-27s%s\n", $1, $2, $3}' conf.missing
-  rm conf.missing
-  exit 1
-fi
-rm -f conf.missing
- # Post process any makefiles.
-#
-# Create a script to accomplish the post processing.
-#
-cat << EOF_CONFTEST_SH > conftest.sh
-cat << EOF_CONFTEST_C > conftest.c
-#include <stdio.h>
-main()
-{
-    return readsub((char*)NULL) ? 0 : 1;
-}
-readsub(inpath)
-    char	*inpath;
-{
-    char	buf[2048], path[1024];
-    FILE	*fp	= inpath == NULL
-				? stdin
-				: fopen(inpath, "r");
-    if (fp == NULL) {
-	(void) perror(inpath);
-	return 0;
-    }
-    buf[sizeof(buf)-1]	= 0;
-    while (fgets(buf, sizeof(buf), fp) != NULL) {
-      if (sscanf(buf, "include%*[] \\t[]%s", path) == 1) {
-          if (!readsub(path))
-		return 0;
-	} else {
-	    (void) fputs(buf, stdout);
-	}
-    }
-    return 1;
-}
-EOF_CONFTEST_C
-if $CC -o conftest conftest.c; then
-    conftest=\`pwd\`/conftest
-    set \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${POST_PROCESSEES-}
-    for file do
-      echo post processing makefile \\\`\$file\\'
-      sd=\`pwd\`/\`echo \$file | sed 's,[^/]*\$,,'\`
-      base=\`basename \$file\`
-      (cd \$sd; \$conftest < \$base > conftest.mk && mv conftest.mk \$base)
-    done
-fi
-rm conftest conftest.c
-EOF_CONFTEST_SH
-#
-# Append the above script to the output-script file, config.status, so that 
-# invoking that file will also do the post processing.  Note that the 
-# output-script file will be invoked by ./configure before the post-
-# processing code is appended.
-#
-cat conftest.sh >> config.status
-#
-# If appropriate, do the postprocessing now because the previous step 
-# couldn't.
-#
-test -n "$no_create" || sh conftest.sh
-rm conftest.sh
- 

Deleted: packages/libhdf4/trunk/mfhdf/configure.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/configure.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/configure.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,63 +0,0 @@
-dnl $Id: configure.in,v 1.6 1998/09/02 21:09:59 acheng Exp $
-dnl
-dnl Process this file with GNU autoconf(1) to produce a configure script.
-dnl
-UC_INIT(nctest)
-
-UL_FILLVALUES
-
-UC_DEFAULT(CFLAGS, -O)
-UC_DEFAULT(CPPFLAGS, -DNDEBUG)
-UC_ENSURE(CPPFLAGS, -DHDF)
-UC_DEFAULT(HDF_INC, -I/hdf/home/chouck/hdf/33/include)
-UC_DEFAULT(HDF_LIB, /hdf/home/chouck/hdf/33/lib/libdf.a)
-UC_DEFAULT(JPEG_LIB, /hdf/home/chouck/hdf/33/jpeg/libjpeg.a)
-UC_DEFAULT(FFLAGS,)
-UC_DEFAULT(LEX, lex)
-UC_DEFAULT(YACC, yacc)
-UC_DEFAULT(XDRFILE, xdrposix)
-UC_PREFIX(..)
-
-UC_OS
-UC_MACHINE
-UC_PROG_CC
-UC_PROG_WHICH
-if test "$OS" = ultrix && test "$MACHINE" = vax \
-    && test `$WHICH "$CC"` = /bin/cc; then
-  echo "changing C compiler to \`vcc' because \`cc' floating-point is broken"
-  CC=vcc
-fi
-
-UC_PROG_CPP
-UC_PROG_FC
-UC_PROG_NEQN
-UC_PROG_TBL
-UC_PROG_INSTALL
-UC_PROG_AR
-UC_PROG_MAKEINFO
-
-UL_SWAP
-UL_NETLONG
-UL_XDR
-UL_PROTOTYPES
-UL_CONST
-UL_VARIADIC_FUNCTIONS
-UL_STRERROR
-
-UC_FTPDIR(pub/sdm)
-UC_VERSION
-
-UC_CHECK_MISSING
-
-UC_FINISH( \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-    pablo/Makefile \
-    )

Deleted: packages/libhdf4/trunk/mfhdf/dumper/Example6.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/Image_with_Palette.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/LongDataset.hdf
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/dumper/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,31 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = hdp
+
+## Information for building the "hdp" program
+hdp_SOURCES = hdp.c hdp_dump.c hdp_gr.c hdp_list.c hdp_rig.c hdp_sds.c      \
+              hdp_util.c hdp_vd.c hdp_vg.c show.c
+hdp_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdp_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check_SCRIPTS = testhdp.sh
+
+check:
+	@$(SHELL) ./testhdp.sh

Modified: packages/libhdf4/trunk/mfhdf/dumper/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,723 +1,461 @@
-# Makefile for HDF dumper(1).
-#
-# Makefile.in,v 1.2 1994/05/19 20:18:53 sxu Exp
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = hdp
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+hdp_SOURCES = hdp.c hdp_dump.c hdp_gr.c hdp_list.c hdp_rig.c hdp_sds.c      \
+              hdp_util.c hdp_vd.c hdp_vg.c show.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+hdp_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdp_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+#############################################################################
+#############################################################################
+check_SCRIPTS = testhdp.sh
+subdir = mfhdf/dumper
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES = testhdp.sh
+bin_PROGRAMS = hdp$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+am_hdp_OBJECTS = hdp.$(OBJEXT) hdp_dump.$(OBJEXT) hdp_gr.$(OBJEXT) \
+	hdp_list.$(OBJEXT) hdp_rig.$(OBJEXT) hdp_sds.$(OBJEXT) \
+	hdp_util.$(OBJEXT) hdp_vd.$(OBJEXT) hdp_vg.$(OBJEXT) \
+	show.$(OBJEXT)
+hdp_OBJECTS = $(am_hdp_OBJECTS)
+hdp_LDFLAGS =
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hdp.Po ./$(DEPDIR)/hdp_dump.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_gr.Po ./$(DEPDIR)/hdp_list.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_rig.Po ./$(DEPDIR)/hdp_sds.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_util.Po ./$(DEPDIR)/hdp_vd.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_vg.Po ./$(DEPDIR)/show.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hdp_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am testhdp.sh.in
+SOURCES = $(hdp_SOURCES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+all: all-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= hdp
-BINFILES	= $(PROGRAM)
-#HDF_LIB         = @HDF_LIB@
-#HDF_INC         = @HDF_INC@
-#JPEG_LIB        = @JPEG_LIB@
-#CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_HDP)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in depend hdp.h hdp.c hdp_list.c hdp_sds.c hdp_util.c hdp_vd.c hdp_vg.c hdp_rig.c show.c hdp_dump.c hdp_gr.c
-MANUALS		= 
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a
-OBJS		=  hdp.o hdp_list.o hdp_sds.o hdp_util.o hdp_vd.o hdp_vg.o hdp_rig.o show.o hdp_dump.o hdp_gr.o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(LIBSX) $(JPEG_LIB) $(ZLIB_LIB)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) *.o
-
-#all::		$(PROGRAM)
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" $(PROGRAM); \
-	fi
-
-debug:  $(PROGRAM)  ../libsrc/libmfhdf.a
-	purify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o phdp
-
-
-test: hdp
-	sh testhdp.sh
-
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/dumper/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+testhdp.sh: $(top_builddir)/config.status testhdp.sh.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+hdp$(EXEEXT): $(hdp_OBJECTS) $(hdp_DEPENDENCIES) 
+	@rm -f hdp$(EXEEXT)
+	$(LINK) $(hdp_LDFLAGS) $(hdp_OBJECTS) $(hdp_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_dump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_gr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_rig.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_sds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_vd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_vg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/show.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+check: check-am
+all-am: Makefile $(PROGRAMS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
 
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/dumper
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
+check:
+	@$(SHELL) ./testhdp.sh
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/dumper/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,40 +0,0 @@
-# Makefile for HDF dumper(1).
-#
-# Makefile.in,v 1.2 1994/05/19 20:18:53 sxu Exp
-
-PROGRAM		= hdp
-BINFILES	= $(PROGRAM)
-HDF_LIB         = @HDF_LIB@
-HDF_INC         = @HDF_INC@
-JPEG_LIB        = @JPEG_LIB@
-CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-MANIFEST	= Makefile.in depend hdp.h hdp.c hdp_list.c hdp_sds.c hdp_util.c hdp_vd.c hdp_vg.c hdp_rig.c show.c hdp_dump.c
-MANUALS		= 
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-OBJS		=  hdp.o hdp_list.o hdp_sds.o hdp_util.o hdp_vd.o hdp_vg.o hdp_rig.o show.o hdp_dump.o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(LIBSX) $(JPEG_LIB)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) *.o
-
-all::		$(PROGRAM)
-
-
-test:	echo "*** there is no testing for $(PROGRAM) ***" ; 
-
-install::	installed_program installed_manuals
-
-include ../port/master.mk
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/dumper/TEST.COM
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/TEST.COM	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/TEST.COM	2007-09-28 21:58:13 UTC (rev 1125)
@@ -60,6 +60,9 @@
 $ hdp dumpgr grtdfui162.hdf
 $ hdp dumpgr grtdfi322.hdf
 $ hdp dumpgr -p image_with_palette.hdf
-$ hdp dumpgr -p -h image_with_palette.hdf
-$ hdp dumpgr -r 2,4 -p -d image_with_palette.hdf
+$ hdp dumpgr -h image_with_palette.hdf
+$ hdp dumpgr -r 2,4 -pd image_with_palette.hdf
+$ hdp dumpgr -r 6 -d -s grtdfui82.hdf
+$ hdp dumpgr -r 6 -m 1 grtdfui82.hdf
+$ hdp dumpgr -c grtdfi322.hdf
 $ exit

Deleted: packages/libhdf4/trunk/mfhdf/dumper/ctxtr2r.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/depend
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/depend	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/depend	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,132 +0,0 @@
-hdp.o: hdp.c
-hdp.o: hdp.h
-hdp.o: ../../hdf/src//hdf.h
-hdp.o: ../../hdf/src//hdfi.h
-hdp.o: ../../hdf/src//hlimits.h
-hdp.o: ../../hdf/src//hntdefs.h
-hdp.o: ../../hdf/src//htags.h
-hdp.o: ../../hdf/src//hbitio.h
-hdp.o: ../../hdf/src//hcomp.h
-hdp.o: ../../hdf/src//herr.h
-hdp.o: ../../hdf/src//hproto.h
-hdp.o: ../../hdf/src//hfile.h
-hdp_dump.o: hdp_dump.c
-hdp_dump.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_dump.o: ../../mfhdf/libsrc/local_nc.h
-hdp_dump.o: ../../mfhdf/libsrc/netcdf.h
-hdp_dump.o: ../../hdf/src//hlimits.h
-hdp_dump.o: ../../hdf/src//hdf.h
-hdp_dump.o: ../../hdf/src//hdfi.h
-hdp_dump.o: ../../hdf/src//hntdefs.h
-hdp_dump.o: ../../hdf/src//htags.h
-hdp_dump.o: ../../hdf/src//hbitio.h
-hdp_dump.o: ../../hdf/src//hcomp.h
-hdp_dump.o: ../../hdf/src//herr.h
-hdp_dump.o: ../../hdf/src//hproto.h
-hdp_dump.o: ../../hdf/src//vg.h
-hdp_dump.o: ../../hdf/src//hfile.h
-hdp_dump.o: ../../hdf/src//tbbt.h
-hdp_dump.o: hdp.h
-hdp_list.o: hdp_list.c
-hdp_list.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_list.o: ../../mfhdf/libsrc/local_nc.h
-hdp_list.o: ../../mfhdf/libsrc/netcdf.h
-hdp_list.o: ../../hdf/src//hlimits.h
-hdp_list.o: ../../hdf/src//hdf.h
-hdp_list.o: ../../hdf/src//hdfi.h
-hdp_list.o: ../../hdf/src//hntdefs.h
-hdp_list.o: ../../hdf/src//htags.h
-hdp_list.o: ../../hdf/src//hbitio.h
-hdp_list.o: ../../hdf/src//hcomp.h
-hdp_list.o: ../../hdf/src//herr.h
-hdp_list.o: ../../hdf/src//hproto.h
-hdp_list.o: ../../hdf/src//vg.h
-hdp_list.o: ../../hdf/src//hfile.h
-hdp_list.o: ../../hdf/src//tbbt.h
-hdp_list.o: hdp.h
-hdp_rig.o: hdp_rig.c
-hdp_rig.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_rig.o: ../../mfhdf/libsrc/local_nc.h
-hdp_rig.o: ../../mfhdf/libsrc/netcdf.h
-hdp_rig.o: ../../hdf/src//hlimits.h
-hdp_rig.o: ../../hdf/src//hdf.h
-hdp_rig.o: ../../hdf/src//hdfi.h
-hdp_rig.o: ../../hdf/src//hntdefs.h
-hdp_rig.o: ../../hdf/src//htags.h
-hdp_rig.o: ../../hdf/src//hbitio.h
-hdp_rig.o: ../../hdf/src//hcomp.h
-hdp_rig.o: ../../hdf/src//herr.h
-hdp_rig.o: ../../hdf/src//hproto.h
-hdp_rig.o: ../../hdf/src//vg.h
-hdp_rig.o: ../../hdf/src//hfile.h
-hdp_rig.o: ../../hdf/src//tbbt.h
-hdp_rig.o: hdp.h
-hdp_sds.o: hdp_sds.c
-hdp_sds.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_sds.o: ../../mfhdf/libsrc/local_nc.h
-hdp_sds.o: ../../mfhdf/libsrc/netcdf.h
-hdp_sds.o: ../../hdf/src//hlimits.h
-hdp_sds.o: ../../hdf/src//hdf.h
-hdp_sds.o: ../../hdf/src//hdfi.h
-hdp_sds.o: ../../hdf/src//hntdefs.h
-hdp_sds.o: ../../hdf/src//htags.h
-hdp_sds.o: ../../hdf/src//hbitio.h
-hdp_sds.o: ../../hdf/src//hcomp.h
-hdp_sds.o: ../../hdf/src//herr.h
-hdp_sds.o: ../../hdf/src//hproto.h
-hdp_sds.o: ../../hdf/src//vg.h
-hdp_sds.o: ../../hdf/src//hfile.h
-hdp_sds.o: ../../hdf/src//tbbt.h
-hdp_sds.o: hdp.h
-hdp_util.o: hdp_util.c
-hdp_util.o: hdp.h
-hdp_util.o: ../../hdf/src//hdf.h
-hdp_util.o: ../../hdf/src//hdfi.h
-hdp_util.o: ../../hdf/src//hlimits.h
-hdp_util.o: ../../hdf/src//hntdefs.h
-hdp_util.o: ../../hdf/src//htags.h
-hdp_util.o: ../../hdf/src//hbitio.h
-hdp_util.o: ../../hdf/src//hcomp.h
-hdp_util.o: ../../hdf/src//herr.h
-hdp_util.o: ../../hdf/src//hproto.h
-hdp_util.o: ../../hdf/src//hfile.h
-hdp_vd.o: hdp_vd.c
-hdp_vd.o: hdp.h
-hdp_vd.o: ../../hdf/src//hdf.h
-hdp_vd.o: ../../hdf/src//hdfi.h
-hdp_vd.o: ../../hdf/src//hlimits.h
-hdp_vd.o: ../../hdf/src//hntdefs.h
-hdp_vd.o: ../../hdf/src//htags.h
-hdp_vd.o: ../../hdf/src//hbitio.h
-hdp_vd.o: ../../hdf/src//hcomp.h
-hdp_vd.o: ../../hdf/src//herr.h
-hdp_vd.o: ../../hdf/src//hproto.h
-hdp_vd.o: ../../hdf/src//hfile.h
-hdp_vg.o: hdp_vg.c
-hdp_vg.o: hdp.h
-hdp_vg.o: ../../hdf/src//hdf.h
-hdp_vg.o: ../../hdf/src//hdfi.h
-hdp_vg.o: ../../hdf/src//hlimits.h
-hdp_vg.o: ../../hdf/src//hntdefs.h
-hdp_vg.o: ../../hdf/src//htags.h
-hdp_vg.o: ../../hdf/src//hbitio.h
-hdp_vg.o: ../../hdf/src//hcomp.h
-hdp_vg.o: ../../hdf/src//herr.h
-hdp_vg.o: ../../hdf/src//hproto.h
-hdp_vg.o: ../../hdf/src//hfile.h
-hdp_vg.o: ../../hdf/src//vg.h
-hdp_vg.o: ../../hdf/src//tbbt.h
-show.o: show.c
-show.o: hdp.h
-show.o: ../../hdf/src//hdf.h
-show.o: ../../hdf/src//hdfi.h
-show.o: ../../hdf/src//hlimits.h
-show.o: ../../hdf/src//hntdefs.h
-show.o: ../../hdf/src//htags.h
-show.o: ../../hdf/src//hbitio.h
-show.o: ../../hdf/src//hcomp.h
-show.o: ../../hdf/src//herr.h
-show.o: ../../hdf/src//hproto.h
-show.o: ../../hdf/src//hfile.h
-show.o: ../../hdf/src//vg.h
-show.o: ../../hdf/src//tbbt.h

Deleted: packages/libhdf4/trunk/mfhdf/dumper/grtdfi322.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/grtdfui162.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/grtdfui82.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/grtdfui83.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/grtdfui84.hdf
===================================================================
(Binary files differ)

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.23 $";
+static char RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
-/* $Id: hdp.c,v 1.23 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp.c,v 1.25 2005/01/09 20:54:34 mcgrath Exp $ */
 #if defined __MWERKS__
 #include <console.h>
 #endif
@@ -221,12 +221,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VShdfsize");
 
-#ifdef HAVE_PABLO
-/*
-  TRACE_ON(VS_mask, ID_VShdfsize);
-*/
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -246,7 +240,7 @@
         for (j = 0; j < vs->wlist.n; j++)	
             totalsize += vs->wlist.isize[j];
       }		
-    else
+    else if (fields[0] != '\0')  /* implies: return 0 for empty 'fields' */
       {  /* parse field string */
         if ((scanattrs(fields, &ac, &av) < 0) || (ac < 1))
             HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -276,12 +270,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-  TRACE_OFF(VS_mask, ID_VShdfsize);
-*/
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VShdfsize */
 
@@ -313,12 +301,6 @@
      intn i, nattrs, a_index, found;
      DYN_VWRITELIST *w;
 
-#ifdef HAVE_PABLO
-/*
-     TRACE_ON(V_mask, ID_VSattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -373,11 +355,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-      TRACE_OFF(V_mask, ID_VSattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }  /* VSattrhdfsize */
@@ -408,12 +385,6 @@
     int32 fid, vsid;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-/*
-    TRACE_ON(V_mask, ID_Vattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -455,11 +426,5 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-      TRACE_OFF(V_mask, ID_Vattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vattrhdfsize */

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.23 $";
+static char RcsId[] = "@(#)$Revision: 1.24 $";
 #endif
 
-/* $Id: hdp.h,v 1.23 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp.h,v 1.24 2002/03/08 05:58:25 bmribler Exp $ */
 
 #ifndef __HDP_H
 #define __HDP_H
@@ -478,8 +478,8 @@
 
 /* hdp_vg.c */
 extern intn do_dumpvg(intn curr_arg, intn argc, char *argv[], intn help);
-extern intn print_data_annots(int32 file_id, char *file_name, int32 tag, int32 ref);
-extern intn print_file_annotations( int32 file_id, char *file_name );
+extern intn print_data_annots(int32 file_id, const char *file_name, int32 tag, int32 ref);
+extern intn print_file_annotations( int32 file_id, const char *file_name );
 void print_fields( char *fields, char *field_title, FILE *fp );
 
 /* hdp_vd.c */

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_dump.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_dump.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_dump.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.18 $";
+static char RcsId[] = "$Revision: 1.19 $";
 #endif
 
-/* $Id: hdp_dump.c,v 1.18 2000/10/06 04:04:01 bmribler Exp $ */
+/* $Id: hdp_dump.c,v 1.19 2000/12/19 20:57:12 koziol Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -481,7 +481,7 @@
    }  /* space char. criteria */
 
    /* for each character in the buffer, print it accordingly */
-   for (i = 0; i < cnt && bufptr != NULL; i++)
+   for (i = 0; i < cnt; i++)
    {
       /* if number of characters printed on the current line reaches
          the max defined and the data buffer doesn't contain any LF or
@@ -557,6 +557,9 @@
       /* advance the buffer pointer */
       bufptr = (char *) bufptr + off;
 
+       /* Move here to avoid internal compiler error on Cray J90 -QAK */
+       if(bufptr==NULL)
+           break;
    }	/* end for every item in buffer */
 
    putc('\n', ofp); /* newline */

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_gr.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_gr.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_gr.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,3 +1,4 @@
+
 /**********************************************************************
  * NCSA HDF                                                                 *
  * Software Development Group                                               *
@@ -14,7 +15,7 @@
 static char RcsId[] = "@(#)Revision";
 #endif
 
-/* $Id: hdp_gr.c,v 1.14 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp_gr.c,v 1.21 2003/12/10 21:14:01 epourmal Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -31,18 +32,21 @@
              char *argv[])
 {
     printf("Usage:\n");
-    printf("%s dumpgr [-a|-i <indices>|-r <refs>|-n <names>] [-m <interlace>] [-p] [-cdhvs] [-o <filename>] [-bx] <filelist>\n", argv[0]);
+    printf("%s dumpgr [-a|-i <indices>|-r <refs>|-n <names>] [-m <interlace>] [-dhvcs] [-p|-pd] [-o <filename>] [-bx] <filelist>\n", argv[0]);
     printf("\t-a\tDump all RIs in the file (default)\n");
     printf("\t-i <indices>\tDump the <indices>th RIs in the file \n");
     printf("\t-r <refs>\tDump the RIs with reference number <refs>\n");
     printf("\t-n <names>\tDump the RIs with name <names>\n");
     printf("\t-m <interlace>\tDump data in interlace mode <interlace= 0, 1, or 2>\n");
-    printf("\t-c\tPrint space characters as they are, not \\digit\n");
     printf("\t-d\tDump data only, no tag/ref, formatted to input to hp2hdf\n");
-    printf("\t-h\tDump header only, no annotation for elements nor data\n");
+    printf("\t-h\tDump header only, no data - exclusive with -p and -pd\n");
     printf("\t-v\tDump everything including all annotations (default)\n");
-    printf("\t-s\tDump data as a stream, i.e. do not add carriage returns\n");
-    printf("\t-p\tDump palette data\n");
+    printf("\t-c\tPrint space characters as they are, not \\digit\n");
+    printf("\t-g\tDo not print data of file (global) attributes\n"); 
+    printf("\t-l\tDo not print data of local attributes\n"); 
+    printf("\t-s\tDo not add carriage return to a long line - dump it as a stream\n");
+    printf("\t-p\tDump palette's information and data - exclusive with -h\n");
+    printf("\t-pd\tDump palette's data only - exclusive with -h\n");
     printf("\t-o <filename>\tOutput to file <filename>\n");
     printf("\t-b\tBinary format of output\n");
     printf("\t-x\tAscii text format of output (default)\n");
@@ -125,7 +129,7 @@
          case 'h':	/* no annotations nor data */
 	     /* make sure -p is not also given */
 	     if( dumpgr_opts->print_pal )
-		ERROR_GOTO_0( "Option -h and -p must not be used together" );
+		ERROR_GOTO_0( "Option -h must not be used together with either -p or -pd" );
 
              dumpgr_opts->contents = DHEADER;
              (*curr_arg)++;
@@ -146,6 +150,16 @@
              (*curr_arg)++;
              break; 
 
+         case 'g':      /* suppress file (global) attr data, print its header */
+                dumpgr_opts->no_gattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
+         case 'l':      /* suppress local attr data, only print its header */
+                dumpgr_opts->no_lattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
          case 'o':   /* specify output file */
              dumpgr_opts->dump_to_file = TRUE;
 
@@ -166,12 +180,19 @@
              break;
 
          case 'p':   /* dump palette data */
-	     /* make sure -p is not also given */
+	     /* make sure -h is not also given */
 	     if( dumpgr_opts->contents == DHEADER )
-		ERROR_GOTO_0( "Option -h and -p must not be used together" );
+		ERROR_GOTO_0( "Option -h must not be used together with either -p or -pd" );
 
              dumpgr_opts->print_pal = TRUE;
+
+	     /* if the current option is -pd, then pal data only is requested */
+	     if( argv[*curr_arg][2] == 'd' ) /* \0 if only -p */
+	     {
+		dumpgr_opts->contents = DDATA;
+	     }
              (*curr_arg)++;
+
              break;
 
          default:	/* invalid dumpgr option */
@@ -409,32 +430,11 @@
    for (attr_index = 0; attr_index < n_file_attrs; attr_index++)
    {
       /* get the current attr's name, number type, and number of values */
-      ret_value = GRattrinfo(gr_id, attr_index, attr_name, &attr_nt, &attr_count);
-      if (FAIL == ret_value ) /* to the next attribute */
+      status = GRattrinfo(gr_id, attr_index, attr_name, &attr_nt, &attr_count);
+      if (FAIL == status ) /* to the next attribute */
          ERROR_CONT_2( "in %s: GRattrinfo failed for %d'th attribute", 
 			"print_GRattrs", (int)attr_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_GRattrs" );
-
-      /* allocate space for the attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_GRattrs" );
-
-      /* read the values of the attribute into the buffer */
-      status = GRgetattr( gr_id, attr_index, attr_buf );
-      if (status == FAIL)
-         ERROR_CONT_2( "in %s: GRgetattr failed for %d'th attribute", 
-		"print_GRattr", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (NULL == attr_nt_desc)
@@ -455,30 +455,54 @@
 			attr_nt_desc, (int) attr_count);
       resetBuff(( VOIDP *) &attr_nt_desc ); 
 
-      /* display the attribute's values */
-      fprintf(fp, "\t\t Value = ");
-
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-         option will be ignored for other types */
-      if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpgr_opts->no_gattr_data == FALSE )
       {
-         status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute",
-                "print_GRattr", (int)attr_index );
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
+         /* calculate the buffer size of the attribute using the number of
+            values in the attribute and its value size */
+         attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+         /* make sure we are not allocating 0 elements */
+         CHECK_POS( attr_buf_size, "attr_buf_size", "print_GRattrs" );
+
+         /* allocate space for the attribute's values */
+         attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+         CHECK_ALLOC( attr_buf, "attr_buf", "print_GRattrs" );
+
+         /* read the values of the attribute into the buffer */
+         status = GRgetattr( gr_id, attr_index, attr_buf );
+         if (status == FAIL)
+            ERROR_CONT_2( "in %s: GRgetattr failed for %d'th attribute", 
+		"print_GRattr", (int)attr_index );
+
+         /* display the attribute's values */
+         fprintf(fp, "\t\t Value = ");
+
+         /* if the user wishes to have clean output, i.e. option -c is
+            selected - Note that this option is only applicable to DFNT_CHAR
+            type, the option will be ignored for other types */
+         if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+         {
+            status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+               ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute",
+                   "print_GRattr", (int)attr_index );
+
+         }
+         else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+         {
+            status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
 			ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute",
-                "print_GRattr", (int)attr_index );
-      }
-      /* free buffer and reset it to NULL */
-      resetBuff( &attr_buf );
+            if( status == FAIL )
+               ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute",
+                   "print_GRattr", (int)attr_index );
+         }
+         /* free buffer and reset it to NULL */
+      }  /* end of if no file attributes */
    } /* for all attributes of GR */
 
    return ret_value;
@@ -511,27 +535,6 @@
          ERROR_CONT_3( "in %s: GRattrinfo failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of 
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_RIattrs" );
-
-      /* allocate space for attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_RIattrs" );
-
-      /* read the values of the attribute into buffer attr_buf */
-      status = GRgetattr( ri_id, attr_index, attr_buf );
-      if (status == FAIL)  /* go to the next attribute */
-         ERROR_CONT_3( "in %s: GRgetattr failed for %d'th attribute of %d'th RI", 
-			"print_RIattrs", (int)attr_index, (int)ri_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (NULL == attr_nt_desc)  /* go to the next attribute */
@@ -545,30 +548,52 @@
       /* free buffer and reset it to NULL */
       resetBuff((VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values then free buffer */
-      fprintf(fp, "\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpgr_opts->no_lattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-         option will be ignored for other types */
-      if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_3( "in %s: dumpclean failed for %d'th attribute of %d'th RI", 
+         /* calculate the buffer size of the attribute using the number of 
+            values in the attribute and its value size */
+         attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+         /* make sure we are not allocating 0 elements */
+         CHECK_POS( attr_buf_size, "attr_buf_size", "print_RIattrs" );
+
+         /* allocate space for attribute's values */
+         attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+         CHECK_ALLOC( attr_buf, "attr_buf", "print_RIattrs" );
+
+         /* read the values of the attribute into buffer attr_buf */
+         status = GRgetattr( ri_id, attr_index, attr_buf );
+         if (status == FAIL)  /* go to the next attribute */
+            ERROR_CONT_3( "in %s: GRgetattr failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
+
+         /* display the attribute's values then free buffer */
+         fprintf(fp, "\t\t Value = ");
+
+         /* if the user wishes to have clean output, i.e. option -c is selected */
+         /* Note that this option is only applicable to DFNT_CHAR type, the
+            option will be ignored for other types */
+         if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+         {
+            status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+               ERROR_CONT_3( "in %s: dumpclean failed for %d'th attribute of %d'th RI", 
+			"print_RIattrs", (int)attr_index, (int)ri_index );
+         }
+         else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+         {
+            status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
 			ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_3( "in %s: dumpfull failed for %d'th attribute of %d'th RI", 
+            if( status == FAIL )
+               ERROR_CONT_3( "in %s: dumpfull failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
-      }
-
-      /* free buffer and reset it to NULL */
-      resetBuff( &attr_buf );
+         }
+      }  /* end of if no local attributes */
    } /* for all attributes of an RI */
 
    return ret_value;
@@ -594,34 +619,44 @@
          interlace_mode;
    intn  status, ret_value = SUCCEED;
 
-   /* display each palette of an RI */
-   for( pal_index = 0; pal_index < num_pals; pal_index++ )
-   {
-      /* Get the identifier of the palette attached to the image. */
-      pal_id = GRgetlutid (ri_id, pal_index);
-      if( pal_id == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
-                        "print_PaletteInfo", (int)pal_index);
+   /* Check the number of palettes */
+   if((num_pals=GRgetnluts(ri_id))<0)
+         ERROR_GOTO_2( "in %s: GRgetnluts failed for raster image ID #%d",
+                        "print_PaletteInfo", (int)ri_id);
 
-      /* Obtain and display information about the palette. */
-      status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
-                            &n_entries);
-      if( status == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
-                        "print_PaletteInfo", (int)pal_index);
+   /* if there are no palette data, print message for both cases:
+      header-only and verbose (data+header) */
+   if(num_pals==0) {
+        fprintf( fp, "\t No palette\n");
+   } /* end if */
+   else {
+      /* display each palette of an RI */
+      for( pal_index = 0; pal_index < num_pals; pal_index++ )
+      {
+          /* Get the identifier of the palette attached to the image. */
+         pal_id = GRgetlutid (ri_id, pal_index);
+         if( pal_id == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
+                            "print_PaletteInfo", (int)pal_index);
 
-      /* if there are no palette data, print message for both cases:
-         header-only and verbose (data+header) */
-      if( n_entries <= 0 )
-         fprintf( fp, "\t No palette\n");
+         /* Obtain and display information about the palette. */
+         status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
+                                &n_entries);
+         if( status == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
+                            "print_PaletteInfo", (int)pal_index);
 
-      /* else, if there are palette data, print header info */
-      else /* have palette data */
+         /* if there are palette data, print header info */
          fprintf (fp, "\t Palette: %d components; %d entries\n",
                         (int)n_comps, (int)n_entries);
 
-   } /* end of for each palette */
+      } /* end of for each palette */
+   } /* end else */
 
+done:
+   if (ret_value == FAIL)
+   { /* Failure cleanup */
+   }
    return( ret_value );
 }  /* end of print_PaletteInfo */
 
@@ -645,67 +680,82 @@
          n_entries,
          interlace_mode;
    uint8 palette_data[N_ENTRIES][3];  /* static because of fixed size */
+   uint16 ri_ref;
    intn  status, ret_value = SUCCEED;
 
-   /* display each palette of an RI */
-   for( pal_index = 0; pal_index < num_pals; pal_index++ )
-   {
-      /* Get the identifier of the palette attached to the image. */
-      pal_id = GRgetlutid (ri_id, pal_index);
-      if( pal_id == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d", 
-			"print_Palette", (int)pal_index);
+   /* Get the ref# of the image, for displaying output */
+   ri_ref = GRidtoref(ri_id);
 
-      /* Obtain and display information about the palette. */
-      status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
-                            &n_entries);
-      if( status == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d", 
-			"print_Palette", (int)pal_index);
-   
-      /* if there are no palette data, print message for both cases:   
-         header-only and verbose (data+header) */
-      if( n_entries <= 0 )
+   /* Check the number of palettes */
+   if((num_pals=GRgetnluts(ri_id))<0)
+         ERROR_GOTO_2( "in %s: GRgetnluts failed for raster image with ref#=%d",
+                        "print_Palette", (int)ri_ref);
+
+   /* if there are no palette data, print message for both cases:
+      header-only and verbose (data+header) */
+   if(num_pals==0) {
+      if( dumpgr_opts->contents != DDATA )
+         fprintf( fp, "\n\t Raster Image Ref. = %d\n\t No palette data\n", 
+			  (int)ri_ref);
+   } /* end if */
+   else {
+      /* display each palette of an RI */
+      for( pal_index = 0; pal_index < num_pals; pal_index++ )
       {
-         if( dumpgr_opts->contents != DDATA )
-            fprintf( fp, "\t No palette data\n");
-      }
-      /* else, if there are palette data, print header info when not 
-         data-only and print palette data when not header-only */
-      else /* have palette data */
-      {
-         if( dumpgr_opts->contents != DDATA )
-            fprintf (fp, "\t Palette: %d components; %d entries\n", 
-			(int)n_comps, (int)n_entries);
+         /* Get the identifier of the palette attached to the image. */
+         pal_id = GRgetlutid (ri_id, pal_index);
+         if( pal_id == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
+                            "print_Palette", (int)pal_index);
 
-         if( dumpgr_opts->contents != DHEADER )
-         {  /* not header only */
-            /* Read the palette data. */
-            status = GRreadlut (pal_id, (VOIDP)palette_data);
-            if( status == FAIL ) /* continue to the next palette */
-            {
-               ERROR_CONT_2( "in %s: GRreadlut failed for palette #%d", 
-			"print_Palette", (int)pal_index);
-            }
+         /* Read the palette data. */
+         status = GRreadlut (pal_id, (VOIDP)palette_data);
+         if( status == FAIL ) { /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRreadlut failed for palette #%d",
+                            "print_Palette", (int)pal_index); }
 
-	    /* if printing data only, print palette data with no indentation */
-	    if( dumpgr_opts->contents == DDATA )
-               status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps, 
-			palette_data, fp, 0, 0 );
+         /* Obtain and display information about the palette. */
+         status = GRgetlutinfo (pal_id, &n_comps, &data_type, 
+				&interlace_mode, &n_entries);
+         if( status == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
+                           "print_Palette", (int)pal_index);
 
-            /* display the palette data with the title line and indentation */
-	    else
-	    {
-               fprintf (fp, "\t Palette Data: \n");
-               status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps, 
-			palette_data, fp, DATA_INDENT, DATA_CONT_INDENT );
-	    }
-            if( status == FAIL )
-               ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d",
-			"print_Palette", (int)ri_id );
-         }  /* not header only */
-      } /* have palette data */
-   } /* end of for each palette */
+         /* if there are palette data, print header info when not 
+             data-only and print palette data when not header-only */
+	 switch (dumpgr_opts->contents)
+	 {
+	    /* Note that case DHEADER is not presented because option -h
+	       is not allowed with -p or -pd */
+	    case DVERBOSE:
+		 fprintf (fp, "\n\t Raster Image Ref. = %d\n", (int)ri_ref);
+		 fprintf (fp, "\t Palette: %d components; %d entries\n", 
+                         (int)n_comps, (int)n_entries);
+
+		 /* display the palette data with the title line and 
+		    indent the data with DATA_INDENT and DATA_CONT_INDENT */
+		 fprintf (fp, "\t Palette Data: \n");
+		 status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps,
+		    	  palette_data, fp, DATA_INDENT, DATA_CONT_INDENT );
+                 if( status == FAIL )
+                    ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d", 
+			     "print_Palette", (int)pal_index);
+		 break;
+
+	    case DDATA:
+		 /* print palette data with no title and indentation */
+		 status = dumpfull(data_type, dumpgr_opts, 
+			  n_entries*n_comps, palette_data, fp, 0, 0 );
+                 if( status == FAIL )
+                    ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d",
+                         "print_Palette", (int)pal_index );
+		 break;
+	    default:
+		 printf("Unknown output type option \n" );
+	  } /* end switch */
+      } /* end for each palette */
+   } /* end else */
+
 done:
    if (ret_value == FAIL)
    { /* Failure cleanup */
@@ -801,7 +851,6 @@
 			"printGR_ASCII", (int)ri_index );
 
          /* end access to the current image before going on to the next */
-	 /* BMR: can this check be skipped */
          if (FAIL == GRendaccess(ri_id))
             fprintf( stderr,"in %s: GRendaccess failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index );
@@ -810,79 +859,85 @@
          continue; /* to the next image */
       }
 
-      /* print the current image as specified by user's options */
-      switch (dumpgr_opts->contents)
+      /* print image palette's info and data or data only depending on
+         the content's option (-pd or -p, taken care by print_Palette) */
+      if( dumpgr_opts->print_pal )  /* set when -p or -pd is given */
       {
-         case DVERBOSE:
-         case DHEADER:
-            nt_desc = HDgetNTdesc(nt);
-            if (NULL == nt_desc)
-               ERROR_BREAK_2( "in %s: HDgetNTdesc failed for %d'th RI",
+         /* Note: currently only 1 pal assigned to an image, 2nd arg. */
+         status = print_Palette( ri_id, 1, fp, dumpgr_opts );
+	 if( status == FAIL )
+	    ERROR_BREAK_2("in %s: Printing image's palette failed for RI #%d",
+			"printGR_ASCII", (int)ri_index, FAIL );
+      }
+      else /* only happen when neither -p nor -pd were given */
+      {
+
+         /* print the current image as specified by user's options */
+         switch (dumpgr_opts->contents)
+         {
+            case DVERBOSE:
+            case DHEADER:
+               nt_desc = HDgetNTdesc(nt);
+               if (NULL == nt_desc)
+                  ERROR_BREAK_2( "in %s: HDgetNTdesc failed for %d'th RI",
       			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* display image's info then free the buffer no longer needed */
-            fprintf(fp, "\n\t Image  Name = %s\n\t Index = ", name);
-            fprintf(fp, "%d\n\t Type= %s\n", (int)ri_index, nt_desc);
+               /* display image's info then free the buffer no longer needed */
+               fprintf(fp, "\n\t Image  Name = %s\n\t Index = ", name);
+               fprintf(fp, "%d\n\t Type= %s\n", (int)ri_index, nt_desc);
 
-            resetBuff(( VOIDP *) &nt_desc ); 
+               resetBuff(( VOIDP *) &nt_desc ); 
 
-            /* get the image's ref# from its id */
-            if ((ri_ref = GRidtoref(ri_id)) == FAIL)
-               ERROR_BREAK_2( "in %s: GRidtoref failed for %d'th RI",
+               /* get the image's ref# from its id */
+               if ((ri_ref = GRidtoref(ri_id)) == FAIL)
+                  ERROR_BREAK_2( "in %s: GRidtoref failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* print more image's info */
-            fprintf(fp, "\t width=%d; height=%d\n", (int) dimsizes[0], (int) dimsizes[1]);
-            fprintf(fp, "\t Ref. = %d\n", (int) ri_ref);
-            fprintf(fp, "\t ncomps = %d\n\t Interlace mode= %s\n",
+               /* print more image's info */
+               fprintf(fp, "\t width=%d; height=%d\n", (int) dimsizes[0], (int) dimsizes[1]);
+               fprintf(fp, "\t Ref. = %d\n", (int) ri_ref);
+               fprintf(fp, "\t ncomps = %d\n\t Interlace mode= %s\n",
 				(int) ncomps, Il_mode_text(il) );
 
-	    /* if palette data is not to be printed, print the palette
-	       info now so it won't be lost after the image data; currently,
-	       only 1 palette per image (second arg.) */
-            if( !dumpgr_opts->print_pal )
-		print_PaletteInfo( ri_id, 1, fp );
+	       /* print the palette info now so it won't be lost after the 
+	          image data; currently, only 1 palette per image (2nd arg.) */
+	       status = print_PaletteInfo( ri_id, 1, fp );
+               if( status == FAIL )
+		   ERROR_BREAK_2( "in %s: Printing image's palette information failed for %d'th RI",
+			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* Print image attributes */
-            fprintf(fp, "\t Number of attributes = %d\n", (int) nattrs );
-            status = print_RIattrs(ri_id, ri_index, nattrs, fp, dumpgr_opts );
-            if( status == FAIL )
-		ERROR_BREAK_2( "in %s: Printing image's attributes failed for %d'th RI",
+               /* Print image attributes */
+               fprintf(fp, "\t Number of attributes = %d\n", (int) nattrs );
+               status = print_RIattrs(ri_id, ri_index, nattrs, fp, dumpgr_opts );
+               if( status == FAIL )
+		   ERROR_BREAK_2( "in %s: Printing image's attributes failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
 
-            if (dumpgr_opts->contents == DHEADER)
-               break; /* break out for header only */
+               if (dumpgr_opts->contents == DHEADER)
+                  break; /* break out for header only */
 
-         case DDATA:
-            if (dumpgr_opts->contents != DDATA)
-               fprintf(fp, "\t Data : \n");
+            case DDATA:
+               if (dumpgr_opts->contents != DDATA)
+                  fprintf(fp, "\t Data : \n");
 
-            if (ncomps > 0 && dimsizes[0] != 0)
-            {
-               /* print the current image's data */
-               status = grdumpfull( ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
-               if ( status == FAIL )
-		  ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
+               if (ncomps > 0 && dimsizes[0] != 0)
+               {
+                  /* print the current image's data */
+                  status = grdumpfull( ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
+                  if ( status == FAIL )
+		     ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
-            }
-            else
-            {
-               fprintf(fp, "\t\t No data written.\n");
-            }
-            break; /* data section */
-         default:
-            printf("Unknown output type option \n" );
-      } /* switch  on contents */
+               }
+               else
+               {
+                  fprintf(fp, "\t\t No data written.\n");
+               }
+               break; /* data section */
+            default:
+               printf("Unknown output type option \n" );
+         } /* switch  on contents */
+      } /* end if when neither -p nor -pd given */
 
-      /* print image palette's info with/without data depending on the
-         content's option (-h, -d, or none, taken care by print_Palette) */
-      if( dumpgr_opts->print_pal )
-         /* Note: currently only 1 pal assigned to an image, 2nd arg. */
-         status = print_Palette( ri_id, 1, fp, dumpgr_opts );
-	 if( status == FAIL )
-	    ERROR_BREAK_2( "in %s: Printing image's palette failed for %d'th RI",
-			"printGR_ASCII", (int)ri_index, FAIL );
-
       /* end access to the current image */
       if (FAIL == GRendaccess(ri_id))    
          fprintf(stderr,"in %s: GRendaccess failed for %d'th RI",
@@ -970,22 +1025,26 @@
          continue; /* to the next image */
       }
 
-      /* output data in binary format   */
-      if (ncomps > 0 && dimsizes[0] != 0)
-         /* print the current image's data */
-         status = grdumpfull(ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
-         if ( status == FAIL )
-            ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
-			"printGR_BINARY", (int)ri_index, FAIL );
-
-      /* print image palette's data print_Palette) */
+      /* print image palette's data */
       if( dumpgr_opts->print_pal )
+      {
          /* Note: currently only 1 pal assigned to an image, 2nd arg. */
          status = print_Palette( ri_id, 1, fp, dumpgr_opts );
          if ( status == FAIL )
             ERROR_BREAK_2( "in %s: Printing image's palette failed for %d'th RI",
 			"printGR_BINARY", (int)ri_index, FAIL );
+      }
 
+      /* output data in binary format if palette printing is not requested  */
+      else if (ncomps > 0 && dimsizes[0] != 0)
+      {
+         /* print the current image's data */
+         status = grdumpfull(ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
+         if ( status == FAIL )
+            ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
+			"printGR_BINARY", (int)ri_index, FAIL );
+      }
+
       /* end access to the current image */
       if (FAIL == GRendaccess(ri_id))
          fprintf(stderr,"in %s: GRendaccess failed for %d'th RI",
@@ -1049,13 +1108,15 @@
 
    /* check for missing input file name */
    if( curr_arg >= argc )
-      ERROR_GOTO_0( "Missing input file name.  Please try again.\n" );
+      ERROR_GOTO_0( "Missing input file name.  Please try again" );
 
    /* going through each input file, open the file, try to compose the list
       of indices of the images in the file that are requested, then read and
       display information and data of each image in the specified manner */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
+
       HDstrcpy(file_name, argv[curr_arg]);   /* get file name */
       HDstrcpy( dumpgr_opts->ifile_name, file_name ); /* record file name */
       curr_arg++;   /* forward the pointer to the current argument */
@@ -1065,19 +1126,37 @@
          help avoiding the chore at every one of those instances */ 
       closeGR( &file_id, &gr_id, &gr_chosen ); 
 
+      /* Print an informative message and skip this file if it is not 
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dgr: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dgr: %s is not an HDF file", file_name);}
+      }
+
       /* open current hdf file for processing */
       file_id = Hopen(file_name, DFACC_RDONLY, 0);
       if (file_id == FAIL)
-         ERROR_CONT_1( "in dgr: Hopen failed for file %s\n", file_name);
-
-      /* initiate the GR interface */
-      gr_id = GRstart(file_id);
-      if (FAIL == gr_id) /* to the next file */
       {
-HEprint( stderr, 0 );  /* what is this??? BMR - 7/14/00 */
-         ERROR_CONT_1( "in dgr: GRstart failed for file %s\n", file_name);
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dgr: Failure in opening file %s", file_name);}
+         else /* print message, then continue processing the next file */
+            ERROR_CONT_1( "in dgr: Failure in opening file %s", file_name );
       }
 
+      /* initiate GR interface, if fail, probably something fatal, returns
+         with FAIL */
+      gr_id = GRstart(file_id);
+      if (FAIL == gr_id)
+         ERROR_GOTO_1( "in dgr: GRstart failed for file %s", file_name);
+
       /* BMR: compose the list of indices of RIs to be processed in the current
          file: gr_chosen is the list and return the number of items in it */
       num_ri_chosen = get_RIindex_list(gr_id, dumpgr_opts, &gr_chosen, &index_error);
@@ -1093,7 +1172,7 @@
          used to print file attributes */
       status = GRfileinfo(gr_id, &ndsets, &nglb_attrs);
       if (status == FAIL) /* to the next file */
-         ERROR_CONT_1( "in dgr: GRfileinfo failed for file %s\n", file_name);
+         ERROR_CONT_1( "in dgr: GRfileinfo failed for file %s", file_name);
 
       fp = stdout;  /* assume that output option is not given */
 
@@ -1133,7 +1212,7 @@
                status = printGR_ASCII( gr_id, dumpgr_opts, ndsets, 
                                        gr_chosen, num_ri_chosen, fp );
                if( status == FAIL ) /* to the next file */
-                  ERROR_BREAK_1( "in dgr: printGR_ASCII failed for file %s\n", 
+                  ERROR_BREAK_1( "in dgr: printGR_ASCII failed for file %s", 
                                     file_name, FAIL );
             }
             else
@@ -1158,7 +1237,7 @@
             status = printGR_BINARY( gr_id, dumpgr_opts, num_ri_chosen, ndsets, 
                                gr_chosen, fp );
             if( status == FAIL )
-               ERROR_BREAK_1( "in dgr: printGR_BINARY failed for file %s\n", 
+               ERROR_BREAK_1( "in dgr: printGR_BINARY failed for file %s", 
                                  file_name, FAIL );
             break; /* BINARY */
 
@@ -1191,7 +1270,7 @@
           intn        help)
 {
    dump_info_t dumpgr_opts;	/* dumpgr options */
-   intn ret_value = SUCCEED;
+   intn status, ret_value = SUCCEED;
 
    /* initialize the structure that holds user's options and inputs */
    init_dump_opts(&dumpgr_opts);
@@ -1207,22 +1286,21 @@
    if( curr_arg >= argc )
    {
       dumpgr_usage(argc, argv);
-      ret_value = FAIL; /* return status to caller */
-      goto done;
+      ERROR_GOTO_0( "in do_dumpgr: command is incomplete");
    }		/* end if */
 
    /* parse the user's command and store the inputs in dumpgr_opts */
-   ret_value = parse_dumpgr_opts( &dumpgr_opts, &curr_arg, argc, argv );
-   if( ret_value == FAIL )
+   status = parse_dumpgr_opts( &dumpgr_opts, &curr_arg, argc, argv );
+   if( status == FAIL )
    {
       dumpgr_usage(argc, argv);
-      goto done;  /* skip dgr */
+      ERROR_GOTO_0( "in do_dumpgr: parse_dumpgr_opts is unable to parse command");
    }
 
    /* display data and information as specified in dumpgr_opts */
-   ret_value = dgr( &dumpgr_opts, curr_arg, argc, argv );
-   if( ret_value == FAIL )
-      ERROR_GOTO_0( "in do_dumpgr\n" );
+   status = dgr( &dumpgr_opts, curr_arg, argc, argv );
+   if( status == FAIL )
+      ERROR_GOTO_0( "in do_dumpgr: dgr failed" );
 
 done:
    if (ret_value == FAIL)

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_list.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_list.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_list.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.29 $";
+static char RcsId[] = "@(#)$Revision: 1.30 $";
 #endif
 
-/* $Id: hdp_list.c,v 1.29 2000/09/05 14:28:11 bmribler Exp $ */
+/* $Id: hdp_list.c,v 1.30 2002/03/08 05:58:23 bmribler Exp $ */
 
 #include "mfhdf.h"
 #include "hdp.h"
@@ -243,7 +243,7 @@
    int32 *ann_list = NULL;
    char *annot_type_text = "invalid";	/* "label" or "description" */
    char *func_name = "print_annots_by_object"; /* used to print error msg */
-   char error_item[80];	/* holds tag, ref, and fname for error msg */
+   char error_item[256];	/* holds tag, ref, and fname for error msg */
    intn   ret_value = SUCCEED;
 
    /* stores the current values tag, ref, and file name in error_item,

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_sds.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_sds.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_sds.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -14,7 +14,7 @@
 static char RcsId[] = "@(#)Revision";
 #endif
 
-/* $Id: hdp_sds.c,v 1.39 2000/10/05 14:14:20 ymuqun Exp $ */
+/* $Id: hdp_sds.c,v 1.42 2003/12/10 21:14:01 epourmal Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -33,11 +33,13 @@
     printf("\t-i <indices>\tDump the SDSs at positions listed in <indices>\n");
     printf("\t-r <refs>\tDump the SDSs with reference number listed in <refs>\n");
     printf("\t-n <names>\tDump the SDSs with name listed in <names>\n");
-    printf("\t-c\tPrint space characters as they are, not \\digit\n");
     printf("\t-d\tDump data only, no tag/ref, formatted to input to hp2hdf\n");
     printf("\t-h\tDump header only, no annotation for elements nor data\n");
     printf("\t-v\tDump everything including all annotations (default)\n");
-    printf("\t-s\tDo not add a carriage return to a long data line\n");
+    printf("\t-c\tPrint space characters as they are, not \\digit\n");
+    printf("\t-g\tDo not print data of file (global) attributes\n");
+    printf("\t-l\tDo not print data of local attributes\n");
+    printf("\t-s\tDo not add carriage return to a long line - dump it as a stream\n");
     printf("\t-o <filename>\tOutput to file <filename>\n");
     printf("\t-b\tBinary format of output\n");
     printf("\t-x\tAscii text format of output (default)\n");
@@ -122,6 +124,16 @@
                 (*curr_arg)++;
                 break;
 
+         case 'g':	/* suppress file (global) attr data, print its header */
+                dumpsds_opts->no_gattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
+         case 'l':	/* suppress local attr data, only print its header */
+                dumpsds_opts->no_lattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
          case 'o':   /* specify output file */
                 dumpsds_opts->dump_to_file = TRUE;
 
@@ -442,11 +454,7 @@
     return ret_value;
 } /* end of get_SDSindex_list */
 
-/* Displays all SD file attributes 
-   Note: the reason for dumpsds_opts is not passed for ft and no_cret
-   is print_SDattrs is also called by a function of hdp list, which has 
-   a different option structure than all the dump commands, 
-   list_info_t vs. dump_info_t */
+/* Displays all SD file attributes */
 intn
 print_SDattrs( int32 sd_id,
                FILE *fp,
@@ -473,29 +481,6 @@
          ERROR_CONT_2( "in %s: SDattrinfo failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
      
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDattrs" );
-
-      /* allocate space for the attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-
-      /* if allocation fails, handle the failure */
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_SDattrs" );
-
-      /* read the values of the attribute into the buffer attr_buf */
-      status = SDreadattr(sd_id, attr_index, attr_buf);
-      if( status == FAIL )
-         ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
-			"print_SDattrs", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (attr_nt_desc == NULL)
@@ -510,38 +495,60 @@
          printed = TRUE;
       }
 
-      /* display the attribute's information then free buffer */
+      /* display the attribute's information */
       fprintf(fp,"\t Attr%i: Name = %s\n", (int) attr_index, attr_name);
       fprintf(fp,"\t\t Type = %s \n\t\t Count= %i\n", attr_nt_desc, (int) attr_count);
       resetBuff(( VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values */
-      /* Note that filetype is DASCII since binary format does not contain
-         these information - it's data only */
-      fprintf(fp,"\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpsds_opts->no_gattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-	 option will be ignored for other types */
-      if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+	 /* calculate the buffer size of the attribute using the number of
+	    values in the attribute and its value size */
+	 attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+	 /* make sure we are not allocating 0 elements */
+	 CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDattrs" );
+
+	 /* allocate space for the attribute's values */
+	 attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+
+	 /* if allocation fails, handle the failure */
+	 CHECK_ALLOC( attr_buf, "attr_buf", "print_SDattrs" );
+
+	 /* read the values of the attribute into the buffer attr_buf */
+	 status = SDreadattr(sd_id, attr_index, attr_buf);
+	 if( status == FAIL )
+	    ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
+
+	 fprintf( fp,"\t\t Value = ");
+
+	 /* if the user wishes to have clean output, i.e. option -c is 
+	    selected - Note that this option is only applicable to DFNT_CHAR 
+	    type, the option will be ignored for other types */
+	 if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
+	 {
+	    status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
+	    if( status == FAIL )
+		ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+			"print_SDattrs", (int)attr_index );
+	 }
+	 else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+	 {
+	    status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
 				ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
+	    if( status == FAIL )
+		ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
-      }
+	 }
+      }  /* end of if no file attributes */
+   }  /* for each file attribute */
 
-      resetBuff( &attr_buf );  /* free buffer and reset it to NULL */
-   }/* for each file attribute */
-
    return( ret_value );
 }   /* end of print_SDattrs */
 
@@ -570,10 +577,6 @@
          ERROR_CONT_2( "in %s: SDattrinfo failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
       /* calculate the buffer size of the attribute using the number of
          values in the attribute and its value size */
       attr_buf_size = DFKNTsize(attr_nt|DFNT_NATIVE) * attr_count;
@@ -581,53 +584,58 @@
       /* make sure we are not allocating 0 elements */
       CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDSattrs" );
 
-      /* allocate space for attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
-
-      /* read the values of the attribute into buffer attr_buf */
-      status = SDreadattr(sds_id, attr_index, attr_buf);
-      if (status == FAIL)
-         ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
-			"print_SDSattrs", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (attr_nt_desc == NULL)
          ERROR_CONT_2( "in %s: HDgetNTdesc failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
 
-      /* display the attribute's information then free the buffer */
+      /* display the attribute's information */
       fprintf(fp, "\t Attr%d: Name = %s\n", (int) attr_index, attr_name);
       fprintf(fp, "\t\t Type = %s \n\t\t Count= %d\n", 
 			attr_nt_desc, (int) attr_count);
+
+      /* free buffer and reset it to NULL */
       resetBuff((VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values then free buffer */
-      /* Note that filetype is DASCII since binary format does not contain
-         these information - it's data only */
-      fprintf(fp, "\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpsds_opts->no_lattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-	 option will be ignored in other types */
-      if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+	 /* allocate space for attribute's values */
+	 attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+	 CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
+
+	 /* read the values of the attribute into buffer attr_buf */
+	 status = SDreadattr(sds_id, attr_index, attr_buf);
+	 if (status == FAIL)
+            ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
+
+	 fprintf(fp, "\t\t Value = ");
+
+	 /* if the user wishes to have clean output, i.e. option -c is 
+	    selected - Note that this option is only applicable to DFNT_CHAR 
+	    type, the option will be ignored for other types */
+	 if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
+	 {
+            status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+                ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+			"print_SDSattrs", (int)attr_index );
+	 }
+	 else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+	 {
+            status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
 				ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
+            if( status == FAIL )
+                ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
-      }
-
-      resetBuff( &attr_buf );  /* free buffer and reset it to NULL */
+	 }
+      }  /* end of if no local attributes */
    } /* for each attribute */
 
    return( ret_value );
@@ -974,11 +982,26 @@
       display information and data of each SDS in the specified manner */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
+
       HDstrcpy(file_name, argv[curr_arg]);
       HDstrcpy( dumpsds_opts->ifile_name, file_name ); /* record file name */
       curr_arg++;
 
-      /* if SDstart fails, shoudl ret_value be set to FAIL or SUCCEED? */
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+	 if( curr_arg == argc )
+	    {ERROR_GOTO_1( "in dsd: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dsd: %s is not an HDF file", file_name);}
+      }
+
+      /* open current hdf file with error check, if fail, go to next file */
       sd_id = SDstart(file_name, DFACC_RDONLY);
       if (sd_id == FAIL)
       {
@@ -986,8 +1009,7 @@
 	    message, then returns with FAIL */
 	 if( curr_arg == argc )
             {ERROR_GOTO_1( "in dsd: Failure in opening file %s", file_name);}
-	 /* otherwise, print message, then continue processing the next file */
-	 else
+	 else /* print message, then continue processing the next file */
             ERROR_CONT_1( "in dsd: Failure in opening file %s", file_name );
       }
 
@@ -1119,8 +1141,7 @@
    if( curr_arg >= argc )
    {
       dumpsds_usage(argc, argv);
-      ret_value = FAIL; /* so caller can be traced in debugging */
-      goto done;
+      ERROR_GOTO_0( "in do_dumpsds: command is incomplete");
    }            /* end if */
 
    /* parse the user's command and store the inputs in dumpsds_opts */
@@ -1135,7 +1156,7 @@
    /* display data and information as specified in dumpsds_opts */
    status = dsd( &dumpsds_opts, curr_arg, argc, argv );
    if( status == FAIL )
-      ERROR_GOTO_0( "in do_dumpsds" );
+      ERROR_GOTO_0( "in do_dumpsds: dsd failed" );
 
   done:
     if (ret_value == FAIL)

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_vd.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_vd.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_vd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.45 $";
+static char RcsId[] = "@(#)$Revision: 1.51 $";
 #endif
 
-/* $Id: hdp_vd.c,v 1.45 2000/09/05 14:28:12 bmribler Exp $ */
+/* $Id: hdp_vd.c,v 1.51 2003/12/10 21:14:02 epourmal Exp $ */
 
 #include "hdp.h"
 #ifndef MIPSEL
@@ -428,12 +428,6 @@
 		char* fields,
 		vd_info_t* curr_vd )
 { 
-/*   int32 lastItem;
-   int32 count = 0;
-   char  *tempPtr = NULL;
-   char  *ptr = NULL;
-   int32 i;
-*/
    fprintf(fp, "Vdata: %d\n", (int) curr_vd->index );
    if( curr_vd->tag == FAIL )	/* print vdata tag */
       fprintf(fp, "   tag = <Undefined>; ");
@@ -465,14 +459,11 @@
       messy when being displayed if it were to be dumped out at once. 
       print_fields displays a list in a nice way even if the list is 
       long.  The second parameter specifies how the field name list 
-      begins; it's needed because dumpvd also uses this routine and 
-      has different indentation format than dumpvg */
+      begins; it's needed because dumpvg also uses this routine and 
+      has different indentation format than dumpvd */
    print_fields( fields, "   fields = ", fp );
 
-   if( curr_vd->vsize > 0 ) /* print vdata record size */
-      fprintf(fp, "   record size (in bytes) = %d;\n", (int)curr_vd->vsize);
-   else
-      fprintf(fp, "   record size = <Undefined>;\n");
+   fprintf(fp, "   record size (in bytes) = %d;\n", (int)curr_vd->vsize);
 
    if( curr_vd->name[0] == '\0' ) /* print vdata name */
       fprintf(fp, "   name = <Undefined>; ");
@@ -501,7 +492,7 @@
    int32 i;
    intn  flds_match = 0;
    intn  ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *tempflds = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( tempflds, "tempflds", "getFieldIndices" );
@@ -553,7 +544,7 @@
    }	/* for (fld_name_idx...) */
 
 /* free dynamic space if on MAC */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(tempflds != NULL)
    {
       HDfree(tempflds);
@@ -570,7 +561,7 @@
 intn
 dumpvd_ascii(dump_info_t * dumpvd_opts, 
              int32 file_id,
-             char  *file_name,
+             const char  *file_name,
 	     FILE* fp,
              int32 num_vd_chosen, 
              char *flds_chosen[MAXCHOICES],
@@ -594,7 +585,7 @@
    int32       vd_id = FAIL;
    int32       an_handle   = FAIL;
    intn        status = SUCCEED, ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( fields, "fields", "dumpvd_ascii" );
@@ -649,16 +640,20 @@
       /* Note: each of the parameters retuned by a query routine below 
 	 must be checked before being used */
 
-      /* Retrieves general information about the vdata */
-      if (FAIL == VSinquire( vd_id, &nvf, &interlace, fields, &vsize, vdname ))
+      /* Retrieves general information about the vdata.  Note that NULL is
+	 passed in for vdata's record size because it is not needed and 
+	 attempting to retrieve it causes failure when the vdata doesn't
+	 have any fields defined.  (bug #626) - BMR Mar 12, 02 */
+      if (FAIL == VSinquire( vd_id, &nvf, &interlace, fields, NULL, vdname ))
 	 ERROR_CONT_END( "in %s: VSinquire failed for vdata with ref#=%d", 
                         "dumpvd_ascii", (int) vdata_ref, vd_id );
 
-      /* Get the size of the specified fields of the vdata */
-      vsize = VShdfsize( vd_id, fields );
-      if (vsize == FAIL)
-         ERROR_CONT_END( "in %s: VShdfsize failed for vdata with ref#=%d", 
- 			"dumpvd_ascii", (int) vdata_ref, vd_id );
+      /* Get the HDF size of the specified fields of the vdata; VShdfsize 
+	 returns 0 if there are no fields previously defined */
+         vsize = VShdfsize( vd_id, fields );
+         if (vsize == FAIL)
+             ERROR_CONT_END( "in %s: VShdfsize failed for vdata with ref#=%d",
+			 "dumpvd_ascii", (int) vdata_ref, vd_id );
 
       if (FAIL == (vdata_tag = VSQuerytag(vd_id)))
          ERROR_CONT_END( "in %s: VSQuerytag failed for vdata with ref#=%d", 
@@ -717,7 +712,10 @@
                    /* BMR - 6/30/98 to fix bug #236: if no fields are defined or 
 		      no data is written, break out and don't fall through */
                    if ( fields[0] == '\0' || nvf == 0 )
-                      ERROR_BREAK_0( "<No data written>\n\n", SUCCEED );
+                   {
+                      fprintf(fp, "   No data written\n\n");
+                      break;
+                   }
                 }
                 else /* only header, no attributes, annotations or data */
                     break; /* break out and don't fall through */
@@ -767,7 +765,7 @@
               VSdetach(vd_id);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -782,7 +780,7 @@
 intn
 dumpvd_binary(dump_info_t * dumpvd_opts, 
               int32 file_id,
-              char  *file_name,
+              const char  *file_name,
 	      FILE* fp,
               int32 num_vd_chosen, 
               char *flds_chosen[MAXCHOICES],
@@ -793,7 +791,6 @@
    int32       i, vd_chosen_idx;
    int32       nvf;
    int32       interlace;
-   int32       vsize;
    int32       vdata_ref = -1;
    char        vdname[VSNAMELENMAX];
    intn        dumpall = 0;
@@ -801,7 +798,7 @@
    int32       vd_id = FAIL;
    intn        status;
    intn        ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
 
@@ -846,7 +843,7 @@
          ERROR_CONT_2( "in %s: VSattach failed for vdata with ref#=%d", 
                         "dumpvd_binary", (int) vdata_ref );
 
-      status = VSinquire(vd_id, &nvf, &interlace, fields, &vsize, vdname);
+      status = VSinquire(vd_id, &nvf, &interlace, fields, NULL, vdname);
       if( FAIL == status ) /* end access to vd_id and cont. to next vdata */
          ERROR_CONT_END( "in %s: VSinquire failed for vdata with ref#=%d", 
                         "dumpvd_binary", (int) vdata_ref, vd_id );
@@ -898,7 +895,7 @@
    }	/* for each vdata */
 
    /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -919,7 +916,7 @@
 closeVD(
     int32 *file_id,     /* will be returned as a FAIL */
     int32 **vd_chosen,  /* will be returned as a NULL */
-    char  *curr_file_name )
+    const char  *curr_file_name )
 {
    if( *file_id != FAIL )
    {
@@ -963,83 +960,107 @@
       ERROR_GOTO_0( "Missing input file name.  Please try again.\n" );
 
    while (curr_arg < argc)
-   {	/* Loop until all specified files have been 
-           processed */
+   {	/* Loop until all specified files have been processed */
 
-   /* get file name */
-   HDstrcpy(file_name, argv[curr_arg]); 
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
 
-   /* record for later use */
-   HDstrcpy( dumpvd_opts->ifile_name, file_name );
-   curr_arg++;
+      /* get file name */
+      HDstrcpy(file_name, argv[curr_arg]); 
 
-   closeVD( &file_id, &vd_chosen, file_name );
+      /* record for later use */
+      HDstrcpy( dumpvd_opts->ifile_name, file_name );
+      curr_arg++;
 
-   /* try opening file */
-   file_id = Hopen(file_name, DFACC_READ, 0);
-   if (file_id == FAIL)
-      ERROR_CONT_1( "in dvd: Hopen failed on file %s\n", file_name);
+      closeVD( &file_id, &vd_chosen, file_name );
 
-   if (FAIL == Vstart(file_id))
-      ERROR_CONT_1( "in dvd: Vstart failed for file %s\n", file_name);
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvd: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dvd: %s is not an HDF file", file_name);}
+      }
 
-   /* Find out which VDs have been chosen. */
-   num_vd_chosen = choose_vd(dumpvd_opts, &vd_chosen, file_id, &index_error);
+      /* open current hdf file with error check, if fail, go to next file */
+      file_id = Hopen(file_name, DFACC_READ, 0);
+      if (file_id == FAIL)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvd: Failure in opening file %s", file_name);}
+         /* otherwise, print message, then continue processing the next file */
+         else
+            ERROR_CONT_1( "in dvd: Failure in opening file %s", file_name );
+      }
 
-   /* if there are no valid indices, move on to the next file */
-   if (index_error && num_vd_chosen == 0)
-      continue;   /* to the next file, closeVG before opening next file
-                     takes care of Vend, Hclose, and free vg_chosen */
+      /* initiate VG interface; if fail, probably something fatal, returns
+         with FAIL */
+      if (FAIL == Vstart(file_id))
+         ERROR_GOTO_1( "in dvd: Vstart failed for file %s\n", file_name);
 
-   ft = dumpvd_opts->file_type;
-   fp = stdout;	/* default file pointer to the standard output */
-   switch(ft)
-   {
-       case DASCII:  /*    ASCII file   */
+      /* Find out which VDs have been chosen. */
+      num_vd_chosen = choose_vd(dumpvd_opts, &vd_chosen, file_id, &index_error);
 
-	  /* set output file */
-	  if (dumpvd_opts->dump_to_file)
-	     fp = fopen(dumpvd_opts->file_name, "w");
+      /* if there are no valid indices, move on to the next file */
+      if (index_error && num_vd_chosen == 0)
+         continue;   /* to the next file, closeVG before opening next file
+                        takes care of Vend, Hclose, and free vg_chosen */
 
-          status = dumpvd_ascii(dumpvd_opts, file_id, file_name, fp,
-                   num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
-          if( FAIL == status )
-             ERROR_BREAK_0( "in dvd", FAIL );
-          break;
-       case DBINARY:   /*  binary file, not fully tested yet  */
+      ft = dumpvd_opts->file_type;
+      fp = stdout;	/* default file pointer to the standard output */
+      switch(ft)
+      {
+          case DASCII:  /*    ASCII file   */
 
-    	  /* Get output file name.  */
-    	  if (dumpvd_opts->dump_to_file)
-             fp = fopen(dumpvd_opts->file_name, "wb");
+	     /* set output file */
+	     if (dumpvd_opts->dump_to_file)
+	        fp = fopen(dumpvd_opts->file_name, "w");
 
-          status = dumpvd_binary(dumpvd_opts, file_id, file_name, fp,
-                   num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
-          if( FAIL == status )
-             ERROR_BREAK_0( "in dvd", FAIL );
+             status = dumpvd_ascii(dumpvd_opts, file_id, file_name, fp,
+                      num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
+             if( FAIL == status )
+                ERROR_BREAK_0( "in dvd: dumpvd_ascii returned failure", FAIL );
+             break;
+          case DBINARY:   /*  binary file, not fully tested yet  */
 
-          break;
-       default:
-          printf("dumping vdata, unknown ouput file option \n");
-          ret_value = FAIL;
-   }    /* switch for output file   */
+    	     /* Get output file name.  */
+    	     if (dumpvd_opts->dump_to_file)
+                fp = fopen(dumpvd_opts->file_name, "wb");
 
-   if(vd_chosen != NULL)
-   {
-      HDfree(vd_chosen);
-      vd_chosen = NULL;
-   } 
+             status = dumpvd_binary(dumpvd_opts, file_id, file_name, fp,
+                      num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
+             if( FAIL == status )
+                ERROR_BREAK_0( "in dvd: dumpvd_binary returned failure", FAIL );
 
-   if (dumpvd_opts->dump_to_file)
-      fclose(fp);
+             break;
+          default:
+             printf("dumping vdata, unknown ouput file option \n");
+             ret_value = FAIL;
+      }    /* switch for output file   */
 
-   if (FAIL == Vend(file_id))
-      ERROR_CONT_1( "in dvd: Vend failed on file %s\n", file_name);
+      if(vd_chosen != NULL)
+      {
+         HDfree(vd_chosen);
+         vd_chosen = NULL;
+      } 
 
-   if (FAIL == Hclose(file_id))
-      ERROR_CONT_1( "in dvd: Hclose failed on file %s\n", file_name);
+      if (dumpvd_opts->dump_to_file)
+         fclose(fp);
 
-   file_id = FAIL; /* reset */
+      if (FAIL == Vend(file_id))
+         ERROR_CONT_1( "in dvd: Vend failed on file %s\n", file_name);
 
+      if (FAIL == Hclose(file_id))
+         ERROR_CONT_1( "in dvd: Hclose failed on file %s\n", file_name);
+
+      file_id = FAIL; /* reset */
+
    }	/* while processing files  */
 
 done:
@@ -1090,7 +1111,7 @@
    if( curr_arg >= argc )
    {
       dumpvd_usage(argc, argv);
-      goto done;
+      ERROR_GOTO_0( "in do_dumpvd: command is incomplete");
    }            /* end if */
 
    /* parse the user's command and store the inputs in dumpvd_opts */
@@ -1104,9 +1125,9 @@
 
    /* display data and information as specified in dumpvd_opts */
    status = dvd(&dumpvd_opts, curr_arg, argc, argv, flds_chosen, dumpallfields);
+   if( status == FAIL )
+      ERROR_GOTO_0( "in do_dumpvd: dvd failed" );
 
-   ret_value = status; /* return status to caller */
-
   done:
     if (ret_value == FAIL)
       { /* Failure cleanup */

Modified: packages/libhdf4/trunk/mfhdf/dumper/hdp_vg.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/hdp_vg.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/hdp_vg.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.37 $";
+static char RcsId[] = "@(#)$Revision: 1.41 $";
 #endif
 
-/* $Id: hdp_vg.c,v 1.37 2000/09/05 14:28:13 bmribler Exp $ */
+/* $Id: hdp_vg.c,v 1.41 2003/12/10 21:14:03 epourmal Exp $ */
 
 #include "hdp.h"
 #ifndef MIPSEL
@@ -256,7 +256,7 @@
    print an error message in the stderr to help debugging */
 void
 resetVG( int32 *vg_id,
-         char  *curr_file_name )
+         const char  *curr_file_name )
 {
    if( *vg_id != FAIL )
    {
@@ -392,7 +392,7 @@
 get_VGandInfo( int32 *vg_id,
                int32  file_id,
                int32  vg_ref,
-               char  *file_name,
+               const  char *file_name,
                int32 *n_entries,
                char  *vgname,
                char  *vgclass )
@@ -444,7 +444,7 @@
 
 intn 
 print_data_annots( int32 file_id,
-                char *file_name,
+                const char *file_name,
                 int32 tag,
                 int32 ref )
 {
@@ -531,7 +531,7 @@
           count = 0;
    char  *ptr, *tempPtr,
           fldname[MAXNAMELEN],
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__) 
 
    /* Lets allocate space for tmpflds */
    *tempflds = (char *)HDmalloc(VSFIELDMAX * FIELDNAMELENMAX * sizeof(char *));
@@ -548,31 +548,38 @@
    else
    { /* there are fields to print */
       fprintf(fp, "%s[", field_title );
-      HDstrcpy(tempflds, fields);
-      ptr = tempflds;
+      HDstrcpy(tempflds, fields);	/* tempflds can be manipulated */
+      ptr = tempflds;			/* traverse tempflds with ptr */
+
+      /* traverse the temporary fieldname list to obtain and print each
+       * field name; use ',' to locate individual field names, and each 
+       * line should not exceed 50 characters beside the alignment */
       for (i = 0; !lastItem; i++)
       {
-         tempPtr = HDstrchr(ptr, ',');
+         tempPtr = HDstrchr(ptr, ',');  /* locate next separator */
          if (tempPtr == NULL)
-            lastItem = 1;
+            lastItem = 1;	/* set flag for end of list */
          else
-            *tempPtr = '\0';
-         HDstrcpy(fldname, ptr);
-         count += HDstrlen(fldname);
+            *tempPtr = '\0';	/* change ',' to null to obtain field name */
+         HDstrcpy(fldname, ptr);	/* obtain current field name */
+         count += HDstrlen(fldname);	/* increment current # of chars on line */
          if (count > 50)
          {
-            fprintf(fp, "%s", field_title );
-            count = 0;
+	    /* print alignment for the subsequent lines */
+            fprintf(fp, "\n\t          ");
+
+	    /* include the skipped field from previous line */
+            count = HDstrlen(fldname);  
          }
-         fprintf(fp, "%s", fldname);
+         fprintf(fp, "%s", fldname);  /* print the current field name */
          if (!lastItem)
-            fprintf(fp, ", ");
-         ptr = tempPtr + 1;
-      }  /* end of if skip */
+            fprintf(fp, ", ");	/* print a comma if it's not the last field name */
+         ptr = tempPtr + 1;	/* move ptr beyond last field name */
+      }  /* end of for loop */
       fprintf(fp, "];\n");
    }  /* there are fields to print */
    
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(tempflds != NULL)
    {
       HDfree(tempflds);
@@ -732,7 +739,7 @@
    two routines print_all_file_labels and print_file_descs defined in
    hdp_list.c to display the file annotations of the current file */
 intn
-print_file_annotations( int32 file_id, char* file_name )
+print_file_annotations( int32 file_id, const char* file_name )
 {
    int32 an_id = FAIL;
    intn  status = SUCCEED, ret_value = SUCCEED;
@@ -778,7 +785,7 @@
 closeVG(
     int32 *file_id,     /* will be returned as a FAIL */
     int32 **vg_chosen,  /* will be returned as a NULL */
-    char  *curr_file_name )
+    const char  *curr_file_name )
 {
    if( *file_id != FAIL )
    {
@@ -803,7 +810,7 @@
 vgBuildGraph(int32        vg_id, 
            int32        file_id, 
            int32        num_entries, 
-	   char* file_name,
+	   const char* file_name,
            vg_info_t *aNode,
            intn         *skipfile)
 {
@@ -979,7 +986,7 @@
     char  *file_name = dumpvg_opts->ifile_name;
     intn   status, ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( fields, "*fields", "vgdumpfull" );
@@ -1170,7 +1177,7 @@
             }
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -1221,6 +1228,7 @@
       and display them */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
       intn skipfile = FALSE;  /* skip the current file when some severe */
            /* failure occurs; otherwise, the list of nodes is not */
            /* completely prepared and will cause a crash in display */
@@ -1233,6 +1241,19 @@
          cleanup, so closeVG ensures of that */
       closeVG( &file_id, &vg_chosen, file_name );
 
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvg: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dvg: %s is not an HDF file", file_name);}
+      }
+
       /* open current hdf file with error check, if fail, go to next file */
       file_id = Hopen(file_name, DFACC_READ, 0);
       if (file_id == FAIL)
@@ -1246,9 +1267,10 @@
             ERROR_CONT_1( "in dvg: Failure in opening file %s", file_name );
       }
 
-      /* initiate VG interface; if fail, close hdf file & go to next file */
+      /* initiate VG interface; if fail, probably something fatal, returns 
+	 with FAIL */
       if (FAIL == Vstart(file_id))
-         ERROR_CONT_1( "in dvg: Vstart failed for file %s\n", file_name);
+         ERROR_GOTO_1( "in dvg: Vstart failed for file %s\n", file_name);
 
       /* compose the list of indices of vgroups to be processed in the current
       file and return the number of items in the list */

Modified: packages/libhdf4/trunk/mfhdf/dumper/show.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/show.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/show.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -13,7 +13,7 @@
 /* Modified from vshow.c by Eric Tsui, 12/25/1994. */
 
 #ifdef RCSID
-static char *RcsId[] = "@(#)$Revision: 1.22 $";
+static char *RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
 #define VSET_INTERFACE
@@ -57,7 +57,7 @@
     int32       cn = 0;
     int32       ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
     char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
     char *flds = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
@@ -148,9 +148,10 @@
 
           /* Choose a function for displaying a piece of data of a 
              particular type. */
-          switch (w->type[i])
+          switch (w->type[i] & 0xff)
             {
             case DFNT_CHAR:
+	    case DFNT_UCHAR:
                 vfmtfn[i] = fmtchar;
                 break;
 
@@ -456,7 +457,7 @@
               HDfree((VOIDP)bb);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -497,7 +498,7 @@
     intn          status;
     intn          ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
     char *name = (char *)HDmalloc((FIELDNAMELENMAX+1) * sizeof(char));
     uint8 *attrbuf = (uint8 *)HDmalloc((BUFFER) * sizeof(uint8));
@@ -600,7 +601,7 @@
             }
 
           /* format output */
-          switch (i_type)  
+          switch (i_type & 0xff)  
             {
             case DFNT_CHAR:
             case DFNT_UCHAR:
@@ -679,7 +680,7 @@
               HDfree(buf);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(name != NULL)
    {
       HDfree(name);

Deleted: packages/libhdf4/trunk/mfhdf/dumper/star.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/swf32.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/swf32_fileattr.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/swi16.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/swi8.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/tdata.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/tdf24.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/tdfr8f.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/test.hdf
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/Example6.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Example6.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/Image_with_Palette.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Image_with_Palette.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/LongDataset.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/LongDataset.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/ctxtr2r.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/ctxtr2r.hdf)
===================================================================
(Binary files differ)

Modified: packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-13.out
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-13.out	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-13.out	2007-09-28 21:58:13 UTC (rev 1125)
@@ -3,17 +3,7 @@
 #############################
 File name: Image_with_Palette.hdf 
 
-	 Image  Name = Image with Palette
-	 Index = 0
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 2
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 2
 	 Palette: 3 components; 256 entries
 	 Palette Data: 
                 0 0 8 1 0 8 2 0 8 3 0 8 4 0 8 5 0 8 6 0 8 7 0 8 8 
@@ -56,17 +46,7 @@
                 249 0 8 250 0 8 251 0 8 252 0 8 253 0 8 254 0 8 255 
                 0 8 
 
-	 Image  Name = Second Image w/pal
-	 Index = 1
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 3
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 3
 	 Palette: 3 components; 256 entries
 	 Palette Data: 
                 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 
@@ -101,15 +81,5 @@
                 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 
                 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 
 
-	 Image  Name = Last Image: no pal
-	 Index = 2
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 4
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 4
 	 No palette data

Modified: packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-15.out
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-15.out	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-15.out	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,8 +1,6 @@
 #############################
-Expected output for './hdp dumpgr -r 2,4 -p -d Image_with_Palette.hdf'
+Expected output for './hdp dumpgr -r 2,4 -pd Image_with_Palette.hdf'
 #############################
-1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 6 6 7 7 8 4 5 5 
-6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
 0 0 8 1 0 8 2 0 8 3 0 8 4 0 8 5 0 8 6 0 8 7 0 8 8 0 8 9 0 8 10 0 8 
 11 0 8 12 0 8 13 0 8 14 0 8 15 0 8 16 0 8 17 0 8 18 0 8 19 0 8 20 
 0 8 21 0 8 22 0 8 23 0 8 24 0 8 25 0 8 26 0 8 27 0 8 28 0 8 29 0 8 
@@ -33,5 +31,3 @@
 8 239 0 8 240 0 8 241 0 8 242 0 8 243 0 8 244 0 8 245 0 8 246 0 8 
 247 0 8 248 0 8 249 0 8 250 0 8 251 0 8 252 0 8 253 0 8 254 0 8 255 
 0 8 
-1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 6 6 7 7 8 4 5 5 
-6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-19.out (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-19.out)
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-19.out	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpgr-19.out	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,93 @@
+#############################
+Expected output for './hdp dumpgr -g -l grtdfi322.hdf'
+#############################
+File name: grtdfi322.hdf 
+
+    File attributes:
+	 Attr0: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 16
+
+	 Image  Name = Raster Image #0
+	 Index = 0
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 7
+	 ncomps = 1
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 1
+	 Attr0: Name = Value range
+		 Type = 32-bit signed integer 
+		 Count= 2
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 
+
+	 Image  Name = Image_array_5
+	 Index = 1
+	 Type= 32-bit signed integer
+	 width=10; height=5
+	 Ref. = 5
+	 ncomps = 2
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                0 5 0 5 1 6 1 6 2 7 2 7 3 8 3 8 4 9 4 9 10 15 10 15 
+                11 16 11 16 12 17 12 17 13 18 13 18 14 19 14 19 20 
+                25 20 25 21 26 21 26 22 27 22 27 23 28 23 28 24 29 
+                24 29 30 35 30 35 31 36 31 36 32 37 32 37 33 38 33 
+                38 34 39 34 39 40 45 40 45 41 46 41 46 42 47 42 47 
+                43 48 43 48 44 49 44 49 
+
+	 Image  Name = Raster Image #3
+	 Index = 2
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 1
+	 ncomps = 3
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 
+
+	 Image  Name = Raster Image #4
+	 Index = 3
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 3
+	 ncomps = 3
+	 Interlace mode= LINE
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 
+
+	 Image  Name = Raster Image #5
+	 Index = 4
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 4
+	 ncomps = 3
+	 Interlace mode= COMPONENT
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-10.out (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-10.out)
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-10.out	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-10.out	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,124 @@
+#############################
+Expected output for './hdp dumpsds -g swf32_fileattr.hdf'
+#############################
+File name: swf32_fileattr.hdf 
+
+File attributes:
+	 Attr0: Name = File purpose
+		 Type = 8-bit signed char 
+		 Count= 37
+	 Attr1: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 14
+	 Attr2: Name = Test clean format
+		 Type = 8-bit signed char 
+		 Count= 65
+
+Dimension Variable Name = fakeDim0
+	 Index = 0
+	 Scale Type= 32-bit floating point
+	 Ref. = 3
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim0
+		 Size = 2
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Time
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 6
+		 Value = Second
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int32
+	 Data : 
+                0.000000 100.000000 
+
+
+Dimension Variable Name = fakeDim1
+	 Index = 1
+	 Scale Type= 32-bit floating point
+	 Ref. = 4
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim1
+		 Size = 3
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Line
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Inch
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int16
+	 Data : 
+                0.000000 10.000000 20.000000 
+
+
+Dimension Variable Name = fakeDim2
+	 Index = 2
+	 Scale Type= 32-bit floating point
+	 Ref. = 5
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim2
+		 Size = 4
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 6
+		 Value = Column
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 2
+		 Value = Cm
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int32
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+
+
+Variable Name = Data-Set-2
+	 Index = 3
+	 Type= 32-bit floating point
+	 Ref. = 2
+	 Rank = 3
+	 Number of attributes = 2
+	 Dim0: Name=fakeDim0
+		 Size = 2
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim1: Name=fakeDim1
+		 Size = 3
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim2: Name=fakeDim2
+		 Size = 4
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Attr0: Name = valid_max
+		 Type = 32-bit floating point 
+		 Count= 1
+		 Value = 123.000000 
+	 Attr1: Name = valid_min
+		 Type = 32-bit floating point 
+		 Count= 1
+		 Value = -1.000000 
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+                10.000000 11.000000 12.000000 13.000000 
+                20.000000 21.000000 22.000000 23.000000 
+
+                100.000000 101.000000 102.000000 103.000000 
+                110.000000 111.000000 112.000000 113.000000 
+                120.000000 121.000000 122.000000 123.000000 
+
+

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-11.out (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-11.out)
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-11.out	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/dumper/testfiles/dumpsds-11.out	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,118 @@
+#############################
+Expected output for './hdp dumpsds -l swf32_fileattr.hdf'
+#############################
+File name: swf32_fileattr.hdf 
+
+File attributes:
+	 Attr0: Name = File purpose
+		 Type = 8-bit signed char 
+		 Count= 37
+		 Value = For testing dumpsds SD file attribute
+	 Attr1: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 14
+		 Value = Some data sets
+	 Attr2: Name = Test clean format
+		 Type = 8-bit signed char 
+		 Count= 65
+		 Value = A tab <\011>, a CR <\012>, several nulls 
+                         <\000\000\000\000\000\000>, and one more 
+                         tab <\011>
+
+Dimension Variable Name = fakeDim0
+	 Index = 0
+	 Scale Type= 32-bit floating point
+	 Ref. = 3
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim0
+		 Size = 2
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 6
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 100.000000 
+
+
+Dimension Variable Name = fakeDim1
+	 Index = 1
+	 Scale Type= 32-bit floating point
+	 Ref. = 4
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim1
+		 Size = 3
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 10.000000 20.000000 
+
+
+Dimension Variable Name = fakeDim2
+	 Index = 2
+	 Scale Type= 32-bit floating point
+	 Ref. = 5
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim2
+		 Size = 4
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 6
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 2
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+
+
+Variable Name = Data-Set-2
+	 Index = 3
+	 Type= 32-bit floating point
+	 Ref. = 2
+	 Rank = 3
+	 Number of attributes = 2
+	 Dim0: Name=fakeDim0
+		 Size = 2
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim1: Name=fakeDim1
+		 Size = 3
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim2: Name=fakeDim2
+		 Size = 4
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Attr0: Name = valid_max
+		 Type = 32-bit floating point 
+		 Count= 1
+	 Attr1: Name = valid_min
+		 Type = 32-bit floating point 
+		 Count= 1
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+                10.000000 11.000000 12.000000 13.000000 
+                20.000000 21.000000 22.000000 23.000000 
+
+                100.000000 101.000000 102.000000 103.000000 
+                110.000000 111.000000 112.000000 113.000000 
+                120.000000 121.000000 122.000000 123.000000 
+
+

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfi322.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfi322.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui162.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui162.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui82.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui82.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui83.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui83.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/grtdfui84.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui84.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/star.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/star.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/swf32.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/swf32_fileattr.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32_fileattr.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/swi16.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi16.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/swi8.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi8.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdata.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdata.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdf24.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdf24.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/tdfr8f.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdfr8f.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/test.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/test.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/tvattr.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvattr.hdf)
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/dumper/testfiles/tvset.hdf (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvset.hdf)
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,318 +0,0 @@
-#! /bin/sh
-# $Id: testhdp.sh,v 1.15 2000/09/05 15:04:41 bmribler Exp $
-# Test scripts for hdp (dumper).
-# See the USAGE function for command usage.
-
-
-# Definitions of commands and variables
-CMD='./hdp'
-RM='rm -f'
-DIFF=diff
-CMP='cmp -s'
-nerrors=0		# number of errors (0)
-quitonerr=0		# quit on error (not)
-noclean=0		# no cleaning temp. files (yes)
-only=""			# dumper sub-command to test only
-except=""		# dumper sub-command to test not
-
-
-# Definitions of functions/shorthands
-#
-
-# Print Usage of the command
-USAGE()
-{
-    echo "Usage: $0 [-help] [-noclean] [-quit] [-except <command>] [-only <command>]"
-    echo "    -help: display help information"
-    echo "    -noclean: do not clean away temporary files"
-    echo "    -quit: quit immediately if any test fails"
-    echo "    -except: skip one specific command"
-    echo "    -only: test one specific command"
-    echo "<command> can be one of {list, dumpsds, dumprig, dumpvd, dumpvg, dumpgr}"
-}
-
-# Print message with formats according to message level ($1)
-MESG()
-{
-    level=$1
-    shift
-    case $level in
-	0)
-	    echo '============================='
-	    echo $*
-	    echo '============================='
-	    ;;
-	3)
-	    echo '-----------------------------'
-	    echo $*
-	    echo '-----------------------------'
-	    ;;
-	6)
-	    echo "*** $* ***"
-	    ;;
-	*)
-	    echo "MESG(): Unknown level ($level)"
-	    exit 1
-	    ;;
-    esac
-
-}
-
-
-# Run the test to produce an output file which is then
-# compared with the expected ($1) output.
-# Note that this can be used to produce the expected
-# output files by replace "$output" with "$expected"
-# in the run-the-test commands.
-TEST()
-{
-    # parse the arguments
-    output=tmp.out
-    expected=testfiles/$1
-    shift
-    # print a id banner
-    MESG 6 "$@"
-    # run the test
-    ( 
-	echo "#############################"
-	echo "Expected output for '$CMD $@'" 
-	echo "#############################"
-        $CMD "$@"
-    ) > $output
-    $CMP $expected $output
-    if [ $? -ne 0 ]
-    then
-	echo $DIFF $expected $output
-	$DIFF $expected $output
-	echo "   <<< FAILED >>>"
-	nerrors=`expr $nerrors + 1`
-	if [ $quitonerr -gt 0 ]; 
-	then
-	    FINISH
-	fi
-    fi
-    if [ $noclean -eq 0 ]
-    then
-	$RM $output
-    fi
-}
-
-
-# Report the result and exit
-FINISH()
-{
-    if [ $nerrors -eq 0 ]
-    then
-	MESG 0 "All hdp tests passed"
-    else
-	MESG 0 "hdp tests failed: $nerrors"
-    fi
-    exit $nerrors
-}
-
-
-#===============
-# Main Body
-#===============
-
-# parse arguments
-while [ $# -gt 0 ]
-do
-    case "$1" in
-	"-quit")
-	    quitonerr=1
-	    ;;
-	"-noclean")
-	    noclean=1
-	    ;;
-	"-help")
-	    USAGE
-	    exit 0
-	    ;;
-	"-only")
-	    shift
-	    case "$1" in
-    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
-		    only="$1"
-		    ;;
-		*)
-		    echo "Unknown command: $1"
-		    USAGE
-		    exit 1
-		    ;;
-	    esac
-	    ;;
-	"-except")
-	    shift
-	    case "$1" in
-    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
-		    except="$1"
-		    ;;
-		*)
-		    echo "Unknown command: $1"
-		    USAGE
-		    exit 1
-		    ;;
-	    esac
-	    ;;
-	* )
-	    echo "Unknow option: $1"
-	    USAGE
-	    exit 1
-	    ;;
-    esac
-    shift
-done
-
-# Print a beginning banner
-MESG 0 "Running hdp tests"
-
-# Test command list
-TestCmd=list
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST list-1.out list tdata.hdf
-TEST list-2.out list -l tdata.hdf
-TEST list-3.out list -d tdata.hdf
-TEST list-4.out list -e tdata.hdf
-TEST list-5.out list -t 720 tdata.hdf
-TEST list-6.out list -d -t "Numeric Data Group" tdata.hdf
-TEST list-7.out list -g tdata.hdf
-TEST list-8.out list -a tdata.hdf
-TEST list-9.out list -a Example6.hdf
-TEST list-10.out list -n Example6.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpsds
-TestCmd=dumpsds
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpsds-1.out dumpsds swf32.hdf
-TEST dumpsds-2.out dumpsds -i 2 swf32.hdf
-TEST dumpsds-3.out dumpsds -i 1,3 swf32.hdf
-
-# Next command should fail with error message: "SD with name Time: not found"
-TEST dumpsds-4.out dumpsds -n Time swf32.hdf
-TEST dumpsds-5.out dumpsds -n fakeDim0,Data-Set-2 swf32.hdf
-TEST dumpsds-6.out dumpsds -r 3,2 swf32.hdf
-TEST dumpsds-7.out dumpsds -r 3,2 -d swf32.hdf
-TEST dumpsds-8.out dumpsds -h swf32_fileattr.hdf
-TEST dumpsds-9.out dumpsds -c swf32_fileattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumprig
-TestCmd=dumprig
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumprig-1.out dumprig tdf24.hdf
-TEST dumprig-2.out dumprig -i 1,2 tdf24.hdf
-TEST dumprig-3.out dumprig -i 1,3 tdf24.hdf		# '-i 3' is invalid
-TEST dumprig-4.out dumprig -m 24 tdf24.hdf
-TEST dumprig-5.out dumprig -r 3,4 tdf24.hdf
-TEST dumprig-6.out dumprig -r 3,4 -d tdf24.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpvd
-TestCmd=dumpvd
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpvd-1.out dumpvd tvset.hdf
-TEST dumpvd-2.out dumpvd -i 1,3,5 tvset.hdf
-TEST dumpvd-3.out dumpvd -r 1238,1239,1251,1252 tvset.hdf
-TEST dumpvd-4.out dumpvd -n "Multi-Order Vdata" tvset.hdf
-TEST dumpvd-5.out dumpvd -n "Mixed Vdata","Integer Vdata" tvset.hdf
-TEST dumpvd-6.out dumpvd -c "Test object","No class specified" tvset.hdf
-TEST dumpvd-7.out dumpvd -f B tvset.hdf
-TEST dumpvd-8.out dumpvd -f "STATION_NAME","FLOATS" tvset.hdf
-TEST dumpvd-9.out dumpvd -f "STATION_NAME","FLOATS" -d tvset.hdf
-TEST dumpvd-10.out dumpvd tvattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpvg
-TestCmd=dumpvg
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpvg-1.out dumpvg tvset.hdf
-TEST dumpvg-2.out dumpvg -i 0,1 tvset.hdf
-TEST dumpvg-3.out dumpvg -r 3 tvset.hdf
-TEST dumpvg-4.out dumpvg -n "Simple Vgroup" tvset.hdf
-TEST dumpvg-5.out dumpvg -c "Test object" tvset.hdf
-TEST dumpvg-6.out dumpvg -i 1,3,5 tdata.hdf
-TEST dumpvg-7.out dumpvg -r 32,39 tdata.hdf
-TEST dumpvg-8.out dumpvg -n nsamp,tdata.hdf tdata.hdf
-TEST dumpvg-9.out dumpvg -c CDF0.0 tdata.hdf
-
-# Added option -h to the following test; this option has always 
-# failed; just fixed it - BMR 8/1/00
-TEST dumpvg-10.out dumpvg -h -c Dim0.0,Var0.0 tdata.hdf
-
-# this following test is removed since option -d is removed
-#TEST dumpvg-11.out dumpvg -c Dim0.0,Var0.0 -d tdata.hdf
-
-# moved test #12 up to #11, consequently - BMR 7/25/00
-TEST dumpvg-11.out dumpvg tvattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpgr
-TestCmd=dumpgr
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpgr-1.out dumpgr grtdfui82.hdf
-TEST dumpgr-2.out dumpgr -i 0,1,3 grtdfui82.hdf
-TEST dumpgr-3.out dumpgr -i 0 grtdfui82.hdf
-TEST dumpgr-4.out dumpgr -n Image_array_5 grtdfui82.hdf
-TEST dumpgr-5.out dumpgr -r 6,2,3 grtdfui82.hdf
-TEST dumpgr-6.out dumpgr -r 6 -d  grtdfui82.hdf
-TEST dumpgr-7.out dumpgr -o my.dat grtdfui82.hdf
-$RM my.dat
-TEST dumpgr-8.out dumpgr -o mybin.dat  -b grtdfui82.hdf
-$RM mybin.dat
-TEST dumpgr-9.out dumpgr grtdfui83.hdf
-TEST dumpgr-10.out dumpgr grtdfui84.hdf
-TEST dumpgr-11.out dumpgr grtdfui162.hdf
-
-# Test 12 shows that file attribute is printed
-TEST dumpgr-12.out dumpgr grtdfi322.hdf
-
-# Tests 13, 14, and 15 to test new option -p that prints palette
-TEST dumpgr-13.out dumpgr -p Image_with_Palette.hdf
-TEST dumpgr-14.out dumpgr -h Image_with_Palette.hdf
-TEST dumpgr-15.out dumpgr -r 2,4 -p -d Image_with_Palette.hdf
-
-# Test 16: to test new option -s, printing data as stream
-TEST dumpgr-16.out dumpgr -r 6 -d -s grtdfui82.hdf
-
-# Test 17: to test new option -m (interlace mode = LINE)
-TEST dumpgr-17.out dumpgr -r 6 -m 1 grtdfui82.hdf
-
-# Test 18: to test new option -c (printing attribute data in clean format)
-TEST dumpgr-18.out dumpgr -c grtdfi322.hdf
-
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# End of test
-FINISH

Copied: packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh.in (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in)
===================================================================
--- packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh.in	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/dumper/testhdp.sh.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,345 @@
+#! /bin/sh
+# $Id: testhdp.sh.in,v 1.2 2003/12/10 21:14:06 epourmal Exp $
+# Test scripts for hdp (dumper).
+# See the USAGE function for command usage.
+
+srcdir=@srcdir@
+
+# Definitions of commands and variables
+HDP='./hdp'               # The tool name
+HDP_BIN=`pwd`/$HDP        # The path of the tool binary
+
+RM='rm -f'
+DIFF=diff
+CMP='cmp -s'
+nerrors=0		# number of errors (0)
+quitonerr=0		# quit on error (not)
+noclean=0		# no cleaning temp. files (yes)
+only=""			# dumper sub-command to test only
+except=""		# dumper sub-command to test not
+
+
+# Definitions of functions/shorthands
+#
+
+# Print Usage of the command
+USAGE() {
+    echo "Usage: $0 [-help] [-noclean] [-quit] [-except <command>] [-only <command>]"
+    echo "    -help: display help information"
+    echo "    -noclean: do not clean away temporary files"
+    echo "    -quit: quit immediately if any test fails"
+    echo "    -except: skip one specific command"
+    echo "    -only: test one specific command"
+    echo "<command> can be one of {list, dumpsds, dumprig, dumpvd, dumpvg, dumpgr}"
+}
+
+# Print message with formats according to message level ($1)
+MESG() {
+  level=$1
+  shift
+  case $level in
+    0)
+      echo '============================='
+      echo $*
+      echo '============================='
+      ;;
+    3)
+      echo '-----------------------------'
+      echo $*
+      echo '-----------------------------'
+      ;;
+    6)
+      echo "*** $* ***"
+      ;;
+    *)
+      echo "MESG(): Unknown level ($level)"
+      exit 1
+      ;;
+  esac
+}
+
+
+# Run the test to produce an output file which is then
+# compared with the expected ($1) output.
+# Note that this can be used to produce the expected
+# output files by replace "$output" with "$expected"
+# in the run-the-test commands.
+TEST()
+{
+  # parse the arguments
+  output=tmp.out
+  expected="$srcdir/testfiles/$1"
+  shift
+
+  # print a id banner
+  MESG 6 "$@"
+
+  # run the test
+  ( 
+    echo "#############################"
+    echo "Expected output for '$HDP $@'" 
+    echo "#############################"
+    cd $srcdir/testfiles
+    $HDP_BIN "$@"
+  ) > $output
+  $CMP $expected $output
+
+  if [ $? -ne 0 ]; then
+    echo $DIFF $expected $output
+    $DIFF $expected $output
+    echo "   <<< FAILED >>>"
+    nerrors=`expr $nerrors + 1`
+
+    if [ $quitonerr -gt 0 ]; then
+      FINISH
+    fi
+  fi
+
+  if [ $noclean -eq 0 ]; then
+    $RM -f $output
+  fi
+}
+
+
+# Report the result and exit
+FINISH()
+{
+    if [ $nerrors -eq 0 ]
+    then
+	MESG 0 "All hdp tests passed"
+    else
+	MESG 0 "hdp tests failed: $nerrors"
+    fi
+    exit $nerrors
+}
+
+
+#===============
+# Main Body
+#===============
+
+# parse arguments
+while [ $# -gt 0 ]
+do
+    case "$1" in
+	"-quit")
+	    quitonerr=1
+	    ;;
+	"-noclean")
+	    noclean=1
+	    ;;
+	"-help")
+	    USAGE
+	    exit 0
+	    ;;
+	"-only")
+	    shift
+	    case "$1" in
+    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
+		    only="$1"
+		    ;;
+		*)
+		    echo "Unknown command: $1"
+		    USAGE
+		    exit 1
+		    ;;
+	    esac
+	    ;;
+	"-except")
+	    shift
+	    case "$1" in
+    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
+		    except="$1"
+		    ;;
+		*)
+		    echo "Unknown command: $1"
+		    USAGE
+		    exit 1
+		    ;;
+	    esac
+	    ;;
+	* )
+	    echo "Unknow option: $1"
+	    USAGE
+	    exit 1
+	    ;;
+    esac
+    shift
+done
+
+# Print a beginning banner
+MESG 0 "Running hdp tests"
+
+# Test command list
+TestCmd=list
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST list-1.out list tdata.hdf
+TEST list-2.out list -l tdata.hdf
+TEST list-3.out list -d tdata.hdf
+TEST list-4.out list -e tdata.hdf
+TEST list-5.out list -t 720 tdata.hdf
+TEST list-6.out list -d -t "Numeric Data Group" tdata.hdf
+TEST list-7.out list -g tdata.hdf
+TEST list-8.out list -a tdata.hdf
+TEST list-9.out list -a Example6.hdf
+TEST list-10.out list -n Example6.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpsds
+TestCmd=dumpsds
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+# Test 1 prints all datasets
+TEST dumpsds-1.out dumpsds swf32.hdf
+
+# Tests 2 and 3 print datasets given their indices
+TEST dumpsds-2.out dumpsds -i 2 swf32.hdf
+TEST dumpsds-3.out dumpsds -i 1,3 swf32.hdf
+
+# Test 4 should fail with error message: "SD with name Time: not found"
+TEST dumpsds-4.out dumpsds -n Time swf32.hdf
+
+# Test 5 prints datasets given their names 
+TEST dumpsds-5.out dumpsds -n fakeDim0,Data-Set-2 swf32.hdf
+
+# Test 6 prints datasets given their ref numbers
+TEST dumpsds-6.out dumpsds -r 3,2 swf32.hdf
+
+# Test 7 prints only data of the datasets selected by their ref numbers
+TEST dumpsds-7.out dumpsds -r 3,2 -d swf32.hdf
+
+# Test 8 prints only header information
+TEST dumpsds-8.out dumpsds -h swf32_fileattr.hdf
+
+# Test 9 prints data in clean format, no \digit's
+TEST dumpsds-9.out dumpsds -c swf32_fileattr.hdf
+
+# Test 10 prints contents of file without file attribute's data
+TEST dumpsds-10.out dumpsds -g swf32_fileattr.hdf
+
+# Test 11 prints contents of file without local attribute's data
+TEST dumpsds-11.out dumpsds -l swf32_fileattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumprig
+TestCmd=dumprig
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumprig-1.out dumprig tdf24.hdf
+TEST dumprig-2.out dumprig -i 1,2 tdf24.hdf
+TEST dumprig-3.out dumprig -i 1,3 tdf24.hdf		# '-i 3' is invalid
+TEST dumprig-4.out dumprig -m 24 tdf24.hdf
+TEST dumprig-5.out dumprig -r 3,4 tdf24.hdf
+TEST dumprig-6.out dumprig -r 3,4 -d tdf24.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpvd
+TestCmd=dumpvd
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpvd-1.out dumpvd tvset.hdf
+TEST dumpvd-2.out dumpvd -i 1,3,5 tvset.hdf
+TEST dumpvd-3.out dumpvd -r 1238,1239,1251,1252 tvset.hdf
+TEST dumpvd-4.out dumpvd -n "Multi-Order Vdata" tvset.hdf
+TEST dumpvd-5.out dumpvd -n "Mixed Vdata","Integer Vdata" tvset.hdf
+TEST dumpvd-6.out dumpvd -c "Test object","No class specified" tvset.hdf
+TEST dumpvd-7.out dumpvd -f B tvset.hdf
+TEST dumpvd-8.out dumpvd -f "STATION_NAME","FLOATS" tvset.hdf
+TEST dumpvd-9.out dumpvd -f "STATION_NAME","FLOATS" -d tvset.hdf
+TEST dumpvd-10.out dumpvd tvattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpvg
+TestCmd=dumpvg
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpvg-1.out dumpvg tvset.hdf
+TEST dumpvg-2.out dumpvg -i 0,1 tvset.hdf
+TEST dumpvg-3.out dumpvg -r 3 tvset.hdf
+TEST dumpvg-4.out dumpvg -n "Simple Vgroup" tvset.hdf
+TEST dumpvg-5.out dumpvg -c "Test object" tvset.hdf
+TEST dumpvg-6.out dumpvg -i 1,3,5 tdata.hdf
+TEST dumpvg-7.out dumpvg -r 32,39 tdata.hdf
+TEST dumpvg-8.out dumpvg -n nsamp,tdata.hdf tdata.hdf
+TEST dumpvg-9.out dumpvg -c CDF0.0 tdata.hdf
+
+# Added option -h to the following test; this option has always 
+# failed; just fixed it - BMR 8/1/00
+TEST dumpvg-10.out dumpvg -h -c Dim0.0,Var0.0 tdata.hdf
+
+# this following test is removed since option -d is removed
+#TEST dumpvg-11.out dumpvg -c Dim0.0,Var0.0 -d tdata.hdf
+
+# moved test #12 up to #11, consequently - BMR 7/25/00
+TEST dumpvg-11.out dumpvg tvattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpgr
+TestCmd=dumpgr
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpgr-1.out dumpgr grtdfui82.hdf
+TEST dumpgr-2.out dumpgr -i 0,1,3 grtdfui82.hdf
+TEST dumpgr-3.out dumpgr -i 0 grtdfui82.hdf
+TEST dumpgr-4.out dumpgr -n Image_array_5 grtdfui82.hdf
+TEST dumpgr-5.out dumpgr -r 6,2,3 grtdfui82.hdf
+TEST dumpgr-6.out dumpgr -r 6 -d  grtdfui82.hdf
+TEST dumpgr-7.out dumpgr -o my.dat grtdfui82.hdf
+$RM my.dat
+TEST dumpgr-8.out dumpgr -o mybin.dat  -b grtdfui82.hdf
+$RM mybin.dat
+TEST dumpgr-9.out dumpgr grtdfui83.hdf
+TEST dumpgr-10.out dumpgr grtdfui84.hdf
+TEST dumpgr-11.out dumpgr grtdfui162.hdf
+
+# Test 12 shows that file attribute is printed
+TEST dumpgr-12.out dumpgr grtdfi322.hdf
+
+# Tests 13, 14, and 15 test option -h, which was not included in any
+# of the previous tests, and the new options -p and -pd, printing palette
+# with or without palette information 
+TEST dumpgr-13.out dumpgr -p Image_with_Palette.hdf
+TEST dumpgr-14.out dumpgr -h Image_with_Palette.hdf
+TEST dumpgr-15.out dumpgr -r 2,4 -pd Image_with_Palette.hdf
+
+# Test 16: to test new option -s, printing data as stream
+TEST dumpgr-16.out dumpgr -r 6 -d -s grtdfui82.hdf
+
+# Test 17: to test new option -m (interlace mode = LINE)
+TEST dumpgr-17.out dumpgr -r 6 -m 1 grtdfui82.hdf
+
+# Test 18: to test new option -c (printing attribute data in clean format)
+TEST dumpgr-18.out dumpgr -c grtdfi322.hdf
+
+# Test 19: to test new options -g and -l (suppress all attribute data)
+TEST dumpgr-19.out dumpgr -g -l grtdfi322.hdf
+
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# End of test
+FINISH

Deleted: packages/libhdf4/trunk/mfhdf/dumper/tvattr.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/trunk/mfhdf/dumper/tvset.hdf
===================================================================
(Binary files differ)

Copied: packages/libhdf4/trunk/mfhdf/fortran/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,50 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/hdf/test       \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+include_HEADERS = netcdf.inc netcdf.f90
+check_PROGRAMS = ftest hdftest
+
+ftest_SOURCES = ftest.f
+ftest_LDADD = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+              ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+ftest_DEPENDENCIES = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+                     $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+hdftest_SOURCES = hdftest.f
+hdftest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdftest_DEPENDENCIES = testdir $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+testdir:
+	-mkdir testdir
+
+SUFFIXES = .inc .f90
+.inc.f90:
+	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
+check:
+	@echo "==================================="
+	@echo "HDF-SD Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./hdftest
+	@echo "==================================="
+	@echo "HDF-NetCDF Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./ftest
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = ftest.f jackets.c netcdf.inc netcdf.f90 test.nc copy.nc *.hdf testdir/testext.hdf

Modified: packages/libhdf4/trunk/mfhdf/fortran/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,851 +1,445 @@
-# Makefile for the FORTRAN interface to the Network CDF library
-#
-# $Id: Makefile.in,v 1.31 2000/08/30 21:55:39 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/hdf/test       \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+include_HEADERS = netcdf.inc netcdf.f90
+check_PROGRAMS = ftest hdftest
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ftest_SOURCES = ftest.f
+ftest_LDADD = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+              ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ftest_DEPENDENCIES = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+                     $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+hdftest_SOURCES = hdftest.f
+hdftest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdftest_DEPENDENCIES = testdir $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+SUFFIXES = .inc .f90
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+DISTCLEANFILES = ftest.f jackets.c netcdf.inc netcdf.f90 test.nc copy.nc *.hdf testdir/testext.hdf
+subdir = mfhdf/fortran
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+check_PROGRAMS = ftest$(EXEEXT) hdftest$(EXEEXT)
+am_ftest_OBJECTS = ftest.$(OBJEXT)
+ftest_OBJECTS = $(am_ftest_OBJECTS)
+ftest_LDFLAGS =
+am_hdftest_OBJECTS = hdftest.$(OBJEXT)
+hdftest_OBJECTS = $(am_hdftest_OBJECTS)
+hdftest_LDFLAGS =
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(ftest_SOURCES) $(hdftest_SOURCES)
+HEADERS = $(include_HEADERS)
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-ifeq ($(NOFORTRANINSOLIB),)
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-else
-HDF_LIB  = -static -L$(TOP_SRCDIR)/hdf/src -ldf -dynamic
-endif
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(ftest_SOURCES) $(hdftest_SOURCES)
 
+all: all-am
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-OTHERDIRS = config msoft vms
-
-PROGRAM		= ftest
-#OS		= @OS@
-#FC		= @FC@
-#CPP_NETCDF	= -I../libsrc $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_NF)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-GARBAGE		= $(PROGRAM) test.nc copy.nc \
-		  c*.hdf \
-		  test*.hdf hdftest hdfout.new \
-		  netcdf.f90
-HEADERS		= netcdf.inc netcdf.f90
-MANIFEST = $(DISTFILES)
-DISTFILES	= $(PROGRAM).src Makefile.in README aix.m4 common.inc \
-		  common.m4 depend descrip.mms fortc fortc1.sed \
-		  fortc2.sed hpux.m4 irix.m4 jackets.src msoft.m4 msoft.mk \
-		  osf.m4 sunos.m4 ultrix.m4 unicos.m4 vax-ultrix.m4 \
-		  vms.m4 convex.m4 freebsd.m4 Linux.m4 \
-		  msoft/NOTES msoft/fslen.asm msoft/ftest.for \
-		  msoft/jackets.c msoft/msoft.int \
-		  msoft/netcdf.inc \
-		  vms/ftest.for \
-		  vms/ftest.m4 \
-		  vms/jackets.c \
-		  vms/make.com \
-		  vms/netcdf.inc \
-		  mfsdf.c mfsdff.f hdftest.f \
-		config/netcdf-hpux.inc config/jackets-hpux.c config/ftest-hpux.f \
-		config/netcdf-irix4.inc config/jackets-irix4.c config/ftest-irix4.f \
-		config/netcdf-irix5.inc config/jackets-irix5.c config/ftest-irix5.f \
-		config/netcdf-irix6.inc config/jackets-irix6.c config/ftest-irix6.f \
-		config/netcdf-irix32.inc config/jackets-irix32.c config/ftest-irix32.f \
-		config/netcdf-sun.inc config/jackets-sun.c config/ftest-sun.f \
-		config/netcdf-linux.inc config/jackets-linux.c config/ftest-linux.f \
-		config/netcdf-fbsd.inc config/jackets-fbsd.c config/ftest-fbsd.f \
-		config/netcdf-alpha.inc config/jackets-alpha.c config/ftest-alpha.f \
-		config/netcdf-dec.inc config/jackets-dec.c config/ftest-dec.f \
-		config/netcdf-aix.inc config/jackets-aix.c config/ftest-aix.f \
-		config/netcdf-solaris.inc config/jackets-solaris.c config/ftest-solaris.f \
-		config/netcdf-solarisx86.inc config/jackets-solarisx86.c  config/ftest-solarisx86.f \
-		config/netcdf-convex.inc config/jackets-convex.c config/ftest-convex.f \
-		config/netcdf-unicos.inc config/jackets-unicos.c config/ftest-unicos.f
-
-LIBOBJS		= jackets.o mfsdf.o mfsdff.o
-LIBNAME		= mfhdf
-#REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-REMOTE_LIBRARY	= $(srcdir)/../libsrc/lib$(LIBNAME).a 
-REMOTE_LIBRARIES= $(REMOTE_LIBRARY) fortran.so.o
-#LD_XDR		= @LD_XDR@
-#LD_NETCDF	= -L../libsrc -lmfhdf
-LD_NETCDF	= -L$(srcdir)/../libsrc -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-prefix		= ../../..
-
-# directory used by extelt test.
-TESTDIR = testdir
-
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) nall ; \
-	esac
-
-
-nall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) netcdf.inc $(REMOTE_LIBRARIES); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" netcdf.inc $(REMOTE_LIBRARIES); \
-	fi
-
-test:		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	    echo "=================================";\
-	    echo "netCDF Fortran interface tests";\
-	    echo "=================================";\
-	    LD_LIBRARY_PATH=../../hdf/src:../libsrc ./$(PROGRAM); \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) hdftest;; \
-	esac
-install-includes:: install
-
-install::	FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(LOCAL_MACROS) installed_headers;; \
-	esac
-
-$(PROGRAM):	$(REMOTE_LIBRARY)
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.sho .so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .inc .f90 .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/fortran/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+ftest$(EXEEXT): $(ftest_OBJECTS) $(ftest_DEPENDENCIES) 
+	@rm -f ftest$(EXEEXT)
+	$(F77LINK) $(ftest_LDFLAGS) $(ftest_OBJECTS) $(ftest_LDADD) $(LIBS)
+hdftest$(EXEEXT): $(hdftest_OBJECTS) $(hdftest_DEPENDENCIES) 
+	@rm -f hdftest$(EXEEXT)
+	$(F77LINK) $(hdftest_LDFLAGS) $(hdftest_OBJECTS) $(hdftest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
-
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
 .f.o:
-	$(FC) -c $(FFLAGS) -D_REENTRANT $<
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-.f.sho:
-	$(FC) -c $(FFLAGS) -D_REENTRANT -fPIC -o $@ $<
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) -D_RRENTRANT $*.c
+ETAGS = etags
+ETAGSFLAGS =
 
-.fc.sho:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) -D_REENTRANT -fPIC $*.c
+CTAGS = ctags
+CTAGSFLAGS =
 
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
+tags: TAGS
 
-# Compile C code.
-#
-.c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -D_REENTRANT $<
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-.c.sho:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -D_REENTRANT -fPIC -o $@ $<
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-library::		$(LIB_A)
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile $(HEADERS)
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS)
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o libmfhdf.sl $(LIBOBJS)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-fortran.so.o: $(LIBOBJS:%.o=%.sho)
-	ld -r -o $@ $(LIBOBJS:%.o=%.sho)
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o ../libsrc/libmfhdf.sl $(LIBOBJS)
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+clean-generic:
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distclean: distclean-am
+	-rm -f Makefile
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
+dvi: dvi-am
 
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
+dvi-am:
 
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
+info: info-am
 
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
+info-am:
 
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
+install-data-am: install-includeHEADERS
 
+install-exec-am:
 
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
+install-info: install-info-am
 
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+install-man:
 
-dummy_prog $(PROGRAM):	$(PROGRAM).o FORCE
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(PROGRAM).o $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installcheck-am:
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+mostlyclean: mostlyclean-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+pdf: pdf-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+pdf-am:
 
+ps: ps-am
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ps-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+uninstall-am: uninstall-includeHEADERS uninstall-info-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-checkPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-includeHEADERS \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-includeHEADERS uninstall-info-am
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
 
-
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
-
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
-
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
-
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
-
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
-
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
-
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
-
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
-
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-
-# Rules to make Free format Fortran90 include files from F77 include files
-# 1) change all col. 1 [Cc] to '!'
-# 2) change all col. 6 continuation character to '&'
-#
-.SUFFIXES:	.inc .f90
-
+testdir:
+	-mkdir testdir
 .inc.f90:
 	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
-
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
-
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so *.sho \
-	    *.log $(TESTDIR)/*
-
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so *.sho \
-	    *.log Makefile config.status cc_id tags ftest.f netcdf.inc jackets.c \
-	    $(TESTDIR)/*
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/fortran
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# Disable the following since the three files are created by hand
-# and copied in during configuration.  The following, if ever activiated,
-# would blow away those good files.
-#
-#jackets.c:	fortc1.sed fortc2.sed common.m4 jackets.src $(OS).m4
-#	./fortc -L . -O $(OS) jackets.src > $@
-#
-#netcdf.inc:	common.inc fortc1.sed fortc2.sed common.m4 $(OS).m4
-#	./fortc -L . -O $(OS) common.inc > $@
-#
-#$(PROGRAM).f:	fortc1.sed fortc2.sed common.m4 $(PROGRAM).src $(OS).m4
-#	./fortc -L . -O $(OS) $(PROGRAM).src > $@
-#
-hdftest:        FORCE
-	$(FC) $(FFLAGS) hdftest.f $(LIBS) -o $@
-	@ echo "=======================================";
-	@ echo "HDF-SD Fortran interface tests start";
-	@ echo "=======================================";
-	test -d $(TESTDIR) || mkdir $(TESTDIR)
-	./hdftest > hdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) hdfout.new hdftst.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF-SD Fortran interface tests passed ***"; \
-	    else \
-		echo "*** HDF-SD Fortran interface tests failed ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-
-$(PROGRAM).o:	netcdf.inc
-jackets.o:	../libsrc/netcdf.h
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
+check:
+	@echo "==================================="
+	@echo "HDF-SD Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./hdftest
+	@echo "==================================="
+	@echo "HDF-NetCDF Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./ftest
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/fortran/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,98 +0,0 @@
-# Makefile for the FORTRAN interface to the Network CDF library
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:42 wendling Exp $
-
-PROGRAM		= ftest
-OS		= @OS@
-FC		= @FC@
-CPP_NETCDF	= -I../libsrc @HDF_INC@
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-GARBAGE		= $(PROGRAM) test.nc copy.nc netcdf.inc jackets.c \
-		  $(PROGRAM).f test*.hdf hdftest hdfout.new
-HEADERS		= netcdf.inc
-MANIFEST	= $(PROGRAM).src Makefile.in README aix.m4 common.inc \
-		  common.m4 depend descrip.mms fortc fortc1.sed \
-		  fortc2.sed hpux.m4 irix.m4 jackets.src msoft.m4 msoft.mk \
-		  next.m4 osf.m4 sunos.m4 ultrix.m4 unicos.m4 vax-ultrix.m4 \
-		  vms.m4 \
-		  msoft/NOTES msoft/fslen.asm msoft/ftest.for \
-		  msoft/jackets.c msoft/msoft.int \
-		  msoft/netcdf.inc \
-		  vms/ftest.for \
-		  vms/ftest.m4 \
-		  vms/jackets.c \
-		  vms/make.com \
-		  vms/netcdf.inc \
-		  mfsdf.c mfsdff.f hdftest.f
-
-LIBOBJS		= jackets.o mfsdf.o mfsdff.o
-LIBNAME		= netcdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS) 
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) netcdf.inc $(REMOTE_LIBRARY);; \
-	esac
-
-test:		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(PROGRAM); \
-	    $(MAKE) $(MFLAGS) hdftest; \
-	    ./$(PROGRAM);; \
-	esac
-
-install::	FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) installed_headers;; \
-	esac
-
-$(PROGRAM):	$(REMOTE_LIBRARY)
-
-include ../port/master.mk
-
-jackets.c:	fortc1.sed fortc2.sed common.m4 jackets.src $(OS).m4
-	./fortc -L . -O $(OS) jackets.src > $@
-
-netcdf.inc:	common.inc fortc1.sed fortc2.sed common.m4 $(OS).m4
-	./fortc -L . -O $(OS) common.inc > $@
-
-$(PROGRAM).f:	fortc1.sed fortc2.sed common.m4 $(PROGRAM).src $(OS).m4
-	./fortc -L . -O $(OS) $(PROGRAM).src > $@
-
-hdftest:        hdftest.f $(LIBRARY)
-	$(FC) -g hdftest.f $(LIBS) -o $@
-	./hdftest > hdfout.new
-	@cmd="diff hdfout.new hdftst.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes FORTRAN test ***"; \
-	    else \
-		echo "*** HDF fails FORTRAN test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-
-$(PROGRAM).o:	netcdf.inc
-jackets.o:	../libsrc/netcdf.h
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-aix.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-aix.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-aix.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-aix.f,v 1.3 1998/01/17 00:23:27 epourmal Exp $
+c   $Id: ftest-aix.f,v 1.6 2005/02/09 03:04:01 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-alpha.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-alpha.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-alpha.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-alpha.f,v 1.3 1998/01/17 00:24:23 epourmal Exp $
+c   $Id: ftest-alpha.f,v 1.6 2005/02/09 03:04:02 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+ 
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,195 @@
       call ncclos (ncid, iret)
       return
       end
+      
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len 
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-apple.f (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-apple.f)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-apple.f	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-apple.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1420 @@
+c********************************************************************
+c   Copyright 1993, UCAR/Unidata
+c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+c   $Id: ftest-apple.f,v 1.3 2005/02/09 03:04:02 epourmal Exp $
+c********************************************************************/
+
+
+
+c
+c     program to test the FBSD Fortran jacket interface to the netCDF
+c
+      program ftest
+      
+      include 'netcdf.inc'
+
+c     name of first test cdf
+      character*31 name
+c     name of second test cdf
+      character*31 name2
+      
+c     Returned error code.
+      integer iret 
+c     netCDF ID
+      integer ncid
+c     ID of dimension lat
+      integer  latdim
+c     ID of dimension lon
+      integer londim
+c     ID of dimension level
+      integer leveldim
+c     ID of dimension time
+      integer timedim
+c     ID of dimension len
+      integer lendim
+
+c     variable used to control error-handling behavior
+      integer ncopts
+      integer dimsiz(MAXNCDIM)
+C      allowable roundoff 
+      real epsilon
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      data name/'test.nc'/
+      data name2/'copy.nc'/
+      data epsilon /.000001/
+      
+100   format('*** Testing ', a, ' ...')
+c     set error-handling to verbose and non-fatal
+      ncopts = NCVERBOS
+      call ncpopt(ncopts)
+
+c     create a netCDF named 'test.nc'
+      write(*,100) 'nccre'
+      ncid = nccre(name, NCCLOB, iret)
+
+c     test ncddef
+      write(*,100) 'ncddef'
+      call tncddef(ncid)
+
+c     test ncvdef
+      write(*,100) 'ncvdef'
+      call tncvdef(ncid)
+
+c     test ncapt
+      write(*, 100) 'ncapt, ncaptc'
+      call tncapt(ncid)
+
+c     close 'test.nc'
+      write(*, 100) 'ncclos'
+      call ncclos(ncid, iret)
+
+c     test ncvpt1
+      write(*, 100) 'ncvpt1'
+      call tncvpt1(name)
+
+c     test ncvgt1
+      write(*, 100) 'ncvgt1'
+      call tncvgt1(name)
+
+c     test ncvpt
+      write(*, 100) 'ncvpt'
+      call tncvpt(name)
+
+c     test ncinq
+      write(*, 100) 'ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq'
+      call tncinq(name)
+
+c     test ncvgt
+      write(*, 100) 'ncvgt, ncvgtc'
+      call tncvgt(name)
+
+c     test ncagt
+      write(*, 100) 'ncagt, ncagtc'
+      call tncagt(name)
+
+c     test ncredf
+      write(*, 100) 'ncredf, ncdren, ncvren, ncaren, ncendf'
+      call tncredf(name)
+
+      call tncinq(name)
+
+c     test ncacpy
+      write(*, 100) 'ncacpy'
+      call tncacpy(name, name2)
+
+c     test ncadel
+      write(*, 100) 'ncadel'
+      call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
+
+      end
+c
+c     subroutine to test ncacpy
+c
+      subroutine tncacpy(iname, oname)
+      character*31 iname, oname
+      include 'netcdf.inc'
+      integer ndims, nvars, natts, recdim, iret
+      character*31 vname, attnam
+      integer attype, attlen
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      integer lenstr
+c     existing netCDF id
+      integer incdf
+c     netCDF id of the output netCDF file to which the attribute
+c     will be copied
+      integer outcdf
+
+      integer mattlen
+      parameter (mattlen = 80)
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer i, j, k
+      character*31 varnam, attname(2,7), gattnam(2)
+      integer*1 bytval(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+
+      incdf = ncopn(iname, NCNOWRIT, iret)
+      outcdf = nccre(oname, NCCLOB, iret)
+      call tncddef(outcdf)
+      call tncvdef(outcdf)
+      call ncinq (incdf, ndims, nvars, natts, recdim, iret)
+      do 5 j = 1, natts
+         call ncanam (incdf, NCGLOBAL, j, attnam, iret)
+         call ncacpy (incdf, NCGLOBAL, attnam, outcdf, NCGLOBAL, iret)
+ 5    continue
+      do 10 i = 1, nvars
+         call ncvinq (incdf, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         do 20 k = 1, nvatts
+            call ncanam (incdf, i, k, attnam, iret)
+            call ncacpy (incdf, i, attnam, outcdf, i, iret)
+ 20      continue
+ 10   continue
+c     
+c     get global attributes first
+c     
+      do 100 i = 1, natts
+         call ncanam (outcdf, NCGLOBAL, i, attnam, iret)
+         call ncainq (outcdf, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!', attlen, mattlen
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (outcdf, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt G'
+            if (charval .ne. gavalue(i))
+     + write(*,*) 'error in ncagt G2', lenstr, charval, gavalue(i)
+                  charval = ' '                                   
+         else if (attype .eq. NCSHORT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (outcdf, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (outcdf, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 100   continue
+c
+c     get variable attributes
+c
+      do 200 i = 1, nvars
+         call ncvinq (outcdf, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 250 j = 1, nvatts
+            call ncanam (outcdf, i, j, attnam, iret)
+            call ncainq (outcdf, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (outcdf, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE N'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (outcdf, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR N'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in  ncagt'
+                  charval = ' '                                    
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (outcdf, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT N'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (outcdf, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG N'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (outcdf, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT N'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (outcdf, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE N'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 250     continue
+ 200   continue
+      call ncclos(incdf, iret)
+      call ncclos(outcdf, iret)
+      return
+      end
+
+
+      
+c     
+c     subroutine to test ncadel
+c
+      subroutine tncadel (cdfname)
+      character*31 cdfname
+      include 'netcdf.inc'
+      
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer ncid, iret, i, j
+      integer ndims, nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      character*31 varnam, attnam
+
+      ncid = ncopn(cdfname, NCWRITE, iret)
+c     put cdf in define mode
+      call ncredf (ncid,iret)
+c     get number of global attributes
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 10 i = natts, 1, -1
+c     get name of global attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     delete global attribute
+         call ncadel (ncid, NCGLOBAL, attnam, iret)
+ 10   continue
+
+      do 100 i = 1, nvars
+c     get number of variable attributes
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +        nvatts, iret)
+         do 200 j = nvatts, 1, -1
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncadel (ncid, i, attnam, iret)
+ 200     continue
+ 100  continue
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (natts .ne. 0) write(*,*) 'error in ncadel'
+c     put netCDF into data mode
+      call ncendf (ncid, iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+c
+c     subroutine to test ncagt and ncagtc
+
+      subroutine tncagt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+            
+c     maximum length of an attribute
+      integer mattlen
+      parameter (mattlen = 80)
+      integer ncid, ndims, nvars, natts, recdim
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer i, j
+      integer attype, attlen, lenstr, iret
+      character*31 attnam
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer*1 bytval(2)
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      character*31 varnam, attname(2,7), gattnam(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+c     
+c     get global attributes first
+c     
+      do 10 i = 1, natts
+c     get name of attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     get attribute type and length
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!'
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (ncid, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (ncid, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt'
+            if (charval .ne. gavalue(i)) write(*,*) 'error in ncagt'
+            charval = '                                        '
+         else if (attype .eq. NCSHORT) then
+            call ncagt (ncid, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (ncid, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (ncid, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (ncid, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 10   continue
+
+c
+c     get variable attributes
+c
+      do 20 i = 1, nvars
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 25 j = 1, nvatts
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (ncid, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE name'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (ncid, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR name'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in ncagt CHAR name'
+	         charval = '                                        '
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (ncid, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT name'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (ncid, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG name'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (ncid, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT name'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (ncid, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE name'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 25      continue
+ 20   continue
+      call ncclos(ncid, iret)
+      return
+      end
+c
+c     subroutine to test ncapt
+c
+      subroutine tncapt (ncid)
+      include 'netcdf.inc'
+      integer ncid, iret
+
+c attribute vectors
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+
+c     variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c assign attributes
+      
+c
+c     byte
+c
+      
+      bvalidrg(1) = 1
+      bvalidrg(2) = 250
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
+     +bvalidrg, iret)
+
+c
+c     short
+c
+
+      svalidrg(1) = -100
+      svalidrg(2) = 100
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
+     +svalidrg, iret)
+
+c
+c     long
+c
+
+      lvalidrg(1) = 0
+      lvalidrg(2) = 360
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
+     +lvalidrg, iret)
+      
+c
+c     float
+c
+
+      rvalidrg(1) = 0.0
+      rvalidrg(2) = 5000.0
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
+     +rvalidrg, iret)
+
+c
+c     double
+c
+
+      dvalidrg(1) = 0D0
+      dvalidrg(2) = 500D0
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
+     +dvalidrg, iret)
+
+c
+c     global
+c
+
+      call ncaptc (ncid, NCGLOBAL, 'source', NCCHAR, 3, 
+     +'NWS', iret)
+      call ncaptc (ncid, NCGLOBAL, 'basetime', NCCHAR, 17, 
+     +'88/10/25 12:00:00', iret)
+
+c
+c     char
+c
+
+      call ncaptc (ncid, chid, 'longname', NCCHAR, 11,
+     +'test string', iret)
+
+      call ncaptc (ncid, chid, 'id', NCCHAR, 1,
+     +'a', iret)
+
+      return
+      end
+
+c
+c     initialize variables in labelled common blocks
+c
+      block data
+      common /cdims/ dimnam
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      integer  latdim, londim, leveldim, timedim, lendim
+
+c     should include 'netcdf.inc' for MAXNCDIM, but it has EXTERNAL
+c     declaration, which is not permitted in a BLOCK DATA unit.
+
+c      integer dimsiz(MAXNCDIM)
+      integer dimsiz(32)
+c      character*31 dimnam(MAXNCDIM)
+      character*31 dimnam(32)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+
+      data dimnam /'time', 'lat', 'lon', 'level',
+     + 'length', 27*'0'/
+      data dimsiz /4, 5, 5, 4, 80, 27*0/
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
+     + 'chv', 'cv'/
+      
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
+     + '0', '0'/
+      data gattnam/'source','basetime'/
+      end
+
+
+c
+c     subroutine to test ncddef
+c
+
+      subroutine tncddef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     sizes of dimensions of 'test.nc' and 'copy.nc'
+      integer  ndims
+      parameter(ndims=5)
+c dimension ids
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer iret
+c     function to define a netCDF dimension
+      integer dimsiz(MAXNCDIM)
+      character*31 dimnam(MAXNCDIM)
+      
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /cdims/ dimnam
+
+c define dimensions
+      timedim = ncddef(ncid, dimnam(1), NCUNLIM, iret)
+      latdim = ncddef(ncid, dimnam(2), dimsiz(2), iret)
+      londim = ncddef(ncid, dimnam(3), dimsiz(3), iret)
+      leveldim = ncddef(ncid, dimnam(4), dimsiz(4), iret)
+      lendim = ncddef(ncid, dimnam(5), dimsiz(5), iret)
+      return
+      end
+c
+c     subroutine to test ncinq, ncdinq, ncdid, ncvinq, ncanam
+c     and ncainq
+c
+      subroutine tncinq(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     netCDF id
+      integer ncid
+c     returned number of dimensions
+      integer ndims
+c     returned number of variables
+      integer nvars
+c     returned number of global attributes
+      integer natts
+c     returned id of the unlimited dimension
+      integer recdim
+c     returned error code
+      integer iret
+c     returned name of record dimension
+      character*31 recnam
+c     returned size of record dimension
+      integer recsiz
+c     loop control variables
+      integer i, j, k
+c     returned size of dimension
+      integer dsize
+c     returned dimension ID
+      integer dimid
+c     returned dimension name
+      character*31 dname
+c     returned variable name
+      character*31 vname
+c     returned attribute name
+      character*31 attnam
+c     returned netCDF datatype of variable
+      integer vartyp
+c     returned number of variable dimensions
+      integer nvdims
+c     returned number of variable attributes
+      integer nvatts
+c     returned vector of nvdims dimension IDS corresponding to the
+c     variable dimensions
+      integer vdims(MAXNCDIM)
+c     returned attribute length
+      integer attlen
+c     returned attribute type
+      integer attype
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      integer vdlist(5,7), vtyp(7), vndims(7), vnatts(7)
+      integer attyp(2,7),atlen(2,7),gattyp(2),gatlen(2)
+      integer timedim,latdim,londim,leveldim,lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+
+      data vdlist/1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,4,3,2,1,0,4,3,2,1,0,
+     + 5,1,0,0,0,1,0,0,0,0/
+      data vtyp/NCBYTE, NCSHORT, NCLONG, NCFLOAT, NCDOUBLE, NCCHAR,
+     + NCCHAR/
+      data vndims/1,1,1,4,4,2,1/
+      data vnatts/1,1,1,1,1,2,0/
+      data attyp/NCBYTE, 0, NCSHORT, 0, NCLONG, 0, NCFLOAT, 0,
+     + NCDOUBLE, 0, NCCHAR, NCCHAR, 0, 0/
+      data atlen/2,0,2,0,2,0,2,0,2,0,11,1, 0, 0/
+      data gattyp/NCCHAR,NCCHAR/
+      data gatlen/3,17/
+
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (ndims .ne. 5) write(*,*) 'error in ncinq or ncddef'
+      if (nvars .ne. 7) write(*,*) 'error in ncinq or ncvdef'
+      if (natts .ne. 2) write(*,*) 'error in ncinq or ncapt'
+      call ncdinq (ncid, recdim, recnam, recsiz, iret)
+      if (recnam .ne. 'time') write(*,*) 'error: bad recdim from ncinq'
+c
+c     dimensions
+c
+      do 10 i = 1, ndims
+         call ncdinq (ncid, i, dname, dsize, iret)
+         if (dname .ne. dimnam(i)) write(*,*)
+     + 'error in ncdinq or  ncddef, dname=', dname
+         if (dsize .ne. dimsiz(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dsize=',dsize
+         dimid = ncdid (ncid, dname, iret)
+         if (dimid .ne. i) write(*,*)
+     +      'error in ncdinq or ncddef, dimid=', dimid
+ 10   continue
+c
+c     variables
+c
+      do 30 i = 1, nvars
+         call ncvinq (ncid, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         if (vname .ne. varnam(i)) write(*,*)
+     + 'error: from ncvinq, wrong name returned: ', vname,
+     + ' .ne. ', varnam(i)
+         if (vartyp .ne. vtyp(i)) write(*,*)
+     + 'error: from ncvinq, wrong type returned: ', vartyp,
+     + ' .ne. ', vtyp(i)
+         if (nvdims .ne. vndims(i)) write(*,*)
+     + 'error: from ncvinq, wrong num dims returned: ', vdims,
+     + ' .ne. ', vndims(i)
+         do 35 j = 1, nvdims
+            if (vdims(j) .ne. vdlist(j,i)) write(*,*)
+     + 'error: from ncvinq wrong dimids: ', vdims(j),
+     + ' .ne. ', vdlist(j,i)
+ 35      continue
+         if (nvatts .ne. vnatts(i)) write(*,*)
+     + 'error in ncvinq or ncvdef'
+c
+c     attributes
+c
+         do 45 k = 1, nvatts
+            call ncanam (ncid, i, k, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen, iret)
+            if (attnam .ne. attname(k,i)) write(*,*)
+     + 'error in ncanam or ncapt'
+            if (attype .ne. attyp(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+            if (attlen .ne. atlen(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 45      continue
+ 30   continue
+      do 40 i = 1, natts
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen, iret)
+         if (attnam .ne. gattnam(i)) write(*,*)
+     + 'error in ncanam or ncapt'
+         if (attype .ne. gattyp(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+         if (attlen .ne. gatlen(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 40   continue
+      call ncclos(ncid, iret)
+      return
+      end
+      
+      
+      
+c     subroutine to test ncredf, ncdren, ncvren, ncaren, and 
+c     ncendf
+
+      subroutine tncredf(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      common /varn/varnam
+      integer ncid, iret, latid, varid
+
+      dimnam(2) = 'latitude'
+      varnam(4) = 'realv'
+      attname(1,6) = 'stringname'
+      gattnam(1) = 'agency'
+      ncid = ncopn(cdfname, NCWRITE, iret)
+      call ncredf(ncid, iret)
+      latid = ncdid(ncid, 'lat', iret)
+      call ncdren(ncid, latid, 'latitude', iret)
+      varid = ncvid(ncid, 'floatv', iret)
+      call ncvren(ncid, varid, 'realv', iret)
+      varid = ncvid(ncid, 'chv', iret)
+      call ncaren(ncid, varid, 'longname', 'stringname', iret)
+      call ncaren(ncid, NCGLOBAL, 'source', 'agency', iret)
+      call ncendf(ncid, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+c     
+c     subroutine to test ncvdef
+c
+
+      subroutine tncvdef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     function to define a netCDF variable
+      integer dimsiz(MAXNCDIM)
+      integer  latdim, londim, leveldim, timedim, lendim
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+c variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c variable shapes
+      integer  bdims(1), fdims(4), ddims(4), ldims(1), sdims(1) 
+      integer chdims(2), cdims(1)
+
+      integer iret
+c
+c define variables
+c
+c     byte
+c 
+      bdims(1) = timedim
+      bid = ncvdef(ncid, 'bytev', NCBYTE, 1, bdims, iret)
+c
+c     short
+c
+      sdims(1) = timedim
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
+c
+c     long
+c
+      ldims(1) = latdim
+      lid = ncvdef (ncid, 'longv', NCLONG, 1, ldims, iret)
+c
+c     float
+c
+      fdims(4) = timedim
+      fdims(1) = leveldim
+      fdims(2) = londim
+      fdims(3) = latdim
+      fid = ncvdef (ncid, 'floatv', NCFLOAT, 4, fdims, iret)
+c
+c     double
+c
+      ddims(4) = timedim
+      ddims(1) = leveldim
+      ddims(2) = londim
+      ddims(3) = latdim
+      did = ncvdef (ncid, 'doublev', NCDOUBLE, 4, ddims, iret)
+c
+c     char
+c
+      chdims(2) = timedim
+      chdims(1) = lendim
+      chid = ncvdef (ncid, 'chv', NCCHAR, 2, chdims, iret)
+
+      cdims(1) = timedim
+      cid = ncvdef (ncid, 'cv', NCCHAR, 1, cdims, iret)
+
+
+      return
+      end
+
+
+c    
+c     subroutine to test ncvgt and ncvgtc
+c
+      subroutine tncvgt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ndims, times, lats, lons, levels, lenstr
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer start(MAXNCDIM), count(MAXNCDIM)
+      integer ncid, iret, i, m
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer itime, ilev, ilat, ilon
+
+c     arrays of data values to be read
+      integer*1 barray(times), byval(times)
+      integer*2 sarray(times), shval(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+c     character array of data values to be read
+      character*31 string
+      character*31 varnam
+      integer nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data byval /97, 98, 99, 100/
+      data shval /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c     get number of variables in netCDF
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 5 m = 1, nvars-1
+c     get variable name, datatype, number of dimensions
+c     vector of dimension ids, and number of variable attributes
+         call ncvinq (ncid, m, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         if (vartyp .eq. NCBYTE) then
+c
+c     byte
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, barray, iret)
+            do 10 i = 1, times
+               if (barray(i) .ne. byval(i)) then 
+                  write(*,*) 'ncvgt of bytes, got ', barray(i), ' .ne. '
+     +			     , byval(i)
+               end if
+ 10         continue
+         else if (vartyp .eq. NCSHORT) then
+c
+c     short
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, sarray, iret)
+            do 20 i = 1, times
+               if (sarray(i) .ne. shval(i)) then 
+                  write(*,*) 'ncvgt of short, got ', sarray(i), ' .ne. '
+     +			     , shval(i)
+               end if
+ 20         continue
+         else if (vartyp .eq. NCLONG) then
+c     
+c     long
+c
+            count(1) = lats
+            call ncvgt (ncid, m, start, count, larray, iret)
+            do 30 i = 1, lats
+               if (larray(i) .ne. 1000) then 
+                  write(*,*) 'long error in ncvgt'
+               end if
+ 30         continue
+         else if (vartyp .eq. NCFLOAT) then
+c     
+c     float
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, farray, iret)
+            i = 0
+            do 40 itime = 1,times
+               do 40 ilon = 1, lons
+                  do 40 ilat = 1, lats
+                     do 40 ilev = 1, levels
+                        i = i + 1
+                        if (farray(ilev, ilat, ilon, itime) .ne.
+     + real(i)) then
+                           write (*,*) 'float error in ncvgt'
+                        end if
+ 40         continue
+         else if (vartyp .eq. NCDOUBLE) then
+c
+c     double
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, darray, iret)
+            i = 0
+            do 50 itime = 1, times
+               do 50 ilon = 1, lons
+                  do 50 ilat = 1, lats
+                     do 50 ilev = 1, levels
+                        i = i + 1
+                        if (darray(ilev, ilat, ilon, itime) .ne.
+     +                       real(i)) then
+                           write(*,*) 'double error in ncvgt:', i,
+     +              darray(ilev, ilat, ilon, itime), '.ne.', real(i)
+                        end if
+ 50         continue
+         else 
+c     
+c     char
+c
+	    count(1) = 3
+	    count(2) = 4
+	    lenstr = 31
+            call ncvgtc (ncid, m, start, count, string, lenstr, iret)
+            if (string .ne. 'testhikin of') then 
+               write(*,*) 'error in ncvgt, returned string =', string
+            end if
+         end if
+ 5    continue
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvgt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ncid, iret
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+      integer*1 bvalue
+      integer*2 svalue
+      integer lvalue
+      real fvalue
+      double precision dvalue
+      character*1 c
+      real epsilon
+      double precision onethird
+
+      data epsilon /.000001/
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data onethird/0.3333333333D0/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+c
+c     test ncvgt1 for byte
+c
+      call ncvgt1 (ncid, bid, bindx, bvalue, iret)
+      if (bvalue .ne. ichar('z')) write(*,*) 'error in ncvgt1 byte:',
+     + bvalue, ' .ne.', ichar('z')
+c
+c     test ncvgt1 for short
+c
+      call ncvgt1 (ncid, sid, sindx, svalue, iret)
+      if (svalue .ne. 10) write(*,*) 'error in ncvgt1 short:',
+     + svalue, ' .ne.', 10
+c     
+c     test ncvgt1 for long
+c
+      call ncvgt1 (ncid, lid, lindx, lvalue, iret)
+      if (lvalue .ne. 1000) write(*,*) 'error in ncvgt1 long:',
+     + lvalue,  ' .ne.', 1000
+c
+c     test ncvgt1 for float
+c
+      call ncvgt1 (ncid, fid, findx, fvalue, iret)
+      if (abs(fvalue - 3.14159) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 float:', fvalue, ' not close to', 3.14159
+c
+c     test ncvgt1 for double
+c
+      call ncvgt1 (ncid, did, dindx, dvalue, iret)
+      if (abs(dvalue - onethird) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 double:', dvalue, ' not close to',
+     +     onethird
+c
+c     test ncvg1c for char
+c
+      call ncvg1c (ncid, cid, cindx, c, iret)
+      if (c .ne. 'a') write(*,*) 'error in ncvg1c'
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      
+c
+c     subroutine to test ncvpt and ncvptc
+c
+      subroutine tncvpt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     size of dimensions
+      integer times, lats, lons, levels
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer ncid, iret
+c     loop control variables
+      integer itime, ilev, ilon, ilat, i
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      integer lenstr
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c     vector of integers specifying the corner of the  hypercube
+c     where the first of the data values will be written
+      integer start(MAXNCDIM)
+c     vector of integers specifying the edge lengths from the
+c     corner of the hypercube where the first of the data values
+c     will be written
+      integer count(MAXNCDIM)
+
+c     arrays of data values to be written
+      integer*1 barray(times)
+      integer*2 sarray(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+      character*31 string
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data barray /97, 98, 99, 100/
+      data sarray /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+
+c
+c     byte
+c
+      count(1) = times
+      call ncvpt (ncid, bid, start, count, barray, iret)
+c
+c     short
+c
+      count(1) = times
+      call ncvpt (ncid, sid, start, count, sarray, iret)
+c
+c     long
+c
+      do 30 i = 1,lats
+         larray(i) = 1000
+ 30   continue
+      count(1) = lats
+      call ncvpt (ncid, lid, start, count, larray, iret)
+c
+c     float
+c
+      i = 0
+      do 40 itime = 1,times
+         do 40 ilon = 1, lons
+            do 40 ilat = 1, lats
+               do 40 ilev = 1, levels
+                  i = i + 1
+                  farray(ilev, ilat, ilon, itime) = real(i)
+ 40   continue
+      count(1) = levels
+      call ncvpt (ncid, fid, start, count, farray, iret)
+c
+c     double
+c
+      i = 0
+      do 50 itime = 1, times
+         do 50 ilon = 1, lons
+            do 50 ilat = 1, lats
+               do 50 ilev = 1, levels
+                  i = i + 1
+                  darray(ilev, ilat, ilon, itime) = real(i)
+ 50   continue
+      count(1) = levels
+      call ncvpt (ncid, did, start, count, darray, iret)
+c
+c     char
+c
+      start(1) = 1
+      start(2) = 1
+      count(1) = 4
+      count(2) = 4
+      lenstr = 31	
+      string = 'testthiskind of '
+      call ncvptc (ncid, chid,start, count, string, lenstr, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvpt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+
+      integer iret, ncid
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer lvalue
+      integer*2 svalue
+      integer*1 bvalue
+      double precision onethird
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data lvalue /1000/
+      data svalue/10/
+      data onethird/0.3333333333D0/
+
+      bvalue = ichar('z')
+      
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c
+c     test ncvpt1 for byte
+c
+      call ncvpt1 (ncid, bid, bindx, bvalue, iret)
+c
+c     test ncvpt1 for short
+c
+      call ncvpt1 (ncid, sid, sindx, svalue, iret)
+c     
+c     test ncvpt1 for long
+c
+      call ncvpt1 (ncid, lid, lindx, lvalue, iret)
+c
+c     test ncvpt1 for float
+c
+      call ncvpt1 (ncid, fid, findx, 3.14159, iret)
+c
+c     test ncvpt1 for double
+c
+      call ncvpt1 (ncid, did, dindx, onethird, iret)
+c
+c     test ncvp1c for char
+c
+      call ncvp1c (ncid, cid, cindx, 'a', iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-convex.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-convex.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-convex.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-convex.f,v 1.3 1998/01/17 00:30:50 epourmal Exp $
+c   $Id: ftest-convex.f,v 1.4 2005/02/09 03:04:03 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-dec.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-dec.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-dec.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-dec.f,v 1.3 1998/01/17 00:25:00 epourmal Exp $
+c   $Id: ftest-dec.f,v 1.4 2005/02/09 03:04:03 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fbsd.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fbsd.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fbsd.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-fbsd.f,v 1.3 1998/01/17 00:31:39 epourmal Exp $
+c   $Id: ftest-fbsd.f,v 1.6 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fujivp.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fujivp.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-fujivp.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-fujivp.f,v 1.2 1998/01/17 00:32:25 epourmal Exp $
+c   $Id: ftest-fujivp.f,v 1.3 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-hpux.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-hpux.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-hpux.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-hpux.f,v 1.3 1998/01/17 00:26:11 epourmal Exp $
+c   $Id: ftest-hpux.f,v 1.6 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-ia64.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-ia64.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-ia64.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-ia64.f,v 1.1 2000/05/23 18:07:07 acheng Exp $
+c   $Id: ftest-ia64.f,v 1.4 2005/02/09 03:04:05 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix32.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix32.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix32.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix32.f,v 1.3 1998/01/17 00:33:06 epourmal Exp $
+c   $Id: ftest-irix32.f,v 1.4 2005/02/09 03:04:05 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix4.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix4.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix4.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix4.f,v 1.3 1998/01/17 00:33:48 epourmal Exp $
+c   $Id: ftest-irix4.f,v 1.4 2005/02/09 03:04:06 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix5.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix5.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix5.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix5.f,v 1.3 1998/01/17 00:34:31 epourmal Exp $
+c   $Id: ftest-irix5.f,v 1.4 2005/02/09 03:04:06 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix6.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix6.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-irix6.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix6.f,v 1.3 1998/01/17 00:35:09 epourmal Exp $
+c   $Id: ftest-irix6.f,v 1.6 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-linux.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-linux.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-linux.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-linux.f,v 1.3 1998/01/17 00:26:57 epourmal Exp $
+c   $Id: ftest-linux.f,v 1.6 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-mac.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-mac.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-mac.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-mac.f,v 1.3 1998/01/17 00:27:53 epourmal Exp $
+c   $Id: ftest-mac.f,v 1.4 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-solaris.f,v 1.3 1998/01/17 00:28:29 epourmal Exp $
+c   $Id: ftest-solaris.f,v 1.6 2005/02/09 03:04:08 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,197 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris64.f (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris64.f)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris64.f	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solaris64.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1221 @@
+c********************************************************************
+c   Copyright 1993, UCAR/Unidata
+c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+c   $Id: ftest-solaris64.f,v 1.4 2005/02/09 03:04:08 epourmal Exp $
+c********************************************************************/
+
+
+
+c
+c     program to test the Sun Fortran jacket interface to the netCDF
+c
+      program ftest
+      
+      include 'netcdf.inc'
+
+c     name of first test cdf
+      character*31 name
+c     name of second test cdf
+      character*31 name2
+      
+c     Returned error code.
+      integer iret 
+c     netCDF ID
+      integer ncid
+c     ID of dimension lat
+      integer  latdim
+c     ID of dimension lon
+      integer londim
+c     ID of dimension level
+      integer leveldim
+c     ID of dimension time
+      integer timedim
+c     ID of dimension len
+      integer lendim
+
+c     variable used to control error-handling behavior
+      integer ncopts
+      integer dimsiz(MAXNCDIM)
+C      allowable roundoff 
+      real epsilon
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      data name/'test.nc'/
+      data name2/'copy.nc'/
+      data epsilon /.000001/
+      
+100   format('*** Testing ', a, ' ...')
+c     set error-handling to verbose and non-fatal
+      ncopts = NCVERBOS
+      call ncpopt(ncopts)
+
+c     create a netCDF named 'test.nc'
+      write(*,100) 'nccre'
+      ncid = nccre(name, NCCLOB, iret)
+
+c     test ncddef
+      write(*,100) 'ncddef'
+      call tncddef(ncid)
+
+c     test ncvdef
+      write(*,100) 'ncvdef'
+      call tncvdef(ncid)
+
+c     test ncapt
+      write(*, 100) 'ncapt, ncaptc'
+      call tncapt(ncid)
+
+c     close 'test.nc'
+      write(*, 100) 'ncclos'
+      call ncclos(ncid, iret)
+
+c     test ncvpt1
+      write(*, 100) 'ncvpt1'
+      call tncvpt1(name)
+
+c     test ncvgt1
+      write(*, 100) 'ncvgt1'
+      call tncvgt1(name)
+
+c     test ncvpt
+      write(*, 100) 'ncvpt'
+      call tncvpt(name)
+
+c     test ncinq
+      write(*, 100) 'ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq'
+      call tncinq(name)
+
+c     test ncvgt
+      write(*, 100) 'ncvgt, ncvgtc'
+      call tncvgt(name)
+
+c     test ncagt
+      write(*, 100) 'ncagt, ncagtc'
+      call tncagt(name)
+
+c     test ncredf
+      write(*, 100) 'ncredf, ncdren, ncvren, ncaren, ncendf'
+      call tncredf(name)
+
+      call tncinq(name)
+
+c     test ncacpy
+      write(*, 100) 'ncacpy'
+      call tncacpy(name, name2)
+
+c     test ncadel
+      write(*, 100) 'ncadel'
+      call tncadel(name2)
+      end
+c
+c     subroutine to test ncacpy
+c
+      subroutine tncacpy(iname, oname)
+      character*31 iname, oname
+      include 'netcdf.inc'
+      integer ndims, nvars, natts, recdim, iret
+      character*31 vname, attnam
+      integer attype, attlen
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      integer lenstr
+c     existing netCDF id
+      integer incdf
+c     netCDF id of the output netCDF file to which the attribute
+c     will be copied
+      integer outcdf
+
+      integer mattlen
+      parameter (mattlen = 80)
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer i, j, k
+      character*31 varnam, attname(2,7), gattnam(2)
+      byte bytval(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+
+      incdf = ncopn(iname, NCNOWRIT, iret)
+      outcdf = nccre(oname, NCCLOB, iret)
+      call tncddef(outcdf)
+      call tncvdef(outcdf)
+      call ncinq (incdf, ndims, nvars, natts, recdim, iret)
+      do 5 j = 1, natts
+         call ncanam (incdf, NCGLOBAL, j, attnam, iret)
+         call ncacpy (incdf, NCGLOBAL, attnam, outcdf, NCGLOBAL, iret)
+ 5    continue
+      do 10 i = 1, nvars
+         call ncvinq (incdf, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         do 20 k = 1, nvatts
+            call ncanam (incdf, i, k, attnam, iret)
+            call ncacpy (incdf, i, attnam, outcdf, i, iret)
+ 20      continue
+ 10   continue
+c     
+c     get global attributes first
+c     
+      do 100 i = 1, natts
+         call ncanam (outcdf, NCGLOBAL, i, attnam, iret)
+         call ncainq (outcdf, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!', attlen, mattlen
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (outcdf, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt G'
+            if (charval .ne. gavalue(i))
+     + write(*,*) 'error in ncagt G2', lenstr, charval, gavalue(i)
+                  charval = ' '                                    
+         else if (attype .eq. NCSHORT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (outcdf, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (outcdf, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 100   continue
+c
+c     get variable attributes
+c
+      do 200 i = 1, nvars
+         call ncvinq (outcdf, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 250 j = 1, nvatts
+            call ncanam (outcdf, i, j, attnam, iret)
+            call ncainq (outcdf, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (outcdf, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i))
+     +       write(*,*) 'error in ncagt BYTE N'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (outcdf, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     +  'error in ncagt CHAR N'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     +  'error in ncagt'
+                  charval = ' '                                   
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (outcdf, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT N'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (outcdf, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG N'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (outcdf, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT N'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (outcdf, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE N'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 250     continue
+ 200   continue
+      call ncclos(incdf, iret)
+      call ncclos(outcdf, iret)
+      return
+      end
+
+
+      
+c     
+c     subroutine to test ncadel
+c
+      subroutine tncadel (cdfname)
+      character*31 cdfname
+      include 'netcdf.inc'
+      
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer ncid, iret, i, j
+      integer ndims, nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      character*31 varnam, attnam
+
+      ncid = ncopn(cdfname, NCWRITE, iret)
+c     put cdf in define mode
+      call ncredf (ncid,iret)
+c     get number of global attributes
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 10 i = natts, 1, -1
+c     get name of global attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     delete global attribute
+         call ncadel (ncid, NCGLOBAL, attnam, iret)
+ 10   continue
+
+      do 100 i = 1, nvars
+c     get number of variable attributes
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +        nvatts, iret)
+         do 200 j = nvatts, 1, -1
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncadel (ncid, i, attnam, iret)
+ 200     continue
+ 100  continue
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (natts .ne. 0) write(*,*) 'error in ncadel'
+c     put netCDF into data mode
+      call ncendf (ncid, iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+c
+c     subroutine to test ncagt and ncagtc
+
+      subroutine tncagt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+            
+c     maximum length of an attribute
+      integer mattlen
+      parameter (mattlen = 80)
+      integer ncid, ndims, nvars, natts, recdim
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer i, j
+      integer attype, attlen, lenstr, iret
+      character*31 attnam
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      byte bytval(2)
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      character*31 varnam, attname(2,7), gattnam(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+c     
+c     get global attributes first
+c     
+      do 10 i = 1, natts
+c     get name of attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     get attribute type and length
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!'
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (ncid, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (ncid, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt'
+            if (charval .ne. gavalue(i)) write(*,*) 'error in ncagt'
+            charval = '                                        '
+         else if (attype .eq. NCSHORT) then
+            call ncagt (ncid, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (ncid, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (ncid, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (ncid, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 10   continue
+
+c
+c     get variable attributes
+c
+      do 20 i = 1, nvars
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 25 j = 1, nvatts
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (ncid, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE name'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (ncid, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR name'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in ncagt CHAR name'
+	         charval = '                                        '
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (ncid, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT name'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (ncid, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG name'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (ncid, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT name'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (ncid, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE name'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 25      continue
+ 20   continue
+      call ncclos(ncid, iret)
+      return
+      end
+c
+c     subroutine to test ncapt
+c
+      subroutine tncapt (ncid)
+      include 'netcdf.inc'
+      integer ncid, iret
+
+c attribute vectors
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+
+c     variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c assign attributes
+      
+c
+c     byte
+c
+      
+      bvalidrg(1) = 1
+      bvalidrg(2) = 250
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
+     +bvalidrg, iret)
+
+c
+c     short
+c
+
+      svalidrg(1) = -100
+      svalidrg(2) = 100
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
+     +svalidrg, iret)
+
+c
+c     long
+c
+
+      lvalidrg(1) = 0
+      lvalidrg(2) = 360
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
+     +lvalidrg, iret)
+      
+c
+c     float
+c
+
+      rvalidrg(1) = 0.0
+      rvalidrg(2) = 5000.0
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
+     +rvalidrg, iret)
+
+c
+c     double
+c
+
+      dvalidrg(1) = 0D0
+      dvalidrg(2) = 500D0
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
+     +dvalidrg, iret)
+
+c
+c     global
+c
+
+      call ncaptc (ncid, NCGLOBAL, 'source', NCCHAR, 3, 
+     +'NWS', iret)
+      call ncaptc (ncid, NCGLOBAL, 'basetime', NCCHAR, 17, 
+     +'88/10/25 12:00:00', iret)
+
+c
+c     char
+c
+
+      call ncaptc (ncid, chid, 'longname', NCCHAR, 11,
+     +'test string', iret)
+
+      call ncaptc (ncid, chid, 'id', NCCHAR, 1,
+     +'a', iret)
+
+      return
+      end
+
+c
+c     initialize variables in labelled common blocks
+c
+      block data
+      common /cdims/ dimnam
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      integer  latdim, londim, leveldim, timedim, lendim
+
+c     should include 'netcdf.inc' for MAXNCDIM, but it has EXTERNAL
+c     declaration, which is not permitted in a BLOCK DATA unit.
+
+c      integer dimsiz(MAXNCDIM)
+      integer dimsiz(32)
+c      character*31 dimnam(MAXNCDIM)
+      character*31 dimnam(32)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+
+      data dimnam /'time', 'lat', 'lon', 'level',
+     + 'length', 27*'0'/
+      data dimsiz /4, 5, 5, 4, 80, 27*0/
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
+     + 'chv', 'cv'/
+      
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
+     + '0', '0'/
+      data gattnam/'source','basetime'/
+      end
+
+
+c
+c     subroutine to test ncddef
+c
+
+      subroutine tncddef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     sizes of dimensions of 'test.nc' and 'copy.nc'
+      integer  ndims
+      parameter(ndims=5)
+c dimension ids
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer iret
+c     function to define a netCDF dimension
+      integer dimsiz(MAXNCDIM)
+      character*31 dimnam(MAXNCDIM)
+      
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /cdims/ dimnam
+
+c define dimensions
+      timedim = ncddef(ncid, dimnam(1), NCUNLIM, iret)
+      latdim = ncddef(ncid, dimnam(2), dimsiz(2), iret)
+      londim = ncddef(ncid, dimnam(3), dimsiz(3), iret)
+      leveldim = ncddef(ncid, dimnam(4), dimsiz(4), iret)
+      lendim = ncddef(ncid, dimnam(5), dimsiz(5), iret)
+      return
+      end
+c
+c     subroutine to test ncinq, ncdinq, ncdid, ncvinq, ncanam
+c     and ncainq
+c
+      subroutine tncinq(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     netCDF id
+      integer ncid
+c     returned number of dimensions
+      integer ndims
+c     returned number of variables
+      integer nvars
+c     returned number of global attributes
+      integer natts
+c     returned id of the unlimited dimension
+      integer recdim
+c     returned error code
+      integer iret
+c     returned name of record dimension
+      character*31 recnam
+c     returned size of record dimension
+      integer recsiz
+c     loop control variables
+      integer i, j, k
+c     returned size of dimension
+      integer dsize
+c     returned dimension ID
+      integer dimid
+c     returned dimension name
+      character*31 dname
+c     returned variable name
+      character*31 vname
+c     returned attribute name
+      character*31 attnam
+c     returned netCDF datatype of variable
+      integer vartyp
+c     returned number of variable dimensions
+      integer nvdims
+c     returned number of variable attributes
+      integer nvatts
+c     returned vector of nvdims dimension IDS corresponding to the
+c     variable dimensions
+      integer vdims(MAXNCDIM)
+c     returned attribute length
+      integer attlen
+c     returned attribute type
+      integer attype
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      integer vdlist(5,7), vtyp(7), vndims(7), vnatts(7)
+      integer attyp(2,7),atlen(2,7),gattyp(2),gatlen(2)
+      integer timedim,latdim,londim,leveldim,lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+
+      data vdlist/1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,4,3,2,1,0,4,3,2,1,0,
+     + 5,1,0,0,0,1,0,0,0,0/
+      data vtyp/NCBYTE, NCSHORT, NCLONG, NCFLOAT, NCDOUBLE, NCCHAR,
+     + NCCHAR/
+      data vndims/1,1,1,4,4,2,1/
+      data vnatts/1,1,1,1,1,2,0/
+      data attyp/NCBYTE, 0, NCSHORT, 0, NCLONG, 0, NCFLOAT, 0,
+     + NCDOUBLE, 0, NCCHAR, NCCHAR, 0, 0/
+      data atlen/2,0,2,0,2,0,2,0,2,0,11,1, 0, 0/
+      data gattyp/NCCHAR,NCCHAR/
+      data gatlen/3,17/
+
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (ndims .ne. 5) write(*,*) 'error in ncinq or ncddef'
+      if (nvars .ne. 7) write(*,*) 'error in ncinq or ncvdef'
+      if (natts .ne. 2) write(*,*) 'error in ncinq or ncapt'
+      call ncdinq (ncid, recdim, recnam, recsiz, iret)
+      if (recnam .ne. 'time') write(*,*) 'error: bad recdim from ncinq'
+c
+c     dimensions
+c
+      do 10 i = 1, ndims
+         call ncdinq (ncid, i, dname, dsize, iret)
+         if (dname .ne. dimnam(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dname=', dname
+         if (dsize .ne. dimsiz(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dsize=',dsize
+         dimid = ncdid (ncid, dname, iret)
+         if (dimid .ne. i) write(*,*)
+     +      'error in ncdinq or ncddef, dimid=', dimid
+ 10   continue
+c
+c     variables
+c
+      do 30 i = 1, nvars
+         call ncvinq (ncid, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         if (vname .ne. varnam(i)) write(*,*)
+     +  'error: from ncvinq, wrong  name returned: ', vname,
+     +  ' .ne. ', varnam(i)
+         if (vartyp .ne. vtyp(i)) write(*,*)
+     + 'error: from ncvinq, wrong type returned: ', vartyp,
+     + ' .ne. ', vtyp(i)
+         if (nvdims .ne. vndims(i)) write(*,*)
+     + 'error: from ncvinq, wrong num dims returned: ', vdims,
+     + ' .ne. ', vndims(i)
+         do 35 j = 1, nvdims
+            if (vdims(j) .ne. vdlist(j,i)) write(*,*)
+     + 'error: from ncvinq wrong dimids: ', vdims(j),
+     + ' .ne. ', vdlist(j,i)
+ 35      continue
+         if (nvatts .ne. vnatts(i)) write(*,*)
+     + 'error in ncvinq or ncvdef'
+c
+c     attributes
+c
+         do 45 k = 1, nvatts
+            call ncanam (ncid, i, k, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen, iret)
+            if (attnam .ne. attname(k,i)) write(*,*)
+     + 'error in ncanam or ncapt'
+            if (attype .ne. attyp(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+            if (attlen .ne. atlen(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 45      continue
+ 30   continue
+      do 40 i = 1, natts
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen, iret)
+         if (attnam .ne. gattnam(i)) write(*,*)
+     + 'error in ncanam or ncapt'
+         if (attype .ne. gattyp(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+         if (attlen .ne. gatlen(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 40   continue
+      call ncclos(ncid, iret)
+      return
+      end
+      
+      
+      
+c     subroutine to test ncredf, ncdren, ncvren, ncaren, and 
+c     ncendf
+
+      subroutine tncredf(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      common /varn/varnam
+      integer ncid, iret, latid, varid
+
+      dimnam(2) = 'latitude'
+      varnam(4) = 'realv'
+      attname(1,6) = 'stringname'
+      gattnam(1) = 'agency'
+      ncid = ncopn(cdfname, NCWRITE, iret)
+      call ncredf(ncid, iret)
+      latid = ncdid(ncid, 'lat', iret)
+      call ncdren(ncid, latid, 'latitude', iret)
+      varid = ncvid(ncid, 'floatv', iret)
+      call ncvren(ncid, varid, 'realv', iret)
+      varid = ncvid(ncid, 'chv', iret)
+      call ncaren(ncid, varid, 'longname', 'stringname', iret)
+      call ncaren(ncid, NCGLOBAL, 'source', 'agency', iret)
+      call ncendf(ncid, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+c     
+c     subroutine to test ncvdef
+c
+
+      subroutine tncvdef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     function to define a netCDF variable
+      integer dimsiz(MAXNCDIM)
+      integer  latdim, londim, leveldim, timedim, lendim
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+c variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c variable shapes
+      integer  bdims(1), fdims(4), ddims(4), ldims(1), sdims(1) 
+      integer chdims(2), cdims(1)
+
+      integer iret
+c
+c define variables
+c
+c     byte
+c 
+      bdims(1) = timedim
+      bid = ncvdef(ncid, 'bytev', NCBYTE, 1, bdims, iret)
+c
+c     short
+c
+      sdims(1) = timedim
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
+c
+c     long
+c
+      ldims(1) = latdim
+      lid = ncvdef (ncid, 'longv', NCLONG, 1, ldims, iret)
+c
+c     float
+c
+      fdims(4) = timedim
+      fdims(1) = leveldim
+      fdims(2) = londim
+      fdims(3) = latdim
+      fid = ncvdef (ncid, 'floatv', NCFLOAT, 4, fdims, iret)
+c
+c     double
+c
+      ddims(4) = timedim
+      ddims(1) = leveldim
+      ddims(2) = londim
+      ddims(3) = latdim
+      did = ncvdef (ncid, 'doublev', NCDOUBLE, 4, ddims, iret)
+c
+c     char
+c
+      chdims(2) = timedim
+      chdims(1) = lendim
+      chid = ncvdef (ncid, 'chv', NCCHAR, 2, chdims, iret)
+
+      cdims(1) = timedim
+      cid = ncvdef (ncid, 'cv', NCCHAR, 1, cdims, iret)
+
+
+      return
+      end
+
+
+c    
+c     subroutine to test ncvgt and ncvgtc
+c
+      subroutine tncvgt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ndims, times, lats, lons, levels, lenstr
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer start(MAXNCDIM), count(MAXNCDIM)
+      integer ncid, iret, i, m
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer itime, ilev, ilat, ilon
+
+c     arrays of data values to be read
+      byte barray(times), byval(times)
+      integer*2 sarray(times), shval(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+c     character array of data values to be read
+      character*31 string
+      character*31 varnam
+      integer nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data byval /97, 98, 99, 100/
+      data shval /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c     get number of variables in netCDF
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 5 m = 1, nvars-1
+c     get variable name, datatype, number of dimensions
+c     vector of dimension ids, and number of variable attributes
+         call ncvinq (ncid, m, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         if (vartyp .eq. NCBYTE) then
+c
+c     byte
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, barray, iret)
+            do 10 i = 1, times
+               if (barray(i) .ne. byval(i)) then 
+                  write(*,*) 'ncvgt of bytes, got ', barray(i), ' .ne. '
+     +			     , byval(i)
+               end if
+ 10         continue
+         else if (vartyp .eq. NCSHORT) then
+c
+c     short
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, sarray, iret)
+            do 20 i = 1, times
+               if (sarray(i) .ne. shval(i)) then 
+                  write(*,*) 'ncvgt of short, got ', sarray(i), ' .ne. '
+     +			     , shval(i)
+               end if
+ 20         continue
+         else if (vartyp .eq. NCLONG) then
+c     
+c     long
+c
+            count(1) = lats
+            call ncvgt (ncid, m, start, count, larray, iret)
+            do 30 i = 1, lats
+               if (larray(i) .ne. 1000) then 
+                  write(*,*) 'long error in ncvgt'
+               end if
+ 30         continue
+         else if (vartyp .eq. NCFLOAT) then
+c     
+c     float
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, farray, iret)
+            i = 0
+            do 40 itime = 1,times
+               do 40 ilon = 1, lons
+                  do 40 ilat = 1, lats
+                     do 40 ilev = 1, levels
+                        i = i + 1
+                        if (farray(ilev, ilat, ilon, itime) .ne.
+     + real(i)) then
+                           write (*,*) 'float error in ncvgt'
+                        end if
+ 40         continue
+         else if (vartyp .eq. NCDOUBLE) then
+c
+c     double
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, darray, iret)
+            i = 0
+            do 50 itime = 1, times
+               do 50 ilon = 1, lons
+                  do 50 ilat = 1, lats
+                     do 50 ilev = 1, levels
+                        i = i + 1
+                        if (darray(ilev, ilat, ilon, itime) .ne.
+     +                       real(i)) then
+                           write(*,*) 'double error in ncvgt:', i,
+     +              darray(ilev, ilat, ilon, itime), '.ne.', real(i)
+                        end if
+ 50         continue
+         else 
+c     
+c     char
+c
+	    count(1) = 3
+	    count(2) = 4
+	    lenstr = 31
+            call ncvgtc (ncid, m, start, count, string, lenstr, iret)
+            if (string .ne. 'testhikin of') then 
+               write(*,*) 'error in ncvgt, returned string =', string
+            end if
+         end if
+ 5    continue
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvgt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ncid, iret
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+      byte bvalue
+      integer*2 svalue
+      integer lvalue
+      real fvalue
+      double precision dvalue
+      character*1 c
+      real epsilon
+      double precision onethird
+
+      data epsilon /.000001/
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data onethird/0.3333333333D0/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+c
+c     test ncvgt1 for byte
+c
+      call ncvgt1 (ncid, bid, bindx, bvalue, iret)
+      if (bvalue .ne. ichar('z')) write(*,*) 'error in ncvgt1 byte:',
+     + bvalue, ' .ne.', ichar('z')
+c
+c     test ncvgt1 for short
+c
+      call ncvgt1 (ncid, sid, sindx, svalue, iret)
+      if (svalue .ne. 10) write(*,*) 'error in ncvgt1 short:',
+     + svalue, ' .ne.', 10
+c     
+c     test ncvgt1 for long
+c
+      call ncvgt1 (ncid, lid, lindx, lvalue, iret)
+      if (lvalue .ne. 1000) write(*,*) 'error in ncvgt1 long:',
+     + lvalue,  ' .ne.', 1000
+c
+c     test ncvgt1 for float
+c
+      call ncvgt1 (ncid, fid, findx, fvalue, iret)
+      if (abs(fvalue - 3.14159) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 float:', fvalue, ' not close to', 3.14159
+c
+c     test ncvgt1 for double
+c
+      call ncvgt1 (ncid, did, dindx, dvalue, iret)
+      if (abs(dvalue - onethird) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 double:', dvalue, ' not close to',
+     +     onethird
+c
+c     test ncvg1c for char
+c
+      call ncvg1c (ncid, cid, cindx, c, iret)
+      if (c .ne. 'a') write(*,*) 'error in ncvg1c'
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      
+c
+c     subroutine to test ncvpt and ncvptc
+c
+      subroutine tncvpt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     size of dimensions
+      integer times, lats, lons, levels
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer ncid, iret
+c     loop control variables
+      integer itime, ilev, ilon, ilat, i
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      integer lenstr
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c     vector of integers specifying the corner of the  hypercube
+c     where the first of the data values will be written
+      integer start(MAXNCDIM)
+c     vector of integers specifying the edge lengths from the
+c     corner of the hypercube where the first of the data values
+c     will be written
+      integer count(MAXNCDIM)
+
+c     arrays of data values to be written
+      byte barray(times)
+      integer*2 sarray(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+      character*31 string
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data barray /97, 98, 99, 100/
+      data sarray /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+
+c
+c     byte
+c
+      count(1) = times
+      call ncvpt (ncid, bid, start, count, barray, iret)
+c
+c     short
+c
+      count(1) = times
+      call ncvpt (ncid, sid, start, count, sarray, iret)
+c
+c     long
+c
+      do 30 i = 1,lats
+         larray(i) = 1000
+ 30   continue
+      count(1) = lats
+      call ncvpt (ncid, lid, start, count, larray, iret)
+c
+c     float
+c
+      i = 0
+      do 40 itime = 1,times
+         do 40 ilon = 1, lons
+            do 40 ilat = 1, lats
+               do 40 ilev = 1, levels
+                  i = i + 1
+                  farray(ilev, ilat, ilon, itime) = real(i)
+ 40   continue
+      count(1) = levels
+      call ncvpt (ncid, fid, start, count, farray, iret)
+c
+c     double
+c
+      i = 0
+      do 50 itime = 1, times
+         do 50 ilon = 1, lons
+            do 50 ilat = 1, lats
+               do 50 ilev = 1, levels
+                  i = i + 1
+                  darray(ilev, ilat, ilon, itime) = real(i)
+ 50   continue
+      count(1) = levels
+      call ncvpt (ncid, did, start, count, darray, iret)
+c
+c     char
+c
+      start(1) = 1
+      start(2) = 1
+      count(1) = 4
+      count(2) = 4
+      lenstr = 31	
+      string = 'testthiskind of '
+      call ncvptc (ncid, chid,start, count, string, lenstr, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvpt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+
+      integer iret, ncid
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer lvalue
+      integer*2 svalue
+      byte bvalue
+      double precision onethird
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data lvalue /1000/
+      data svalue/10/
+      data onethird/0.3333333333D0/
+
+      bvalue = ichar('z')
+      
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c
+c     test ncvpt1 for byte
+c
+      call ncvpt1 (ncid, bid, bindx, bvalue, iret)
+c
+c     test ncvpt1 for short
+c
+      call ncvpt1 (ncid, sid, sindx, svalue, iret)
+c     
+c     test ncvpt1 for long
+c
+      call ncvpt1 (ncid, lid, lindx, lvalue, iret)
+c
+c     test ncvpt1 for float
+c
+      call ncvpt1 (ncid, fid, findx, 3.14159, iret)
+c
+c     test ncvpt1 for double
+c
+      call ncvpt1 (ncid, did, dindx, onethird, iret)
+c
+c     test ncvp1c for char
+c
+      call ncvp1c (ncid, cid, cindx, 'a', iret)
+      call ncclos (ncid, iret)
+      return
+      end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solarisx86.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solarisx86.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-solarisx86.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-solarisx86.f,v 1.3 1998/01/17 00:29:28 epourmal Exp $
+c   $Id: ftest-solarisx86.f,v 1.4 2005/02/09 03:04:08 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range', 
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-sun.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-sun.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-sun.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-sun.f,v 1.3 1998/01/17 00:30:10 epourmal Exp $
+c   $Id: ftest-sun.f,v 1.4 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -568,8 +568,9 @@
       data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-t3e.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-t3e.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-t3e.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-t3e.f,v 1.4 1998/03/03 23:38:55 acheng Exp $
+c   $Id: ftest-t3e.f,v 1.7 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1220,3 +1226,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/ftest-unicos.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/ftest-unicos.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/ftest-unicos.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-unicos.f,v 1.3 1998/01/17 00:36:22 epourmal Exp $
+c   $Id: ftest-unicos.f,v 1.7 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,200 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+C         double precision c(3), double_attr(3)
+C        On Cray double precision in Fortran is 16 bytes, use real instead
+         real c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+C         double precision c_val(3), double_attr_val(3)
+C        On Cray double precision in Fortran is 16 bytes, use real instead
+         real c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-aix.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-aix.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-aix.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-aix.c,v 1.6 1997/11/05 22:19:48 koziol Exp $ */
+/* $Id: jackets-aix.c,v 1.10 2005/02/09 03:04:10 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+
+/* EIP  We need to use int instead of long on all platfroms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1616,8 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1688,8 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1855,8 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2021,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We have to use int buffer to read data in on all platforms
+        where long is 8
+
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-alpha.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-alpha.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-alpha.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-alpha.c,v 1.3 1997/11/05 22:19:50 koziol Exp $ */
+/* $Id: jackets-alpha.c,v 1.7 2005/02/09 03:04:10 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,21 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+
+/* EIP
+        This code doesn't work when long is 8 bytes. We need to use an int
+        buffer to read data in 
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1618,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1689,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1855,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2020,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+
+/* EIP
+        This code doesn't work when long is 8 bytes. We need to use an int
+        buffer to read data in 
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-apple.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-apple.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-apple.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-apple.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,2086 @@
+/*
+ *	Copyright 1990, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: jackets-apple.c,v 1.4 2005/02/09 03:04:11 epourmal Exp $ */
+/*
+ * OVERVIEW
+ *
+ * This file contains jacket routines written in C for interfacing Fortran
+ * netCDF function calls to the actual C binding for the NetCDF.  This code
+ * is written explicitly for Sun.  In general, these functions handle
+ * character-string parameter conventions, convert between
+ * column-major-order arrays and row-major-order arrays, and map between
+ * array indices beginning at one and array indices beginning at zero.
+ *
+ */
+
+/* LINTLIBRARY */
+#include	<ctype.h>
+#include        <string.h>
+#include	<stdlib.h>
+#include	<stdio.h>
+#ifdef HDF
+#include        "local_nc.h"
+#else /* HDF */
+#include	"netcdf.h"
+#endif /* HDF */
+
+
+
+
+
+#if !NC_OLD_FILLVALUES
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    FILL_DOUBLE,
+    FILL_LONG,
+    FILL_FLOAT,
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones.  
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    XDR_D_INFINITY,		/* You may have to insert a constant here */
+    FILL_LONG,
+    XDR_F_INFINITY,		/* You may have to insert a constant here */
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ * global integer used for suppressing error messages and determining
+ * the fatality of errors.
+ */
+extern int ncopts;		/* default is (NC_FATAL | NC_VERBOSE) */
+
+/* global integer that contains a netCDF-specific error code */
+extern int ncerr;
+
+/* blank fill C string to make FORTRAN string */
+static void
+fcdcpy (fstring, fslen, sstring)
+    char *fstring;		/* output string to be blank-filled */
+    int fslen;			/* length of output string */
+    char *sstring;		/* input string, null-terminated */
+{
+    int i, len = strlen(sstring);
+
+    for (i = 0; i < len; i++)
+	*(fstring + i) = *(sstring + i);
+    for (i = len; i < fslen; i++)
+	*(fstring + i) = ' ';
+}
+
+
+static void
+reverse (array, length)
+    int array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int temp, i, j;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+static void
+revlongs (array, length)
+    long array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int i, j;
+    long temp;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+/* error handling function */
+static void
+handle_err (pname, rcode)
+    char *pname;		/* procedure name */
+    int rcode;			/* error return */
+{
+    cdf_routine_name = pname;
+    NCadvise(rcode, "string won't fit in CHARACTER variable provided");
+}
+
+/* copy function used to copy strings with embedded blanks */
+static void
+fstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != '\0')
+	*target++ = *source++;
+    *target = '\0';
+}
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
+/* copy function used to copy strings terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != ' ')
+	*target++ = *source++;
+    *target = '\0';
+}
+#endif
+
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
+
+}
+/*
+ * Compute product of dimensions.
+ */
+static long
+dimprod (dims, ndims)
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long *ip;
+    long prod = 1;
+
+    for (ip = dims; ip < &dims[ndims]; ip++)
+      prod *= *ip;
+    return prod;
+}
+
+
+#ifdef FORTRAN_HAS_NO_BYTE
+/*
+ * Convert multi-dimensional array of bytes stored in ints to packed array of
+ * bytes, in malloc'ed space.  Returns pointer to bytes or NULL if malloc
+ * failed.
+ */
+static char *
+itob(ints, dims, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+    int *ip;
+    char *bp = bytes;
+
+    if (bytes != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*bp++ = (char) *ip++;
+    return bytes;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of bytes stored in ints to 
+ * packed array of bytes, in malloc'ed space.  Returns pointer to bytes or 
+ * NULL if malloc failed.
+ */
+static char *
+itobg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+
+    if (bytes != NULL && iocount > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *bp++	= (char)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return bytes;
+}
+
+/*
+ * Convert a packed array of bytes into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+btoig(bytes, ints, dims, basis, ndims)
+     char *bytes;		/* packed array of bytes */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *bp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_BYTE */
+
+#ifdef FORTRAN_HAS_NO_SHORT
+/*
+ * Convert multi-dimensional array of shorts stored in ints to packed array of
+ * shorts, in malloc'ed space.  Returns pointer to shorts or NULL if malloc
+ * failed.
+ */
+static short *
+itos(ints, dims, ndims)
+     int *ints;		/* multi-dimensional array of ints */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+    int *ip;
+    short *sp = shorts;
+
+    if (shorts != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*sp++ = (short) *ip++;
+    return shorts;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of shorts stored in ints to 
+ * packed array of shorts, in malloc'ed space.  Returns pointer to shorts or 
+ * NULL if malloc failed.
+ */
+static short *
+itosg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+
+    if (shorts != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	short	*sp	= shorts;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *sp++	= (short)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return shorts;
+}
+
+/*
+ * Convert a packed array of shorts into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+stoig(shorts, ints, dims, basis, ndims)
+     short *shorts;		/* packed array of shorts */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	short	*sp	= shorts;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *sp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_SHORT */
+
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+/*
+ * Convert multi-dimensional array of NCLONGs stored in ints to packed
+ * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
+ * if malloc failed.
+ */
+static long *
+itol(ints, dims, ndims)
+    int		*ints;		/* multi-dimensional array of ints */
+    long	*dims;		/* list of dimensions */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+    int		*ip;
+    long	*lp = longs;
+
+    if (longs != NULL)
+	for (ip = ints; iocount > 0; iocount--)
+	    *lp++ = (long) *ip++;
+    return longs;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of longs stored in ints to 
+ * packed array of longs, in malloc'ed space.  Returns pointer to longs or 
+ * NULL if malloc failed.
+ */
+static long *
+itolg(ints, dims, imap, ndims)
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+
+    if (longs != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	long	*lp	= longs;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *lp++	= (long)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return longs;
+}
+
+/*
+ * Convert a packed array of longs into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+ltoig(longs, ints, dims, imap, ndims)
+    long	*longs;		/* packed array of longs */
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	long	*lp	= longs;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *lp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif	/* Alpha platform above */
+
+/* ------------ APPLE FORTRAN jackets for netCDF Functions ------------ */
+
+/* used to set the C global variable ncopts from Fortran */
+void
+#ifdef H4_ABSOFT
+NCPOPT(val)
+#else
+ncpopt(val)
+#endif
+    int		*val;	
+{
+    ncopts = *val;
+}
+
+
+/* used to get the C global variable ncopts from Fortran */
+void
+#ifdef H4_ABSOFT
+NCGOPT(val)
+#else
+ncgopt(val)
+#endif
+    int		*val;	
+{
+    *val = ncopts;
+}
+
+/*
+ * creates a new netCDF file, returning a netCDF ID.  New netCDF
+ * file is placed in define mode.
+ */
+int
+#ifdef H4_ABSOFT
+NCCRE(pathname, clobmode, rcode, pathnamelen)
+#else
+nccre(pathname, clobmode, rcode, pathnamelen)
+#endif
+    char	*pathname;	
+    int		pathnamelen;
+    int		*clobmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = nccreate (name, *clobmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* opens an existing netCDF file for access */
+int
+#ifdef H4_ABSOFT
+NCOPN(pathname, rwmode, rcode, pathnamelen)
+#else
+ncopn(pathname, rwmode, rcode, pathnamelen)
+#endif
+    char	*pathname;	
+    int		pathnamelen;
+    int		*rwmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = ncopen (name, *rwmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new dimension to an open netCDF file in define mode */
+int
+#ifdef H4_ABSOFT
+NCDDEF(cdfid, dimname, dimlen, rcode, dimnamelen)
+#else
+ncddef(cdfid, dimname, dimlen, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*dimlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimdef (*cdfid, name, (long)*dimlen)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/*
+ * returns the ID of a netCDF dimension, given the name of the
+ * dimension
+ */
+int
+#ifdef H4_ABSOFT
+NCDID(cdfid, dimname, rcode, dimnamelen)
+#else
+ncdid(cdfid, dimname, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new variable to an open netCDF file in define mode */
+int
+#ifdef H4_ABSOFT
+NCVDEF(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#else
+ncvdef(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*rcode;	
+{
+    int varid, i, dimid[MAX_VAR_DIMS];
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    for (i = 0; i < *ndims; i++)
+	dimid[i] = dimarray[i] - 1;
+    reverse (dimid, *ndims);
+    if ((varid = ncvardef (*cdfid, name, (nc_type) *datatype, *ndims,
+			   dimid)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns the ID of a netCDF variable given its name */
+int
+#ifdef H4_ABSOFT
+NCVID(cdfid, varname, rcode, varnamelen)
+#else
+ncvid(cdfid, varname, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    int varid;
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    if ((varid = ncvarid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns number of bytes per netCDF data type */
+int
+#ifdef H4_ABSOFT
+NCTLEN(datatype, rcode)
+#else
+nctlen(datatype, rcode)
+#endif
+    int		*datatype;	
+    int		*rcode;	
+{
+    int itype;
+
+    if ((itype = nctypelen ((nc_type) *datatype)) != -1) {
+	*rcode = 0;
+	return (itype);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+/* closes an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCCLOS(cdfid, rcode)
+#else
+ncclos(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncclose (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* puts an open netCDF into define mode */
+void
+#ifdef H4_ABSOFT
+NCREDF(cdfid, rcode)
+#else
+ncredf(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncredef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* takes an open netCDF out of define mode */
+void
+#ifdef H4_ABSOFT
+NCENDF(cdfid, rcode)
+#else
+ncendf(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncendef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about an open netCDF file given its netCDF ID */
+void
+#ifdef H4_ABSOFT
+NCINQ(cdfid, ndims, nvars, natts, recdim, rcode)
+#else
+ncinq(cdfid, ndims, nvars, natts, recdim, rcode)
+#endif
+    int		*cdfid;	
+    int		*ndims;	
+    int		*nvars;	
+    int		*natts;	
+    int		*recdim;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncinquire (*cdfid, ndims, nvars, natts, recdim) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (*recdim != -1)
+	(*recdim)++;
+}
+
+/*
+ * makes sure that the disk copy of a netCDF file open for writing
+ * is current
+ */
+void
+#ifdef H4_ABSOFT
+NCSNC(cdfid, rcode)
+#else
+ncsnc(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncsync (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/*
+ * restores the netCDF to a known consistent state in case anything
+ * goes wrong during the definition of new dimensions, variables
+ * or attributes
+ */
+void
+#ifdef H4_ABSOFT
+NCABOR(cdfid, rcode)
+#else
+ncabor(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncabort (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns the name and size of a dimension, given its ID */
+void
+#ifdef H4_ABSOFT
+NCDINQ(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#else
+ncdinq(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*size;	
+    int		*rcode;	
+{
+    long siz;
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncdiminq (*cdfid, *dimid - 1, name, &siz) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    *size = siz;
+    if (strlen (name) > dimnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCDINQ", *rcode);
+	return;
+    }
+    /* blank fill the input character string */
+    fcdcpy (dimname, dimnamelen, name);
+}
+
+/* renames an existing dimension in a netCDF open for writing */
+void
+#ifdef H4_ABSOFT
+NCDREN(cdfid, dimid, dimname, rcode, dimnamelen)
+#else
+ncdren(cdfid, dimid, dimname, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, dimname, dimnamelen);
+    *rcode = 0;
+    if (ncdimrename (*cdfid, *dimid - 1, name) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about a netCDF variable, given its ID */
+void
+#ifdef H4_ABSOFT
+NCVINQ(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#else
+ncvinq(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*natts;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid[MAX_VAR_DIMS], i;
+
+    *rcode = 0;
+    if (ncvarinq (*cdfid, *varid - 1, name, (nc_type *) datatype, ndims, dimid,
+		  natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < *ndims; i++)
+	dimarray[i] = dimid[i] + 1;
+    reverse (dimarray, *ndims);
+    if (strlen (name) > varnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVINQ", *rcode);
+	return;
+    }
+    fcdcpy (varname, varnamelen, name);
+}
+
+/* puts a single numeric data value into a variable of an open netCDF */
+void
+#ifdef H4_ABSOFT
+NCVPT1(cdfid, varid, indices, value, rcode)
+#else
+ncvpt1(cdfid, varid, indices, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char           bytes = *(int *) value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices,
+		      (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {	/* pack ints into shorts */
+	short          shorts = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* puts a single character into an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVP1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
+ncvp1c(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a hypercube of numeric values into a netCDF variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPT(cdfid, varid, start, count, value, rcode)
+#else
+ncvpt(cdfid, varid, start, count, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, ncount, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	short *shorts = itos (value, ncount, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* writes a hypercube of character values into an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVPTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
+ncvptc(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    if (dimprod(ncount,ndims) > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVPTC", *rcode);
+	return;
+    }
+    *rcode = 0;
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of numeric values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
+ncvptg(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	char *bytes = itobg (value, ncount, nbasis, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	short *shorts = itosg (value, ncount, nbasis, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of character values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
+ncvpgc(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* gets a single numeric value from a variable of an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVGT1(cdfid, varid, indices, value, rcode)
+#else
+ncvgt1(cdfid, varid, indices, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS], i;
+    int datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char           bytes;
+	int            *ip = (int *) value;
+	char           *bp = &bytes;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *bp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short          shorts;
+	int            *ip = (int *) value;
+	short          *sp = &shorts;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *sp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets a single character data value from a variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVG1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
+ncvg1c(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS];
+    int i, datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a hypercube of numeric values from a netCDF variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGT(cdfid, varid, start, count, value, rcode)
+#else
+ncvgt(cdfid, varid, start, count, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	  *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* reads a hypercube of character values from a netCDF variable */
+void
+#ifdef H4_ABSOFT
+NCVGTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
+ncvgtc(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+    int prod = 1;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	prod *= count[i];
+    }
+    if (prod > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVGTC", *rcode);
+	return;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    *rcode = 0;
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = prod; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/*
+ * reads a generalized hypercube of numeric values from a netCDF variable of an 
+ * open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
+ncvgtg(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	btoig(bytes, (int*)value, ncount, nbasis, ndims);
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	stoig(shorts, (int*)value, ncount, nbasis, ndims);
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a generalized hypercube of character values from a netCDF variable 
+ * of an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
+ncvggc(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* changes the name of a netCDF variable in an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVREN(cdfid, varid, varname, rcode, varnamelen)
+#else
+ncvren(cdfid, varid, varname, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    *rcode = 0;
+    if (ncvarrename (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a numeric variable or global attribute of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCAPT(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#else
+ncapt(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) *datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, attlen, 1);
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) *datatype == NC_SHORT) {	/* pack ints into shorts */
+	short *shorts = itos (value, attlen, 1);
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		  value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a character variable or global attribute
+ * of an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCAPTC(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#else
+ncaptc(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*lenstr;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    char *value;
+
+    nstrncpy (name, attname, attnamelen);
+    if (((value = malloc ((unsigned) *lenstr + 1)) == NULL) || (*lenstr == 0)) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAPTC", *rcode);
+	return;
+    }
+    (void) fstrncpy (value, string, *lenstr);
+    *rcode = 0;
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *lenstr,
+		  (ncvoid *) value) == -1) {
+	*rcode = ncerr;
+    }
+    free (value);
+}
+
+/*
+ * returns information about a netCDF attribute given its variable
+ * ID and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAINQ(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#else
+ncainq(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) datatype, attlen) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF attribute given its variable ID
+ * and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAGT(cdfid, varid, attname, value, rcode, attnamelen)
+#else
+ncagt(cdfid, varid, attname, value, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen)
+	    == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char *bytes = (char *) malloc (attlen);
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short *shorts = (short *) malloc (attlen * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncattget (*cdfid, *varid - 1, name, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF character attribute given its variable
+ * ID and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAGTC(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#else
+ncagtc(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+    int i;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (attlen > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAGTC", *rcode);
+	return;
+    }
+    if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = attlen; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/* copies an attribute from one open netCDF file to another */
+void
+#ifdef H4_ABSOFT
+NCACPY(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#else
+ncacpy(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#endif
+    int		*incdfid;	
+    int		*invarid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*outcdfid;	
+    int		*outvarid;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattcopy (*incdfid, *invarid - 1, name,
+		   *outcdfid, *outvarid - 1) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the name of an attribute given its variable ID and number
+ * as an attribute of that variable
+ */
+void
+#ifdef H4_ABSOFT
+NCANAM(cdfid, varid, attnum, attname, rcode, attnamelen)
+#else
+ncanam(cdfid, varid, attnum, attname, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*attnum;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncattname (*cdfid, *varid - 1, *attnum - 1, name) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (strlen (name) > attnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCANAM", *rcode);
+	return;
+    }
+    fcdcpy (attname, attnamelen, name);
+}
+
+
+/* renames an attribute in an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCAREN(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#else
+ncaren(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*newname;	
+    int		newnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1], nname[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    nstrncpy (nname, newname, newnamelen);
+    *rcode = 0;
+    if (ncattrename (*cdfid, *varid - 1, name, nname) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * deletes an attribute from an open netCDF file given the attribute
+ * name
+ */
+void
+#ifdef H4_ABSOFT
+NCADEL(cdfid, varid, attname, rcode, attnamelen)
+#else
+ncadel(cdfid, varid, attname, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattdel (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+
+/*
+ * sets the fill mode of a netCDF file open for writing
+ */
+int
+#ifdef H4_ABSOFT
+NCSFIL(cdfid, fillmode, rcode)
+#else
+ncsfil(cdfid, fillmode, rcode)
+#endif
+    int		*cdfid;	
+    int		*fillmode;	
+    int		*rcode;	
+{
+    int retval;
+
+    if ((retval = ncsetfill (*cdfid, *fillmode)) != -1) {
+	*rcode = 0;
+	return retval;
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-convex.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-convex.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-convex.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-convex.c,v 1.3 1997/11/05 22:19:55 koziol Exp $ */
+/* $Id: jackets-convex.c,v 1.5 2005/02/09 03:04:11 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-dec.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-dec.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-dec.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,8 +1,8 @@
-/*
+*
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-dec.c,v 1.3 1997/11/05 22:19:58 koziol Exp $ */
+/* $Id: jackets-dec.c,v 1.5 2005/02/09 03:04:12 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,25 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +429,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +916,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1030,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1141,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1198,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1334,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1476,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1609,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1680,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1846,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2011,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fbsd.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fbsd.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fbsd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-fbsd.c,v 1.4 1997/11/05 19:40:02 koziol Exp $ */
+/* $Id: jackets-fbsd.c,v 1.8 2005/02/09 03:04:12 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -1065,7 +1083,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1419,7 +1437,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fujivp.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fujivp.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-fujivp.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/config/jackets-fujivp.c,v 1.2 1997/11/05 22:20:00 koziol Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/config/jackets-fujivp.c,v 1.4 2005/02/09 03:04:13 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-hpux.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-hpux.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-hpux.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-hpux.c,v 1.3 1997/11/05 22:20:03 koziol Exp $ */
+/* $Id: jackets-hpux.c,v 1.7 2005/02/09 03:04:13 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP  We neet to use int buffer to read data in on the platforms where long is 8
+
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1616,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1687,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1853,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2018,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/*EIP   We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-ia64.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-ia64.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-ia64.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-ia64.c,v 1.1 2000/05/23 18:07:08 acheng Exp $ */
+/* $Id: jackets-ia64.c,v 1.5 2005/02/09 03:04:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix32.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix32.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix32.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix32.c,v 1.3 1997/11/05 22:20:05 koziol Exp $ */
+/* $Id: jackets-irix32.c,v 1.5 2005/02/09 03:04:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix4.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix4.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix4.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix4.c,v 1.3 1997/11/05 22:20:09 koziol Exp $ */
+/* $Id: jackets-irix4.c,v 1.5 2005/02/09 03:04:15 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix5.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix5.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix5.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix5.c,v 1.3 1997/11/05 22:20:13 koziol Exp $ */
+/* $Id: jackets-irix5.c,v 1.5 2005/02/09 03:04:15 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix6.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix6.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-irix6.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix6.c,v 1.3 1997/11/05 22:20:16 koziol Exp $ */
+/* $Id: jackets-irix6.c,v 1.7 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,18 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP  We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1615,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1686,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1852,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2017,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We need int buffer to read data in on the platfroms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-linux.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-linux.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-linux.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-linux.c,v 1.3 1997/11/05 22:20:21 koziol Exp $ */
+/* $Id: jackets-linux.c,v 1.8 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -521,11 +539,15 @@
 }
 #endif	/* Alpha platform above */
 
-/* ------------ Sun FORTRAN jackets for netCDF Functions ------------ */
+/* ------------ Linux FORTRAN jackets for netCDF Functions ------------ */
 
 /* used to set the C global variable ncopts from Fortran */
 void
+#ifdef H4_ABSOFT
+NCPOPT(val)
+#else
 ncpopt_(val)
+#endif
     int		*val;	
 {
     ncopts = *val;
@@ -534,7 +556,11 @@
 
 /* used to get the C global variable ncopts from Fortran */
 void
+#ifdef H4_ABSOFT
+NCGOPT(val)
+#else
 ncgopt_(val)
+#endif
     int		*val;	
 {
     *val = ncopts;
@@ -545,7 +571,11 @@
  * file is placed in define mode.
  */
 int
+#ifdef H4_ABSOFT
+NCCRE(pathname, clobmode, rcode, pathnamelen)
+#else
 nccre_(pathname, clobmode, rcode, pathnamelen)
+#endif
     char	*pathname;	
     int		pathnamelen;
     int		*clobmode;	
@@ -566,7 +596,11 @@
 
 /* opens an existing netCDF file for access */
 int
+#ifdef H4_ABSOFT
+NCOPN(pathname, rwmode, rcode, pathnamelen)
+#else
 ncopn_(pathname, rwmode, rcode, pathnamelen)
+#endif
     char	*pathname;	
     int		pathnamelen;
     int		*rwmode;	
@@ -587,7 +621,11 @@
 
 /* adds a new dimension to an open netCDF file in define mode */
 int
+#ifdef H4_ABSOFT
+NCDDEF(cdfid, dimname, dimlen, rcode, dimnamelen)
+#else
 ncddef_(cdfid, dimname, dimlen, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     char	*dimname;	
     int		dimnamelen;
@@ -612,7 +650,11 @@
  * dimension
  */
 int
+#ifdef H4_ABSOFT
+NCDID(cdfid, dimname, rcode, dimnamelen)
+#else
 ncdid_(cdfid, dimname, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     char	*dimname;	
     int		dimnamelen;
@@ -633,7 +675,11 @@
 
 /* adds a new variable to an open netCDF file in define mode */
 int
+#ifdef H4_ABSOFT
+NCVDEF(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#else
 ncvdef_(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#endif
     int		*cdfid;	
     char	*varname;	
     int		varnamelen;
@@ -661,7 +707,11 @@
 
 /* returns the ID of a netCDF variable given its name */
 int
+#ifdef H4_ABSOFT
+NCVID(cdfid, varname, rcode, varnamelen)
+#else
 ncvid_(cdfid, varname, rcode, varnamelen)
+#endif
     int		*cdfid;	
     char	*varname;	
     int		varnamelen;
@@ -682,7 +732,11 @@
 
 /* returns number of bytes per netCDF data type */
 int
+#ifdef H4_ABSOFT
+NCTLEN(datatype, rcode)
+#else
 nctlen_(datatype, rcode)
+#endif
     int		*datatype;	
     int		*rcode;	
 {
@@ -698,7 +752,11 @@
 
 /* closes an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCCLOS(cdfid, rcode)
+#else
 ncclos_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -709,7 +767,11 @@
 
 /* puts an open netCDF into define mode */
 void
+#ifdef H4_ABSOFT
+NCREDF(cdfid, rcode)
+#else
 ncredf_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -720,7 +782,11 @@
 
 /* takes an open netCDF out of define mode */
 void
+#ifdef H4_ABSOFT
+NCENDF(cdfid, rcode)
+#else
 ncendf_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -731,7 +797,11 @@
 
 /* returns information about an open netCDF file given its netCDF ID */
 void
+#ifdef H4_ABSOFT
+NCINQ(cdfid, ndims, nvars, natts, recdim, rcode)
+#else
 ncinq_(cdfid, ndims, nvars, natts, recdim, rcode)
+#endif
     int		*cdfid;	
     int		*ndims;	
     int		*nvars;	
@@ -753,7 +823,11 @@
  * is current
  */
 void
+#ifdef H4_ABSOFT
+NCSNC(cdfid, rcode)
+#else
 ncsnc_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -768,7 +842,11 @@
  * or attributes
  */
 void
+#ifdef H4_ABSOFT
+NCABOR(cdfid, rcode)
+#else
 ncabor_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -779,7 +857,11 @@
 
 /* returns the name and size of a dimension, given its ID */
 void
+#ifdef H4_ABSOFT
+NCDINQ(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#else
 ncdinq_(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     int		*dimid;	
     char	*dimname;	
@@ -807,7 +889,11 @@
 
 /* renames an existing dimension in a netCDF open for writing */
 void
+#ifdef H4_ABSOFT
+NCDREN(cdfid, dimid, dimname, rcode, dimnamelen)
+#else
 ncdren_(cdfid, dimid, dimname, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     int		*dimid;	
     char	*dimname;	
@@ -824,7 +910,11 @@
 
 /* returns information about a netCDF variable, given its ID */
 void
+#ifdef H4_ABSOFT
+NCVINQ(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#else
 ncvinq_(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*varname;	
@@ -857,7 +947,11 @@
 
 /* puts a single numeric data value into a variable of an open netCDF */
 void
+#ifdef H4_ABSOFT
+NCVPT1(cdfid, varid, indices, value, rcode)
+#else
 ncvpt1_(cdfid, varid, indices, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -899,7 +993,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -925,7 +1019,11 @@
 
 /* puts a single character into an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVP1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
 ncvp1c_(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -956,7 +1054,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPT(cdfid, varid, start, count, value, rcode)
+#else
 ncvpt_(cdfid, varid, start, count, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1013,7 +1115,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1051,7 +1153,11 @@
 
 /* writes a hypercube of character values into an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVPTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
 ncvptc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1091,7 +1197,11 @@
  * an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
 ncvptg_(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1124,7 +1234,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1291,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1223,7 +1333,11 @@
  * an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
 ncvpgc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1266,7 +1380,11 @@
 
 /* gets a single numeric value from a variable of an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVGT1(cdfid, varid, indices, value, rcode)
+#else
 ncvgt1_(cdfid, varid, indices, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -1317,7 +1435,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1354,7 +1472,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVG1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
 ncvg1c_(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -1386,7 +1508,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGT(cdfid, varid, start, count, value, rcode)
+#else
 ncvgt_(cdfid, varid, start, count, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1459,13 +1585,18 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP   We need int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1513,7 +1644,11 @@
 
 /* reads a hypercube of character values from a netCDF variable */
 void
+#ifdef H4_ABSOFT
+NCVGTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
 ncvgtc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1559,7 +1694,11 @@
  * open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
 ncvgtg_(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1592,7 +1731,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1802,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1715,7 +1854,11 @@
  * of an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
 ncvggc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1758,7 +1901,11 @@
 
 /* changes the name of a netCDF variable in an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVREN(cdfid, varid, varname, rcode, varnamelen)
+#else
 ncvren_(cdfid, varid, varname, rcode, varnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*varname;	
@@ -1779,7 +1926,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCAPT(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#else
 ncapt_(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1829,7 +1980,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1873,7 +2024,11 @@
  * of an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCAPTC(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#else
 ncaptc_(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1907,7 +2062,11 @@
  * ID and name
  */
 void
+#ifdef H4_ABSOFT
+NCAINQ(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#else
 ncainq_(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1930,7 +2089,11 @@
  * and name
  */
 void
+#ifdef H4_ABSOFT
+NCAGT(cdfid, varid, attname, value, rcode, attnamelen)
+#else
 ncagt_(cdfid, varid, attname, value, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1994,12 +2157,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -2047,7 +2215,11 @@
  * ID and name
  */
 void
+#ifdef H4_ABSOFT
+NCAGTC(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#else
 ncagtc_(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2084,7 +2256,11 @@
 
 /* copies an attribute from one open netCDF file to another */
 void
+#ifdef H4_ABSOFT
+NCACPY(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#else
 ncacpy_(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#endif
     int		*incdfid;	
     int		*invarid;	
     char	*attname;	
@@ -2108,7 +2284,11 @@
  * as an attribute of that variable
  */
 void
+#ifdef H4_ABSOFT
+NCANAM(cdfid, varid, attnum, attname, rcode, attnamelen)
+#else
 ncanam_(cdfid, varid, attnum, attname, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*attnum;	
@@ -2134,7 +2314,11 @@
 
 /* renames an attribute in an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCAREN(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#else
 ncaren_(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2158,7 +2342,11 @@
  * name
  */
 void
+#ifdef H4_ABSOFT
+NCADEL(cdfid, varid, attname, rcode, attnamelen)
+#else
 ncadel_(cdfid, varid, attname, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2179,7 +2367,11 @@
  * sets the fill mode of a netCDF file open for writing
  */
 int
+#ifdef H4_ABSOFT
+NCSFIL(cdfid, fillmode, rcode)
+#else
 ncsfil_(cdfid, fillmode, rcode)
+#endif
     int		*cdfid;	
     int		*fillmode;	
     int		*rcode;	

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-mac.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-mac.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-mac.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-mac.c,v 1.3 1997/11/05 22:20:24 koziol Exp $ */
+/* $Id: jackets-mac.c,v 1.5 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-solaris.c,v 1.3 1997/11/05 22:20:26 koziol Exp $ */
+/* $Id: jackets-solaris.c,v 1.7 2005/02/09 03:04:17 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP
+        This code is wrong when long is 8 bytes. We need to use an int
+        buffer to read data in
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1617,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1688,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1854,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2019,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP
+        This code is wrong when long is 8 bytes. We need to use an int
+        buffer to read data in
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris64.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris64.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris64.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solaris64.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,2214 @@
+/*
+ *	Copyright 1990, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: jackets-solaris64.c,v 1.4 2005/02/09 03:04:17 epourmal Exp $ */
+/*
+ * OVERVIEW
+ *
+ * This file contains jacket routines written in C for interfacing Fortran
+ * netCDF function calls to the actual C binding for the NetCDF.  This code
+ * is written explicitly for Sun.  In general, these functions handle
+ * character-string parameter conventions, convert between
+ * column-major-order arrays and row-major-order arrays, and map between
+ * array indices beginning at one and array indices beginning at zero.
+ *
+ */
+
+/* LINTLIBRARY */
+#include	<ctype.h>
+#include        <string.h>
+#include	<stdlib.h>
+#include	<stdio.h>
+#ifdef HDF
+#include        "local_nc.h"
+#else /* HDF */
+#include	"netcdf.h"
+#endif /* HDF */
+
+
+
+
+
+#if !NC_OLD_FILLVALUES
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    FILL_DOUBLE,
+    FILL_LONG,
+    FILL_FLOAT,
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones.  
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    XDR_D_INFINITY,		/* You may have to insert a constant here */
+    FILL_LONG,
+    XDR_F_INFINITY,		/* You may have to insert a constant here */
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ * global integer used for suppressing error messages and determining
+ * the fatality of errors.
+ */
+extern int ncopts;		/* default is (NC_FATAL | NC_VERBOSE) */
+
+/* global integer that contains a netCDF-specific error code */
+extern int ncerr;
+
+/* blank fill C string to make FORTRAN string */
+static void
+fcdcpy (fstring, fslen, sstring)
+    char *fstring;		/* output string to be blank-filled */
+    int fslen;			/* length of output string */
+    char *sstring;		/* input string, null-terminated */
+{
+    int i, len = strlen(sstring);
+
+    for (i = 0; i < len; i++)
+	*(fstring + i) = *(sstring + i);
+    for (i = len; i < fslen; i++)
+	*(fstring + i) = ' ';
+}
+
+
+static void
+reverse (array, length)
+    int array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int temp, i, j;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+static void
+revlongs (array, length)
+    long array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int i, j;
+    long temp;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+/* error handling function */
+static void
+handle_err (pname, rcode)
+    char *pname;		/* procedure name */
+    int rcode;			/* error return */
+{
+    cdf_routine_name = pname;
+    NCadvise(rcode, "string won't fit in CHARACTER variable provided");
+}
+
+/* copy function used to copy strings with embedded blanks */
+static void
+fstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != '\0')
+	*target++ = *source++;
+    *target = '\0';
+}
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
+/* copy function used to copy strings terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != ' ')
+	*target++ = *source++;
+    *target = '\0';
+}
+#endif
+
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
+
+}
+
+/*
+ * Compute product of dimensions.
+ */
+static long
+dimprod (dims, ndims)
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long *ip;
+    long prod = 1;
+
+    for (ip = dims; ip < &dims[ndims]; ip++)
+      prod *= *ip;
+    return prod;
+}
+
+
+#ifdef FORTRAN_HAS_NO_BYTE
+/*
+ * Convert multi-dimensional array of bytes stored in ints to packed array of
+ * bytes, in malloc'ed space.  Returns pointer to bytes or NULL if malloc
+ * failed.
+ */
+static char *
+itob(ints, dims, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+    int *ip;
+    char *bp = bytes;
+
+    if (bytes != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*bp++ = (char) *ip++;
+    return bytes;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of bytes stored in ints to 
+ * packed array of bytes, in malloc'ed space.  Returns pointer to bytes or 
+ * NULL if malloc failed.
+ */
+static char *
+itobg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+
+    if (bytes != NULL && iocount > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *bp++	= (char)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return bytes;
+}
+
+/*
+ * Convert a packed array of bytes into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+btoig(bytes, ints, dims, basis, ndims)
+     char *bytes;		/* packed array of bytes */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *bp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_BYTE */
+
+#ifdef FORTRAN_HAS_NO_SHORT
+/*
+ * Convert multi-dimensional array of shorts stored in ints to packed array of
+ * shorts, in malloc'ed space.  Returns pointer to shorts or NULL if malloc
+ * failed.
+ */
+static short *
+itos(ints, dims, ndims)
+     int *ints;		/* multi-dimensional array of ints */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+    int *ip;
+    short *sp = shorts;
+
+    if (shorts != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*sp++ = (short) *ip++;
+    return shorts;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of shorts stored in ints to 
+ * packed array of shorts, in malloc'ed space.  Returns pointer to shorts or 
+ * NULL if malloc failed.
+ */
+static short *
+itosg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+
+    if (shorts != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	short	*sp	= shorts;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *sp++	= (short)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return shorts;
+}
+
+/*
+ * Convert a packed array of shorts into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+stoig(shorts, ints, dims, basis, ndims)
+     short *shorts;		/* packed array of shorts */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	short	*sp	= shorts;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *sp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_SHORT */
+
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+/*
+ * Convert multi-dimensional array of NCLONGs stored in ints to packed
+ * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
+ * if malloc failed.
+ */
+static long *
+itol(ints, dims, ndims)
+    int		*ints;		/* multi-dimensional array of ints */
+    long	*dims;		/* list of dimensions */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+    int		*ip;
+    long	*lp = longs;
+
+    if (longs != NULL)
+	for (ip = ints; iocount > 0; iocount--)
+	    *lp++ = (long) *ip++;
+    return longs;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of longs stored in ints to 
+ * packed array of longs, in malloc'ed space.  Returns pointer to longs or 
+ * NULL if malloc failed.
+ */
+static long *
+itolg(ints, dims, imap, ndims)
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+
+    if (longs != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	long	*lp	= longs;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *lp++	= (long)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return longs;
+}
+
+/*
+ * Convert a packed array of longs into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+ltoig(longs, ints, dims, imap, ndims)
+    long	*longs;		/* packed array of longs */
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	long	*lp	= longs;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *lp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif	/* Alpha platform above */
+
+/* ------------ Sun FORTRAN jackets for netCDF Functions ------------ */
+
+/* used to set the C global variable ncopts from Fortran */
+void
+ncpopt_(val)
+    int		*val;	
+{
+    ncopts = *val;
+}
+
+
+/* used to get the C global variable ncopts from Fortran */
+void
+ncgopt_(val)
+    int		*val;	
+{
+    *val = ncopts;
+}
+
+/*
+ * creates a new netCDF file, returning a netCDF ID.  New netCDF
+ * file is placed in define mode.
+ */
+int
+nccre_(pathname, clobmode, rcode, pathnamelen)
+    char	*pathname;	
+    int		pathnamelen;
+    int		*clobmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = nccreate (name, *clobmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* opens an existing netCDF file for access */
+int
+ncopn_(pathname, rwmode, rcode, pathnamelen)
+    char	*pathname;	
+    int		pathnamelen;
+    int		*rwmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = ncopen (name, *rwmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new dimension to an open netCDF file in define mode */
+int
+ncddef_(cdfid, dimname, dimlen, rcode, dimnamelen)
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*dimlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimdef (*cdfid, name, (long)*dimlen)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/*
+ * returns the ID of a netCDF dimension, given the name of the
+ * dimension
+ */
+int
+ncdid_(cdfid, dimname, rcode, dimnamelen)
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new variable to an open netCDF file in define mode */
+int
+ncvdef_(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*rcode;	
+{
+    int varid, i, dimid[MAX_VAR_DIMS];
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    for (i = 0; i < *ndims; i++)
+	dimid[i] = dimarray[i] - 1;
+    reverse (dimid, *ndims);
+    if ((varid = ncvardef (*cdfid, name, (nc_type) *datatype, *ndims,
+			   dimid)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns the ID of a netCDF variable given its name */
+int
+ncvid_(cdfid, varname, rcode, varnamelen)
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    int varid;
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    if ((varid = ncvarid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns number of bytes per netCDF data type */
+int
+nctlen_(datatype, rcode)
+    int		*datatype;	
+    int		*rcode;	
+{
+    int itype;
+
+    if ((itype = nctypelen ((nc_type) *datatype)) != -1) {
+	*rcode = 0;
+	return (itype);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+/* closes an open netCDF file */
+void
+ncclos_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncclose (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* puts an open netCDF into define mode */
+void
+ncredf_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncredef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* takes an open netCDF out of define mode */
+void
+ncendf_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncendef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about an open netCDF file given its netCDF ID */
+void
+ncinq_(cdfid, ndims, nvars, natts, recdim, rcode)
+    int		*cdfid;	
+    int		*ndims;	
+    int		*nvars;	
+    int		*natts;	
+    int		*recdim;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncinquire (*cdfid, ndims, nvars, natts, recdim) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (*recdim != -1)
+	(*recdim)++;
+}
+
+/*
+ * makes sure that the disk copy of a netCDF file open for writing
+ * is current
+ */
+void
+ncsnc_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncsync (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/*
+ * restores the netCDF to a known consistent state in case anything
+ * goes wrong during the definition of new dimensions, variables
+ * or attributes
+ */
+void
+ncabor_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncabort (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns the name and size of a dimension, given its ID */
+void
+ncdinq_(cdfid, dimid, dimname, size, rcode, dimnamelen)
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*size;	
+    int		*rcode;	
+{
+    long siz;
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncdiminq (*cdfid, *dimid - 1, name, &siz) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    *size = siz;
+    if (strlen (name) > dimnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCDINQ", *rcode);
+	return;
+    }
+    /* blank fill the input character string */
+    fcdcpy (dimname, dimnamelen, name);
+}
+
+/* renames an existing dimension in a netCDF open for writing */
+void
+ncdren_(cdfid, dimid, dimname, rcode, dimnamelen)
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, dimname, dimnamelen);
+    *rcode = 0;
+    if (ncdimrename (*cdfid, *dimid - 1, name) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about a netCDF variable, given its ID */
+void
+ncvinq_(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*natts;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid[MAX_VAR_DIMS], i;
+
+    *rcode = 0;
+    if (ncvarinq (*cdfid, *varid - 1, name, (nc_type *) datatype, ndims, dimid,
+		  natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < *ndims; i++)
+	dimarray[i] = dimid[i] + 1;
+    reverse (dimarray, *ndims);
+    if (strlen (name) > varnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVINQ", *rcode);
+	return;
+    }
+    fcdcpy (varname, varnamelen, name);
+}
+
+/* puts a single numeric data value into a variable of an open netCDF */
+void
+ncvpt1_(cdfid, varid, indices, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char           bytes = *(int *) value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices,
+		      (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {	/* pack ints into shorts */
+	short          shorts = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long          longs = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long          longs = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* puts a single character into an open netCDF file */
+void
+ncvp1c_(cdfid, varid, indices, chval, rcode, chvallen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a hypercube of numeric values into a netCDF variable of an open
+ * netCDF file
+ */
+void
+ncvpt_(cdfid, varid, start, count, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, ncount, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	short *shorts = itos (value, ncount, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itol (value, ncount, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = itol (value, ncount, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* writes a hypercube of character values into an open netCDF file */
+void
+ncvptc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    if (dimprod(ncount,ndims) > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVPTC", *rcode);
+	return;
+    }
+    *rcode = 0;
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of numeric values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+ncvptg_(cdfid, varid, start, count, stride, basis, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	char *bytes = itobg (value, ncount, nbasis, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	short *shorts = itosg (value, ncount, nbasis, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itolg (value, ncount, nbasis, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = itolg (value, ncount, nbasis, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of character values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+ncvpgc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* gets a single numeric value from a variable of an open netCDF file */
+void
+ncvgt1_(cdfid, varid, indices, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS], i;
+    int datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char           bytes;
+	int            *ip = (int *) value;
+	char           *bp = &bytes;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *bp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short          shorts;
+	int            *ip = (int *) value;
+	short          *sp = &shorts;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *sp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long          longs;
+	int           *ip = (int *) value;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = longs;
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long          longs;
+	int           *ip = (int *) value;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = longs;
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets a single character data value from a variable of an open
+ * netCDF file
+ */
+void
+ncvg1c_(cdfid, varid, indices, chval, rcode, chvallen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS];
+    int i, datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a hypercube of numeric values from a netCDF variable of an open
+ * netCDF file
+ */
+void
+ncvgt_(cdfid, varid, start, count, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	  *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* reads a hypercube of character values from a netCDF variable */
+void
+ncvgtc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+    int prod = 1;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	prod *= count[i];
+    }
+    if (prod > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVGTC", *rcode);
+	return;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    *rcode = 0;
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = prod; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/*
+ * reads a generalized hypercube of numeric values from a netCDF variable of an 
+ * open netCDF file
+ */
+void
+ncvgtg_(cdfid, varid, start, count, stride, basis, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	btoig(bytes, (int*)value, ncount, nbasis, ndims);
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	stoig(shorts, (int*)value, ncount, nbasis, ndims);
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	ltoig(longs, (int*)value, ncount, nbasis, ndims);
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	ltoig(longs, (int*)value, ncount, nbasis, ndims);
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a generalized hypercube of character values from a netCDF variable 
+ * of an open netCDF file
+ */
+void
+ncvggc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* changes the name of a netCDF variable in an open netCDF file */
+void
+ncvren_(cdfid, varid, varname, rcode, varnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    *rcode = 0;
+    if (ncvarrename (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a numeric variable or global attribute of an open
+ * netCDF file
+ */
+void
+ncapt_(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    nstrncpy (name, attname, attnamelen);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) *datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, attlen, 1);
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) *datatype == NC_SHORT) {	/* pack ints into shorts */
+	short *shorts = itos (value, attlen, 1);
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itol (value, attlen, 1);
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) *datatype == NC_LONG) {
+	long *longs = itol (value, attlen, 1);
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		  value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a character variable or global attribute
+ * of an open netCDF file
+ */
+void
+ncaptc_(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*lenstr;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    char *value;
+
+    nstrncpy (name, attname, attnamelen);
+    if (((value = malloc ((unsigned) *lenstr + 1)) == NULL) || (*lenstr == 0)) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAPTC", *rcode);
+	return;
+    }
+    (void) fstrncpy (value, string, *lenstr);
+    *rcode = 0;
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *lenstr,
+		  (ncvoid *) value) == -1) {
+	*rcode = ncerr;
+    }
+    free (value);
+}
+
+/*
+ * returns information about a netCDF attribute given its variable
+ * ID and name
+ */
+void
+ncainq_(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) datatype, attlen) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF attribute given its variable ID
+ * and name
+ */
+void
+ncagt_(cdfid, varid, attname, value, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen)
+	    == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char *bytes = (char *) malloc (attlen);
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short *shorts = (short *) malloc (attlen * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = (long *) malloc (attlen * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = (long *) malloc (attlen * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncattget (*cdfid, *varid - 1, name, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF character attribute given its variable
+ * ID and name
+ */
+void
+ncagtc_(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+    int i;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (attlen > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAGTC", *rcode);
+	return;
+    }
+    if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = attlen; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/* copies an attribute from one open netCDF file to another */
+void
+ncacpy_(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+    int		*incdfid;	
+    int		*invarid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*outcdfid;	
+    int		*outvarid;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattcopy (*incdfid, *invarid - 1, name,
+		   *outcdfid, *outvarid - 1) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the name of an attribute given its variable ID and number
+ * as an attribute of that variable
+ */
+void
+ncanam_(cdfid, varid, attnum, attname, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*attnum;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncattname (*cdfid, *varid - 1, *attnum - 1, name) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (strlen (name) > attnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCANAM", *rcode);
+	return;
+    }
+    fcdcpy (attname, attnamelen, name);
+}
+
+
+/* renames an attribute in an open netCDF file */
+void
+ncaren_(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*newname;	
+    int		newnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1], nname[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    nstrncpy (nname, newname, newnamelen);
+    *rcode = 0;
+    if (ncattrename (*cdfid, *varid - 1, name, nname) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * deletes an attribute from an open netCDF file given the attribute
+ * name
+ */
+void
+ncadel_(cdfid, varid, attname, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattdel (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+
+/*
+ * sets the fill mode of a netCDF file open for writing
+ */
+int
+ncsfil_(cdfid, fillmode, rcode)
+    int		*cdfid;	
+    int		*fillmode;	
+    int		*rcode;	
+{
+    int retval;
+
+    if ((retval = ncsetfill (*cdfid, *fillmode)) != -1) {
+	*rcode = 0;
+	return retval;
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solarisx86.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solarisx86.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-solarisx86.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-solarisx86.c,v 1.3 1997/11/05 22:20:31 koziol Exp $ */
+/* $Id: jackets-solarisx86.c,v 1.5 2005/02/09 03:04:18 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +431,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +918,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1032,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1143,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1200,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1336,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1478,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1611,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1682,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1848,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2013,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-sun.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-sun.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-sun.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-sun.c,v 1.3 1997/11/05 22:20:34 koziol Exp $ */
+/* $Id: jackets-sun.c,v 1.5 2005/02/09 03:04:18 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +431,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +918,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1032,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1143,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1200,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1336,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1478,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1611,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1682,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1848,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2013,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-t3e.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-t3e.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-t3e.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-t3e.c,v 1.4 1998/03/03 23:41:08 acheng Exp $ */
+/* $Id: jackets-t3e.c,v 1.8 2005/02/09 03:04:19 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -39,7 +39,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -70,7 +70,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -168,7 +168,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -180,8 +180,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -417,7 +435,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -913,7 +931,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1028,7 +1046,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1140,7 +1158,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1197,7 +1215,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1352,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1477,7 +1495,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1611,7 +1629,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1682,7 +1700,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1851,7 +1869,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -2020,7 +2038,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/trunk/mfhdf/fortran/config/jackets-unicos.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/jackets-unicos.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/jackets-unicos.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-unicos.c,v 1.3 1997/11/05 22:20:41 koziol Exp $ */
+/* $Id: jackets-unicos.c,v 1.7 2005/02/09 03:04:19 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -39,7 +39,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -70,7 +70,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -168,7 +168,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -180,8 +180,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -417,7 +436,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -913,7 +932,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1028,7 +1047,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1140,7 +1159,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1197,7 +1216,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1353,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1477,7 +1496,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1611,7 +1630,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1682,7 +1701,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1851,7 +1870,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -2020,7 +2039,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-apple.inc (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-apple.inc)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-apple.inc	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-apple.inc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,147 @@
+c      
+c     Functions in the FORTRAN interface
+
+      integer nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      integer ncsfil
+      external nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      external ncsfil
+
+      integer NCRDWR,NCCREAT,NCEXCL,NCINDEF,NCNSYNC,NCHSYNC
+      integer NCNDIRTY,NCHDIRTY,NCLINK,NCNOWRIT,NCWRITE
+      integer NCCLOB,NCNOCLOB,NCGLOBAL,NCFILL,NCNOFILL
+      integer MAXNCOP,MAXNCDIM,MAXNCATT,MAXNCVAR
+      integer MAXNCNAM,MAXVDIMS,NCNOERR,NCEBADID
+      integer NCENFILE,NCEEXIST,NCEINVAL,NCEPERM,NCENOTIN
+      integer NCEINDEF,NCECOORD,NCEMAXDS,NCENAME
+      integer NCENOATT,NCEMAXAT,NCEBADTY,NCEBADD, NCESTS
+      integer NCEUNLIM,NCEMAXVS,NCENOTVR,NCEGLOB,NCENOTNC
+      integer NCFOOBAR,NCSYSERR,NCFATAL,NCVERBOS, NCENTOOL
+      
+      integer NCBYTE,NCCHAR,NCSHORT,NCLONG,NCFLOAT,NCDOUBLE
+      
+      parameter(NCBYTE = 1)
+      parameter(NCCHAR = 2)
+      parameter(NCSHORT = 3)
+      parameter(NCLONG = 4)
+      parameter(NCFLOAT = 5)
+      parameter(NCDOUBLE = 6)
+      
+c     
+c     masks for the struct NC flag field; passed in as 'mode' arg to
+c     nccreate and ncopen.
+c     
+      
+c     read/write, 0 => readonly 
+      parameter(NCRDWR = 1)
+c     in create phase, cleared by ncendef 
+      parameter(NCCREAT = 2)
+c     on create destroy existing file 
+      parameter(NCEXCL = 4)
+c     in define mode, cleared by ncendef 
+      parameter(NCINDEF = 8)
+c     synchronise numrecs on change (X'10')
+      parameter(NCNSYNC = 16)
+c     synchronise whole header on change (X'20')
+      parameter(NCHSYNC = 32)
+c     numrecs has changed (X'40')
+      parameter(NCNDIRTY = 64)	
+c     header info has changed (X'80')
+      parameter(NCHDIRTY = 128)
+c     prefill vars on endef and increase of record, the default behavior
+      parameter(NCFILL = 0)
+c     don't fill vars on endef and increase of record (X'100')
+      parameter(NCNOFILL = 256)
+c     isa link (X'8000')
+      parameter(NCLINK = 32768)
+      
+c     
+c     'mode' arguments for nccreate and ncopen
+c     
+      
+      parameter(NCNOWRIT = 0)
+      parameter(NCWRITE = NCRDWR)
+      parameter(NCCLOB = 11)
+      parameter(NCNOCLOB = 15)
+c     
+c     'size' argument to ncdimdef for an unlimited dimension
+c     
+      integer NCUNLIM
+      parameter(NCUNLIM = 0)
+      
+c     
+c     attribute id to put/get a global attribute
+c     
+      parameter(NCGLOBAL  = 0)
+c     
+c     Advisory Maximums
+c     
+      parameter(MAXNCOP = 32)
+      parameter(MAXNCDIM = 32)
+      parameter(MAXNCATT = 512)
+      parameter(MAXNCVAR = 512)
+c     Not enforced 
+      parameter(MAXNCNAM = 128)
+      parameter(MAXVDIMS = MAXNCDIM)
+      
+      
+c     
+c     The netcdf data types
+c     
+      
+c     
+c     Global netcdf error status variable
+c     Initialized in error.c
+c     
+      
+c     No Error 
+      parameter(NCNOERR = 0)
+c     Not a netcdf id 
+      parameter(NCEBADID = 1)
+c     Too many netcdfs open 
+      parameter(NCENFILE = 2)	
+c     netcdf file exists && NCNOCLOB
+      parameter(NCEEXIST = 3)
+c     Invalid Argument 
+      parameter(NCEINVAL = 4)
+c     Write to read only 
+      parameter(NCEPERM = 5)
+c     Operation not allowed in data mode 
+      parameter(NCENOTIN = 6)	
+c     Operation not allowed in define mode 
+      parameter(NCEINDEF = 7)	
+c     Coordinates out of Domain 
+      parameter(NCECOORD = 8)
+c     MAXNCDIMS exceeded 
+      parameter(NCEMAXDS = 9)
+c     String match to name in use 
+      parameter(NCENAME = 10)	
+c     Attribute not found 
+      parameter(NCENOATT = 11)
+c     MAXNCATTRS exceeded 
+      parameter(NCEMAXAT = 12)
+c     Not a netcdf data type 
+      parameter(NCEBADTY = 13)
+c     Invalid dimension id 
+      parameter(NCEBADD = 14)	
+c     NCUNLIMITED in the wrong index 
+      parameter(NCEUNLIM = 15)
+c     MAXNCVARS exceeded 
+      parameter(NCEMAXVS = 16)
+c     Variable not found 
+      parameter(NCENOTVR = 17)
+c     Action prohibited on NCGLOBAL varid 
+      parameter(NCEGLOB = 18)
+c     Not a netcdf file 
+      parameter(NCENOTNC = 19)
+      parameter(NCESTS = 20)
+      parameter (NCENTOOL = 21)	
+      parameter(NCFOOBAR = 32)
+      parameter(NCSYSERR = -1)
+      
+      
+c     
+c     Global options variable. Used to determine behavior of error handler.
+c     Initialized in lerror.c
+c     
+      parameter(NCFATAL = 1)
+      parameter(NCVERBOS = 2)

Copied: packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-solaris64.inc (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-solaris64.inc)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-solaris64.inc	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/config/netcdf-solaris64.inc	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,147 @@
+c      
+c     Functions in the FORTRAN interface
+
+      integer nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      integer ncsfil
+      external nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      external ncsfil
+
+      integer NCRDWR,NCCREAT,NCEXCL,NCINDEF,NCNSYNC,NCHSYNC
+      integer NCNDIRTY,NCHDIRTY,NCLINK,NCNOWRIT,NCWRITE
+      integer NCCLOB,NCNOCLOB,NCGLOBAL,NCFILL,NCNOFILL
+      integer MAXNCOP,MAXNCDIM,MAXNCATT,MAXNCVAR
+      integer MAXNCNAM,MAXVDIMS,NCNOERR,NCEBADID
+      integer NCENFILE,NCEEXIST,NCEINVAL,NCEPERM,NCENOTIN
+      integer NCEINDEF,NCECOORD,NCEMAXDS,NCENAME
+      integer NCENOATT,NCEMAXAT,NCEBADTY,NCEBADD, NCESTS
+      integer NCEUNLIM,NCEMAXVS,NCENOTVR,NCEGLOB,NCENOTNC
+      integer NCFOOBAR,NCSYSERR,NCFATAL,NCVERBOS, NCENTOOL
+      
+      integer NCBYTE,NCCHAR,NCSHORT,NCLONG,NCFLOAT,NCDOUBLE
+      
+      parameter(NCBYTE = 1)
+      parameter(NCCHAR = 2)
+      parameter(NCSHORT = 3)
+      parameter(NCLONG = 4)
+      parameter(NCFLOAT = 5)
+      parameter(NCDOUBLE = 6)
+      
+c     
+c     masks for the struct NC flag field; passed in as 'mode' arg to
+c     nccreate and ncopen.
+c     
+      
+c     read/write, 0 => readonly 
+      parameter(NCRDWR = 1)
+c     in create phase, cleared by ncendef 
+      parameter(NCCREAT = 2)
+c     on create destroy existing file 
+      parameter(NCEXCL = 4)
+c     in define mode, cleared by ncendef 
+      parameter(NCINDEF = 8)
+c     synchronise numrecs on change (X'10')
+      parameter(NCNSYNC = 16)
+c     synchronise whole header on change (X'20')
+      parameter(NCHSYNC = 32)
+c     numrecs has changed (X'40')
+      parameter(NCNDIRTY = 64)	
+c     header info has changed (X'80')
+      parameter(NCHDIRTY = 128)
+c     prefill vars on endef and increase of record, the default behavior
+      parameter(NCFILL = 0)
+c     don't fill vars on endef and increase of record (X'100')
+      parameter(NCNOFILL = 256)
+c     isa link (X'8000')
+      parameter(NCLINK = 32768)
+      
+c     
+c     'mode' arguments for nccreate and ncopen
+c     
+      
+      parameter(NCNOWRIT = 0)
+      parameter(NCWRITE = NCRDWR)
+      parameter(NCCLOB = 11)
+      parameter(NCNOCLOB = 15)
+c     
+c     'size' argument to ncdimdef for an unlimited dimension
+c     
+      integer NCUNLIM
+      parameter(NCUNLIM = 0)
+      
+c     
+c     attribute id to put/get a global attribute
+c     
+      parameter(NCGLOBAL  = 0)
+c     
+c     Advisory Maximums
+c     
+      parameter(MAXNCOP = 32)
+      parameter(MAXNCDIM = 32)
+      parameter(MAXNCATT = 512)
+      parameter(MAXNCVAR = 512)
+c     Not enforced 
+      parameter(MAXNCNAM = 128)
+      parameter(MAXVDIMS = MAXNCDIM)
+      
+      
+c     
+c     The netcdf data types
+c     
+      
+c     
+c     Global netcdf error status variable
+c     Initialized in error.c
+c     
+      
+c     No Error 
+      parameter(NCNOERR = 0)
+c     Not a netcdf id 
+      parameter(NCEBADID = 1)
+c     Too many netcdfs open 
+      parameter(NCENFILE = 2)	
+c     netcdf file exists && NCNOCLOB
+      parameter(NCEEXIST = 3)
+c     Invalid Argument 
+      parameter(NCEINVAL = 4)
+c     Write to read only 
+      parameter(NCEPERM = 5)
+c     Operation not allowed in data mode 
+      parameter(NCENOTIN = 6)	
+c     Operation not allowed in define mode 
+      parameter(NCEINDEF = 7)	
+c     Coordinates out of Domain 
+      parameter(NCECOORD = 8)
+c     MAXNCDIMS exceeded 
+      parameter(NCEMAXDS = 9)
+c     String match to name in use 
+      parameter(NCENAME = 10)	
+c     Attribute not found 
+      parameter(NCENOATT = 11)
+c     MAXNCATTRS exceeded 
+      parameter(NCEMAXAT = 12)
+c     Not a netcdf data type 
+      parameter(NCEBADTY = 13)
+c     Invalid dimension id 
+      parameter(NCEBADD = 14)	
+c     NCUNLIMITED in the wrong index 
+      parameter(NCEUNLIM = 15)
+c     MAXNCVARS exceeded 
+      parameter(NCEMAXVS = 16)
+c     Variable not found 
+      parameter(NCENOTVR = 17)
+c     Action prohibited on NCGLOBAL varid 
+      parameter(NCEGLOB = 18)
+c     Not a netcdf file 
+      parameter(NCENOTNC = 19)
+      parameter(NCESTS = 20)
+      parameter (NCENTOOL = 21)	
+      parameter(NCFOOBAR = 32)
+      parameter(NCSYSERR = -1)
+      
+      
+c     
+c     Global options variable. Used to determine behavior of error handler.
+c     Initialized in lerror.c
+c     
+      parameter(NCFATAL = 1)
+      parameter(NCVERBOS = 2)

Modified: packages/libhdf4/trunk/mfhdf/fortran/fort_ps/hdftestp.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/fort_ps/hdftestp.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/fort_ps/hdftestp.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -5,11 +5,11 @@
 
       implicit none
 
-      integer fid1, fid2
-	integer fid_empty
+      integer fid1, fid2
+      integer fid_empty
 
-      integer sds1, sds2, sds3, sds4
-	integer sds_empty, index_empty, flag_empty
+      integer sds1, sds2, sds3, sds4
+      integer sds_empty, index_empty, flag_empty
 
       integer dim1, dim2
 
@@ -38,8 +38,8 @@
       integer sfid2ref, sfref2index, sfsdmvc, sfisdmvc
       integer sfsextf,  hxsdir,    hxscdir
       integer sfwcdata, sfrcdata,  sfscfill, sfgcfill
-      integer sfscatt,  sfrcatt,   sfsnatt,  sfrnatt
-	integer sfchempty
+      integer sfscatt,  sfrcatt,   sfsnatt,  sfrnatt
+      integer sfchempty
       integer SD_UNLIMITED, SD_DIMVAL_BW_INCOMP, DFNT_INT32
       integer DFNT_FLOAT32, DFNT_CHAR8
       integer SD_DIMVAL_BW_COMP, SD_FILL, SD_NOFILL
@@ -54,41 +54,42 @@
       DATA cfill/'@'/, icfill/' '/
       DATA catt/'U','S'/, icatt/' ',' '/
       DATA natt/10,20/, inatt/0,0/
-      DATA i32/15,25/, ii32/0,0/
-
-C
-C--- Create a file with an empty SDS
-C
-      fid_empty = sfstart('test_empty.hdf', 4)
-      if(fid_empty.eq.-1) then
-         print *, 'sfstart returned bad ID'
-         err = err + 1
-      endif
-C
-C--- Create an empty SDS
-C
-      dims(1) = 4
-      dims(2) = 9
-      nt = DFNT_INT32
-      rank = 2
-      sds_empty = sfcreate(fid_empty, 'Empty_SDS', nt, rank, dims)
-      if(sds_empty.eq.-1) then
-         print *, 'SDcreate Empty  returned bad ID', sds_empty
-         err = err + 1
-      endif
-
-      stat = sfendacc(sds_empty)
-      if(stat.ne.0) then
-         print *, 'SDendaccess returned', stat
-         err = err + 1
-      endif
-      stat = sfend(fid_empty)
-      if(stat.ne.0) then
-         print *, 'SDend returned', stat
-         err = err + 1
-      endif
+      DATA i32/15,25/, ii32/0,0/
 
+      err=0
 
+C
+C--- Create a file with an empty SDS
+C
+      fid_empty = sfstart('test_empty.hdf', 4)
+      if(fid_empty.eq.-1) then
+         print *, 'sfstart returned bad ID'
+         err = err + 1
+      endif
+C
+C--- Create an empty SDS
+C
+      dims(1) = 4
+      dims(2) = 9
+      nt = DFNT_INT32
+      rank = 2
+      sds_empty = sfcreate(fid_empty, 'Empty_SDS', nt, rank, dims)
+      if(sds_empty.eq.-1) then
+         print *, 'SDcreate Empty  returned bad ID', sds_empty
+         err = err + 1
+      endif
+
+      stat = sfendacc(sds_empty)
+      if(stat.ne.0) then
+         print *, 'SDendaccess returned', stat
+         err = err + 1
+      endif
+      stat = sfend(fid_empty)
+      if(stat.ne.0) then
+         print *, 'SDend returned', stat
+         err = err + 1
+      endif
+
 C     create a new file
       err = 0
       eps = 0.0001
@@ -328,39 +329,38 @@
          err = err + 1
       endif
 
-
-C
-C     OK, let's open it back up and take a look at what we've done
-C
-      fid_empty = sfstart('test_empty.hdf', 3)
-      if(fid_empty.eq.-1) then
-          print *, 'Reopen returned', fid_empty
-          err = err + 1
-      endif
-      index_empty = sfn2index(fid_empty,'Empty_SDS')
- 
-      sds_empty= sfselect(fid_empty, index_empty)
-      if(sds_empty.eq. -1) then
-         print *, 'Select returned', sds_empty
-         err = err + 1
-      endif
-      stat = sfchempty(sds_empty, flag_empty)
-      if(stat.ne. 0 .or. flag_empty. ne. 1) then
-        print*, 'sfchempty returned wrong flag, should be 1)'
-        err = err +1
-      endif 
-
-      stat = sfendacc(sds_empty)
-      if(stat.ne.0) then
-         print *, 'SDendaccess returned', stat
-         err = err + 1
-      endif
-      stat = sfend(fid_empty)
-      if(stat.ne.0) then
-         print *, 'SDend returned', stat
-         err = err + 1
-      endif
+C
+C     OK, let's open it back up and take a look at what we've done
+C
+      fid_empty = sfstart('test_empty.hdf', 3)
+      if(fid_empty.eq.-1) then
+          print *, 'Reopen returned', fid_empty
+          err = err + 1
+      endif
+      index_empty = sfn2index(fid_empty,'Empty_SDS')
+ 
+      sds_empty= sfselect(fid_empty, index_empty)
+      if(sds_empty.eq. -1) then
+         print *, 'Select returned', sds_empty
+         err = err + 1
+      endif
+      stat = sfchempty(sds_empty, flag_empty)
+      if(stat.ne. 0 .or. flag_empty. ne. 1) then
+        print*, 'sfchempty returned wrong flag, should be 1)'
+        err = err +1
+      endif 
 
+      stat = sfendacc(sds_empty)
+      if(stat.ne.0) then
+         print *, 'SDendaccess returned', stat
+         err = err + 1
+      endif
+      stat = sfend(fid_empty)
+      if(stat.ne.0) then
+         print *, 'SDend returned', stat
+         err = err + 1
+      endif
+
       fid2 = sfstart('test1.hdf', 3)
       if(fid2.eq.-1) then
           print *, 'Reopen returned', fid2
@@ -368,15 +368,15 @@
       endif
  
       sds3 = sfselect(fid2, 0)
-      if(sds3.eq.-1) then
+      if(sds3.eq. -1) then
          print *, 'Select returned', sds3
          err = err + 1
       endif
-	stat = sfchempty(sds3, flag_empty)
-      if(stat.ne. 0 .or. flag_empty. ne. 0) then
-        print*, 'sfchempty returned wrong flag, should be 0)'
-        err = err +1
-      endif
+      stat = sfchempty(sds3, flag_empty)
+      if(stat.ne. 0 .or. flag_empty. ne. 0) then
+        print*, 'sfchempty returned wrong flag, should be 0)'
+        err = err +1
+      endif
 
       stat = sfginfo(sds3, name, rank, idims, nt, nattr)
       if(stat.ne.0) then
@@ -441,13 +441,13 @@
       endif
 
       sds4 = sfselect(fid2, 1)
-      if(sds4.eq.-1) then
+      if(sds4.eq. -1) then
          print *, 'Select #4  returned', sds4
          err = err + 1
       endif
 
       dim2 = sfdimid(sds4, 1)
-      if(dim2.eq.-1) then
+      if(dim2.eq. -1) then
          print *, 'Get dim id #2 returned', dim2
          err = err + 1
       endif
@@ -1209,7 +1209,9 @@
      .             sds_index(N_COMP_TYPES)
          integer   RANK, comp_type, c_out
          integer   comp_arg(N_COMP_ARG)
+         integer   comp_prm_out(N_COMP_ARG)
          integer   comp_type_out(N_COMP_TYPES)
+         integer   comp_typesd
          integer   d_dims(2)
          integer   ch_dims(2),ch_dims_out(2), start_dims(2)
          integer   start(2), stride(2), edges(2)
@@ -1229,7 +1231,7 @@
 C  SDS functions declarations
 C
          integer   sfstart, sfcreate, sfendacc, sfend,
-     .             sfn2index, sfselect,
+     .             sfn2index, sfselect, sfgcompress,
      .             sfsfill, sfschnk, sfscchnk, sfwchnk, 
      .             sfgichnk, sfrchnk, sfwdata, sfrdata
 C
@@ -1325,12 +1327,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -1580,6 +1582,60 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_chunk = err_chunk + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_typesd, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_chunk = err_chunk + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_typesd .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
+            if (name(i) .eq. 'Nbcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NBIT) then
+          print *, 'wrong compression type for Nbcomp_data dataset'
+                endif
+                if ((comp_prm_out(1) .ne. nbit_sign_ext) .or.
+     .          (comp_prm_out(2) .ne. nbit_fill_one) .or.
+     .          (comp_prm_out(3) .ne. nbit_start_bit) .or.
+     .          (comp_prm_out(4) .ne. nbit_bit_len)) then
+          print *, 'wrong compression parameter for Nbcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
 201      continue
 
 C
@@ -1831,12 +1887,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -2221,8 +2277,8 @@
          integer   sd_id(N_COMP_TYPES),
      .             sds_id(N_COMP_TYPES),
      .             sds_index(N_COMP_TYPES)
-         integer   RANK, comp_type
-         integer   comp_arg(N_COMP_ARG)
+         integer   RANK, comp_type, comp_type_out
+         integer   comp_arg(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
          integer   d_dims(2)
          integer   start(2), stride(2), edges(2)
          integer   status, fill_value
@@ -2242,7 +2298,7 @@
          integer   sfstart, sfcreate, sfendacc, sfend,
      .             sfn2index, sfselect,
      .             sfsfill, sfrdata,
-     .             sfwdata, sfscompress
+     .             sfwdata, sfscompress, sfgcompress
 C
 C  Initial data declarations( change if you which to test larger arrays )
 C
@@ -2317,7 +2373,7 @@
 C
          integer deflate_level,
      .           skphuff_skp_size
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2 )
 
 
@@ -2475,8 +2531,48 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_compress = err_compress + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_compress = err_compress + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
 
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
 
+
 C
 C   Read part of the data back using sfrdata function
 C

Modified: packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpf.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.7 $";
 #endif
 
-/* $Id: mfsdpf.c,v 1.4 1999/04/02 18:37:19 ptlu Exp $ */
+/* $Id: mfsdpf.c,v 1.7 2001/10/16 14:19:41 epourmal Exp $ */
 
 /*
   mfsdpf.c -- based on mfsdf.c,v 1.26
@@ -2051,4 +2051,93 @@
     status = SDcheckempty(*id, &flag_c);
     *flag = flag_c;
     return(status);
-}   
\ No newline at end of file
+}   
+/*------------------------------------------------------------------------- 
+ * Name:    scgcompress
+ * Puporse: Call SDgetcompress 
+ * Inputs:  id: SDS access id
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_NBIT = 2
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *          SKPHUFF:
+ *          comp_prm[0] = skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          GZIP:
+ *          comp_prm[0] = deflate_level:    GZIP  compression parameter
+ *          NBIT:
+ *          comp_prm[0] = nbit_sign_ext
+ *          comp_prm[1] = nbit_fill_one
+ *          comp_prm[2] = nbit_start_bit
+ *          comp_prm[3] = nbit_bit_len
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nscgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nscgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int   CASE;
+    intn c_ret;
+    intf ret = -1;
+
+
+    c_ret = SDgetcompress(*id, &c_type, &c_info);
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+	  ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+	  ret = 0;
+         break;
+
+       case COMP_CODE_NBIT:      /* NBIT encoding */
+          *comp_type = 2;
+          comp_prm[0] = c_info.nbit.sign_ext; 
+          comp_prm[1] = c_info.nbit.fill_one; 
+          comp_prm[2] = c_info.nbit.start_bit; 
+          comp_prm[3] = c_info.nbit.bit_len; 
+	  ret = 0;
+          break;
+
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = c_info.skphuff.skp_size; 
+	  ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = c_info.deflate.level; 
+	  ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+                     } /*end CASE */
+    } /* end if */
+    return(ret);
+
+}

Modified: packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpff.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/fort_ps/mfsdpff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfsdpff.f,v 1.5 1999/04/02 18:38:06 ptlu Exp $
+C $Id: mfsdpff.f,v 1.6 2001/09/24 23:03:06 epourmal Exp $
 C
 C mfsdpff.f, based on mfsdff.f,v 1.7
 C
@@ -1685,7 +1685,7 @@
         INTEGER FUNCTION scscompress(id, comp_type, comp_prm) 
       !MS$ATTRIBUTES C, reference, alias: '_SCSCOMPRESS' :: scscompress 
           integer id, comp_type, comp_prm(*) 
-        END FUNCTION sc scompress
+        END FUNCTION scscompress
       END INTERFACE
 
          sfscompress = scscompress(id, comp_type, comp_prm)
@@ -1693,6 +1693,44 @@
          end
 
 C-------------------------------------------------------------------------
+C        Name:      sfgcompress
+C        Purpose:   get compression information about  SDS 
+C        Inputs:    id       - data set ID
+C        Output:    comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4 
+C                   comp_prm - compression parameter array:
+C                   comp_prm(1) = deflate_level for GZIP
+C                   comp_prm(1) = skphuff_skp_size for ADAPTIVE HUFFMAN
+C        NOTE: IT IS USER's responsibility to pass correct compression
+C              parameters for each type of compression
+C
+C        Returns:   0 on success, -1 on failure
+C        Calls:     scgcompress (C stub for SDsetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function sfgcompress(id, comp_type,comp_prm)
+	     !MS$if defined(BUILD_HDF_DLL)
+	     !MS$attributes dllexport :: sfgcompress 
+	     !MS$endif
+
+         INTEGER id, comp_type, comp_prm(*)
+      INTERFACE
+        INTEGER FUNCTION scgcompress(id, comp_type, comp_prm) 
+      !MS$ATTRIBUTES C, reference, alias: '_SCGCOMPRESS' :: scgcompress 
+          integer id, comp_type, comp_prm(*) 
+        END FUNCTION scgcompress
+      END INTERFACE
+         sfgcompress = scgcompress(id, comp_type, comp_prm)
+         return
+         end
+
+
+C-------------------------------------------------------------------------
 C        Name:      sfisrcrd
 C        Purpose:   checkes if SDS is appendable ,i.e, has unlimited 
 C                   dimension 

Modified: packages/libhdf4/trunk/mfhdf/fortran/hdftest.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/hdftest.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/hdftest.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1209,7 +1209,9 @@
      .             sds_index(N_COMP_TYPES)
          integer   RANK, comp_type, c_out
          integer   comp_arg(N_COMP_ARG)
+         integer   comp_prm_out(N_COMP_ARG)
          integer   comp_type_out(N_COMP_TYPES)
+         integer   comp_typesd
          integer   d_dims(2)
          integer   ch_dims(2),ch_dims_out(2), start_dims(2)
          integer   start(2), stride(2), edges(2)
@@ -1229,7 +1231,7 @@
 C  SDS functions declarations
 C
          integer   sfstart, sfcreate, sfendacc, sfend,
-     .             sfn2index, sfselect,
+     .             sfn2index, sfselect, sfgcompress,
      .             sfsfill, sfschnk, sfscchnk, sfwchnk, 
      .             sfgichnk, sfrchnk, sfwdata, sfrdata
 C
@@ -1325,12 +1327,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -1580,6 +1582,60 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_chunk = err_chunk + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_typesd, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_chunk = err_chunk + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_typesd .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
+            if (name(i) .eq. 'Nbcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NBIT) then
+          print *, 'wrong compression type for Nbcomp_data dataset'
+                endif
+                if ((comp_prm_out(1) .ne. nbit_sign_ext) .or.
+     .          (comp_prm_out(2) .ne. nbit_fill_one) .or.
+     .          (comp_prm_out(3) .ne. nbit_start_bit) .or.
+     .          (comp_prm_out(4) .ne. nbit_bit_len)) then
+          print *, 'wrong compression parameter for Nbcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
 201      continue
 
 C
@@ -1831,12 +1887,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -2221,8 +2277,8 @@
          integer   sd_id(N_COMP_TYPES),
      .             sds_id(N_COMP_TYPES),
      .             sds_index(N_COMP_TYPES)
-         integer   RANK, comp_type
-         integer   comp_arg(N_COMP_ARG)
+         integer   RANK, comp_type, comp_type_out
+         integer   comp_arg(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
          integer   d_dims(2)
          integer   start(2), stride(2), edges(2)
          integer   status, fill_value
@@ -2242,7 +2298,7 @@
          integer   sfstart, sfcreate, sfendacc, sfend,
      .             sfn2index, sfselect,
      .             sfsfill, sfrdata,
-     .             sfwdata, sfscompress
+     .             sfwdata, sfscompress, sfgcompress
 C
 C  Initial data declarations( change if you which to test larger arrays )
 C
@@ -2317,7 +2373,7 @@
 C
          integer deflate_level,
      .           skphuff_skp_size
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2 )
 
 
@@ -2475,8 +2531,48 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_compress = err_compress + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_compress = err_compress + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
 
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
 
+
 C
 C   Read part of the data back using sfrdata function
 C

Modified: packages/libhdf4/trunk/mfhdf/fortran/mfsdf.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/mfsdf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/mfsdf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.35 $";
+static char RcsId[] = "@(#)$Revision: 1.40 $";
 #endif
 
-/* $Id: mfsdf.c,v 1.35 1999/03/27 22:57:18 epourmal Exp $ */
+/* $Id: mfsdf.c,v 1.40 2004/11/22 20:15:04 epourmal Exp $ */
 
 /*
 
@@ -1504,7 +1504,7 @@
  * Returns:  0 on success, -1 on failure with error set
  *----------------------------------------------------------------------------*/   
     FRETVAL (intf)
-#ifdef PROTOTYPEi
+#ifdef PROTOTYPE
        nscrchnk(intf *id, intf *start, VOIDP num_data)
 #else
        nscrchnk(id, start, num_data)
@@ -1834,7 +1834,7 @@
 
     int32 sdsid;              /* SDS id               */
     comp_info c_info;         /* compression info     */
-    int32 c_type;              /* compression type definition */
+    comp_coder_t c_type;              /* compression type definition */
 
     int   CASE;
     intf ret;
@@ -1873,6 +1873,95 @@
     return(ret);
 
 }
+/*-------------------------------------------------------------------------
+ * Name:    scgcompress
+ * Puporse: Call SDgetcompress 
+ * Inputs:  id: SDS access id
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_NBIT = 2
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *          SKPHUFF:
+ *          comp_prm[0] = skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          GZIP:
+ *          comp_prm[0] = deflate_level:    GZIP  compression parameter
+ *          NBIT:
+ *          comp_prm[0] = nbit_sign_ext
+ *          comp_prm[1] = nbit_fill_one
+ *          comp_prm[2] = nbit_start_bit
+ *          comp_prm[3] = nbit_bit_len
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nscgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nscgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int   CASE;
+    intn c_ret;
+    intf ret = -1;
+
+
+    c_ret = SDgetcompress(*id, &c_type, &c_info);
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+	  ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+	  ret = 0;
+         break;
+
+       case COMP_CODE_NBIT:      /* NBIT encoding */
+          *comp_type = 2;
+          comp_prm[0] = c_info.nbit.sign_ext; 
+          comp_prm[1] = c_info.nbit.fill_one; 
+          comp_prm[2] = c_info.nbit.start_bit; 
+          comp_prm[3] = c_info.nbit.bit_len; 
+	  ret = 0;
+          break;
+
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = c_info.skphuff.skp_size; 
+	  ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = c_info.deflate.level; 
+	  ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+                     } /*end CASE */
+    } /* end if */
+    return(ret);
+
+}
 /*-----------------------------------------------------------------------------
  * Name:    sfisrcrd
  * Purpose: call SDisrecord to see if a dataset is a record variable

Modified: packages/libhdf4/trunk/mfhdf/fortran/mfsdff.f
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/mfsdff.f	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/mfsdff.f	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfsdff.f,v 1.10 1999/03/27 22:57:17 epourmal Exp $
+C $Id: mfsdff.f,v 1.11 2001/09/21 15:53:57 epourmal Exp $
 C
 
 C----------------------------------------------------------------------
@@ -557,6 +557,36 @@
          end
 
 C-------------------------------------------------------------------------
+C        Name:      sfgcompress
+C        Purpose:   get compression information about  SDS 
+C        Inputs:    id       - data set ID
+C        Output:    comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4 
+C                   comp_prm - compression parameter array:
+C                   comp_prm(1) = deflate_level for GZIP
+C                   comp_prm(1) = skphuff_skp_size for ADAPTIVE HUFFMAN
+C        NOTE: IT IS USER's responsibility to pass correct compression
+C              parameters for each type of compression
+C
+C        Returns:   0 on success, -1 on failure
+C        Calls:     scgcompress (C stub for SDsetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function sfgcompress(id, comp_type,comp_prm)
+
+         INTEGER id, comp_type, comp_prm(*)
+         INTEGER scgcompress 
+         sfgcompress = scgcompress(id, comp_type, comp_prm)
+         return
+         end
+
+
+C-------------------------------------------------------------------------
 C        Name:      sfchempty
 C        Purpose:   checks whether an SDS is empty ( data has not been written) 
 C        Inputs:    id       - data set ID

Modified: packages/libhdf4/trunk/mfhdf/fortran/msoft/ftest.for
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/msoft/ftest.for	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/msoft/ftest.for	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1989, University Corporation for Atmospheric Research
 c   See netcdf/README file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/msoft/ftest.for,v 1.1 1993/04/21 21:49:16 chouck Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/msoft/ftest.for,v 1.1 1993/04/21 21:49:16 chouck Exp $
 c********************************************************************/
 
 $include: "msoft.int"

Modified: packages/libhdf4/trunk/mfhdf/fortran/msoft/jackets.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/msoft/jackets.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/msoft/jackets.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/README file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/msoft/jackets.c,v 1.1 1993/04/21 21:49:17 chouck Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/msoft/jackets.c,v 1.1 1993/04/21 21:49:17 chouck Exp $ */
 /*
  * OVERVIEW
  *

Copied: packages/libhdf4/trunk/mfhdf/fortran/test_nc.cdl (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.cdl)
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/test_nc.cdl	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/fortran/test_nc.cdl	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,42 @@
+netcdf new {
+dimensions:
+	x    = 2;
+	y    = 3;
+	time = UNLIMITED ; // (12 currently)
+variables:
+        float a(x,y);
+	int date(time) ;
+	int time(time) ;
+        short b(time, y, x);
+        double c(y);
+// global attributes:
+    :Description = "Attributes";
+    :int_attr = -100, 200, -300, 400, -500;
+    :float_attr = 1.f, 2.f, 3.f;
+    :short_attr = 0s, 1s;
+    :double_attr = -1.d, 2.d, -7.d;
+
+data:
+ a = 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;
+
+ date = 840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816, 
+    840915, 841016, 841115, 841216 ;
+
+ time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ;
+  
+ b = 1, 1, 2, 2, 3, 3,
+     4, 4, 5, 5, 6, 6,
+     7, 7, 8, 8, 9, 9,
+    10, 10, 11, 11, 12, 12,
+    13, 13, 14, 14, 15, 15,
+    16, 16, 17, 17, 18, 18,
+    19, 19, 20, 20, 21, 22,
+    23, 23, 24, 24, 25, 25,
+    26, 26, 27, 27, 28, 28,
+    29, 29, 30, 30, 31, 31,
+    32, 32, 33, 33, 34, 34,
+    35, 35, 36, 36, 37, 37 ;
+ 
+ c = 2.d, 3.d, 100.d;
+
+}

Copied: packages/libhdf4/trunk/mfhdf/fortran/test_nc.nc (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.nc)
===================================================================
(Binary files differ)

Modified: packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.for
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.for	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.for	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/ftest.for,v 1.2 1996/01/30 16:20:52 sxu Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/ftest.for,v 1.2 1996/01/30 16:20:52 sxu Exp $
 c********************************************************************/
 
 

Modified: packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.m4
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.m4	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/vms/ftest.m4	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1989, University Corporation for Atmospheric Research
 c   See netcdf/README file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/ftest.m4,v 1.1 1993/11/22 16:50:42 georgev Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/ftest.m4,v 1.1 1993/11/22 16:50:42 georgev Exp $
 c********************************************************************/
 c
 c     program to test the VMS Fortran jacket interface to the netCDF

Modified: packages/libhdf4/trunk/mfhdf/fortran/vms/jackets.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/fortran/vms/jackets.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/fortran/vms/jackets.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/README file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/jackets.c,v 1.3 1998/06/25 17:06:14 epourmal Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/jackets.c,v 1.3 1998/06/25 17:06:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *

Copied: packages/libhdf4/trunk/mfhdf/hdfimport (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/hdfimport)

Copied: packages/libhdf4/trunk/mfhdf/hdiff (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/hdiff)

Copied: packages/libhdf4/trunk/mfhdf/hrepack (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/hrepack)

Copied: packages/libhdf4/trunk/mfhdf/libsrc/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,90 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Library to build                               ##
+#############################################################################
+
+lib_LIBRARIES = libmfhdf.a
+
+## Information for building the "libmfhdf.a" library
+CSOURCES=array.c attr.c cdf.c dim.c file.c hdfsds.c iarray.c error.c    \
+         globdef.c mfsd.c nssdc.c putget.c putgetg.c sharray.c string.c \
+         var.c xdrposix.c
+FSOURCES=../fortran/jackets.c ../fortran/mfsdf.c ../fortran/mfsdff.f
+XDRSOURCES=../xdr/xdr.c ../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+
+if HDF_BUILD_FORTRAN
+
+if HDF_BUILD_XDR
+libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES) $(XDRSOURCES)
+else
+libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+endif
+
+else
+
+if HDF_BUILD_XDR
+libmfhdf_a_SOURCES = $(CSOURCES) $(XDRSOURCES)
+else
+libmfhdf_a_SOURCES = $(CSOURCES)
+endif
+
+endif
+
+include_HEADERS = hdf2netcdf.h local_nc.h mfhdf.h netcdf.h 
+
+#############################################################################
+##                              Testing                                    ##
+#############################################################################
+
+check_PROGRAMS = cdftest hdftest
+
+cdftest_SOURCES = cdftest.c
+cdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+
+hdftest_SOURCES = hdftest.c tszip.c temptySDSs.c tidtypes.c trank0.c \
+		  tsd.c
+hdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+
+check:
+	@echo "============================"
+	@echo "HDF-SD C interfaces tests"
+	@echo "============================"
+	srcdir="$(srcdir)" ./hdftest > hdfout.new
+	@cmd="$(DIFF) hdfout.new $(srcdir)/hdfout.sav";                 \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** HDF passes formatted test ***";                   \
+	  else                                                          \
+	    echo "*** HDF fails formatted test ***";                    \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+	@echo "========================="
+	@echo "netCDF formatted tests"
+	@echo "========================="
+	srcdir="$(srcdir)" ./cdftest > cdfout.new
+	@cmd="$(DIFF) cdfout.new $(srcdir)/testout.sav";                \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** netCDF passes formatted test ***";                \
+	  else                                                          \
+	    echo "*** netCDF fails formatted test ***";                 \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=*.new *.hdf *.cdf *.cdl netcdf.h

Modified: packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,819 +1,758 @@
-# Makefile for netCDF library
-#
-# $Id: Makefile.in,v 1.30 2000/08/30 21:55:46 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+lib_LIBRARIES = libmfhdf.a
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+CSOURCES = array.c attr.c cdf.c dim.c file.c hdfsds.c iarray.c error.c    \
+         globdef.c mfsd.c nssdc.c putget.c putgetg.c sharray.c string.c \
+         var.c xdrposix.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+FSOURCES = ../fortran/jackets.c ../fortran/mfsdf.c ../fortran/mfsdff.f
+XDRSOURCES = ../xdr/xdr.c ../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE at libmfhdf_a_SOURCES = $(CSOURCES)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE at libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE at libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES) $(XDRSOURCES)
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE at libmfhdf_a_SOURCES = $(CSOURCES) $(XDRSOURCES)
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+include_HEADERS = hdf2netcdf.h local_nc.h mfhdf.h netcdf.h 
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+check_PROGRAMS = cdftest hdftest
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+cdftest_SOURCES = cdftest.c
+cdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+hdftest_SOURCES = hdftest.c tszip.c temptySDSs.c tidtypes.c trank0.c \
+		  tsd.c
 
+hdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
 
-OTHERDIRS = config
+#############################################################################
+#############################################################################
+DISTCLEANFILES = *.new *.hdf *.cdf *.cdl netcdf.h
+subdir = mfhdf/libsrc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-PROGRAM		= cdftest
-#SWAP    	= @SWAP@
-#NETLONG    	= @NETLONG@
-#CPPFLAGS	= $(CPPFLAGS_LIB)
-#CFLAGS		= $(CFLAGS_LIB)
-GARBAGE		= $(PROGRAM) test.cdf cdfout.new *.hdf \
-                  hdftest hdfout.new
-HEADERS		= netcdf.h mfhdf.h local_nc.h hdf2netcdf.h
-#XDRFILE	= @XDRFILE@
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-CSRCS		= array.c attr.c cdf.c dim.c error.c file.c \
-		  globdef.c iarray.c putget.c putgetg.c sharray.c string.c \
-		  var.c xdrposix.c xdrstdio.c hdfsds.c mfsd.c nssdc.c
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in README \
-		  depend \
-		  $(CSRCS) cdftest.c \
-		  alloc.h testout.sav descrip.mms error.h htons.mar \
-		  local_nc.h make.com msoft.mk netcdf.h ntohs.mar \
-		  test_cdf.sav hdfout.sav hdftest.c mfhdf.h win32cdf.h hdf2netcdf.h \
-		config/netcdf-hpux.h config/netcdf-irix4.h config/netcdf-irix5.h \
-		config/netcdf-irix6.h config/netcdf-irix32.h config/netcdf-sun.h \
-		config/netcdf-linux.h config/netcdf-fbsd.h config/netcdf-alpha.h \
-		config/netcdf-dec.h config/netcdf-aix.h config/netcdf-solaris.h \
-		config/netcdf-solarisx86.h config/netcdf-convex.h \
-		config/netcdf-unicos.h
+libmfhdf_a_AR = $(AR) cru
+libmfhdf_a_LIBADD =
+am__libmfhdf_a_SOURCES_DIST = array.c attr.c cdf.c dim.c file.c hdfsds.c \
+	iarray.c error.c globdef.c mfsd.c nssdc.c putget.c putgetg.c \
+	sharray.c string.c var.c xdrposix.c ../fortran/jackets.c \
+	../fortran/mfsdf.c ../fortran/mfsdff.f ../xdr/xdr.c \
+	../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+am__objects_1 = array.$(OBJEXT) attr.$(OBJEXT) cdf.$(OBJEXT) \
+	dim.$(OBJEXT) file.$(OBJEXT) hdfsds.$(OBJEXT) iarray.$(OBJEXT) \
+	error.$(OBJEXT) globdef.$(OBJEXT) mfsd.$(OBJEXT) \
+	nssdc.$(OBJEXT) putget.$(OBJEXT) putgetg.$(OBJEXT) \
+	sharray.$(OBJEXT) string.$(OBJEXT) var.$(OBJEXT) \
+	xdrposix.$(OBJEXT)
+am__objects_2 = xdr.$(OBJEXT) xdrfloat.$(OBJEXT) xdrstdio.$(OBJEXT) \
+	xdrarray.$(OBJEXT)
+am__objects_3 = jackets.$(OBJEXT) mfsdf.$(OBJEXT) mfsdff.$(OBJEXT)
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE@	$(am__objects_1)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_3) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE@	$(am__objects_3)
+libmfhdf_a_OBJECTS = $(am_libmfhdf_a_OBJECTS)
+check_PROGRAMS = cdftest$(EXEEXT) hdftest$(EXEEXT)
+am_cdftest_OBJECTS = cdftest.$(OBJEXT)
+cdftest_OBJECTS = $(am_cdftest_OBJECTS)
+cdftest_DEPENDENCIES = libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+cdftest_LDFLAGS =
+am_hdftest_OBJECTS = hdftest.$(OBJEXT) tszip.$(OBJEXT) \
+	temptySDSs.$(OBJEXT) tidtypes.$(OBJEXT) trank0.$(OBJEXT) \
+	tsd.$(OBJEXT)
+hdftest_OBJECTS = $(am_hdftest_OBJECTS)
+hdftest_DEPENDENCIES = libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hdftest_LDFLAGS =
 
-LIBOBJS		= array.o attr.o cdf.o dim.o file.o iarray.o error.o \
-		  globdef.o putget.o putgetg.o sharray.o string.o var.o \
-		  $(XDRFILE).o hdfsds.o mfsd.o nssdc.o
-LIBRARY		= mfhdf
-DEBUGLIBRARY	= mfhdf_g
-PROFILEDLIBRARY	= mfhdf_pg
-OBJS		= $(PROGRAM).o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L. -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX) $(ZLIB_LIB)
-prefix		= ../../..
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/attr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdf.Po ./$(DEPDIR)/cdftest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dim.Po ./$(DEPDIR)/error.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/file.Po ./$(DEPDIR)/globdef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfsds.Po ./$(DEPDIR)/hdftest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/iarray.Po ./$(DEPDIR)/jackets.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfsd.Po ./$(DEPDIR)/mfsdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/nssdc.Po ./$(DEPDIR)/putget.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/putgetg.Po ./$(DEPDIR)/sharray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/string.Po ./$(DEPDIR)/temptySDSs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tidtypes.Po ./$(DEPDIR)/trank0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tsd.Po ./$(DEPDIR)/tszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/var.Po ./$(DEPDIR)/xdr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrarray.Po ./$(DEPDIR)/xdrfloat.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrposix.Po ./$(DEPDIR)/xdrstdio.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__libmfhdf_a_SOURCES_DIST) $(cdftest_SOURCES) \
+	$(hdftest_SOURCES)
+HEADERS = $(include_HEADERS)
 
-#all::		library
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" library; \
-	fi
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(libmfhdf_a_SOURCES) $(cdftest_SOURCES) $(hdftest_SOURCES)
 
-#
-# The formatted file `cdftest_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.cdf' which should be byte-for-byte
-# identical with `test_cdf.sav', modulo small rounding errors.
-#
-test:		$(PROGRAM) nhdftest
-	@ echo "========================="
-	@ echo "netCDF formatted tests"
-	@ echo "========================="
-	./$(PROGRAM) > cdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) cdfout.new testout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** netCDF passes formatted test ***"; \
-	    else \
-		echo "*** netCDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-#	@cmd="cmp test.cdf test_cdf.sav"; \
-#	    echo $$cmd; \
-#	    if $$cmd; then \
-#		echo "*** netCDF passes binary test ***"; \
-#	    else \
-#		echo "*** netCDF fails binary test ***"; \
-#		exit 1; \
-#	    fi
+all: all-am
 
-install::	installed_library installed_headers
-
-install-includes::	installed_headers
-
-$(PROGRAM):	$(PROGRAM).o library
-
-nhdftest::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) hdftest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdftest; \
-	fi
-
-hdftest:	hdftest.o library        
-	$(CC) $(CFLAGS) $(CFLAGS_NETCDF) hdftest.o $(LIBS) -o $@
-	@ echo "============================"
-	@ echo "HDF-SD C interfaces tests"
-	@ echo "============================"
-	./hdftest > hdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) hdfout.new hdfout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes formatted test ***"; \
-	    else \
-		echo "*** HDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-debug:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-g $(CFLAGS_NETCDF) " "LIBRARY=$(LIBRARY)_g" library
-
-profiled:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-pg $(CFLAGS_NETCDF) " "LIBRARY=$(LIBRARY)_pg" library
-
-cdftest.oc:	$(CSRCS) cdftest.c
-	#load -C $(CPPFLAGS) $(CPPFLAGS_NETCDF) -I/usr/local/lang/SC1.0/ansi_include \
-	    $(CSRCS) cdftest.c /usr/local/lang/SC1.0/ansi_lib/libansi.a 
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.sho .so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/libsrc/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libmfhdf.a: $(libmfhdf_a_OBJECTS) $(libmfhdf_a_DEPENDENCIES) 
+	-rm -f libmfhdf.a
+	$(libmfhdf_a_AR) libmfhdf.a $(libmfhdf_a_OBJECTS) $(libmfhdf_a_LIBADD)
+	$(RANLIB) libmfhdf.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+cdftest$(EXEEXT): $(cdftest_OBJECTS) $(cdftest_DEPENDENCIES) 
+	@rm -f cdftest$(EXEEXT)
+	$(LINK) $(cdftest_LDFLAGS) $(cdftest_OBJECTS) $(cdftest_LDADD) $(LIBS)
+hdftest$(EXEEXT): $(hdftest_OBJECTS) $(hdftest_DEPENDENCIES) 
+	@rm -f hdftest$(EXEEXT)
+	$(LINK) $(hdftest_LDFLAGS) $(hdftest_OBJECTS) $(hdftest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+distclean-compile:
+	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/attr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdftest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/error.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/globdef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfsds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/iarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/jackets.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfsdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nssdc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/putget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/putgetg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sharray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/string.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/temptySDSs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tidtypes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/trank0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/var.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrfloat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrposix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrstdio.Po at am__quote@
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -D_REENTRANT $<
-.c.sho:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -D_REENTRANT -fPIC -o $@ $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+xdr.o: ../xdr/xdr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdr.o -MD -MP -MF "$(DEPDIR)/xdr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdr.o `test -f '../xdr/xdr.c' || echo '$(srcdir)/'`../xdr/xdr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdr.Tpo" "$(DEPDIR)/xdr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdr.c' object='xdr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdr.Po' tmpdepfile='$(DEPDIR)/xdr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdr.o `test -f '../xdr/xdr.c' || echo '$(srcdir)/'`../xdr/xdr.c
 
+xdr.obj: ../xdr/xdr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdr.obj -MD -MP -MF "$(DEPDIR)/xdr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdr.obj `if test -f '../xdr/xdr.c'; then $(CYGPATH_W) '../xdr/xdr.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdr.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdr.Tpo" "$(DEPDIR)/xdr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdr.c' object='xdr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdr.Po' tmpdepfile='$(DEPDIR)/xdr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdr.obj `if test -f '../xdr/xdr.c'; then $(CYGPATH_W) '../xdr/xdr.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdr.c'; fi`
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
-LIB_SO		= lib$(LIBRARY).so
-LIB_SOMINOR	= lib$(LIBRARY).so.$(sominor)
-LIB_SOMAJOR	= lib$(LIBRARY).so.$(somajor)
+xdrfloat.o: ../xdr/xdrfloat.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrfloat.o -MD -MP -MF "$(DEPDIR)/xdrfloat.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrfloat.o `test -f '../xdr/xdrfloat.c' || echo '$(srcdir)/'`../xdr/xdrfloat.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrfloat.Tpo" "$(DEPDIR)/xdrfloat.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrfloat.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrfloat.c' object='xdrfloat.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrfloat.Po' tmpdepfile='$(DEPDIR)/xdrfloat.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrfloat.o `test -f '../xdr/xdrfloat.c' || echo '$(srcdir)/'`../xdr/xdrfloat.c
 
-library::		$(LIB_A) $(LIB_SO)
+xdrfloat.obj: ../xdr/xdrfloat.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrfloat.obj -MD -MP -MF "$(DEPDIR)/xdrfloat.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrfloat.obj `if test -f '../xdr/xdrfloat.c'; then $(CYGPATH_W) '../xdr/xdrfloat.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrfloat.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrfloat.Tpo" "$(DEPDIR)/xdrfloat.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrfloat.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrfloat.c' object='xdrfloat.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrfloat.Po' tmpdepfile='$(DEPDIR)/xdrfloat.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrfloat.obj `if test -f '../xdr/xdrfloat.c'; then $(CYGPATH_W) '../xdr/xdrfloat.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrfloat.c'; fi`
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS)
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o libmfhdf.sl $(LIBOBJS)
+xdrstdio.o: ../xdr/xdrstdio.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrstdio.o -MD -MP -MF "$(DEPDIR)/xdrstdio.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrstdio.o `test -f '../xdr/xdrstdio.c' || echo '$(srcdir)/'`../xdr/xdrstdio.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrstdio.Tpo" "$(DEPDIR)/xdrstdio.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrstdio.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrstdio.c' object='xdrstdio.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrstdio.Po' tmpdepfile='$(DEPDIR)/xdrstdio.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrstdio.o `test -f '../xdr/xdrstdio.c' || echo '$(srcdir)/'`../xdr/xdrstdio.c
 
-$(LIB_SO): $(LIB_SOMAJOR)
-	ln -sf $^ $@
+xdrstdio.obj: ../xdr/xdrstdio.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrstdio.obj -MD -MP -MF "$(DEPDIR)/xdrstdio.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrstdio.obj `if test -f '../xdr/xdrstdio.c'; then $(CYGPATH_W) '../xdr/xdrstdio.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrstdio.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrstdio.Tpo" "$(DEPDIR)/xdrstdio.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrstdio.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrstdio.c' object='xdrstdio.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrstdio.Po' tmpdepfile='$(DEPDIR)/xdrstdio.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrstdio.obj `if test -f '../xdr/xdrstdio.c'; then $(CYGPATH_W) '../xdr/xdrstdio.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrstdio.c'; fi`
 
-$(LIB_SOMAJOR): $(LIB_SOMINOR)
-	ln -sf $^ $@
+xdrarray.o: ../xdr/xdrarray.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrarray.o -MD -MP -MF "$(DEPDIR)/xdrarray.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrarray.o `test -f '../xdr/xdrarray.c' || echo '$(srcdir)/'`../xdr/xdrarray.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrarray.Tpo" "$(DEPDIR)/xdrarray.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrarray.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrarray.c' object='xdrarray.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrarray.Po' tmpdepfile='$(DEPDIR)/xdrarray.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrarray.o `test -f '../xdr/xdrarray.c' || echo '$(srcdir)/'`../xdr/xdrarray.c
 
-$(LIB_SOMINOR): $(LIBOBJS:%.o=%.sho) ../fortran/fortran.so.o
-	$(CC) -shared -Wl,-soname,$(LIB_SOMAJOR) -o $@ $(LIBOBJS:%.o=%.sho) ../fortran/fortran.so.o -L../../hdf/src -ldf -lc
+xdrarray.obj: ../xdr/xdrarray.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrarray.obj -MD -MP -MF "$(DEPDIR)/xdrarray.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrarray.obj `if test -f '../xdr/xdrarray.c'; then $(CYGPATH_W) '../xdr/xdrarray.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrarray.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrarray.Tpo" "$(DEPDIR)/xdrarray.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrarray.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrarray.c' object='xdrarray.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrarray.Po' tmpdepfile='$(DEPDIR)/xdrarray.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrarray.obj `if test -f '../xdr/xdrarray.c'; then $(CYGPATH_W) '../xdr/xdrarray.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrarray.c'; fi`
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+jackets.o: ../fortran/jackets.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT jackets.o -MD -MP -MF "$(DEPDIR)/jackets.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o jackets.o `test -f '../fortran/jackets.c' || echo '$(srcdir)/'`../fortran/jackets.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/jackets.Tpo" "$(DEPDIR)/jackets.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/jackets.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/jackets.c' object='jackets.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/jackets.Po' tmpdepfile='$(DEPDIR)/jackets.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jackets.o `test -f '../fortran/jackets.c' || echo '$(srcdir)/'`../fortran/jackets.c
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+jackets.obj: ../fortran/jackets.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT jackets.obj -MD -MP -MF "$(DEPDIR)/jackets.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o jackets.obj `if test -f '../fortran/jackets.c'; then $(CYGPATH_W) '../fortran/jackets.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/jackets.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/jackets.Tpo" "$(DEPDIR)/jackets.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/jackets.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/jackets.c' object='jackets.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/jackets.Po' tmpdepfile='$(DEPDIR)/jackets.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jackets.obj `if test -f '../fortran/jackets.c'; then $(CYGPATH_W) '../fortran/jackets.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/jackets.c'; fi`
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+mfsdf.o: ../fortran/mfsdf.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mfsdf.o -MD -MP -MF "$(DEPDIR)/mfsdf.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o mfsdf.o `test -f '../fortran/mfsdf.c' || echo '$(srcdir)/'`../fortran/mfsdf.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/mfsdf.Tpo" "$(DEPDIR)/mfsdf.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/mfsdf.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/mfsdf.c' object='mfsdf.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/mfsdf.Po' tmpdepfile='$(DEPDIR)/mfsdf.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mfsdf.o `test -f '../fortran/mfsdf.c' || echo '$(srcdir)/'`../fortran/mfsdf.c
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+mfsdf.obj: ../fortran/mfsdf.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mfsdf.obj -MD -MP -MF "$(DEPDIR)/mfsdf.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o mfsdf.obj `if test -f '../fortran/mfsdf.c'; then $(CYGPATH_W) '../fortran/mfsdf.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdf.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/mfsdf.Tpo" "$(DEPDIR)/mfsdf.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/mfsdf.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/mfsdf.c' object='mfsdf.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/mfsdf.Po' tmpdepfile='$(DEPDIR)/mfsdf.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mfsdf.obj `if test -f '../fortran/mfsdf.c'; then $(CYGPATH_W) '../fortran/mfsdf.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdf.c'; fi`
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-	cp -a libmfhdf.so* $(LIBDIR)/
+.f.o:
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
+mfsdff.o: ../fortran/mfsdff.f
+	$(F77) $(AM_FFLAGS) $(FFLAGS) -c -o mfsdff.o `test -f '../fortran/mfsdff.f' || echo '$(srcdir)/'`../fortran/mfsdff.f
 
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
+mfsdff.obj: ../fortran/mfsdff.f
+	$(F77) $(AM_FFLAGS) $(FFLAGS) -c -o mfsdff.obj `if test -f '../fortran/mfsdff.f'; then $(CYGPATH_W) '../fortran/mfsdff.f'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdff.f'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
+ETAGS = etags
+ETAGSFLAGS =
 
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
+CTAGS = ctags
+CTAGSFLAGS =
 
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
+tags: TAGS
 
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
+clean-generic:
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+clean-am: clean-checkPROGRAMS clean-generic clean-libLIBRARIES \
+	mostlyclean-am
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+dvi: dvi-am
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+dvi-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+info: info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+info-am:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+install-data-am: install-includeHEADERS
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-libLIBRARIES
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+install-info: install-info-am
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+install-man:
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+installcheck-am:
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+mostlyclean: mostlyclean-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+pdf: pdf-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log *.sho
+pdf-am:
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags netcdf.h *.sho
+ps: ps-am
 
+ps-am:
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-checkPROGRAMS \
+	clean-generic clean-libLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-config.status:	cc_id configure
-	./configure --no-create
 
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/libsrc
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
+check:
+	@echo "============================"
+	@echo "HDF-SD C interfaces tests"
+	@echo "============================"
+	srcdir="$(srcdir)" ./hdftest > hdfout.new
+	@cmd="$(DIFF) hdfout.new $(srcdir)/hdfout.sav";                 \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** HDF passes formatted test ***";                   \
+	  else                                                          \
+	    echo "*** HDF fails formatted test ***";                    \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+	@echo "========================="
+	@echo "netCDF formatted tests"
+	@echo "========================="
+	srcdir="$(srcdir)" ./cdftest > cdfout.new
+	@cmd="$(DIFF) cdfout.new $(srcdir)/testout.sav";                \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** netCDF passes formatted test ***";                \
+	  else                                                          \
+	    echo "*** netCDF fails formatted test ***";                 \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,98 +0,0 @@
-# Makefile for netCDF library
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:46 wendling Exp $
-
-PROGRAM		= cdftest
-SWAP    	= @SWAP@
-NETLONG    	= @NETLONG@
-CPPFLAGS	= $(SWAP) $(NETLONG) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-GARBAGE		= $(PROGRAM) test.cdf cdfout.new *.hdf \
-                  hdftest hdfout.new
-HEADERS		= netcdf.h mfhdf.h local_nc.h
-XDRFILE		= @XDRFILE@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-CSRCS		= array.c attr.c cdf.c dim.c error.c file.c \
-		  globdef.c iarray.c putget.c putgetg.c sharray.c string.c \
-		  var.c xdrposix.c xdrstdio.c hdfsds.c mfsd.c nssdc.c
-MANIFEST	= Makefile.in README \
-		  depend \
-		  $(CSRCS) cdftest.c \
-		  alloc.h testout.sav descrip.mms error.h htons.mar \
-		  local_nc.h make.com msoft.mk netcdf.h ntohs.mar \
-		  test_cdf.sav hdfout.sav mfsd.c hdfsds.c hdftest.c nssdc.c
-LIBOBJS		= array.o attr.o cdf.o dim.o file.o iarray.o error.o \
-		  globdef.o putget.o putgetg.o sharray.o string.o var.o \
-		  @XDRFILE at .o hdfsds.o mfsd.o nssdc.o
-LIBRARY		= netcdf
-DEBUGLIBRARY	= netcdf_g
-PROFILEDLIBRARY	= netcdf_pg
-OBJS		= $(PROGRAM).o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= libnetcdf.a
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-
-all::		library
-
-#
-# The formatted file `cdftest_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.cdf' which should be byte-for-byte
-# identical with `test_cdf.sav', modulo small rounding errors.
-#
-test:		$(PROGRAM) hdftest
-	./$(PROGRAM) > cdfout.new
-	@cmd="diff cdfout.new testout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** netCDF passes formatted test ***"; \
-	    else \
-		echo "*** netCDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-#	@cmd="cmp test.cdf test_cdf.sav"; \
-#	    echo $$cmd; \
-#	    if $$cmd; then \
-#		echo "*** netCDF passes binary test ***"; \
-#	    else \
-#		echo "*** netCDF fails binary test ***"; \
-#		exit 1; \
-#	    fi
-
-install::	installed_library installed_headers
-
-$(PROGRAM):	$(PROGRAM).o library
-
-hdftest:	hdftest.o library        
-	$(CC) $(CFLAGS) hdftest.o $(LIBS) -o $@
-	./hdftest > hdfout.new
-	@cmd="diff hdfout.new hdfout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes formatted test ***"; \
-	    else \
-		echo "*** HDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-debug:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-g" "LIBRARY=$(LIBRARY)_g" library
-
-profiled:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-pg" "LIBRARY=$(LIBRARY)_pg" library
-
-cdftest.oc:	$(CSRCS) cdftest.c
-	#load -C $(CPPFLAGS) -I/usr/local/lang/SC1.0/ansi_include \
-	    $(CSRCS) cdftest.c /usr/local/lang/SC1.0/ansi_lib/libansi.a 
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/libsrc/array.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/array.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/array.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: array.c,v 1.15 2000/08/29 13:56:50 koziol Exp $ */
+/*	$Id: array.c,v 1.19 2003/12/10 21:15:09 epourmal Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -610,7 +610,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
 		xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		xdr_NC_fnct = xdr_int ;
 #else
 		xdr_NC_fnct = xdr_long ;

Modified: packages/libhdf4/trunk/mfhdf/libsrc/cdf.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/cdf.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/cdf.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: cdf.c,v 1.72 2000/05/23 18:03:33 acheng Exp $ */
+/*	$Id: cdf.c,v 1.79 2003/12/10 21:15:10 epourmal Exp $ */
 
 #include	"local_nc.h"
 #include	"alloc.h"
@@ -659,7 +659,7 @@
 	NC **handlep;
 {
 
-	u_long	magic = NCMAGIC ;
+	u_long	magic;
 
 	if( xdrs->x_op == XDR_FREE)
       {
@@ -669,7 +669,7 @@
 	
 	if( xdr_getpos(xdrs) != 0)
       {
-          if( !xdr_setpos(xdrs, 0L) )
+          if( !xdr_setpos(xdrs, 0) )
             {
                 nc_serror("Can't set position to begin") ;
                 return(FALSE) ;
@@ -1721,9 +1721,9 @@
 intn 
 hdf_read_dims(XDR *xdrs, NC *handle, int32 vg)
 {
-    char vgname[100] = "";
-    char vsclass[128] = "";
-    char vgclass[128] = "";
+    char vgname[MAX_NC_NAME] = "";
+    char vsclass[MAX_NC_CLASS] = "";
+    char vgclass[MAX_NC_CLASS] = "";
     int      id, count, i, found;
     int      sub_id;
     int32    dim_size;
@@ -1967,7 +1967,7 @@
     int       t, n;
     int32     vs, tag;
     int32     id = -1;
-    char      class[128] = "";
+    char      class[MAX_NC_CLASS] = "";
     intn      ret_value = FAIL;
 
 #ifdef HDF_NUM_ATTRS
@@ -2051,9 +2051,9 @@
     int       count, t, n;
     int32     vs, tag, id, vsize, attr_size, nt;
     nc_type   type;
-    char      vsname[100] = "";
+    char      vsname[MAX_NC_NAME] = "";
     char      fields[100] = "" ;
-    char      class[128] = "";
+    char      class[MAX_NC_CLASS] = "";
     char     *values = NULL;
     NC_attr **attributes = NULL;
     NC_array *Array = NULL;
@@ -2242,9 +2242,9 @@
               NC *handle, 
               int32 vg)
 {
-    char     vgname[100] = "";
-    char     subname[100] = "";
-    char     class[128] = "";
+    char     vgname[MAX_NC_NAME] = "";
+    char     subname[MAX_NC_NAME] = "";
+    char     class[MAX_NC_CLASS] = "";
     NC_var **variables = NULL;
     NC_var  *vp = NULL;
     int      ndims, *dims = NULL;
@@ -2519,6 +2519,12 @@
                         }
           
                       variables[count] = NC_new_var(vgname, type, ndims, dims);
+		      /* BMR: put back hdf type that was set wrong by 
+			 NC_new_var; please refer to the cvs history of 
+			 bug #172 for reason on this statement - 4/17/2001 
+		      */
+		      variables[count]->HDFtype = HDFtype;
+
                       vp = variables[count];
                       if(NULL == vp) 
                         {
@@ -2600,7 +2606,10 @@
                                       HDfree(vp->shape);
                                   if(vp->dsizes != NULL)
                                       HDfree(vp->dsizes);
-                      
+				  /* Reset these two pointers to NULL after 
+				     freeing.  BMR 4/11/01 */
+				  vp->shape = NULL;
+				  vp->dsizes = NULL;
                               } 
                             else 
                               {
@@ -2668,7 +2677,7 @@
 NC **handlep;
 {
 #if DEBUG
-  char            vgname[100];
+  char            vgname[MAX_NC_NAME];
   int32           entries;
 #endif
   register int32  cdf_vg = FAIL;
@@ -2676,7 +2685,7 @@
   int             status;
 #ifdef OLD_WAY
   register int    found;
-  char            class[128];
+  char            class[MAX_NC_CLASS];
 #endif /* OLD_WAY */
   CONSTR(FUNC,"hdf_read_xdr_cdf");
   intn            ret_value = SUCCEED;
@@ -3209,7 +3218,7 @@
     int        id, sub_id;
     int32      vg, dim;
     int32      vs;
-    char       class[128] = "";
+    char       class[MAX_NC_CLASS] = "";
     intn       ret_value = SUCCEED;
 #ifdef LATER
     CONSTR(FUNC,"hdf_close"); 
@@ -3553,7 +3562,7 @@
         alen /= 4 ;
 #if defined _CRAYMPP
         xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
         xdr_NC_fnct = xdr_int ;
 #else
         xdr_NC_fnct = xdr_long ;

Modified: packages/libhdf4/trunk/mfhdf/libsrc/cdftest.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/cdftest.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/cdftest.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -30,17 +30,13 @@
 
 # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}}
 
-#define MAXSHORT	32767
-#define MAXLONG		2147483647
-#define  MAXBYTE	127
+#define CDFMAXSHORT	32767
+#define CDFMAXLONG		2147483647
+#define  CDFMAXBYTE	127
 
-/*   #ifdef PC  */
-/* For CRAYMPP, an explicit include <errno.h> uses the task-local memory */
-/* errno.  Read the CRAYMPP errno.h for more explanation. */
-#if defined PC || (defined VMS) || (defined CRAYMPP)
 #include <errno.h>
-#else
-extern int errno ;
+#if defined ERRNO_MISSING
+extern int errno;
 #endif
 
 #define FILENAME		"test.cdf"
@@ -177,23 +173,23 @@
 } testvars[]  = {
 #define Byte_id 0
 	{ "Byte", NC_BYTE, "Byte sized integer variable",
-		-MAXBYTE, MAXBYTE, -MAXBYTE, MAXBYTE , "ones",
+		-CDFMAXBYTE, CDFMAXBYTE, -CDFMAXBYTE, CDFMAXBYTE , "ones",
 			2, {0,1,DONT_CARE} },
 #define Short_id 1
 	{ "Short", NC_SHORT, "Short variable",
-		-MAXSHORT, MAXSHORT, -MAXSHORT, MAXSHORT , "ones",
+		-CDFMAXSHORT, CDFMAXSHORT, -CDFMAXSHORT, CDFMAXSHORT , "ones",
 			2, {0, 2, DONT_CARE }},
 #define Long_id 2
 	{ "Long", NC_LONG, "Long Integer variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "ones",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "ones",
 			2, {1, 2, DONT_CARE}},
 #define Float_id 3
 	{ "Float", NC_FLOAT, "Single Precision Floating Point variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "flots",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "flots",
 			3, {0, 1, 2 }},
 #define Double_id 4
 	{ "Double", NC_DOUBLE, "Double Precision Floating Point variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "dflots",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "dflots",
 			3, {0, 1, 2 }},
 } ;
 #define	NUM_TESTVARS	5
@@ -261,7 +257,7 @@
 	/* zero the indices */
 
 	cc = vindices;
-	while (cc < &vindices[num_dims])
+	while (cc <= &vindices[num_dims-1])
 		*cc++ = 0; 
 
 	/* ripple counter */
@@ -306,7 +302,7 @@
 
 	sizes[0] = NUM_RECS ;
 	cc = vindices;
-	while (cc < &vindices[num_dims])
+	while (cc <= &vindices[num_dims-1])
 		*cc++ = 0; 
 
 	/* ripple counter */
@@ -702,7 +698,7 @@
 	printf("got val = %c (0x%02x) \n", got.by[0], got.by[0] ) ;
 
 	/* (void)memset(new,0,256) ; */
-	{ char *cp = new; for(; cp < &new[sizeof(new)] ; *cp++ = 0) ; }
+	{ char *cp = new; for(; cp < &new[sizeof(new)-1] ; *cp++ = 0) ; }
 	assert( ncvarget(id, Byte_id, s_start, s_edges, (ncvoid *)new) != -1 ) ;
 	printf("got val = \"%s\"\n", new) ;
 

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-aix.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-aix.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-aix.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-aix.h,v 1.5 1997/11/14 02:44:46 acheng Exp $" */
+/* "$Id: netcdf-aix.h,v 1.9 2004/11/22 18:57:11 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64) || defined AIX5L64
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-alpha.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-alpha.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-alpha.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-alpha.h,v 1.5 1997/11/14 02:44:46 acheng Exp $" */
+/* "$Id: netcdf-alpha.h,v 1.7 2004/11/22 18:57:12 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Copied: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-apple.h (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-apple.h)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-apple.h	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-apple.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,590 @@
+/* Generated automatically from netcdf.h.in by configure. */
+/*
+ *	Copyright 1993, University Corporation for Atmospheric Research
+ *
+ *  Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies, that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCAR/Unidata not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  UCAR makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.  It is
+ * provided with no support and without obligation on the part of UCAR
+ * Unidata, to assist in its use, correction, modification, or enhancement.
+ *
+ */
+/* "$Id: netcdf-apple.h,v 1.3 2004/11/22 18:57:13 epourmal Exp $" */
+
+#ifndef _NETCDF_
+#define _NETCDF_
+
+#ifdef __MWERKS__
+#ifndef HDF
+#define HDF
+#endif
+#endif /* __MWERKS__ */
+
+/*
+ * The definitions ncvoid, USE_ENUM, and MAX_NC_OPEN, may need to be set
+ * properly for your installation.
+ */
+
+/*
+ * Argument type in user functions (deprecated, backward compatibility)
+ */
+#ifndef UD_NO_VOID
+#define ncvoid    void
+#else
+/* system doesn't have void type */
+#define ncvoid    char
+#endif
+
+
+/*
+ *   If xdr_enum works properly on your system, you can define 
+ * USE_ENUM so that nc_type is an enum. 
+ * Otherwise, delete this definition so that the nc_type is
+ * an int and the valid values are #defined.
+ */
+#ifndef __MWERKS__
+#define USE_ENUM
+#endif
+
+
+/*
+ * The following macro is provided for backward compatibility only.  If you
+ * are a new user of netCDF, then you may safely ignore it.  If, however,
+ * you have an existing archive of netCDF files that use default
+ * floating-point fill values, then you should know that the definition of
+ * the default floating-point fill values changed with version 2.3 of the
+ * netCDF package.  Prior to this release, the default floating-point fill
+ * values were not very portable:  their correct behavior depended not only
+ * upon the particular platform, but also upon the compilation
+ * environment.  This led to the definition of new, default floating-point
+ * fill values that are portable across all platforms and compilation
+ * environments.  If you wish, however, to obtain the old, non-portable
+ * floating-point fill values, then the following macro should have a true
+ * value PRIOR TO BUILDING THE netCDF LIBRARY.
+ *
+ * Implementation details are contained in the section below on fill values.
+ */
+#define NC_OLD_FILLVALUES	0
+
+/*
+ * 	Fill values
+ * These values are stuffed into newly allocated space as appropriate.
+ * The hope is that one might use these to notice that a particular datum
+ * has not been set.
+ */
+
+#define FILL_BYTE	((char)-127)		/* Largest Negative value */
+#define FILL_CHAR	((char)0)
+#define FILL_SHORT	((short)-32767)
+#define FILL_LONG	((long)-2147483647)
+
+#if !NC_OLD_FILLVALUES
+
+#   define FILL_FLOAT	9.9692099683868690e+36 /* near 15 * 2^119 */
+#   define FILL_DOUBLE	9.9692099683868690e+36
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones (see `_FillValue' below).
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+/*
+ * XDR_F_INFINITY is a float value whose EXTERNAL (xdr)
+ * represention is ieee floating infinity.
+ * XDR_D_INFINITY is a double value whose EXTERNAL (xdr)
+ * represention is ieee double floating point infinity.
+ * These are used as default fill values below.
+ *
+ * This section shows three techniques for setting these:
+ *  Direct assignment (vax, cray) - works for non IEEE machines
+ *		Doesn't work when IEEE machines don't allow
+ *      float or double constants whose values are infinity.
+ *  Use of a union (preferred portable method) - should work on
+ *      any ANSI compiler with IEEE floating point representations,
+ *      modulo byte order and sizeof() considerations.
+ *  Use of pointer puns - may work with many older compilers
+ *      which don't allow intialization of unions.
+ *      Often doesn't work with compilers which have strict
+ *      alignment rules.
+ */ 
+
+    /* Direct assignment. All cases should be mutually exclusive */
+
+#ifdef vax
+#define	XDR_D_INFINITY	1.7014118346046923e+38
+#define	XDR_F_INFINITY	1.70141173e+38
+#endif /* vax */
+
+#ifdef cray
+#define	XDR_D_INFINITY	1.797693134862313000e+308
+#define	XDR_F_INFINITY	XDR_D_INFINITY
+#endif /* cray */
+
+#ifdef notdef /* you might want to try these, on an IEEE machine */
+#define XDR_D_INFINITY	1.797693134862315900e+308
+#define XDR_F_INFINITY	3.40282357e+38
+#endif
+
+#ifdef __STDC__
+    /* Use of a union, assumes IEEE representation and 1 byte unsigned char */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_UNION
+     union xdr_d_union {unsigned char bb[8]; double dd;} ;
+     extern union xdr_d_union xdr_d_infs ;  /* instantiated in array.c */
+#define XDR_D_INFINITY    (xdr_d_infs.dd)
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_UNION
+     union xdr_f_union {unsigned char bb[4]; float ff;} ;
+     extern union xdr_f_union xdr_f_infs ;  /* instantiated in array.c */
+#define  XDR_F_INFINITY    (xdr_f_infs.ff)
+#endif /* !XDR_F_INFINITY */
+
+
+#else /* __STDC__ */
+    /* Use of a pointer pun, assumes IEEE representation, 4 byte long */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_LONG_PUN
+     extern long xdr_d_infinity[] ;  /* instantiated in array.c */
+#define XDR_D_INFINITY *(double *)xdr_d_infinity
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_LONG_PUN
+     extern long xdr_f_infinity ;  /* instantiated in array.c */
+#define XDR_F_INFINITY *((float *)&xdr_f_infinity)
+#endif /* !XDR_F_INFINITY */
+
+#endif /* __STDC__ */
+
+/* End of INFINITY           section */
+
+#define FILL_FLOAT	XDR_F_INFINITY	/* IEEE Infinity */
+#define FILL_DOUBLE	XDR_D_INFINITY
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ *  masks for the struct NC flags field; passed in as 'mode' arg to
+ * nccreate and ncopen.
+ *
+ */
+#define NC_RDWR  1		/* read/write, 0 => readonly */
+#define NC_CREAT 2		/* in create phase, cleared by ncendef */
+#define NC_EXCL  4		/* on create, don't destroy existing file */
+#define NC_INDEF 8		/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+#define NC_NOFILL 0x100	/* Don't fill vars on endef and increase of record */
+#define NC_LINK 0x8000	/* isa link */
+
+#define NC_FILL 0	/* argument to ncsetfill to clear NC_NOFILL */
+
+/*
+ * 'mode' arguments for nccreate and ncopen
+ */
+#define NC_NOWRITE   0
+#define NC_WRITE     NC_RDWR
+#define NC_CLOBBER   (NC_INDEF | NC_CREAT | NC_RDWR)
+#define NC_NOCLOBBER (NC_INDEF | NC_EXCL | NC_CREAT | NC_RDWR)
+
+/*
+ * 'size' argument to ncdimdef for an unlimited dimension
+ */
+#define NC_UNLIMITED 0L
+
+/*
+ * attribute id to put/get a global attribute
+ */
+#define NC_GLOBAL -1
+
+#ifndef HDF
+/*
+ * This can be as large as the maximum number of stdio streams
+ * you can have open on your system.
+ */
+#define MAX_NC_OPEN 32
+
+/*
+ * These maximums are enforced by the interface, to facilitate writing
+ * applications and utilities.  However, nothing is statically allocated to
+ * these sizes internally.
+ */
+#define MAX_NC_DIMS 5000	 /* max dimensions per file */
+#define MAX_NC_ATTRS 3000	 /* max global or per variable attributes */
+#define MAX_NC_VARS 5000	 /* max variables per file */
+#define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_VAR_DIMS 32          /* max per variable dimensions */
+
+/*
+ * Added feature. 
+ * If you wish a variable to use a different value than the above
+ * defaults, create an attribute with the same type as the variable
+ * and the following reserved name. The value you give the attribute
+ * will be used as the fill value for that variable.
+ */
+#define _FillValue	"_FillValue"
+
+#else /* HDF */
+
+#include "hlimits.h"  /* Hard coded constants for HDF library */
+
+#endif /* HDF */
+
+#ifdef USE_ENUM
+/*
+ *  The netcdf data types
+ */
+typedef enum {
+	NC_UNSPECIFIED, /* private */
+	NC_BYTE,
+	NC_CHAR,
+	NC_SHORT,
+	NC_LONG,
+	NC_FLOAT,
+	NC_DOUBLE,
+	/* private */
+	NC_BITFIELD,
+	NC_STRING,
+	NC_IARRAY,
+	NC_DIMENSION,
+	NC_VARIABLE,
+	NC_ATTRIBUTE
+} nc_type ;
+#else
+typedef int nc_type ;
+#define	NC_UNSPECIFIED 0 /* private */
+#define	NC_BYTE 1
+#define	NC_CHAR 2
+#define	NC_SHORT 3
+#define	NC_LONG 4
+#define	NC_FLOAT 5
+#define	NC_DOUBLE 6
+	/* private */
+#define	NC_BITFIELD 7
+#define	NC_STRING 8
+#define	NC_IARRAY 9
+#define	NC_DIMENSION 10
+#define	NC_VARIABLE 11
+#define	NC_ATTRIBUTE 12
+#endif
+
+
+/*
+ * C data types corresponding to netCDF data types:
+ */
+/* Don't use these or the C++ interface gets confused
+typedef char  ncchar;
+typedef char  ncbyte;
+typedef short ncshort;
+typedef float ncfloat;
+typedef double        ncdouble;
+*/
+
+/* 
+ * Variables/attributes of type NC_LONG should use the C type 'nclong'
+ */
+#if defined _CRAYMPP
+typedef short	nclong;
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+typedef int     nclong;   
+#else
+typedef long    nclong;         /* default, compatible type */
+#endif
+
+
+/*
+ * Global netcdf error status variable
+ *  Initialized in error.c
+ */
+#define	NC_NOERR	0	/* No Error */
+#define	NC_EBADID	1	/* Not a netcdf id */
+#define	NC_ENFILE	2	/* Too many netcdfs open */
+#define	NC_EEXIST	3	/* netcdf file exists && NC_NOCLOBBER */
+#define	NC_EINVAL	4	/* Invalid Argument */
+#define	NC_EPERM	5	/* Write to read only */
+#define	NC_ENOTINDEFINE	6	/* Operation not allowed in data mode */
+#define	NC_EINDEFINE	7	/* Operation not allowed in define mode */
+#define	NC_EINVALCOORDS	8	/* Coordinates out of Domain */
+#define	NC_EMAXDIMS	9	/* MAX_NC_DIMS exceeded */
+#define	NC_ENAMEINUSE	10	/* String match to name in use */
+#define NC_ENOTATT	11	/* Attribute not found */
+#define	NC_EMAXATTS	12	/* MAX_NC_ATTRS exceeded */
+#define NC_EBADTYPE	13	/* Not a netcdf data type */
+#define NC_EBADDIM	14	/* Invalid dimension id */
+#define NC_EUNLIMPOS	15	/* NC_UNLIMITED in the wrong index */
+#define	NC_EMAXVARS	16	/* MAX_NC_VARS exceeded */
+#define NC_ENOTVAR	17	/* Variable not found */
+#define NC_EGLOBAL	18	/* Action prohibited on NC_GLOBAL varid */
+#define NC_ENOTNC	19	/* Not a netcdf file */
+#define NC_ESTS         20      /* In Fortran, string too short */
+#define NC_EMAXNAME     21      /* MAX_NC_NAME exceeded */
+#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
+#define NC_EUNLIMIT     22      /* NC_UNLIMITED size already in use */
+
+#define	NC_EXDR		32	/* */
+#define	NC_SYSERR	-1
+
+#include "hdf2netcdf.h"
+extern int ncerr ;
+
+/*
+ * Global options variable. Used to determine behavior of error handler.
+ *  Initialized in lerror.c
+ */
+#define	NC_FATAL	1
+#define	NC_VERBOSE	2
+
+extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
+
+/*
+ * NB: The following feature-test line is too long in order to accomodate a 
+ * bug in the VMS 5.3 C compiler.
+ */
+#ifndef HAVE_PROTOTYPES
+#   if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus) || defined(c_plusplus)
+#       define	HAVE_PROTOTYPES
+#   endif
+#endif
+
+#undef PROTO
+#ifdef HAVE_PROTOTYPES 
+#   define	PROTO(x)	x
+#else
+#   define	PROTO(x)	()
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int nccreate	PROTO((
+    const char*	path,
+    int		cmode
+));
+extern int ncopen	PROTO((
+    const char*	path,
+    int		mode
+));
+extern int ncredef	PROTO((
+    int		cdfid
+));
+extern int ncendef	PROTO((
+    int		cdfid
+));
+extern int ncclose	PROTO((
+    int		cdfid
+));
+extern int ncinquire	PROTO((
+    int		cdfid,
+    int*	ndims,
+    int*	nvars,
+    int*	natts, 
+    int*	recdim
+));
+extern int ncsync	PROTO((
+    int		cdfid
+));
+extern int ncabort	PROTO((
+    int		cdfid
+));
+extern int ncnobuf	PROTO((
+    int		cdfid
+));
+extern int ncdimdef	PROTO((
+    int		cdfid,
+    const char*	name,
+    long	length
+));
+extern int ncdimid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncdiminq	PROTO((
+    int		cdfid,
+    int		dimid,
+    char*	name,
+    long*	length
+));
+extern int ncdimrename	PROTO((
+    int		cdfid,
+    int		dimid,
+    const char*	name
+));
+extern int ncvardef	PROTO((
+    int		cdfid,
+    const char*	name,
+    nc_type	datatype, 
+    int		ndims,
+    const int*	dim
+));
+extern int ncvarid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncvarinq	PROTO((
+    int		cdfid,
+    int		varid,
+    char*	name,
+    nc_type*	datatype,
+    int*	ndims,
+    int*	dim,
+    int*	natts
+));
+extern int ncvarput1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    const void*	value
+));
+extern int ncvarget1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    void*	value
+));
+extern int ncvarput	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarget	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarputs	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvargets	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvarputg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void* values
+));
+extern int ncvargetg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void*	values
+));
+extern int ncvarrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int ncattput	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type	datatype,
+    int		len,
+    const void*	value
+));
+extern int ncattinq	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type*	datatype,
+    int*	len
+));
+extern int ncattget	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    void*	value
+));
+extern int ncattcopy	PROTO((
+    int		incdf,
+    int		invar,
+    const char*	name, 
+    int		outcdf,
+    int		outvar
+));
+extern int ncattname	PROTO((
+    int		cdfid,
+    int		varid,
+    int		attnum,
+    char*	name
+));
+extern int ncattrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    const char*	newname
+));
+extern int ncattdel	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int nctypelen	PROTO((
+    nc_type	datatype
+));
+extern int ncsetfill	PROTO((
+    int		cdfid,
+    int		fillmode
+));
+extern int ncrecinq		PROTO((
+    int		cdfid,
+    int*	nrecvars,
+    int*	recvarids,
+    long*	recsizes
+));
+extern int ncrecget		PROTO((
+    int		cdfid,
+    long	recnum,
+    void**	datap
+));
+extern int ncrecput		PROTO((
+    int		cdfid,
+    long	recnum,
+    void* * datap
+));
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NETCDF_ */

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-convex.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-convex.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-convex.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-convex.h,v 1.5 1997/11/14 02:44:48 acheng Exp $" */
+/* "$Id: netcdf-convex.h,v 1.7 2004/11/22 18:57:13 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-dec.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-dec.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-dec.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-dec.h,v 1.5 1997/11/14 02:44:49 acheng Exp $" */
+/* "$Id: netcdf-dec.h,v 1.7 2004/11/22 18:57:14 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fbsd.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fbsd.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fbsd.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-fbsd.h,v 1.5 1997/11/14 02:44:49 acheng Exp $" */
+/* "$Id: netcdf-fbsd.h,v 1.7 2004/11/22 18:57:15 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fujivp.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fujivp.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-fujivp.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-fujivp.h,v 1.4 1997/11/14 02:44:50 acheng Exp $" */
+/* "$Id: netcdf-fujivp.h,v 1.6 2004/11/22 18:57:16 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-hpux.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-hpux.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-hpux.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-hpux.h,v 1.5 1997/11/14 02:44:50 acheng Exp $" */
+/* "$Id: netcdf-hpux.h,v 1.7 2004/11/22 18:57:16 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-ia64.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-ia64.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-ia64.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-ia64.h,v 1.1 2000/05/23 18:07:10 acheng Exp $" */
+/* "$Id: netcdf-ia64.h,v 1.4 2004/11/22 18:57:17 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix32.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix32.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix32.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix32.h,v 1.5 1997/11/14 02:44:51 acheng Exp $" */
+/* "$Id: netcdf-irix32.h,v 1.7 2004/11/22 18:57:18 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix4.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix4.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix4.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix4.h,v 1.5 1997/11/14 02:44:52 acheng Exp $" */
+/* "$Id: netcdf-irix4.h,v 1.7 2004/11/22 18:57:18 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix5.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix5.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix5.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix5.h,v 1.5 1997/11/14 02:44:52 acheng Exp $" */
+/* "$Id: netcdf-irix5.h,v 1.7 2004/11/22 18:57:19 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix6.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix6.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-irix6.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix6.h,v 1.6 1997/11/14 02:44:53 acheng Exp $" */
+/* "$Id: netcdf-irix6.h,v 1.8 2004/11/22 18:57:20 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-linux.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-linux.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-linux.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-linux.h,v 1.5 1997/11/14 02:44:54 acheng Exp $" */
+/* "$Id: netcdf-linux.h,v 1.9 2004/11/22 18:57:20 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-mac.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-mac.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-mac.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-mac.h,v 1.5 1997/11/14 02:44:54 acheng Exp $" */
+/* "$Id: netcdf-mac.h,v 1.7 2004/11/22 18:57:21 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -352,6 +352,7 @@
 #define	NC_FATAL	1
 #define	NC_VERBOSE	2
 
+#include "hdf2netcdf.h"
 extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,11 +15,19 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-solaris.h,v 1.5 1997/11/14 02:44:55 acheng Exp $" */
+/* "$Id: netcdf-solaris.h,v 1.8 2004/11/22 18:57:22 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
 
+#ifdef __sparcv9
+/*
+ * This header must be included before the _LP64 macro is checked when
+ * compiling for 64-bit libraries. (At least on Solaris 2.8...)
+ */
+#include <stdio.h> 
+#endif  /* __sparcv9 */
+
 #ifdef __MWERKS__
 #ifndef HDF
 #define HDF
@@ -304,7 +312,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +351,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +380,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Copied: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris64.h (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris64.h)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris64.h	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solaris64.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,595 @@
+/* Generated automatically from netcdf.h.in by configure. */
+/*
+ *	Copyright 1993, University Corporation for Atmospheric Research
+ *
+ *  Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies, that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCAR/Unidata not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  UCAR makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.  It is
+ * provided with no support and without obligation on the part of UCAR
+ * Unidata, to assist in its use, correction, modification, or enhancement.
+ *
+ */
+/* "$Id: netcdf-solaris64.h,v 1.2 2004/11/22 18:57:22 epourmal Exp $" */
+
+#ifndef _NETCDF_
+#define _NETCDF_
+
+/* This header must be included before the _LP64 macro is checked when
+ * compiling for 64-bit libraries. (At least on Solaris 2.8...)
+ */
+#include <stdio.h>
+
+#ifdef __MWERKS__
+#ifndef HDF
+#define HDF
+#endif
+#endif /* __MWERKS__ */
+
+/*
+ * The definitions ncvoid, USE_ENUM, and MAX_NC_OPEN, may need to be set
+ * properly for your installation.
+ */
+
+/*
+ * Argument type in user functions (deprecated, backward compatibility)
+ */
+#ifndef UD_NO_VOID
+#define ncvoid    void
+#else
+/* system doesn't have void type */
+#define ncvoid    char
+#endif
+
+
+/*
+ *   If xdr_enum works properly on your system, you can define 
+ * USE_ENUM so that nc_type is an enum. 
+ * Otherwise, delete this definition so that the nc_type is
+ * an int and the valid values are #defined.
+ */
+#ifndef __MWERKS__
+#define USE_ENUM
+#endif
+
+
+/*
+ * The following macro is provided for backward compatibility only.  If you
+ * are a new user of netCDF, then you may safely ignore it.  If, however,
+ * you have an existing archive of netCDF files that use default
+ * floating-point fill values, then you should know that the definition of
+ * the default floating-point fill values changed with version 2.3 of the
+ * netCDF package.  Prior to this release, the default floating-point fill
+ * values were not very portable:  their correct behavior depended not only
+ * upon the particular platform, but also upon the compilation
+ * environment.  This led to the definition of new, default floating-point
+ * fill values that are portable across all platforms and compilation
+ * environments.  If you wish, however, to obtain the old, non-portable
+ * floating-point fill values, then the following macro should have a true
+ * value PRIOR TO BUILDING THE netCDF LIBRARY.
+ *
+ * Implementation details are contained in the section below on fill values.
+ */
+#define NC_OLD_FILLVALUES	0
+
+/*
+ * 	Fill values
+ * These values are stuffed into newly allocated space as appropriate.
+ * The hope is that one might use these to notice that a particular datum
+ * has not been set.
+ */
+
+#define FILL_BYTE	((char)-127)		/* Largest Negative value */
+#define FILL_CHAR	((char)0)
+#define FILL_SHORT	((short)-32767)
+#define FILL_LONG	((long)-2147483647)
+
+#if !NC_OLD_FILLVALUES
+
+#   define FILL_FLOAT	9.9692099683868690e+36 /* near 15 * 2^119 */
+#   define FILL_DOUBLE	9.9692099683868690e+36
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones (see `_FillValue' below).
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+/*
+ * XDR_F_INFINITY is a float value whose EXTERNAL (xdr)
+ * represention is ieee floating infinity.
+ * XDR_D_INFINITY is a double value whose EXTERNAL (xdr)
+ * represention is ieee double floating point infinity.
+ * These are used as default fill values below.
+ *
+ * This section shows three techniques for setting these:
+ *  Direct assignment (vax, cray) - works for non IEEE machines
+ *		Doesn't work when IEEE machines don't allow
+ *      float or double constants whose values are infinity.
+ *  Use of a union (preferred portable method) - should work on
+ *      any ANSI compiler with IEEE floating point representations,
+ *      modulo byte order and sizeof() considerations.
+ *  Use of pointer puns - may work with many older compilers
+ *      which don't allow intialization of unions.
+ *      Often doesn't work with compilers which have strict
+ *      alignment rules.
+ */ 
+
+    /* Direct assignment. All cases should be mutually exclusive */
+
+#ifdef vax
+#define	XDR_D_INFINITY	1.7014118346046923e+38
+#define	XDR_F_INFINITY	1.70141173e+38
+#endif /* vax */
+
+#ifdef cray
+#define	XDR_D_INFINITY	1.797693134862313000e+308
+#define	XDR_F_INFINITY	XDR_D_INFINITY
+#endif /* cray */
+
+#ifdef notdef /* you might want to try these, on an IEEE machine */
+#define XDR_D_INFINITY	1.797693134862315900e+308
+#define XDR_F_INFINITY	3.40282357e+38
+#endif
+
+#ifdef __STDC__
+    /* Use of a union, assumes IEEE representation and 1 byte unsigned char */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_UNION
+     union xdr_d_union {unsigned char bb[8]; double dd;} ;
+     extern union xdr_d_union xdr_d_infs ;  /* instantiated in array.c */
+#define XDR_D_INFINITY    (xdr_d_infs.dd)
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_UNION
+     union xdr_f_union {unsigned char bb[4]; float ff;} ;
+     extern union xdr_f_union xdr_f_infs ;  /* instantiated in array.c */
+#define  XDR_F_INFINITY    (xdr_f_infs.ff)
+#endif /* !XDR_F_INFINITY */
+
+
+#else /* __STDC__ */
+    /* Use of a pointer pun, assumes IEEE representation, 4 byte long */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_LONG_PUN
+     extern long xdr_d_infinity[] ;  /* instantiated in array.c */
+#define XDR_D_INFINITY *(double *)xdr_d_infinity
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_LONG_PUN
+     extern long xdr_f_infinity ;  /* instantiated in array.c */
+#define XDR_F_INFINITY *((float *)&xdr_f_infinity)
+#endif /* !XDR_F_INFINITY */
+
+#endif /* __STDC__ */
+
+/* End of INFINITY           section */
+
+#define FILL_FLOAT	XDR_F_INFINITY	/* IEEE Infinity */
+#define FILL_DOUBLE	XDR_D_INFINITY
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ *  masks for the struct NC flags field; passed in as 'mode' arg to
+ * nccreate and ncopen.
+ *
+ */
+#define NC_RDWR  1		/* read/write, 0 => readonly */
+#define NC_CREAT 2		/* in create phase, cleared by ncendef */
+#define NC_EXCL  4		/* on create, don't destroy existing file */
+#define NC_INDEF 8		/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+#define NC_NOFILL 0x100	/* Don't fill vars on endef and increase of record */
+#define NC_LINK 0x8000	/* isa link */
+
+#define NC_FILL 0	/* argument to ncsetfill to clear NC_NOFILL */
+
+/*
+ * 'mode' arguments for nccreate and ncopen
+ */
+#define NC_NOWRITE   0
+#define NC_WRITE     NC_RDWR
+#define NC_CLOBBER   (NC_INDEF | NC_CREAT | NC_RDWR)
+#define NC_NOCLOBBER (NC_INDEF | NC_EXCL | NC_CREAT | NC_RDWR)
+
+/*
+ * 'size' argument to ncdimdef for an unlimited dimension
+ */
+#define NC_UNLIMITED 0L
+
+/*
+ * attribute id to put/get a global attribute
+ */
+#define NC_GLOBAL -1
+
+#ifndef HDF
+/*
+ * This can be as large as the maximum number of stdio streams
+ * you can have open on your system.
+ */
+#define MAX_NC_OPEN 32
+
+/*
+ * These maximums are enforced by the interface, to facilitate writing
+ * applications and utilities.  However, nothing is statically allocated to
+ * these sizes internally.
+ */
+#define MAX_NC_DIMS 5000	 /* max dimensions per file */
+#define MAX_NC_ATTRS 3000	 /* max global or per variable attributes */
+#define MAX_NC_VARS 5000	 /* max variables per file */
+#define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_VAR_DIMS 32          /* max per variable dimensions */
+
+/*
+ * Added feature. 
+ * If you wish a variable to use a different value than the above
+ * defaults, create an attribute with the same type as the variable
+ * and the following reserved name. The value you give the attribute
+ * will be used as the fill value for that variable.
+ */
+#define _FillValue	"_FillValue"
+
+#else /* HDF */
+
+#include "hlimits.h"  /* Hard coded constants for HDF library */
+
+#endif /* HDF */
+
+#ifdef USE_ENUM
+/*
+ *  The netcdf data types
+ */
+typedef enum {
+	NC_UNSPECIFIED, /* private */
+	NC_BYTE,
+	NC_CHAR,
+	NC_SHORT,
+	NC_LONG,
+	NC_FLOAT,
+	NC_DOUBLE,
+	/* private */
+	NC_BITFIELD,
+	NC_STRING,
+	NC_IARRAY,
+	NC_DIMENSION,
+	NC_VARIABLE,
+	NC_ATTRIBUTE
+} nc_type ;
+#else
+typedef int nc_type ;
+#define	NC_UNSPECIFIED 0 /* private */
+#define	NC_BYTE 1
+#define	NC_CHAR 2
+#define	NC_SHORT 3
+#define	NC_LONG 4
+#define	NC_FLOAT 5
+#define	NC_DOUBLE 6
+	/* private */
+#define	NC_BITFIELD 7
+#define	NC_STRING 8
+#define	NC_IARRAY 9
+#define	NC_DIMENSION 10
+#define	NC_VARIABLE 11
+#define	NC_ATTRIBUTE 12
+#endif
+
+
+/*
+ * C data types corresponding to netCDF data types:
+ */
+/* Don't use these or the C++ interface gets confused
+typedef char  ncchar;
+typedef char  ncbyte;
+typedef short ncshort;
+typedef float ncfloat;
+typedef double        ncdouble;
+*/
+
+/* 
+ * Variables/attributes of type NC_LONG should use the C type 'nclong'
+ */
+#if defined _CRAYMPP
+typedef short	nclong;
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+typedef int     nclong;   
+#else
+typedef long    nclong;         /* default, compatible type */
+#endif
+
+
+/*
+ * Global netcdf error status variable
+ *  Initialized in error.c
+ */
+#define	NC_NOERR	0	/* No Error */
+#define	NC_EBADID	1	/* Not a netcdf id */
+#define	NC_ENFILE	2	/* Too many netcdfs open */
+#define	NC_EEXIST	3	/* netcdf file exists && NC_NOCLOBBER */
+#define	NC_EINVAL	4	/* Invalid Argument */
+#define	NC_EPERM	5	/* Write to read only */
+#define	NC_ENOTINDEFINE	6	/* Operation not allowed in data mode */
+#define	NC_EINDEFINE	7	/* Operation not allowed in define mode */
+#define	NC_EINVALCOORDS	8	/* Coordinates out of Domain */
+#define	NC_EMAXDIMS	9	/* MAX_NC_DIMS exceeded */
+#define	NC_ENAMEINUSE	10	/* String match to name in use */
+#define NC_ENOTATT	11	/* Attribute not found */
+#define	NC_EMAXATTS	12	/* MAX_NC_ATTRS exceeded */
+#define NC_EBADTYPE	13	/* Not a netcdf data type */
+#define NC_EBADDIM	14	/* Invalid dimension id */
+#define NC_EUNLIMPOS	15	/* NC_UNLIMITED in the wrong index */
+#define	NC_EMAXVARS	16	/* MAX_NC_VARS exceeded */
+#define NC_ENOTVAR	17	/* Variable not found */
+#define NC_EGLOBAL	18	/* Action prohibited on NC_GLOBAL varid */
+#define NC_ENOTNC	19	/* Not a netcdf file */
+#define NC_ESTS         20      /* In Fortran, string too short */
+#define NC_EMAXNAME     21      /* MAX_NC_NAME exceeded */
+#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
+#define NC_EUNLIMIT     22      /* NC_UNLIMITED size already in use */
+
+#define	NC_EXDR		32	/* */
+#define	NC_SYSERR	-1
+
+#include "hdf2netcdf.h"
+extern int ncerr ;
+
+/*
+ * Global options variable. Used to determine behavior of error handler.
+ *  Initialized in lerror.c
+ */
+#define	NC_FATAL	1
+#define	NC_VERBOSE	2
+
+extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
+
+/*
+ * NB: The following feature-test line is too long in order to accomodate a 
+ * bug in the VMS 5.3 C compiler.
+ */
+#ifndef HAVE_PROTOTYPES
+#   if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus) || defined(c_plusplus)
+#       define	HAVE_PROTOTYPES
+#   endif
+#endif
+
+#undef PROTO
+#ifdef HAVE_PROTOTYPES 
+#   define	PROTO(x)	x
+#else
+#   define	PROTO(x)	()
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int nccreate	PROTO((
+    const char*	path,
+    int		cmode
+));
+extern int ncopen	PROTO((
+    const char*	path,
+    int		mode
+));
+extern int ncredef	PROTO((
+    int		cdfid
+));
+extern int ncendef	PROTO((
+    int		cdfid
+));
+extern int ncclose	PROTO((
+    int		cdfid
+));
+extern int ncinquire	PROTO((
+    int		cdfid,
+    int*	ndims,
+    int*	nvars,
+    int*	natts, 
+    int*	recdim
+));
+extern int ncsync	PROTO((
+    int		cdfid
+));
+extern int ncabort	PROTO((
+    int		cdfid
+));
+extern int ncnobuf	PROTO((
+    int		cdfid
+));
+extern int ncdimdef	PROTO((
+    int		cdfid,
+    const char*	name,
+    long	length
+));
+extern int ncdimid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncdiminq	PROTO((
+    int		cdfid,
+    int		dimid,
+    char*	name,
+    long*	length
+));
+extern int ncdimrename	PROTO((
+    int		cdfid,
+    int		dimid,
+    const char*	name
+));
+extern int ncvardef	PROTO((
+    int		cdfid,
+    const char*	name,
+    nc_type	datatype, 
+    int		ndims,
+    const int*	dim
+));
+extern int ncvarid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncvarinq	PROTO((
+    int		cdfid,
+    int		varid,
+    char*	name,
+    nc_type*	datatype,
+    int*	ndims,
+    int*	dim,
+    int*	natts
+));
+extern int ncvarput1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    const void*	value
+));
+extern int ncvarget1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    void*	value
+));
+extern int ncvarput	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarget	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarputs	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvargets	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvarputg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void* values
+));
+extern int ncvargetg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void*	values
+));
+extern int ncvarrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int ncattput	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type	datatype,
+    int		len,
+    const void*	value
+));
+extern int ncattinq	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type*	datatype,
+    int*	len
+));
+extern int ncattget	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    void*	value
+));
+extern int ncattcopy	PROTO((
+    int		incdf,
+    int		invar,
+    const char*	name, 
+    int		outcdf,
+    int		outvar
+));
+extern int ncattname	PROTO((
+    int		cdfid,
+    int		varid,
+    int		attnum,
+    char*	name
+));
+extern int ncattrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    const char*	newname
+));
+extern int ncattdel	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int nctypelen	PROTO((
+    nc_type	datatype
+));
+extern int ncsetfill	PROTO((
+    int		cdfid,
+    int		fillmode
+));
+extern int ncrecinq		PROTO((
+    int		cdfid,
+    int*	nrecvars,
+    int*	recvarids,
+    long*	recsizes
+));
+extern int ncrecget		PROTO((
+    int		cdfid,
+    long	recnum,
+    void**	datap
+));
+extern int ncrecput		PROTO((
+    int		cdfid,
+    long	recnum,
+    void* * datap
+));
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NETCDF_ */

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solarisx86.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solarisx86.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-solarisx86.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-solarisx86.h,v 1.5 1997/11/14 02:44:56 acheng Exp $" */
+/* "$Id: netcdf-solarisx86.h,v 1.7 2004/11/22 18:57:23 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-sun.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-sun.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-sun.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-sun.h,v 1.5 1997/11/14 02:44:56 acheng Exp $" */
+/* "$Id: netcdf-sun.h,v 1.7 2004/11/22 18:57:24 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-t3e.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-t3e.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-t3e.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-t3e.h,v 1.3 1997/11/14 02:44:57 acheng Exp $" */
+/* "$Id: netcdf-t3e.h,v 1.5 2004/11/22 18:57:24 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-unicos.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-unicos.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-unicos.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-unicos.h,v 1.5 1997/11/14 02:44:58 acheng Exp $" */
+/* "$Id: netcdf-unicos.h,v 1.7 2004/11/22 18:57:25 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-vms.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-vms.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/config/netcdf-vms.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-vms.h,v 1.5 1997/11/14 02:44:58 acheng Exp $" */
+/* "$Id: netcdf-vms.h,v 1.7 2004/11/22 18:57:26 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/hdf2netcdf.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/hdf2netcdf.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/hdf2netcdf.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,4 +1,4 @@
-/* $Id: hdf2netcdf.h,v 1.1 1996/05/07 22:13:01 acheng Exp $ */
+/* $Id: hdf2netcdf.h,v 1.2 2004/11/22 18:57:08 epourmal Exp $ */
 
 /* If we disable the HDF version of the netCDF API (ncxxx interface)
    (-DHAVE_NETCDF) we need to rename all the relevant function names 
@@ -14,6 +14,8 @@
    need to mangle the HDF versions of netCDF API function names 
    to not conflict w/ oriinal netCDF ones */
 #ifdef HAVE_NETCDF
+#define ncerr     HNAME(ncerr)
+#define ncopts    HNAME(ncopts)
 #define nccreate  HNAME(nccreate)
 #define ncopen    HNAME(ncopen)
 #define ncredef   HNAME(ncredef)

Modified: packages/libhdf4/trunk/mfhdf/libsrc/hdftest.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/hdftest.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/hdftest.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.57 $";
+static char RcsId[] = "@(#)$Revision: 1.73 $";
 #endif
 
-/* $Id: hdftest.c,v 1.57 1999/02/25 08:18:07 bmribler Exp $ */
+/* $Id: hdftest.c,v 1.73 2005/02/11 06:07:58 bmribler Exp $ */
 
 #include "mfhdf.h"
 
@@ -24,14 +24,8 @@
 
 #ifdef HDF
 
-/* Macro to check status value and print error message */
-#define CHECK(status, fail_value, name) {if(status == fail_value) { \
-    printf("*** Routine %s FAILED at line %d ***\n", name, __LINE__); num_err++;}}
-/* BMR - 2/21/99: added macro VERIFY to use in testing SDcheckempty */
-#define VERIFY(item, value, test_name) {if(item != value) { \
-    printf("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", test_name, (long)item,(int)__LINE__,__FILE__); num_err++;}}
+#include "hdftest.h"
 
-
 #define UFOFILE   "file.UFO"	/* non-existing file */
 #define FILE1     "test1.hdf"
 #define FILE2     "test2.hdf"
@@ -205,6 +199,11 @@
         { 110, 111, 112, 113},
         { 120, 121, 122, 123}}};
 
+extern int test_szip_compression();
+extern int test_checkempty();
+extern int test_idtest();
+extern int test_sd();
+
 static intn
 test_chunk()
 {
@@ -223,6 +222,8 @@
     uint16  fill_u16 = 0;        /* fill value */
     HDF_CHUNK_DEF chunk_def;     /* Chunk defintion set */ 
     HDF_CHUNK_DEF rchunk_def;    /* Chunk defintion read */ 
+    comp_coder_t comp_type;      /* to retrieve compression type into */
+    comp_info cinfo;             /* compression information structure */
     int32   cflags;              /* chunk flags */
     int32   index;       /* Index of dataset in file */
     intn    status;      /* status flag */
@@ -231,7 +232,7 @@
     int32   idata[100];
     int32   rdata[100];
     float32 max;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
 
     /* Create file 'chktst.hdf' */
     fchk = SDstart(CHKFILE, DFACC_CREATE);
@@ -247,7 +248,7 @@
     if(newsds8 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to create a new data set \n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -264,7 +265,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -273,7 +274,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -287,7 +288,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to write u16_2data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -309,7 +310,7 @@
                     fprintf(stderr,"u16_cdata[%d][%d]=%d,",
                             i,j,u16_2data[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
@@ -318,7 +319,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -328,7 +329,7 @@
     if (cdims[0] != rcdims[0] || cdims[1] != rcdims[1] || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 1. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -350,7 +351,7 @@
     if(newsds7 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2. Failed to create a new data set \n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -367,7 +368,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -376,7 +377,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -389,7 +390,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -400,7 +401,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -411,7 +412,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -422,7 +423,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -433,7 +434,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -444,7 +445,7 @@
      if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -471,7 +472,7 @@
                     fprintf(stderr,"u16_2cdata[%d][%d]=%d,",
                             i,j,u16_2cdata[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
@@ -480,7 +481,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -490,7 +491,7 @@
     if (cdims[0] != rcdims[0] || cdims[1] != rcdims[1] || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 2.SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -512,7 +513,7 @@
     if(newsds4 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to create a new 3D float32 data set \n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -528,7 +529,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -543,7 +544,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to write f32_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -570,7 +571,7 @@
                         fprintf(stderr,"f32_data[%d][%d][%d]=%f,",
                                 i,j,k,f32_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -593,7 +594,7 @@
     if(newsds5 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to set a new uint16 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -610,7 +611,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -619,7 +620,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -634,7 +635,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to write u16_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -660,7 +661,7 @@
                         fprintf(stderr,"u16_data[%d][%d][%d]=%d,",
                                 i,j,k,u16_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -670,7 +671,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -680,7 +681,7 @@
         || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 4. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -701,7 +702,7 @@
     if(newsds6 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to set a new uint8 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -713,7 +714,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -729,7 +730,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to write wu8_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 #endif
@@ -742,7 +743,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -753,7 +754,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -764,7 +765,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -775,7 +776,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -786,7 +787,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -797,7 +798,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -823,7 +824,7 @@
                         fprintf(stderr,"u8_data[%d][%d][%d]=%d,",
                                 i,j,k,u8_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -836,7 +837,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -847,7 +848,7 @@
             {
                 printf("Chunk Test 5. chunk1_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk1_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -858,7 +859,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -869,7 +870,7 @@
             {
                 printf("Chunk Test 5. chunk2_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk2_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
     start_dims[0] = 0;
@@ -879,7 +880,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -890,7 +891,7 @@
             {
                 printf("Chunk Test 5. chunk3_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk3_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -901,7 +902,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -912,7 +913,7 @@
             {
                 printf("Chunk Test 5. chunk4_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk4_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -923,7 +924,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -934,7 +935,7 @@
             {
                 printf("Chunk Test 5. chunk5_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk5_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -945,7 +946,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -956,7 +957,7 @@
             {
                 printf("Chunk Test 5. chunk6_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk6_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -974,6 +975,7 @@
      * Test 6. Create a new chunked SDS of uint8 in file 1 
      *         Compress using Skipping Huffman. Write using SDwriteChunk
      *         Read back in using SDreaddata and SDreadChunk. 
+     *	       Retrieve and verify the compression information.
      *         Use Skipping Huffman compression
      *         Note: a template is created first then the SDS 
      *               is re-slected for writing/reading.
@@ -987,7 +989,7 @@
     if(newsds6 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. Failed to set a new uint8 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -998,6 +1000,9 @@
 #if 0
     chunk_def.comp.comp_type = COMP_CODE_RLE;
 #endif
+    /* the test for SDgetcompress relies on this compression setting , so 
+       if the setting is changed, please ensure that the verification of 
+       the next call to SDgetcompress below is still valid - BMR */
     chunk_def.comp.comp_type = COMP_CODE_SKPHUFF; /* Skipping Huffman */
     chunk_def.comp.cinfo.skphuff.skp_size = sizeof(uint16);
 
@@ -1005,7 +1010,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. Failed to create new chunked, Skipping Huffman compressed data set\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1015,21 +1020,32 @@
 
     newsds6 = FAIL;
 
-    /* Select same SDS again, fist get index */
+    /* Select same SDS again, first get index */
     if ((index = SDnametoindex(fchk,"DataSetChunked_3D_SKIP_HUF_2")) == FAIL)
       {
           fprintf(stderr, "Chunk Test 6. SDnametoindex  Failed for  Skipping Huffman compressed data set\n");
-          num_err++;
+          num_errs++;
           goto test7;
       }
 
     if ((newsds6 = SDselect(fchk,index)) == FAIL)
       {
           fprintf(stderr, "Chunk Test 6. SDselect Failed to re-select new chunked, Skipping Huffman compressed data set\n");
-          num_err++;
+          num_errs++;
           goto test7;
       }
 
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds6, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, chunk_def.comp.comp_type, "SDgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, chunk_def.comp.cinfo.skphuff.skp_size, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* Write data use SDwriteChunk */
     start_dims[0] = 0;
     start_dims[1] = 0;
@@ -1038,7 +1054,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1049,7 +1065,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1060,7 +1076,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1071,7 +1087,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1082,7 +1098,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1093,7 +1109,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1119,7 +1135,7 @@
                         fprintf(stderr,"u8_data[%d][%d][%d]=%d,",
                                 i,j,k,u8_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -1132,7 +1148,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1143,7 +1159,7 @@
             {
                 printf("Chunk Test 6. chunk1_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk1_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1154,7 +1170,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1165,7 +1181,7 @@
             {
                 printf("Chunk Test 6. chunk2_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk2_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
     start_dims[0] = 0;
@@ -1175,7 +1191,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1186,7 +1202,7 @@
             {
                 printf("Chunk Test 6. chunk3_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk3_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1197,7 +1213,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "SDreadchunk failed to read chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1208,7 +1224,7 @@
             {
                 printf("Chunk Test 6. chunk4_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk4_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1219,7 +1235,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1230,7 +1246,7 @@
             {
                 printf("Chunk Test 6. chunk5_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk5_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1241,7 +1257,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1252,7 +1268,7 @@
             {
                 printf("Chunk Test 6. chunk6_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk6_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1269,17 +1285,17 @@
 
     d_dims[0] = 9;
     d_dims[1] = 4;
-    newsds8 = SDcreate(fchk, "DataSetChunked_2D_GZIP_1", DFNT_UINT16, 2, d_dims);
-    if(newsds8 == FAIL) 
+    newsds7 = SDcreate(fchk, "DataSetChunked_2D_GZIP_1", DFNT_UINT16, 2, d_dims);
+    if(newsds7 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to create a new 2D uint16 data set \n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* set fill value */
     fill_u16 = 0;
-    status = SDsetfillvalue(newsds8, (VOIDP) &fill_u16);
+    status = SDsetfillvalue(newsds7, (VOIDP) &fill_u16);
     CHECK(status, FAIL, "Chunk Test 7. SDsetfillvalue");
 
     /* Create chunked SDS 
@@ -1293,23 +1309,26 @@
     chunk_def.comp.comp_type = COMP_CODE_SKPHUFF; /* Skipping Huffman */
     chunk_def.comp.cinfo.skphuff.skp_size = sizeof(uint16);
 #endif
+    /* the test for SDgetcompress relies on this compression setting , so 
+       if the setting is changed, please ensure that the verification of 
+       the next call to SDgetcompress below is still valid - BMR */
     chunk_def.comp.comp_type = COMP_CODE_DEFLATE; /* GZIP */
     chunk_def.comp.cinfo.deflate.level = 6;
 
-    status = SDsetchunk(newsds8, chunk_def, HDF_CHUNK | HDF_COMP);
+    status = SDsetchunk(newsds7, chunk_def, HDF_CHUNK | HDF_COMP);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to create new chunked, GZIP Compressed data set\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* Set Chunk cache to hold 2 chunks */
-    status = SDsetchunkcache(newsds8, 2, 0);
+    status = SDsetchunkcache(newsds7, 2, 0);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1319,11 +1338,11 @@
     start_dims[1] = 0;
     edge_dims[0] = 9;
     edge_dims[1] = 4;
-    status = SDwritedata(newsds8, start_dims, NULL, edge_dims, (VOIDP) u16_2data);
+    status = SDwritedata(newsds7, start_dims, NULL, edge_dims, (VOIDP) u16_2data);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to write u16_2data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1332,7 +1351,7 @@
     start_dims[1] = 0;
     edge_dims[0] = 9;
     edge_dims[1] = 4;
-    status = SDreaddata(newsds8, start_dims, NULL, edge_dims, (VOIDP) inbuf1_2u16);
+    status = SDreaddata(newsds7, start_dims, NULL, edge_dims, (VOIDP) inbuf1_2u16);
     CHECK(status, FAIL, "Chunk Test 7. SDreaddata");
     for (i = 0; i < 9; i++)
       {
@@ -1345,16 +1364,16 @@
                     fprintf(stderr,"u16_cdata[%d][%d]=%d,",
                             i,j,u16_2data[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
     /* Get chunk lengths */
-    status = SDgetchunkinfo(newsds8, &rchunk_def, &cflags);
+    status = SDgetchunkinfo(newsds7, &rchunk_def, &cflags);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1365,14 +1384,44 @@
         || cflags != (HDF_CHUNK | HDF_COMP))
       {
         fprintf(stderr, "Chunk Test 7. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* Close down this SDS*/    
-    status = SDendaccess(newsds8);
+    status = SDendaccess(newsds7);
     CHECK(status, FAIL, "Chunk Test 7. SDendaccess");
 
+    /*
+     * Added to test getting compression information for chunked SDS - 
+     * bug# 307, 10/10/01 - BMR
+     */
+    /* Select same SDS again, first get index */
+    if ((index = SDnametoindex(fchk,"DataSetChunked_2D_GZIP_1")) == FAIL)
+      {
+          fprintf(stderr, "Chunk Test 7. SDnametoindex  Failed for GZIP compressed data set\n");
+          num_errs++;
+          goto test8;
+      }
+
+    if ((newsds7 = SDselect(fchk,index)) == FAIL)
+      {
+          fprintf(stderr, "Chunk Test 7. SDselect Failed to re-select new chunked, GZIP compressed data set\n");
+          num_errs++;
+          goto test8;
+      }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds7, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, chunk_def.comp.comp_type, "SDgetcompress");
+    VERIFY(cinfo.deflate.level, chunk_def.comp.cinfo.deflate.level, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* Close down file 'chktst.hdf' */
     status = SDend(fchk);
     CHECK(status, FAIL, "SDend");
@@ -1398,13 +1447,12 @@
     if(newsds == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDcreate Failed to create a new chunked, nbit data set \n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
     for(i = 0; i < 25; i++)
         idata[i] = i*10;
-
     /* Create chunked SDS with NBIT compression.
        chunk is 2x2 which will create 9 chunks.*/
     cdims[0] = chunk_def.nbit.chunk_lengths[0] = 2;
@@ -1417,7 +1465,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDsetchunk Failed to create new chunked, NBIT data set\n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1444,7 +1492,7 @@
     if(newsds2 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. Failed to select a data set for n-bit access\n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1461,7 +1509,7 @@
           {
             fprintf(stderr,"Chunk Test 8. Bogus val in loc %d in n-bit dset want %ld got %ld\n",
 		    i, (long)idata[i], (long)rdata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -1470,7 +1518,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1486,10 +1534,27 @@
         fprintf(stderr, "Chunk Test 8. cdims[%d] =%d \n", 1, (int)cdims[1]);
         fprintf(stderr, "Chunk Test 8. rcdims[%d] =%d \n", 0, (int)rcdims[0]);
         fprintf(stderr, "Chunk Test 8. rcdims[%d] =%d \n", 1, (int)cdims[1]);
-        num_err++;
+        num_errs++;
         goto done;
       }
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
 
+    /* Note: the struct nbit in the union HDF_CHUNK_DEF seems like an extra
+	thing since comp_info also has nbit, but the HDF_CHUNK_DEF.nbit was
+	used to set the compression info so it's also used here to verify */ 
+    VERIFY(comp_type, COMP_CODE_NBIT, "SDgetcompress");
+    VERIFY(cinfo.nbit.sign_ext, chunk_def.nbit.sign_ext, "SDgetcompress");
+    VERIFY(cinfo.nbit.fill_one, chunk_def.nbit.fill_one, "SDgetcompress");
+    VERIFY(cinfo.nbit.start_bit, chunk_def.nbit.start_bit, "SDgetcompress");
+    VERIFY(cinfo.nbit.bit_len, chunk_def.nbit.bit_len, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* end access to SDS */
     status = SDendaccess(newsds2);
     CHECK(status, FAIL, "Chunk Test 8. SDendaccess");
@@ -1500,7 +1565,7 @@
 
   done:
 
-    return num_err;
+    return num_errs;
 } /* test_chunk() */
 #endif /* CHUNK_TEST */
 
@@ -1508,6 +1573,8 @@
 static int16  netcdf_u16[2][3] = {{1, 2, 3}, 
                                    {4, 5, 6}};
 
+char    testfile[512] = "";
+
 /* Tests reading of netCDF file 'test1.nc' using the SDxxx inteface.
    Note not all features of reading SDS from netCDF files are tested here.
    Hopefully more tests will be added over time as needed/required. */
@@ -1529,10 +1596,19 @@
 	char name[MAX_NC_NAME];
     int32 status;
     intn i, j;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
+    const char *basename = "test1.nc";
+    char   *srcdir = getenv("srcdir");
 
-	/* Open the file 'test1.nc' and initialize the SDxxx interface. */
-	sd_id = SDstart("test1.nc", DFACC_RDONLY);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(basename) + 1) < sizeof(testfile))) {
+        strcpy(testfile, srcdir);
+        strcat(testfile, "/");
+    }
+    strcat(testfile, basename);
+
+    /* Open the file 'test1.nc' and initialize the SDxxx interface. */
+    sd_id = SDstart(testfile, DFACC_RDONLY);
     CHECK(sd_id, FAIL, "netCDF Read Test 1. SDstart failed on file test1.nc");
 
 	/* Determine the contents of the file. */
@@ -1543,13 +1619,13 @@
     if (n_datasets != 8 )
       {
           fprintf(stderr,"netCDF Read Test 1: SDfileinfo returned wrong number of datasets in file test1.nc \n");
-          num_err++;
+          num_errs++;
       }
 
     if (n_file_attrs != 1 )
       {
           fprintf(stderr,"netCDF Read Test 1: SDfileinfo returned wrong number of file attributes in file test1.nc \n");
-          num_err++;
+          num_errs++;
       }
 
 	/* Access and find the 2-dim dataset of data-type shorts(DFNT_INT16). 
@@ -1595,14 +1671,1000 @@
 	status = SDend(sd_id);
     CHECK(status, FAIL, "netCDF Read Test 1. SDend failed for file test1.nc");
 
-    return num_err;
+    return num_errs;
 } /* test_netcdf_reading() */
 #endif /* NETCDF_READ_TEST */
 
+/* This test is added to test SDsetdimscale while fixing bug #172.
+   Beside the fact that the main program was already very long, adding
+   this separate test routine will also define a place for additional
+   dimension tests to be appended in the future.  Also, hopefully, some
+   day, the main program can be shortened and some of its
+   dimension-related tests can be moved into this test routine - 04/18/01
+*/
+
+/********************************************************************
+   Name: test_dimensions()
+
+   Description: 
+	This test routine is used to test various dimension operations.
+	The main contents include:
+	- creates the file dim.hdf
+	- creates an SDS of size 15 x 10, and sets values to its dimensions
+	- creates another SDS of size 4 x 3, and sets values to its 
+		first dimension
+
+	The followings are included in this test routine:
+	- SDgetdimid
+	- SDsetdimname
+	- SDdiminfo
+	- SDgetdimscale
+        - SDsetdimscale with the following situations:
+        	+ not called before SDdiminfo 
+		+ called with number type = 0
+        	+ called with an unsigned number type
+ 		+ called with the dataset's number type 
+ 		+ called before writing data to dataset
+ 		+ called after closing dataset and file, and then 
+		  reopening
+
+   Return value:
+	The number of errors occurred in this routine.
+
+*********************************************************************/
+#define FILE_DIM  "dim.hdf"	/* created and used by test_dimensions */
+#define LENGTH0 15		/* first SDS dimension */
+#define LENGTH1 10
+#define LENGTH2 4		/* second SDS dimension */
+#define LENGTH3 3
+#define RANK 	2		/* both SDS' rank */
+#define DS0_NAME "HDF Data 0"	/* first SDS name */
+#define DS1_NAME "HDF Data 1"	/* second SDS name */
+#define DIM0_NAME " Dimension 0"	/* name of first SDS' first dim */
+#define DIM1_NAME " Dimension 1"	/* name of first SDS' second dim */
+#define DIM2_NAME " Dimension 2"	/* name of second SDS' first dim */
+
+static intn
+test_dimensions()
+{
+    int32  fid, sds_id, status, dim0_id, dim1_id, sds_idx;
+    int32  dims[2], start[2], edges[2], rank;
+    int16  array1_data[LENGTH0][LENGTH1];	/* data for first SDS */
+    uint32 array2_data[LENGTH2][LENGTH3];	/* data for second SDS */
+    int32  dim_sizes[MAX_VAR_DIMS];		/* read dimensions */
+    intn   i, j;
+    int32  array_rank, num_type, attributes;
+    char   dim_name[MAX_NC_NAME], name[MAX_NC_NAME];
+    uint8  scale0 [] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,255};
+    int16  scale1 [] = {0,1,2,3,4,5,6,7,8,9};
+    char8  scale2 [] = {'d','i','m','2'}, scale2_out[4];
+    float32 scalef[] = {1., 2., 3., 4.};
+    int32  size, dim_data_type, dim_num_attrs;
+    int    num_errs = 0;    /* number of errors so far */
+
+    /* Create the file defined by FILE_DIM and initiate the SD interface. */
+    fid = SDstart(FILE_DIM, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /*
+     * Add a LENGTH0 x LENGTH1 array, which is named by DS0_NAME and of
+     * type 16-bit signed integer, to the file... 
+     */
+
+    /* Define the rank and dimensions of the data set. */
+    rank = RANK;
+    dims[0] = LENGTH0;
+    dims[1] = LENGTH1;
+
+    /* Create the array data set. */
+    sds_id = SDcreate(fid, DS0_NAME, DFNT_INT16, rank, dims);
+    CHECK(sds_id, FAIL, "SDcreate");
+
+    /*
+     * Settings for the first dimension.  Note that all these settings
+     * are done before writing the data to the dataset; just to make sure
+     * that it's possible...
+     */
+
+    /* Get the first dimension id */
+    dim0_id = SDgetdimid (sds_id, 0);
+    CHECK(dim0_id, FAIL, "SDgetdimid");
+
+    /* Set the first dimension name to the name defined by DIM0_NAME */
+    status = SDsetdimname (dim0_id, DIM0_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Set scale of type unsigned int-8 for the first dimension */
+    status = SDsetdimscale (dim0_id, dims[0], DFNT_UINT8, scale0);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the first dimension and verify its information */
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM0_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[0], "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_UINT8, "SDdiminfo"); /* bug #172 is fixed! */
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* 
+     * Write the data stored in the array 'array1_data' to the dataset...
+     */
+
+    /* Fill the buffer with values. */
+    for (j = 0; j < LENGTH0; j++) {
+        for (i = 0; i < LENGTH1; i++)
+            array1_data[j][i] = (i + j) + 1;
+    }
+
+    /* Define the area for writing to the dataset */
+    for (i = 0; i < rank; i++) {
+        start[i] = 0;
+        edges[i] = dims[i];
+    }
+
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)array1_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Re-open FILE_DIM in W mode and select the dataset named by DS0_NAME */
+    fid = SDstart (FILE_DIM, DFACC_WRITE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Look for DS0_NAME dataset */
+    sds_idx = SDnametoindex (fid, DS0_NAME);
+    CHECK(sds_idx, FAIL, "SDnametoindex");
+
+    /* Select that dataset */
+    sds_id = SDselect (fid, sds_idx);
+    CHECK(sds_id, FAIL, "SDselect");
+
+    /* Get info of the dataset and verify them: it is a LENGTH0 x LENGTH1 
+       array of type DFNT_INT16 and is named by DS0_NAME */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+    VERIFY (strcmp(name, DS0_NAME), 0, "SDgetinfo");
+    VERIFY (array_rank, RANK, "SDgetinfo");
+    VERIFY (num_type, DFNT_INT16, "SDgetinfo");
+    VERIFY (dim_sizes[0], LENGTH0, "SDgetinfo");
+    VERIFY (dim_sizes[1], LENGTH1, "SDgetinfo");
+
+    /*
+     * Setting name for the second dimension, but not scale yet...
+     */
+
+    /* Get the second dimension id */
+    dim1_id = SDgetdimid (sds_id, 1);
+    CHECK(dim1_id, FAIL, "SDgetdimid");
+
+    /* Set the second dimension name to the name defined by DIM1_NAME */
+    status = SDsetdimname (dim1_id, DIM1_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Read the second dimension and verify its information; since the
+       scale of this dimension is not set yet, the datatype should be 0 */
+    status = SDdiminfo(dim1_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM1_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[1], "SDdiminfo");
+    VERIFY (dim_data_type, 0, "SDdiminfo");
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* Set dimension scale for the second dimension; its type will be the
+       same as that of the of the dataset */
+    status = SDsetdimscale (dim1_id, dim_sizes[1], num_type, scale1);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the second dimension and verify its information; since the
+       scale of this dimension is now set, the datatype should be DFNT_INT16 */
+    status = SDdiminfo(dim1_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_INT16, "SDdiminfo");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /*
+     * Add a data array named by DS1_NAME to the file... 
+     */
+
+    /*
+     * Add another dataset to the file; this dataset is a LENGTH2 x LENGTH3
+     * array, named by DS1_NAME and of type 32-bit unsigned integer...
+     */
+
+    /* Define the rank and dimensions of the data set */
+    rank = RANK;
+    dims[0] = LENGTH2;
+    dims[1] = LENGTH3;
+
+    for (i = 0; i < rank; i++)
+        edges[i] = dims[i];
+
+    /* Create the data set */
+    sds_id = SDcreate(fid, DS1_NAME, DFNT_UINT32, rank, dims);
+    CHECK(sds_id, FAIL, "SDcreate");
+
+    /* Fill the stored-data array with values. */
+    for (j = 0; j < LENGTH2; j++) {
+        for (i = 0; i < LENGTH3; i++)
+            array2_data[j][i] = 10 * (j + i);
+    }
+
+    /* Write the data stored in the array 'array2_data' to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)array2_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Get info of the dataset and verify its type */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+    VERIFY (strcmp(name, DS1_NAME), 0, "SDgetinfo");
+    VERIFY (array_rank, RANK, "SDgetinfo");
+    VERIFY (num_type, DFNT_UINT32, "SDgetinfo");
+    VERIFY (dim_sizes[0], LENGTH2, "SDgetinfo");
+    VERIFY (dim_sizes[1], LENGTH3, "SDgetinfo");
+
+    /*
+     * Settings for the first dimension of the dataset named by DS1_NAME... 
+     */
+
+    /* Get the first dimension id */
+    dim0_id = SDgetdimid (sds_id, 0);
+    CHECK(dim0_id, FAIL, "SDgetdimid");
+
+    /* Set the first dimension name to the name defined by DIM2_NAME */
+    status = SDsetdimname (dim0_id, DIM2_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Verify that when 0 is passed into SDsetdimscale for number type,
+       then the dimension scale will be set to DFNT_FLOAT32 */
+    status = SDsetdimscale (dim0_id, dims[0], 0, scalef); 
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM2_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[0], "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_FLOAT32, "SDdiminfo");
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* 
+     * Now, set dimension scale for that first dimension again, but this
+     * time, to 8-bit signed char; then verify the type and the scale values 
+     */
+
+    /* Set scale of type 8-bit signed char for this dimension */
+    status = SDsetdimscale (dim0_id, dims[0], DFNT_CHAR, scale2);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the info of this dimension its new number type */ 
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_CHAR, "SDdiminfo");
+
+    /* Read dimension scale values and verify them */
+    status = SDgetdimscale (dim0_id, (VOIDP)scale2_out);
+    CHECK(status, FAIL, "SDgetdimscale");
+    for(i=0; i < LENGTH2; i++)
+	VERIFY (scale2_out[i], scale2[i], "SDgetdimscale");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_dimensions */
+
+static intn
+test_compression()
+{
+    int32 fcomp; /* File handle */
+    int32 nt;                /* Number type */
+    int32 dimsize[10];       /* dimension sizes */
+    int32 newsds, newsds2; 	/* SDS handles */
+    comp_coder_t comp_type;	/* to retrieve compression type into */
+    comp_info cinfo;            /* compression information structure */
+    int32   idata[100];
+    int32   rdata[100];
+    int32   fillval;
+    intn  i;
+    int   num_errs = 0;    /* number of errors in compression test so far */
+    intn  status;      /* status flag */
+    int32   start[10], end[10]; /* start and end arrays */
+
+#ifdef QAK
+printf("writing 1st compressed dataset, basic skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE1, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet1", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE1, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SKPHUFF, "SDgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, 4, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 2nd compressed dataset, partially filled & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE2, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet2", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=43;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+    /* fill the array with the standard info */
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+    /* overwrite selected portions with the fill value */
+    for(i = 0; i < 5; i++)
+        idata[i] = fillval;
+    for(i = 20; i < 25; i++)
+        idata[i] = fillval;
+
+    start[0] = 1;
+    start[1] = 0;
+    end[0]   = 3;
+    end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[5]);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE2, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("creating 3rd compressed dataset, compressed template & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE3, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet3", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=56;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE3, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(fillval != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("creating 4th compressed dataset, compressed template read, then partial write & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet4", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=67;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(fillval != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+    /* fill the array with the standard info */
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+    /* overwrite selected portions with the fill value */
+    for(i = 0; i < 10; i++)
+        idata[i] = fillval;
+    for(i = 20; i < 25; i++)
+        idata[i] = fillval;
+
+    start[0] = 2;
+    start[1] = 0;
+    end[0]   = 2;
+    end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[10]);
+    CHECK(status, FAIL, "SDwritedata");
+
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 5th compressed dataset, basic RLE\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE5, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet5", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    status = SDsetcompress(newsds,COMP_CODE_RLE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE5, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_RLE, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 6th compressed dataset, no encoding\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE6, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet6", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    status = SDsetcompress(newsds,COMP_CODE_NONE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE6, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_NONE, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 7th compressed dataset, deflate encoding\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE7, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet7", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.deflate.level=6;
+    status = SDsetcompress(newsds,COMP_CODE_DEFLATE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE7, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_DEFLATE, "SDgetcompress");
+    VERIFY(cinfo.deflate.level, 6, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+#ifdef QAK
+printf("before SDend\n");
+#endif /* QAK */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+}   /* end test_compression */
+
 int 
 main(int argc, char *argv[])
 {
-    int32 f1, f2, fext, fnbit, fcomp; /* File handles */
+    int32 f1, f2, fext, fnbit; /* File handles */
     int32 nt;                /* Number type */
     int32 dimsize[10];       /* dimension sizes */
     int32 newsds, newsds2, newsds3; /* SDS handles */
@@ -1611,9 +2673,6 @@
     int32 num_sds;               /* number of SDS in file */
     int32 num_gattr;             /* Number of global attributes */
     int32 offset;                /* offset for ? */
-#if defined COMP_TEST 
-    comp_info cinfo;            /* compression information structure */
-#endif /* COMP_TEST */
     int32 index;       /* Index of dataset in file */
     int32 ival;
     int32 sdid;        /* another SDS handle */
@@ -1635,8 +2694,7 @@
     uint8   iuval;
     float32 data[1000], max, min, imax, imin;
     float64 cal, cale, ioff, ioffe;
-    intn emptySDS = FALSE;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
 
 
 #ifdef macintosh
@@ -1671,7 +2729,7 @@
     if (f1 != FAIL)
       {
           fprintf(stderr, "SDstart(..., RDONLY) should fail\n");
-          num_err++;
+          num_errs++;
           SDend(f1);
       }
 
@@ -1679,7 +2737,7 @@
     if (f1 != FAIL)
       {
           fprintf(stderr, "SDstart(..., RDWR) should fail\n");
-          num_err++;
+          num_errs++;
           SDend(f1);
       }
 
@@ -1699,7 +2757,7 @@
     if(num_gattr != 0) 
       {
           fprintf(stderr, "File %s still has stuff in it\n", FILE1);
-          num_err++;
+          num_errs++;
       }
 
     /* create a 4 by 8 dataset called DataSetAlpha in file test1.hdf */
@@ -1723,7 +2781,7 @@
     if(num_sds != 2) 
       {
         fprintf(stderr, "Wrong number of datasets in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* get dimension handle for first dimension? of DataSetGamma */
@@ -1744,7 +2802,7 @@
       {
         fprintf(stderr, "SDfindattr: Bad index for finding 'DimensionAttribute' %d\n",
                 status);
-        num_err++;
+        num_errs++;
       }
 
     /* Find out info about first atribute for dimension  */
@@ -1759,7 +2817,7 @@
     if(HDstrncmp(text, "TRUE", count)) 
       {
         fprintf(stderr, "SDreadattr: Invalid dimension attribute read <%s>\n", text);
-        num_err++;
+        num_errs++;
       }
 
     /* get First dimension of dataset 'DataSetAlpha' */
@@ -1796,7 +2854,7 @@
           {
               fprintf(stderr, "SDreaddata() returned %ld not %ld in location %d\n", 
                       (long)idata[i], (long)scale[i], i);
-              num_err++;
+              num_errs++;
           }
       }
 
@@ -1812,19 +2870,19 @@
     if(nt != DFNT_FLOAT32) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "DimAttr")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* get second dimension of data set 'DataSetAlpha' */
@@ -1844,19 +2902,19 @@
     if(nt != DFNT_INT32) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "Integer")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* read dimension attribute back in */
@@ -1867,7 +2925,7 @@
     if(ival != -256) 
       {
         fprintf(stderr, "Wrong value for SDreadattr(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* add an unsigned integer as an dimension attribute */
@@ -1882,19 +2940,19 @@
     if(nt != DFNT_UINT8) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "UnsignedInteger")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* read second dimension attribute back in */
@@ -1905,7 +2963,7 @@
     if(iuval != 253) 
       {
         fprintf(stderr, "Wrong value for SDreadattr(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Find index of data set 'DataSetAlpha' in file test1.hdf */
@@ -1913,7 +2971,7 @@
     if(status != 0) 
       {
         fprintf(stderr, "Couldn't find data set in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Try finding data set in test2.hdf, should fail? */
@@ -1921,7 +2979,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "Found data set in wrong file 2\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Try finding non-existent dataset in file, should fail */
@@ -1929,7 +2987,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "Found bogus data set in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Set fill value for data set 'DataSetAlpha' assume we still have valid
@@ -1973,22 +3031,22 @@
     if(HDstrcmp(l, "TheLabel")) 
       {
         fprintf(stderr, "Bogus label returned (%s)\n", l);
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(u, "TheUnits")) 
       {
         fprintf(stderr, "Bogus units returned (%s)\n", u);
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(fmt, "")) 
       {
         fprintf(stderr, "Bogus format returned\n");
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(c, "TheCordsys")) 
       {
         fprintf(stderr, "Bogus cordsys returned\n");
-        num_err++;
+        num_errs++;
       }
 
     /* retrieve CHAR attribute for 'DataSetAlpha' */
@@ -1996,7 +3054,7 @@
     if(status != 2) 
       {
         fprintf(stderr, "Bad index for SDfindattr\n");
-        num_err++;
+        num_errs++;
       }
 
     /* retrieve non-existent CHAR attribute for 'DataSetAlpha'. 
@@ -2005,7 +3063,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "SDfindattr found non-existant attribute\n");
-        num_err++;
+        num_errs++;
       }
 
     /* hmm....set global attributes for File 'test1.hdf' */
@@ -2023,7 +3081,7 @@
     if(HDstrncmp(text, "globulator", count)) 
       {
         fprintf(stderr, "Invalid global attribute read <%s>\n", text);
-        num_err++;
+        num_errs++;
       }
 
     /* Get number of SDS and global attributes in file 'test2.hdf'.
@@ -2032,7 +3090,7 @@
     if(num_sds != 0) 
       {
         fprintf(stderr, "File2 still has stuff in it\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Set calibration info for dataset 'DataSetGamma' in file 'test1.hdf' */
@@ -2056,7 +3114,7 @@
     if(num_sds != 1) 
       {
         fprintf(stderr, "Wrong number of datasets in file 2\n");
-        num_err++;
+        num_errs++;
       }
 
     for(i = 0; i < 50; i++)
@@ -2080,27 +3138,27 @@
     if(data[0] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 0: %f\n",(float)data[0]);
-        num_err++;
+        num_errs++;
       }
     if(data[3] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 3: %f\n",(float)data[3]);
-        num_err++;
+        num_errs++;
       }
     if(data[5] != 1.0) 
       {
         fprintf(stderr, "Wrong value returned loc 5: %f\n",(float)data[5]);
-        num_err++;
+        num_errs++;
       }
     if(data[6] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 6: %f\n",(float)data[6]);
-        num_err++;
+        num_errs++;
       }
     if(data[8] != 4.0) 
       {
         fprintf(stderr, "Wrong value returned loc 8: %f\n",(float)data[8]);
-        num_err++;
+        num_errs++;
       }
 
     for(i = 0; i < 50; i++)
@@ -2133,31 +3191,31 @@
     if(cal != 1.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(cale != 5.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(ioff != 3.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(ioffe != 2.5) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(nt != DFNT_INT8) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     /* end access to data set 'DataSetAlpha' */
@@ -2172,19 +3230,6 @@
     status = SDendaccess(newsds3);
     CHECK(status, FAIL, "SDendaccess");
 
-    /* BMR - 2/21/99: added a 2x2 dataset called EmptyDataset to file 
-       'test1.hdf' to later test new routine SDcheckempty.  */
-
-    /* create a 2x2 dataset called EmptyDataset in file test1.hdf */
-    dimsize[0] = 2;
-    dimsize[1] = 2;
-    newsds = SDcreate(f1, "EmptyDataset", DFNT_FLOAT32, 2, dimsize);
-    CHECK(newsds, FAIL, "SDcreate: Failed to create a new data set EmptyDataset ");
-    /* Close down this SDS*/
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "Test empty SDS. SDendaccess");
-    /* end BMR */
-
     /* Close access to file 'test1.hdf' */
     status = SDend(f1);
     CHECK(status, FAIL, "SDend");
@@ -2217,7 +3262,6 @@
     sdid = SDcreate(f1, "FIXED1", DFNT_INT32, 2, dimsize);
     CHECK(sdid, FAIL, "SDcreate:Fail to create data set 'FIXED1' in 'test1.hdf'");
 
-
     for (i=0; i<30; i++)
         idata[i] = i+100;
 
@@ -2286,24 +3330,6 @@
     status = SDendaccess(sdid);
     CHECK(status, FAIL, "SDendaccess");
 
-    /* BMR - 2/21/99: get index of dataset 'EmptyDataset' */
-    index = SDnametoindex(f1, "EmptyDataset");
-    CHECK(index, FAIL, "SDnametoindex: (EmptyDataset)");
-    
-    /* Select dataset 'EmptyDataset' */
-    sdsid = SDselect(f1, index);
-
-    /* This dataset should be empty, if SDcheckempty returns FAIL or the
-       parameter emptySDS is not TRUE, the test fails */
-    status = SDcheckempty( sdsid, &emptySDS );    
-    CHECK( status, FAIL, "SDcheckempty" );
-    VERIFY( emptySDS, TRUE, "SDcheckempty" );
-
-    /* end access to data set 'EmptyDataset' */
-    status = SDendaccess(sdsid);
-    CHECK(status, FAIL, "SDendaccess");
-    /* end BMR */
-
     /* close file 'test1.hdf' */
     status = SDend(f1);
     CHECK(status, FAIL, "SDend");
@@ -2324,7 +3350,7 @@
     index = SDnametoindex(f1, "FIXED");
     CHECK(index, FAIL, "SDnametoindex: (FIXED)");
 
-    /* Select the data set 'FIXED' based on it's index */
+    /* Select the data set 'FIXED' based on its index */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect: (FIXED)");
 
@@ -2336,7 +3362,7 @@
     status = SDwritedata(sdid, start, NULL, end, (VOIDP)idata);
     CHECK(status, FAIL, "SDwritedata (SD_FILL)");
 
-    /* end acces to data set 'FIXED' */
+    /* end access to data set 'FIXED' */
     status = SDendaccess(sdid);
     CHECK(status, FAIL, "SDendaccess");
 
@@ -2354,7 +3380,7 @@
     index = SDnametoindex(f1, "FIXED");
     CHECK(index, FAIL, "SDnametoindex (FIXED)");
 
-    /* Select the data set 'FIXED' based on it's index */
+    /* Select the data set 'FIXED' based on its index */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect (FIXED)");
 
@@ -2372,9 +3398,9 @@
         if ((idata[i] != 100 + (i-12)) ||
             (idata[i+12] != 100 + (i-12))) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d %d\n",
-                           100 + i-12, (int)idata[i], (int)idata[i+12]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d %d\n",
+                           __LINE__,100 + i-12, (int)idata[i], (int)idata[i+12]);
+           num_errs++;
           }
       }
     
@@ -2382,9 +3408,9 @@
       {
         if (idata[i] ==fillval) 
           {
-           fprintf(stderr, "wrong value: should not be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should not be %d, got %d\n",
+                           __LINE__,(int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2398,7 +3424,7 @@
     index = SDnametoindex(f1, "FIXED1");
     CHECK(index, FAIL, "SDnametoindex (FIXED1)");
 
-    /* select dataset 'FIXED1' based on it's index in the file */
+    /* select dataset 'FIXED1' based on its index in the file */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect (FIXED1)");
 
@@ -2415,9 +3441,9 @@
       {
         if (idata[i] != (100 + (i-12)))  
           {
-           fprintf(stderr, "wrong value: should be %d, got %d \n",
-                           100 + i-12, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d \n",
+                           __LINE__, 100 + i-12, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2425,9 +3451,9 @@
       {
         if (idata[i] != fillval) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, (int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2496,7 +3522,7 @@
     index = SDnametoindex(f1, "UNLIMITED_SDS");
     CHECK(index, FAIL, "SDnametoindex: (UNLIMITED)");
 
-    /* select data set 'UNLIMITED_SDS' based on it's index in the file */
+    /* select data set 'UNLIMITED_SDS' based on its index in the file */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect: (UNLIMITED)");
 
@@ -2543,9 +3569,9 @@
       {
         if ((idata[i] != (i-12)) || (idata[i+12] != (i-12))) 
           {
-           fprintf(stderr, "wrong value for %d: should be %d, got %d\n",
-                           i-12, (int)idata[i], (int)idata[i+12]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value for %d: should be %d, got %d\n",
+                           __LINE__, i-12, (int)idata[i], (int)idata[i+12]);
+           num_errs++;
           }
       }
 
@@ -2553,9 +3579,9 @@
       {
         if (idata[i] !=fillval) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, (int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2643,7 +3669,7 @@
     if (rank!=2 || dimsize[0]!=4 || dimsize[1]!=6 || nt!=DFNT_INT32) 
       {
         fprintf(stderr, "SDgetinfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
 
     /* get handle for first dimension of data set 'dimval_1_compat' */
@@ -2658,14 +3684,14 @@
     if (dimsize[0]!=SD_UNLIMITED || nt!= 0 )  
       {
           fprintf(stderr, "SDdiminfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
     /* is it backward non-compatible? */
     status = SDisdimval_bwcomp(dimid);
     if (status != SD_DIMVAL_BW_INCOMP)
        { 
            fprintf(stderr, "SDisdimvalcomp returned wrong value for dimension.\n");
-            num_err++;
+            num_errs++;
        }
     /* re-set first dimension as backward compatible */
     status = SDsetdimval_comp(dimid, SD_DIMVAL_BW_COMP);
@@ -2683,7 +3709,7 @@
     if (dimsize[1]!=6 || nt!= DFNT_INT32 )  
       {
           fprintf(stderr, "Failed on SDgetinfo call\n");
-          num_err++;
+          num_errs++;
       }
 
     /* read data back from data set 'dimval_1_compat' */
@@ -2695,9 +3721,9 @@
       {
         if (idata[i] != i) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           i, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, i, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2707,7 +3733,7 @@
     if (status != SD_DIMVAL_BW_COMP)  
       {
           fprintf(stderr, "SDisdimvalcomp returned wrong value for dimension\n");
-          num_err++;
+          num_errs++;
       }
 
     /* re-set second dimension as backward non-compatible */
@@ -2745,7 +3771,7 @@
     if (rank!=2 || dimsize[0]!=4 || dimsize[1]!=6 || nt!=DFNT_INT32) 
       {
         fprintf(stderr, "SDgetinfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
 
     /* get handle for second dimension of data set 'dimval_1_compat' */
@@ -2760,7 +3786,7 @@
     if (dimsize[1]!=6 || nt!= DFNT_INT32 )  
       {
           fprintf(stderr, "Failed on SDgetinfo call\n");
-          num_err++;
+          num_errs++;
       }
 
     /* see if second dimensionis backward compatible. 
@@ -2769,7 +3795,7 @@
     if (status != SD_DIMVAL_BW_INCOMP)  
       {
           fprintf(stderr, "SDisdimvalcomp returned wrong value\n");
-          num_err++;
+          num_errs++;
       }
     /* re-set second dimension as backward compatible */
     status = SDsetdimval_comp(dimid1, SD_DIMVAL_BW_COMP);
@@ -2794,7 +3820,7 @@
     if(ndg_saved_ref != SDidtoref(sdsid)) 
       {
         fprintf(stderr, "Saved NDG ref != to SDindextoref of same\n");
-        num_err++;
+        num_errs++;
       }
 
     /* end access to data set 'DataSetAlpha' in file 'test1.hdf' */    
@@ -2888,7 +3914,7 @@
           {
             fprintf(stderr, "Bogus val in loc %d in wrapper dset want %d  got %ld\n", 
 		    i, (i + 2) * 10, (long)idata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -2896,7 +3922,7 @@
       {
         fprintf(stderr, "Bogus val in last loc in wrapper dset want 10  got %ld\n",
 		(long)idata[8]);
-        num_err++;
+        num_errs++;
       }
 
     /* End access to data set "WrapperDataSet" */
@@ -2971,7 +3997,7 @@
           {
             fprintf(stderr,"Bogus val in loc %d in n-bit dset want %ld got %ld\n",
 		    i, (long)idata[i], (long)rdata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -2989,659 +4015,62 @@
     /*
      * Test the compressed storage routines
      */
+    status = test_compression();
+    CHECK(status, FAIL, "test_chunk");
+    num_errs = num_errs + status;
 
-#ifdef QAK
-printf("writing 1st compressed dataset, basic skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE1, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet1", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE1, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 2nd compressed dataset, partially filled & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE2, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet2", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=43;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-    /* fill the array with the standard info */
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-    /* overwrite selected portions with the fill value */
-    for(i = 0; i < 5; i++)
-        idata[i] = fillval;
-    for(i = 20; i < 25; i++)
-        idata[i] = fillval;
-
-    start[0] = 1;
-    start[1] = 0;
-    end[0]   = 3;
-    end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[5]);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE2, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("creating 3rd compressed dataset, compressed template & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE3, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet3", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=56;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE3, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(fillval != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("creating 4th compressed dataset, compressed template read, then partial write & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet4", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=67;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(fillval != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-    /* fill the array with the standard info */
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-    /* overwrite selected portions with the fill value */
-    for(i = 0; i < 10; i++)
-        idata[i] = fillval;
-    for(i = 20; i < 25; i++)
-        idata[i] = fillval;
-
-    start[0] = 2;
-    start[1] = 0;
-    end[0]   = 2;
-    end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[10]);
-    CHECK(status, FAIL, "SDwritedata");
-
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 5th compressed dataset, basic RLE\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE5, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet5", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    status = SDsetcompress(newsds,COMP_CODE_RLE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE5, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 6th compressed dataset, no encoding\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE6, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet6", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    status = SDsetcompress(newsds,COMP_CODE_NONE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE6, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 7th compressed dataset, deflate encoding\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE7, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet7", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.deflate.level=6;
-    status = SDsetcompress(newsds,COMP_CODE_DEFLATE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE7, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-#ifdef QAK
-printf("before SDend\n");
-#endif /* QAK */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
 #endif /* COMP_TEST */
 
-
 #ifdef CHUNK_TEST
     status = test_chunk();
     CHECK(status, FAIL, "test_chunk");
-    num_err = num_err + status;
+    num_errs = num_errs + status;
 #endif /* CHUNK_TEST */
 
 #ifdef NETCDF_READ_TEST
     status = test_netcdf_reading();
     CHECK(status, FAIL, "test_netcdf_reading");
-    num_err = num_err + status;
+    num_errs = num_errs + status;
 #endif /* NETCDF_READ_TEST */
 
-    printf("num_err == %d\n", num_err);
+    /* BMR: Added a test routine dedicated for testing dimensions.  A
+       test on SDsetdimscale for an unsigned type was added while I was
+       fixing bug #172.  I didn't want to add this test into the already
+       very long main program so, instead, I added this routine, which can
+       be appended with other dimension tests in the future.  Also, some
+       day, the main program can be shortened and some of its dimension-related
+       tests can be moved into this test routine - 04/18/01 */
+    status = test_dimensions();
+    num_errs = num_errs + status;
 
-    exit(0);
+    /* BMR: Added a test routine dedicated for testing SDcheckempty. 09/17/04 */
+    status = test_checkempty();
+    num_errs = num_errs + status;
+
+    /* BMR: Added a test routine dedicated for testing SDidtype. 01/21/05 */
+    status = test_idtype();
+    num_errs = num_errs + status;
+
+    /* BMR: Added a test routine dedicated for testing the behavior of
+     * several functions when the SDS has rank=0. 02/4/05 */
+    /* BMR: SDcreate fails on Copper when rank=0.  EP decided to remove
+     * this test until further study can be made on this feature.
+    status = test_rank0();
+    num_errs = num_errs + status; */
+
+#ifdef H4_HAVE_LIBSZ
+    status = test_szip_compression();  /* defined in tszip.c */
+    num_errs = num_errs + status;
+#else
+   /*  printf("****** SD Szip test skipped *****\n"); */
+#endif /* H4_HAVE_LIBSZ */
+
+    status = test_sd();  /* defined in tsd.c */
+    num_errs = num_errs + status;
+    printf("num_err == %d\n", num_errs);
+
+    exit(num_errs);
+    return num_errs;
 }
 
 #endif /* HDF */

Copied: packages/libhdf4/trunk/mfhdf/libsrc/hdftest.h (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.h)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/hdftest.h	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/hdftest.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,20 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/* Check status value and print error message */
+#define CHECK(status, fail_value, name) {if(status == fail_value) { \
+    printf("*** Routine %s FAILED at line %d ***\n", name, __LINE__); num_errs++;}}
+
+/* Verify that a value is as expected and, if not, print error message */
+#define VERIFY(item, value, test_name) {if(item != value) { \
+    printf("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", test_name, (long)item,(int)__LINE__,__FILE__); num_errs++;}}
+

Modified: packages/libhdf4/trunk/mfhdf/libsrc/mfhdf.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/mfhdf.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/mfhdf.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: mfhdf.h,v 1.43 2000/08/22 20:29:34 epourmal Exp $ */
+/* $Id: mfhdf.h,v 1.54 2005/01/26 15:51:29 epourmal Exp $ */
 
 #ifndef _MFSD_H_
 #define _MFSD_H_
@@ -28,7 +28,7 @@
 #endif /* OLD_WAY */
 
 #if defined(_MSC_VER) && !defined(_MFHDFLIB_) && !defined(_HDFLIB_)	/* Auto-link when possible */
-#	define MFHDF_LIB_VER	"414"
+#	define MFHDF_LIB_VER	"421"
 #	if !defined(_DEBUG)
 #		if !defined(_HDFDLL_)
 #			define MFHDF_LIB_NAME	"HM" MFHDF_LIB_VER ".lib"
@@ -56,12 +56,21 @@
 #define SD_DIMVAL_BW_INCOMP  0
 #define SD_RAGGED    -1  /* marker for ragged dimension */
 
+/* enumerated types for various types of ids in SD interface */
+typedef enum
+{
+    NOT_SDAPI_ID = -1,	/* not an SD API id */
+    SD_ID = 0,		/* SD id */
+    SDS_ID,		/* SDS id */
+    DIM_ID		/* Dimension id */
+} hdf_idtype_t;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 HDFLIBAPI int32 SDstart
-    (const char *name, int32 access);
+    (const char *name, int32 accs);
 
 HDFLIBAPI intn SDend
     (int32 fid);
@@ -70,7 +79,7 @@
     (int32 fid, int32 *datasets, int32 *attrs);
 
 HDFLIBAPI int32 SDselect
-    (int32 fid, int32 index);
+    (int32 fid, int32 idx);
 
 HDFLIBAPI intn SDgetinfo
     (int32 sdsid, char *name, int32 *rank, int32 *dimsizes, 
@@ -109,10 +118,10 @@
     (int32 id, const char *name, int32 nt, int32 count, const void * data);
 
 HDFLIBAPI intn SDattrinfo
-    (int32 id, int32 index, char *name, int32 *nt, int32 *count);
+    (int32 id, int32 idx, char *name, int32 *nt, int32 *count);
 
 HDFLIBAPI intn SDreadattr
-    (int32 id, int32 index, void * buf);
+    (int32 id, int32 idx, void * buf);
 
 #ifndef __CSTAR__
 HDFLIBAPI intn SDwritedata
@@ -164,8 +173,11 @@
     (int32 id, intn start_bit, intn bit_len, intn sign_ext, intn fill_one);
 
 HDFLIBAPI intn SDsetcompress
-    (int32 id, int32 type, comp_info *c_info);
+    (int32 id, comp_coder_t type, comp_info *c_info);
 
+HDFLIBAPI intn SDgetcompress
+    (int32 id, comp_coder_t* type, comp_info *c_info);
+
 HDFLIBAPI int32 SDfindattr
     (int32 id, const char *attrname);
 
@@ -196,6 +208,9 @@
 HDFLIBAPI int32 SDcheckempty
     (int32 sdsid, intn *emptySDS);
 
+HDFLIBAPI hdf_idtype_t SDidtype
+    (int32 an_id);
+
 /*====================== Chunking Routines ================================*/
 
 /* For defintion of HDF_CHUNK_DEF union see hproto.h since 
@@ -503,6 +518,7 @@
 #   define nscwcchnk     FNAME(SCWCCHNK) 
 #   define nscwchnk      FNAME(SCWCHNK)
 #   define nscscompress  FNAME(SCSCOMPRESS)
+#   define nscgcompress  FNAME(SCGCOMPRESS)
 #   define nsfsnbit      FNAME(SFSNBIT)
 #   define nsfsblsz      FNAME(SFSBLSZ)
 #   define nscchempty    FNAME(SCCHEMPTY)
@@ -560,6 +576,7 @@
 #   define nscwcchnk     FNAME(SCWCCHNK)
 #   define nscwchnk      FNAME(SCWCHNK)
 #   define nscscompress  FNAME(SCSCOMPRESS)
+#   define nscgcompress  FNAME(SCGCOMPRESS)
 #   define nscsnbit      FNAME(SCSNBIT)
 #   define nscsblsz      FNAME(SCSBLSZ)
 #   define nscselct      FNAME(SCSELCT)
@@ -622,6 +639,7 @@
 #   define nscwcchnk     FNAME(scwcchnk) 
 #   define nscwchnk      FNAME(scwchnk)
 #   define nscscompress  FNAME(scscompress)
+#   define nscgcompress  FNAME(scgcompress)
 #   define nsfsnbit      FNAME(sfsnbit)
 #   define nsfsblsz      FNAME(sfsblsz)
 #   define nscchempty    FNAME(scchempty)
@@ -677,7 +695,7 @@
 #   define nscschnk      FNAME(scschnk)
 #   define nscwcchnk     FNAME(scwcchnk)
 #   define nscwchnk      FNAME(scwchnk)
-#   define nscscompress  FNAME(scscompress)
+#   define nscgcompress  FNAME(scgcompress)
 #   define nscsnbit      FNAME(scsnbit)
 #   define nscsblsz      FNAME(scsblsz)
 #   define nscselct      FNAME(scselct)

Modified: packages/libhdf4/trunk/mfhdf/libsrc/mfsd.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/mfsd.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/mfsd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.129 $";
+static char RcsId[] = "@(#)$Revision: 1.147 $";
 #endif
 
-/* $Id: mfsd.c,v 1.129 2000/08/29 13:56:52 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfsd_c
-#include "ProcIDs.h"
-#endif
+/* $Id: mfsd.c,v 1.147 2005/02/09 21:12:54 bmribler Exp $ */
 
 /******************************************************************************
 file - mfsd.c
@@ -54,7 +50,11 @@
 
 status = SDcheckempty(sdsid, emptySDS);
 
- NOTE: This file needs to have the comments cleaned up for most of the
+        --- take an id and determine if it is an SD id, SDS id, dim id, ---
+        --- or none of the above ---
+id_type =  SDidtype(an_id);
+
+NOTE: This file needs to have the comments cleaned up for most of the
        functions here. -GV 9/10/97
 
 ******************************************************************************/
@@ -67,8 +67,13 @@
 #ifdef HDF
 #include "mfhdf.h"
 #include "hfile.h"
-#include "hchunks.h" /* include here for now */
 
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+#include "szlib.h"
+#ifndef MIN
+#define MIN(a,b)    (((a)<(b)) ? (a) : (b))
+#endif
+#endif
 /* for Chunk debugging */
 /*
 #define CHK_DEBUG
@@ -250,7 +255,7 @@
 static intn
 SDIstart(void)
 {
-    CONSTR(FUNC, "SDIstart");    /* for HERROR */
+    CONSTR(FUNC, "SDIstart");    /* for HGOTO_ERROR */
     intn        ret_value = SUCCEED;
 
     /* Don't call this routine again... */
@@ -270,8 +275,48 @@
     return(ret_value);
 } /* end SDIstart() */
 
+
 /******************************************************************************
  NAME
+	SDI_can_clobber -- check permission on the file
+
+ DESCRIPTION
+    Check the file permissions.  If OK to clobber the file, return 1,
+    else return 0. 
+    Called by SDstart.
+
+ RETURNS
+    1 if OK to clobber
+    0 if not OK to overwrite
+
+******************************************************************************/
+int SDI_can_clobber(const char *name)
+{
+int res;
+struct stat buf;
+FILE *ff;
+
+    res = stat(name, &buf);
+
+    if (res < 0) {
+        /* no such file, OK to try to create it */
+	return(1);
+    }
+
+    ff = HI_OPEN(name, DFACC_RDWR);
+
+    if (ff != NULL) {
+        /* OK to open for write, so OK to clobber it */
+        HI_CLOSE(ff);
+	return(1);
+    } 
+
+    /* no permission to write, don't do the create */
+    return(0);
+}
+
+/******************************************************************************
+ NAME
 	SDstart -- open a file
 
  DESCRIPTION
@@ -286,7 +331,7 @@
 SDstart(const char *name,   /* IN: file name to open */
         int32       HDFmode /* IN: access mode to open file with */)
 {
-    CONSTR(FUNC, "SDstart");    /* for HERROR */
+    CONSTR(FUNC, "SDstart");    /* for HGOTO_ERROR */
     intn    cdfid;
     int32   fid;
     intn    NCmode;
@@ -297,9 +342,6 @@
     fprintf(stderr, "SDstart: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON (PABLO_mask,ID_SDstart );
-#endif
     /* turn off annoying crash on error stuff */
     ncopts = 0;
 
@@ -316,6 +358,8 @@
 
     if(HDFmode & DFACC_CREATE) 
       { /* create file */
+        if(!SDI_can_clobber(name)) 
+            HGOTO_ERROR(DFE_DENIED, FAIL);
         cdfid = nccreate(name, NC_CLOBBER);
       } 
     else 
@@ -325,18 +369,12 @@
 
     /* check if bad create/open */
     if(cdfid == -1) 
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_BADOPEN, FAIL);
 
     /* hmm.....*/
     handle = NC_check_id(cdfid);
     if(handle == NULL) 
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* set in 'define' mode? */
     handle->flags &= ~(NC_INDEF);
@@ -353,9 +391,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDstart );
-#endif
 
     return ret_value;
 } /* SDstart */
@@ -383,9 +418,6 @@
     fprintf(stderr, "SDend: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDend );
-#endif
 
     /* get id? */
     cdfid = (intn)id & 0xffff;
@@ -447,9 +479,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDend );
-#endif
 
     return ret_value;
 } /* SDend */
@@ -481,9 +510,6 @@
     fprintf(stderr, "SDnumber: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDfileinfo );
-#endif
 
     /* check that fid is valid and get file structure */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -509,9 +535,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDfileinfo );
-#endif
 
     return ret_value;
 } /* SDfileinfo */
@@ -555,9 +578,6 @@
     fprintf(stderr, "SDselect: I've been called (index: %d) \n", index);
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDselect );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -592,9 +612,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDselect );
-#endif
 
     return ret_value;
 } /* SDselect */
@@ -624,6 +641,7 @@
           int32 *nt,      /* OUT: number type of data */
           int32 *nattr    /* OUT: the number of local attributes */)
 {
+    CONSTR(FUNC, "SDgetinfo");    /* for HGOTO_ERROR */
     intn    i;
     NC     *handle = NULL;
     NC_var *var = NULL;
@@ -633,10 +651,10 @@
     fprintf(stderr, "SDgetinfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetinfo );
-#endif
 
+    if( rank == NULL || dimsizes == NULL || nt == NULL || nattr == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
       {
@@ -696,9 +714,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetinfo );
-#endif
 
     return ret_value;
 } /* SDgetinfo */
@@ -722,10 +737,15 @@
            int32 *end,    /* IN:  number of values to read per dimension */
            void *  data    /* OUT: data buffer */)
 {
+    CONSTR(FUNC, "SDreaddata");    /* for HGOTO_ERROR */
     NC     *handle = NULL;
     NC_dim *dim = NULL;
     intn    varid;
     int32   status;
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    NC_var * tvar;
 #ifdef BIG_LONGS
     long    Start[MAX_VAR_DIMS];
     long    End[MAX_VAR_DIMS];
@@ -741,9 +761,6 @@
     fprintf(stderr, "SDreaddata: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreaddata );
-#endif
     
     if((start == NULL) || (end == NULL) || (data == NULL))
       {
@@ -769,6 +786,28 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    tvar = SDIget_var(handle, sdsid);
+    if(tvar == NULL)
+     {
+            ret_value = FAIL;
+            goto done;
+     }
+    status = HCPgetcompress(handle->hdf_file, tvar->data_tag, tvar->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* get ready to read */
     handle->xdrs->x_op = XDR_DECODE ;
    
@@ -836,9 +875,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask,  ID_SDreaddata );
-#endif
 
     return ret_value;
 } /* SDreaddata */
@@ -875,9 +911,6 @@
     fprintf(stderr, "SDnametoindex: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDnametoindex );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -913,9 +946,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDnametoindex);
-#endif
 
     return ret_value;    
 } /* SDnametoindex */
@@ -959,9 +989,6 @@
     fprintf(stderr, "SDgetrange: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetrange );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -1020,9 +1047,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetrange);
-#endif
 
     return ret_value;
 } /* SDgetrange */
@@ -1102,9 +1126,6 @@
     fprintf(stderr, "SDcreate: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDcreate );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -1282,9 +1303,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDcreate);
-#endif
 
     return ret_value;
 } /* SDcreate */
@@ -1326,9 +1344,6 @@
     fprintf(stderr, "SDgetdimid: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimid );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -1354,6 +1369,11 @@
       }
 
     /* get the dim number out of the assoc array */
+    if (var->assoc->values == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
     dimindex = var->assoc->values[number];
 
     /* build the dim id */
@@ -1367,9 +1387,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimid);
-#endif
 
     return ret_value;
 } /* SDgetdimid */
@@ -1408,9 +1425,6 @@
     fprintf(stderr, "SDsetdimname: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimname );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -1478,9 +1492,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimname);
-#endif
 
     return ret_value;
 } /* SDsetdimname */
@@ -1511,9 +1522,6 @@
     fprintf(stderr, "SDendaccess: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDendaccess );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, SDSTYPE);
@@ -1571,9 +1579,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDendaccess);
-#endif
 
     return ret_value;    
 } /* SDendaccess */
@@ -1717,9 +1722,6 @@
     fprintf(stderr, "SDsetrange: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetrange );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -1768,9 +1770,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetrange);
-#endif
 
     return ret_value;    
 } /* SDsetrange */
@@ -1899,9 +1898,6 @@
     fprintf(stderr, "SDsetattr: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetattr );
-#endif
 
     /* sanity check args */
     if(name == NULL) 
@@ -1964,9 +1960,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetattr);
-#endif
 
     return ret_value;        
 } /* SDsetattr */
@@ -1993,6 +1986,7 @@
            int32 *nt,    /* OUT: attribute number type */
            int32 *count  /* OUT: number of attribute values */)
 {
+    CONSTR(FUNC, "SDattrinfo");    /* for HGOTO_ERROR */
     NC_array  *ap = NULL;
     NC_array **app = NULL;
     NC_attr  **atp = NULL;
@@ -2003,16 +1997,10 @@
     fprintf(stderr, "SDattrinfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDattrinfo );
-#endif
 
     /* sanity check args */
     if((name == NULL) || (nt == NULL) || (count == NULL))
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -2059,9 +2047,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDattrinfo);
-#endif
 
     return ret_value;    
 } /* SDattrinfo */
@@ -2085,7 +2070,7 @@
            int32 index, /* IN:  attribute index */
            void * buf    /* OUT: data buffer  */)
 {
-
+    CONSTR(FUNC, "SDreadattr");    /* for HGOTO_ERROR */
     NC_array  *ap = NULL;
     NC_array **app = NULL;
     NC_attr  **atp = NULL;
@@ -2096,16 +2081,10 @@
     fprintf(stderr, "SDreadattr: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreadattr );
-#endif
 
     /* sanity check args */
     if(buf == NULL)
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -2142,9 +2121,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreadattr);
-#endif
 
     return ret_value;    
 } /* SDreadattr */
@@ -2170,8 +2146,13 @@
             int32 *end,    /* IN: number of values to write per dimension */
             void *  data    /* IN: data buffer */)
 {
+    CONSTR(FUNC, "SDwritedata");    /* for HGOTO_ERROR */
     intn    varid;
     int32   status;
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    NC_var *tvar;
     NC     *handle = NULL;
     NC_dim *dim = NULL;
 #ifdef BIG_LONGS
@@ -2190,15 +2171,9 @@
     fprintf(stderr, "SDwritedata: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDwritedata );
-#endif
 
     if((start == NULL) || (end == NULL) || (data == NULL))
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2222,6 +2197,37 @@
           goto done;
       }
 
+      tvar = SDIget_var(handle, sdsid);
+
+      if(tvar == NULL)
+         {
+              ret_value = FAIL;
+              goto done;
+      }
+
+    /* disallow writing SDS with rank = 0 - BMR, bug #1045 */
+    if(tvar->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, tvar->data_tag, tvar->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* get ready to write */
     handle->xdrs->x_op = XDR_ENCODE;
     
@@ -2327,9 +2333,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDwritedata);
-#endif
 
     return ret_value;    
 } /* SDwritedata */
@@ -2364,9 +2367,6 @@
     fprintf(stderr, "SDsetdatastrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdatastrs );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2439,9 +2439,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdatastrs);
-#endif
 
     return ret_value;    
 } /* SDsetdatastrs */
@@ -2474,9 +2471,6 @@
     fprintf(stderr, "SDsetcal: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetcal );
-#endif
     
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2543,9 +2537,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetcal);
-#endif
 
     return ret_value;    
 } /* SDsetcal */
@@ -2575,9 +2566,6 @@
     fprintf(stderr, "SDsetfillvalue: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetfillvalue );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2616,9 +2604,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetfillvalue);
-#endif
 
     return ret_value;    
 } /* SDsetfillvalue */
@@ -2641,6 +2626,7 @@
 SDgetfillvalue(int32 sdsid, /* IN:  dataset ID */
                void * val    /* OUT: fillvalue */)
 {
+    CONSTR(FUNC, "SDgetfillvalue");    /* for HGOTO_ERROR */
     NC       *handle = NULL;
     NC_var   *var = NULL;
     NC_attr **attr = NULL;
@@ -2650,10 +2636,11 @@
     fprintf(stderr, "SDgetfillvalue: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetfillvalue );
-#endif
 
+    /* sanity check args */
+    if(val == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
       {
@@ -2690,9 +2677,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetfillvalue);
-#endif
 
     return ret_value;    
 } /* SDgetfillvalue */
@@ -2729,9 +2713,6 @@
     fprintf(stderr, "SDgetdatastrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdatastrs );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2830,9 +2811,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdatastrs);
-#endif
 
     return ret_value;    
 } /* SDgetdatastrs */
@@ -2866,9 +2844,6 @@
     fprintf(stderr, "SDgetcal: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetcal );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2937,9 +2912,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetcal);
-#endif
 
     return ret_value;    
 } /* SDgetcal */
@@ -3049,6 +3021,10 @@
           goto done;
       }
 
+    /* BMR: put back hdf type that was set wrong by NC_new_var; please refer
+       to the cvs history of bug #172 for reason on this statement - 4/17/01*/
+    var->HDFtype = nt;
+
     /* get a new NDG ref for this sucker */
 #ifdef NOT_YET
     var->ndg_ref = Htagnewref(handle->hdf_file,DFTAG_NDG);
@@ -3119,9 +3095,6 @@
     fprintf(stderr, "SDsetdimstrs: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimstrs );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -3196,9 +3169,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimstrs);
-#endif
 
     return ret_value;    
 } /* SDsetdimstrs */
@@ -3292,9 +3262,6 @@
     fprintf(stderr, "SDsetdimscales: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimscale );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -3356,9 +3323,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimscale);
-#endif
 
     return ret_value;    
 } /* SDsetdimsacle */
@@ -3394,10 +3358,14 @@
     fprintf(stderr, "SDgetdimscale: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimscale );
-#endif
 
+    /* sanity check args */
+    if(data == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL) 
@@ -3467,9 +3435,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimscale);
-#endif
 
     return ret_value;    
 } /* SDsetdimsacle */
@@ -3508,9 +3473,6 @@
     fprintf(stderr, "SDdiminfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDdiminfo );
-#endif
 
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL)
@@ -3577,9 +3539,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDdiminfo);
-#endif
 
     return ret_value;    
 } /* SDdiminfo */
@@ -3619,9 +3578,6 @@
     fprintf(stderr, "SDgetdimstrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimstrs );
-#endif
 
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL) 
@@ -3718,9 +3674,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimstrs);
-#endif
 
     return ret_value;    
 } /* SDgetdimstrs */
@@ -3753,7 +3706,7 @@
     FORTRAN	- sfsextf
 
  RETURNS
-    Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
@@ -3770,9 +3723,6 @@
     fprintf(stderr, "SDsetexternalfile: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetexternalfile );
-#endif
 
     if(NULL == filename || offset < 0)
       {
@@ -3859,9 +3809,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetexternalfile);
-#endif
 
     return ret_value;    
 } /* SDsetexternalfile */
@@ -3897,7 +3844,7 @@
     NOTE: n-bit "compression" is described more fully in the cnbit.c file.
 
  RETURNS
-    Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
@@ -3918,9 +3865,6 @@
     fprintf(stderr, "SDsetnbitdataset: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetnbitdataset );
-#endif
 
     if(start_bit < 0 || bit_len <= 0)
       {
@@ -4007,16 +3951,70 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetnbitdataset);
-#endif
 
     return ret_value;    
 } /* SDsetnbitdataset */
 
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
 
 /******************************************************************************
  NAME
+	SDsetup_szip_parms -- check and set parameters for szip compression
+              int32 id;            IN: the  varid
+              NC *handle;          IN: the SD handle
+              comp_info *c_info;   IN/OUT: the compression settings 
+              int32 *cdims;        IN: the chunk dims, NULL if not chunked
+
+ DESCRIPTION
+     Collect the parameters and call HCPcszip_setup_parms to set the
+     computed szip paramters.
+
+ RETURNS
+    SUCCEED/FAIL
+
+******************************************************************************/ 
+intn 
+SDsetup_szip_parms( int32 id, NC *handle, comp_info *c_info, int32 *cdims)
+{
+    NC_dim    *dim;     /* to check if the dimension is unlimited */
+    int32      dimindex;/* to obtain the NC_dim record */
+    NC_var    *var; 
+    int32 ndims;
+    int i;
+    int32 xdims[MAX_VAR_DIMS];
+    int32 nt;
+    intn       ret_value = SUCCEED;
+
+    if(handle->vars == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
+    var = SDIget_var(handle, id);
+    if(var == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
+    ndims = var->assoc->count; 
+	for (i = 0; i < ndims; i++) {
+		dimindex = var->assoc->values[i];
+		dim = SDIget_dim(handle, dimindex);
+		xdims[i] = dim->size;
+	}
+
+    nt = var->HDFtype;
+	
+    ret_value = HCPsetup_szip_parms( c_info, nt, 1, ndims, xdims, cdims);
+
+done:
+	return(ret_value);
+}
+#endif
+/******************************************************************************
+ NAME
 	SDsetcompress -- Create/convert a dataset to compressed representation
 
  DESCRIPTION
@@ -4028,18 +4026,23 @@
     IMPORTANT:  This will only work on datasets stored in HDF files.
 
  RETURNS
-     Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
-SDsetcompress(int32      id,    /* IN: dataset ID */
-              int32      type,  /* IN: the type of compression to perform on the
-                                        next image */
-              comp_info *c_info /* IN: ptr to compression information structure */)
+SDsetcompress(int32 id,                /* IN: dataset ID */
+              comp_coder_t comp_type,  /* IN: the type of compression to 
+					  perform on the next image */
+              comp_info *c_info        /* IN: ptr to compression info struct*/)
 {
+    CONSTR(FUNC, "SDsetcompress");    /* for HGOTO_ERROR */
     NC        *handle;
     NC_var    *var;
+    NC_dim    *dim;     /* to check if the dimension is unlimited */
+    int32      dimindex;/* to obtain the NC_dim record */
     model_info m_info;  /* modeling information for the HCcreate() call */
+    comp_info c_info_x;  /* local copy */
+    uint32  comp_config;
     intn       status = FAIL;
     intn       ret_value = SUCCEED;
 
@@ -4047,16 +4050,24 @@
     fprintf(stderr, "SDsetcompress: I've been called\n");
 #endif /* SDDEBUG */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetcompress );
-#endif
 
-    if (type < 0 || type >= COMP_CODE_INVALID)
+    if (comp_type < COMP_CODE_NONE || comp_type >= COMP_CODE_INVALID)
       {
           ret_value = FAIL;
           goto done;
       }
 
+    HCget_config_info(comp_type, &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+    HDmemcpy(&c_info_x,c_info,sizeof(comp_info));
+
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE)
       {
@@ -4077,6 +4088,48 @@
           goto done;
       }
 
+    /* disallow setting compress for SDS with rank = 0 - BMR, bug #1045 */
+    if(var->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
+    /* unlimited dimensions don't work with compression */
+        /* Get the index of the SDS' first dimension from the list of indices
+         * branching out from NC_var.  This index indicates where this dim
+         * is in the "dims" list branching out from NC. */
+        dimindex = var->assoc->values[0];
+
+        /* Retrieve the NC_dim record to check for unlimited dimension */
+        dim = SDIget_dim(handle, dimindex);
+        if(dim == NULL)
+        {
+            ret_value = FAIL;
+            goto done;
+        }
+
+        /* If this dimension is unlimited, then return FAIL; the subsequent
+         * writing of this SDS will write uncompressed data */
+        if (dim->size == SD_UNLIMITED)
+        {
+            ret_value = FAIL;
+            goto done;
+        }
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+	if (comp_type == COMP_CODE_SZIP) {
+	   if (SDsetup_szip_parms( id, handle, &c_info_x, NULL) == FAIL) {
+		HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	    }
+	}
+#else
+	/* no SZIP */
+/* probably covered by test at start */
+	if (comp_type == COMP_CODE_SZIP) {
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	}
+#endif /* H4_HAVE_LIBSZ          */
+
 #ifdef SDDEBUG
     printf("SDsetcompress(): var->data_ref=%d\n",(int)var->data_ref);
 #endif /* SDDEBUG */
@@ -4101,7 +4154,7 @@
 
     status=(intn)HCcreate(handle->hdf_file,(uint16)DATA_TAG,
                           (uint16) var->data_ref,COMP_MODEL_STDIO,&m_info,
-                          (comp_coder_t)type, c_info);
+                          comp_type, &c_info_x);
 
 #ifdef SDDEBUG
     printf("SDsetcompress(): HCcreate() status=%d\n",(intn)status);
@@ -4163,14 +4216,78 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetcompress);
-#endif
 
     return ret_value;    
 } /* SDsetcompress */
 
+/******************************************************************************
+ NAME
+	SDgetcompress -- Retrieves compression information of a dataset
 
+ DESCRIPTION
+    This routine uses HCPgetcompress to retrieve the compression type
+    and the compression information of the identified dataset.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ MODIFICATION
+    July 2001: Added to fix bug #307 - BMR 
+
+******************************************************************************/ 
+intn 
+SDgetcompress(int32     id,     /* IN: dataset ID */
+              comp_coder_t*    comp_type,   /* OUT: the type of compression */
+              comp_info* c_info)/* OUT: ptr to compression information 
+				structure for storing the retrieved info */
+{
+    CONSTR(FUNC, "SDgetcompress");    /* for HGOTO_ERROR */
+    NC        *handle;
+    NC_var    *var;
+    intn       status = FAIL;
+    intn       ret_value = SUCCEED;
+
+#ifdef SDDEBUG
+    fprintf(stderr, "SDgetcompress: I've been called\n");
+#endif /* SDDEBUG */
+
+
+    /* clear error stack */
+    HEclear();
+
+    if(comp_type == NULL || c_info == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    handle = SDIhandle_from_id(id, SDSTYPE);
+    if(handle == NULL || handle->file_type != HDF_FILE)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+    if(handle->vars == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    var = SDIget_var(handle, id);
+    if(var == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+#ifdef SDDEBUG
+    printf("SDgetcompress(): var->data_ref=%d, var->aid=%d\n",(int)var->data_ref, (int)var->aid);
+#endif /* SDDEBUG */
+    if(!var->data_ref) 
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* use lower-level routine to get the compression information */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		comp_type, c_info);
+    if(status==FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+    if (ret_value == FAIL)
+      { /* Failure cleanup */
+
+      }
+    /* Normal cleanup */
+
+    return ret_value;    
+} /* SDgetcompress */
+
 /******************************************************************************
  NAME
 	SDfindattr -- find an attribute's index by name
@@ -4196,9 +4313,6 @@
     int32      len;
     int32      ret_value = FAIL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDfindattr );
-#endif
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -4239,9 +4353,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDfindattr);
-#endif
 
     return ret_value;        
 } /* SDfindattr */
@@ -4270,9 +4381,6 @@
     fprintf(stderr, "SDidtoref: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDidtoref );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE) 
@@ -4303,9 +4411,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDidtoref);
-#endif
 
     return ret_value;    
 } /* SDidtoref */
@@ -4335,9 +4440,6 @@
     fprintf(stderr, "SDreftoindex: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreftoindex );
-#endif
 
     handle = SDIhandle_from_id(fid, CDFTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE) 
@@ -4371,9 +4473,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreftoindex);
-#endif
 
     return ret_value;    
 } /* SDreftoindex */
@@ -4402,9 +4501,6 @@
     fprintf(stderr, "SDisrecord: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDisrecord );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL)
@@ -4426,6 +4522,12 @@
         goto done;
       }
 
+    if(var->shape == NULL)
+      {
+        ret_value = TRUE; /* EP thinks it should return true - BMR, bug #1045 */
+        goto done;
+      }
+
     if(var->shape[0] == SD_UNLIMITED)
         ret_value = TRUE;
     else
@@ -4438,9 +4540,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-   TRACE_OFF (PABLO_mask, ID_SDisrecord);
-#endif
 
     return ret_value;    
 } /* SDisrecord */
@@ -4470,9 +4569,6 @@
     fprintf(stderr, "SDiscoordvar: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDiscoordvar );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL)
@@ -4530,9 +4626,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDiscoordvar);
-#endif
 
     return ret_value;    
 } /* SDiscoordvar */
@@ -4596,9 +4689,6 @@
     fprintf(stderr, "SDsetrag: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetrag );
-#endif
 
     /* get the variable */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -4654,9 +4744,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetrag);
-#endif
 
     return ret_value;    
 } /* SDsetrag */
@@ -4690,9 +4777,6 @@
     fprintf(stderr, "SDsetaccesstype: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetaccesstype );
-#endif
 
     switch (accesstype)
       {
@@ -4739,9 +4823,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetaccesstype);
-#endif
 
     return ret_value;    
 } /* SDsetaccesstype */
@@ -4773,9 +4854,6 @@
     fprintf(stderr, "SDsetblocksize: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetblocksize );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -4803,9 +4881,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask,  ID_SDsetblocksize);
-#endif
 
     return ret_value;    
 } /* SDsetblocksize */
@@ -4835,9 +4910,6 @@
     fprintf(stderr, "SDsetfillmode: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetfillmode );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sd_id, CDFTYPE);
@@ -4857,9 +4929,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetfillmode);
-#endif
 
     return ret_value;    
 } /* SDsetfillmode() */
@@ -4889,9 +4958,6 @@
     fprintf(stderr, "SDsetdimval_comp: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimval_comp );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(dimid, DIMTYPE);
@@ -4927,9 +4993,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimval_comp);
-#endif
 
     return ret_value;    
 } /* SDsetdimval_comp */
@@ -4957,9 +5020,6 @@
     fprintf(stderr, "SDisdimval_bwcomp: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDisdimval_bwcomp );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(dimid, DIMTYPE);
@@ -4991,9 +5051,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDisdimval_bwcomp);
-#endif
 
     return ret_value;    
 } /* SDisdimval_bwcomp */
@@ -5115,6 +5172,7 @@
            HDF_CHUNK_DEF chunk_def, /* IN: chunk definition */
            int32         flags      /* IN: flags */)
 {
+    CONSTR(FUNC, "SDsetchunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;      /* file handle */
     NC_var    *var    = NULL;      /* SDS variable */
     NC_attr  **fill_attr = NULL;   /* fill value attribute */
@@ -5122,6 +5180,7 @@
     HDF_CHUNK_DEF *cdef   = NULL;  /* SD Chunk definition */
     model_info minfo;              /* dummy model info struct */
     comp_info  cinfo;              /* compression info - NBIT */
+uint32 comp_config;
     int32     *cdims    = NULL;    /* array of chunk lengths */
     int32      fill_val_len = 0;   /* fill value length */
     void      *fill_val    = NULL; /* fill value */
@@ -5139,10 +5198,9 @@
     fprintf(stderr,"SDsetchunk: called  \n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetchunk );
-#endif
 
+     /* make sure this is cleared */
+     memset(chunk,0,sizeof(chunk[0]));
     /* Check some args */
 
     /* get file handle and verify it is an HDF file 
@@ -5162,6 +5220,13 @@
         goto done;
       }
 
+    /* disallow setting chunk for SDS with rank = 0 - BMR, bug #1045 */
+    if(var->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
     /* Decide type of defintion passed in  */
     switch (flags)
       {
@@ -5175,13 +5240,50 @@
           chunk[0].minfo = &minfo; /* dummy */
           break;
       case (HDF_CHUNK | HDF_COMP):
+      /*  EIP 9/11/03 
+       *  We have to take special care if SZIP library is not available;
+       *  Fow all other compression types do
+       */
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
+
+    HCget_config_info( (comp_coder_t)cdef->comp.comp_type , &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+      if ((comp_coder_t)cdef->comp.comp_type != COMP_CODE_SZIP) {
           cdims = cdef->comp.chunk_lengths;
           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
           chunk[0].cinfo = &cdef->comp.cinfo; 
           chunk[0].minfo = &minfo; /* dummy */
+       }
+       else /* requested compression is SZIP */
+
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+          {
+           cdims = cdef->comp.chunk_lengths;
+           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
+           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
+           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
+           chunk[0].minfo = &minfo; /* dummy */
+    	   HDmemcpy(&cinfo,&(cdef->comp.cinfo),sizeof(comp_info));
+	   if ( SDsetup_szip_parms( sdsid, handle, &cinfo, cdims) == FAIL ) {
+	       HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	   }
+              chunk[0].cinfo = &cinfo; 
+          }
+#else                         /* we do not have the SZIP library */
+          {
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+          }
+#endif /* H4_HAVE_LIBSZ */
+
           break;
       case (HDF_CHUNK | HDF_NBIT):
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
@@ -5461,9 +5563,6 @@
     if (chunk[0].pdims != NULL)
         HDfree(chunk[0].pdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetchunk);
-#endif
 
     return ret_value;
 } /* SDsetchunk */
@@ -5510,9 +5609,6 @@
     intn      i;                   /* loop variable */
     intn      ret_value = SUCCEED; /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetchunkinfo );
-#endif
 
     /* Check args */
 
@@ -5593,9 +5689,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetchunkinfo);
-#endif
 
     return ret_value;
 } /* SDgetchunkinfo() */
@@ -5632,6 +5725,7 @@
              int32      *origin,/* IN: origin of chunk to write */
              const void *datap  /* IN: buffer for data */)
 {
+    CONSTR(FUNC, "SDwritechunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;   /* file handle */
     NC_var    *var    = NULL;   /* SDS variable */
     int16      special;         /* Special code */
@@ -5640,24 +5734,22 @@
     int8       platntsubclass;  /* the machine type of the current platform */
     int8       outntsubclass;   /* the data's machine type */
     uintn      convert;         /* whether to convert or not */
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    int32 status;
     intn       i;
     sp_info_block_t info_block; /* special info block */
     static uint32 tBuf_size = 0; /* statc conversion buffer size */
     static void  *tBuf = NULL;   /* static buffer used for conversion */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDwritechunk );
-#endif
 
     info_block.cdims = NULL;
 
     /* Check args */
     if (origin == NULL || datap == NULL)
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* get file handle and verify it is an HDF file 
        we only handle writinng to SDS only not coordinate variables */
@@ -5668,6 +5760,7 @@
         goto done;
       }
 
+
     /* get variable from id */
     var = SDIget_var(handle, sdsid);
     if(var == NULL)
@@ -5683,6 +5776,22 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* inquire about element */
     ret_value = Hinquire(var->aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -5794,9 +5903,6 @@
     if (info_block.cdims != NULL)
         HDfree(info_block.cdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDwritechunk);
-#endif
 
     return ret_value;
 } /* SDwritechunk() */
@@ -5832,6 +5938,7 @@
             int32 *origin, /* IN: origin of chunk to write */
             void  *datap   /* IN/OUT: buffer for data */)
 {
+    CONSTR(FUNC, "SDreadchunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;   /* file handle */
     NC_var    *var    = NULL;   /* SDS variable */
     int16      special;         /* Special code */
@@ -5840,24 +5947,22 @@
     int8       platntsubclass;  /* the machine type of the current platform */
     int8       outntsubclass;   /* the data's machine type */
     uintn      convert;         /* whether to convert or not */
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    int32 status;
     intn       i;
     sp_info_block_t info_block; /* special info block */
     static uint32 tBuf_size = 0; /* statc conversion buffer size */
     static void  *tBuf = NULL; /* static buffer used for conversion */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreadchunk );
-#endif
 
     info_block.cdims = NULL;
 
     /* Check args */
     if (origin == NULL || datap == NULL)
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* get file handle and verify it is an HDF file 
        we only handle reading from SDS only not coordinate variables */
@@ -5883,6 +5988,22 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* inquire about element */
     ret_value = Hinquire(var->aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -5993,9 +6114,6 @@
     if (info_block.cdims != NULL)
         HDfree(info_block.cdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreadchunk);
-#endif
 
     return ret_value;
 } /* SDreadchunk() */
@@ -6060,9 +6178,6 @@
     int16     special;              /* Special code */
     intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_SDsetchunkcache );
-#endif
 
     /* Check args */
     if (maxcache < 1 )
@@ -6118,10 +6233,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetchunkcache);
-#endif
-
     return ret_value;
 } /* SDsetchunkcache() */
 
@@ -6135,30 +6246,33 @@
     SDS has not been written with data, and FALSE, otherwise. 
 
  RETURNS
-	SUCCEED/FAIL
+    SUCCEED/FAIL
 
  AUTHOR
-	bmribler - 9-01-98
+    bmribler - 9-01-98
         
+ MODIFICATION
+    bmribler - 9/29/2004
+        When the SDS is not a special element, we only need to check
+        its data ref# to decide whether it has data written, but
+        when the SDS is a special element, it still has a valid
+        data ref# even though it doesn't have data, we'll then need
+        to perform a more detailed check.  Added more detailed checks.
+
 ******************************************************************************/
 int32
 SDcheckempty(int32 sdsid,  /* IN: dataset ID */
 	     intn  *emptySDS /* TRUE if SDS is empty */)
 {
-    NC     *handle = NULL;
-    NC_var *var = NULL;
+    CONSTR(FUNC, "SDcheckempty");	/* for HGOTO_ERROR */
+    NC     *handle = NULL;		/* file record struct */
+    NC_var *var = NULL;			/* variable record struct */
     int32   ret_value = SUCCEED;
 
 #ifdef SDDEBUG
     fprintf(stderr, "SDcheckempty: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-#ifndef ID_SDcheckempty
-#define ID_SDcheckempty DUMMY_HDF
-#endif
-    TRACE_ON(PABLO_mask,ID_SDcheckempty );
-#endif
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -6175,27 +6289,94 @@
         goto done;
       }
 
-    /* if the SDS has been written with data, a storage is created 
-	for the SDS data, and var->data_ref will contain this storage's 
-	reference number, not 0 */
-    if( var->data_ref != 0 )
-      {
-        *emptySDS = FALSE;
-        goto done;
-      }
-    *emptySDS = TRUE;  /* SDS is not written with data */
+    /* assume that the SDS is not empty until proving otherwise */
+    *emptySDS = FALSE;
 
+    /* if the data ref# of the SDS is 0, it indicates that the SDS has 
+	not been written with data because no storage is created 
+	for the SDS data */
+    if (var->data_ref == 0)
+    {
+        *emptySDS = TRUE;
+    }
+    else
+    { /* data_ref is not 0, so must check on special SDSs to determine if
+	 the SDS is empty */
+	ret_value = HDcheck_empty(handle->hdf_file, var->data_tag, 
+				  var->data_ref, emptySDS);
+	if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    } /* var->data_ref != 0 */
+
 done:
     if (ret_value == FAIL)
       { /* Failure cleanup */
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDcheckempty);
+    return ret_value;
+} /* SDcheckempty */
+
+/******************************************************************************
+ NAME
+	SDidtype -- returns the type of an id
+
+ DESCRIPTION
+    Given an id, return its type, which is either an SD id, an SDS id, or
+    a dimension id, or indicate that it is not a valid SD API id.
+
+ RETURNS
+    A value of type hdf_idtype_t, which can be either of the following:
+    SD_ID, SDS_ID, DIM_ID, NOT_SDAPI_ID.
+
+ AUTHOR
+    bmribler - 1-19-2005
+        
+ MODIFICATION
+
+******************************************************************************/
+hdf_idtype_t SDidtype(int32 an_id)
+{
+    NC     *handle = NULL;	/* file record struct */
+    hdf_idtype_t ret_value = NOT_SDAPI_ID;
+
+#ifdef SDDEBUG
+    fprintf(stderr, "SDidtype: I've been called\n");
 #endif
 
+    /* Assuming that the id is an SD id, get and check the handle */
+    handle = SDIhandle_from_id(an_id, CDFTYPE);
+
+    /* If it is, indicate so */
+    if(handle != NULL)
+	ret_value = SD_ID;
+
+    /* otherwise, check further... */
+    else
+    {
+	/* Assuming that it is an SDS id, get and check the handle */
+	handle = SDIhandle_from_id(an_id, SDSTYPE);
+
+	/* If it is, indicate so */
+	if(handle != NULL)
+            ret_value = SDS_ID;
+
+	/* otherwise, check if it is a dimension id, or just not valid */
+	else
+	{
+            handle = SDIhandle_from_id(an_id, DIMTYPE);
+            if(handle != NULL)
+		ret_value = DIM_ID;
+	    else
+		ret_value = NOT_SDAPI_ID;
+        }
+    }
+done:
+    if (ret_value == FAIL)
+      { /* Failure cleanup */
+
+      }
+    /* Normal cleanup */
     return ret_value;
-} /* SDcheckempty */
+} /* SDidtype */
 
 #endif /* HDF */

Modified: packages/libhdf4/trunk/mfhdf/libsrc/netcdf.h.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/netcdf.h.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/netcdf.h.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -14,7 +14,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf.h.in,v 1.13 2000/05/23 18:03:34 acheng Exp $" */
+/* "$Id: netcdf.h.in,v 1.16 2004/11/22 18:57:08 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -295,7 +295,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -334,6 +334,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -362,7 +363,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/trunk/mfhdf/libsrc/putget.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/putget.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/putget.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: putget.c,v 1.73 2000/08/29 13:56:53 koziol Exp $ */
+/*	$Id: putget.c,v 1.78 2003/12/10 21:15:13 epourmal Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -582,7 +582,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
 		return( xdr_short(xdrs, (nclong *)values) ) ;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		return( xdr_int(xdrs, (nclong *)values) ) ;
 #else
 		return( xdr_long(xdrs, (nclong *)values) ) ;
@@ -1899,7 +1899,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
                 xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		xdr_NC_fnct = xdr_int ;
 #else
 		xdr_NC_fnct = xdr_long ;
@@ -1977,8 +1977,9 @@
      *  regular dimensions of an unlimited dimension dataset are being written
      *  out, it's ok to write out a "block" of all those slices at once. -QAK
      */
-	if( IS_RECVAR(vp) && (edp-1==edges) && !partial)
+/*	if( IS_RECVAR(vp) && (edp-1==edges) && !partial)
         edp=edges;
+*/
 
 	/* shp, edp reference last index s.t. shape[ii] == edge[ii] */
 	return(edp) ;

Copied: packages/libhdf4/trunk/mfhdf/libsrc/temptySDSs.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/temptySDSs.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/temptySDSs.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/temptySDSs.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * temptySDS.c - tests the API SDcheckempty.
+ * Structure of the file:
+ *    test_checkempty - test driver
+ *	  test_nonspecial_SDSs - tests nonspecial SDSs without closing file
+ *	  test_compressed_SDSs - tests compressed SDSs without closing file
+ *	  test_chunked_SDSs    - tests chunked SDSs without closing file
+ *	  test_unlimited_SDSs  - tests unlimited dim SDSs without closing file
+ *	  test_SDSs_infile     - tests all SDSs in file after closing the file
+ *	  			 and reopening it
+ *    check_SDS - utility routine that calls SDcheckempty and verifies values
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "emptySDSs.hdf"	/* data file to test empty SDSs */
+#define X_LENGTH      10
+#define Y_LENGTH      10
+#define RANK          2
+
+/* Utility routine that selects that named SDS, then calls SDcheckempty
+ * and verifies the returned values. */
+static void check_SDS(
+		int32 fid, 		/* file id */
+		char* sds_name, 	/* name of the inquired SDS */
+		int32 check_value, 	/* expected ret val from SDcheckempty */
+		int32 verify_value, 	/* expected value of 'emptySDS' from SDcheckempty */
+		int* ret_num_errs	/* current number of errors */ )
+{
+    int32 sds_id, sds_index, status_32;
+    intn status, emptySDS;
+    int num_errs = 0;
+    char mesg[80];
+
+    /* Get index of dataset using its name */
+    sds_index = SDnametoindex(fid, sds_name);
+    sprintf(mesg, "In check_SDS: SDnametoindex (%s)", sds_name);
+    CHECK(sds_index, FAIL, mesg);
+
+    /* Select the dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In check_SDS: SDselect");
+
+    /* The returned value from SDcheckempty is CHECKed against 
+       check_value (FAIL) and 'emptySDS' is verified to be verify_value,
+       which can be TRUE or FALSE. */
+    status_32 = SDcheckempty( sds_id, &emptySDS);
+    CHECK(status_32, check_value, "SDcheckempty");
+    VERIFY(emptySDS, verify_value, "SDcheckempty");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In check_SDS: SDendaccess");
+
+    *ret_num_errs = num_errs;
+}   /* check_SDS */
+
+/* Test non-special SDSs.  This routine creates non-special SDSs, writes
+ * data to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+static intn 
+test_nonspecial_SDSs(int32 fid)
+{
+    int32 sds_id;
+    int32 dimsize[2], start[2], edges[2];
+    int32 data[Y_LENGTH][X_LENGTH];
+    intn  status;
+    int   i, j;
+    int   num_errs = 0;		/* number of errors so far */
+
+    /* Initialize data for the dataset */
+    for (j = 0; j < Y_LENGTH; j++) {
+        for (i = 0; i < X_LENGTH; i++)
+            data[j][i] = (i + j) + 1;
+    }
+
+    /* Create a 2x2 dataset called "EmptyDataset" */
+    dimsize[0] = Y_LENGTH;
+    dimsize[1] = X_LENGTH;
+    sds_id = SDcreate(fid, "EmptyDataset", DFNT_FLOAT32, 2, dimsize);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDcreate 'EmptyDataset'");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_nonspecial_SDSs: SDendaccess");
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "EmptyDataset", FAIL, TRUE, &num_errs);
+
+    /* Create another 2x2 dataset called "WrittenDataset" */
+    sds_id = SDcreate(fid, "WrittenDataset", DFNT_INT32, 2, dimsize);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDcreate 'WrittenDataset'");
+
+    /* Define the location and size of the data to be written to the dataset */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDwritedata");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_nonspecial_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "WrittenDataset", FAIL, FALSE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_nonspecial_SDSs */
+
+/* Test compressed SDSs.  This routine creates compressed SDSs, writes
+ * data to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+static intn
+test_compressed_SDSs(int32 fid)
+{
+    int32     sds_id, esds_id;
+    int32     start[2], edges[2], dim_sizes[2];
+    int32     comp_type;    /* Compression flag */
+    comp_info c_info;	   /* Compression structure */
+    int32     data[Y_LENGTH][X_LENGTH];
+    intn      status;
+    int       i, j;
+    int   num_errs = 0;   /* number of errors so far */
+
+    /* Buffer array data and define array dimensions */
+    for (j = 0; j < Y_LENGTH; j++)
+    {
+        for (i = 0; i < X_LENGTH; i++)
+                data[j][i] = (i + j) + 1;
+    }
+    dim_sizes[0] = Y_LENGTH;
+    dim_sizes[1] = X_LENGTH;
+
+    /* Create datasets, one to be written with data, the other not */
+    sds_id = SDcreate(fid, "CompressedData", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_compressed_SDSs: SDcreate 'CompressedData'");
+
+    esds_id = SDcreate(fid, "Compressed-No-Data", DFNT_INT32, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_compressed_SDSs: SDcreate 'Compressed-No-Data'");
+
+    comp_type = COMP_CODE_DEFLATE;
+    c_info.deflate.level = 6;
+    status = SDsetcompress(sds_id, comp_type, &c_info);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDsetcompress 'CompressedData'");
+
+    status = SDsetcompress(esds_id, comp_type, &c_info);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDsetcompress 'Compressed-No-Data'");
+
+    /* Define the location and size of the dataset to be written to the file */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDwritedata");
+ 
+     /* Close the SDSs */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDendaccess 'CompressedData'");
+
+    status = SDendaccess(esds_id);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDendaccess 'Compressed-No-Data'");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "CompressedData", FAIL, FALSE, &num_errs);
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Compressed-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_compressed_SDSs */
+
+/* Test chunked SDSs.  This routine creates chunked SDSs, writes data
+ * to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+
+#define X_CHUNKED_LENGTH      4
+#define Y_CHUNKED_LENGTH      9
+
+static intn
+test_chunked_SDSs(int32 fid)
+{
+    int32         sds_id, esds_id, sds_index;
+    int32         flag, maxcache, new_maxcache;
+    int32         dim_sizes[RANK], origin[RANK];
+    HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+    int32         comp_flag;
+    int16         fill_value = 0;   /* Fill value */
+    intn          status;
+    int           num_errs = 0;   /* number of errors so far */
+
+    /* Declare chunks data type and initialize some of them. */
+    int16 chunk1[3][2] = { 1, 1,
+                           1, 1,
+                           1, 1 }; 
+
+    int16 chunk2[3][2] = { 2, 2,
+                           2, 2,
+                           2, 2 }; 
+
+    int16 chunk3[3][2] = { 3, 3,
+                           3, 3,
+                           3, 3 }; 
+
+    int16 chunk6[3][2] = { 6, 6,
+                           6, 6,
+                           6, 6 };
+
+
+    c_def.chunk_lengths[0] = 3;
+    c_def.chunk_lengths[1] = 2;
+
+    /* Create Y_CHUNKED_LENGTH x X_CHUNKED_LENGTH SDS */
+    dim_sizes[0] = Y_CHUNKED_LENGTH;
+    dim_sizes[1] = X_CHUNKED_LENGTH;
+    esds_id = SDcreate(fid, "Chunked-No-Data", DFNT_INT16, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_chunked_SDSs: SDcreate 'Chunked-No-Data'");
+
+    /* Terminate access to the "Chunked-No-Data" dataset */
+    status = SDendaccess(esds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess 'Chunked-No-Data'");
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Chunked-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Create another Y_CHUNKED_LENGTH x X_CHUNKED_LENGTH SDS but this 
+       one will be written with chunks */
+    sds_id = SDcreate(fid, "ChunkedData", DFNT_INT16, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_chunked_SDSs: SDcreate 'ChunkedData'");
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue(sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDsetfillvalue");
+
+    /* Set info for chunking */
+    comp_flag = HDF_CHUNK;
+    status = SDsetchunk(sds_id, c_def, comp_flag);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDsetchunk");
+
+    /* Set chunk cache to hold maximum of 3 chunks */
+    maxcache = 3;
+    flag = 0;
+    new_maxcache = SDsetchunkcache(sds_id, maxcache, flag);
+    CHECK(new_maxcache, FAIL, "In test_chunked_SDSs: SDsetchunkcache");
+
+    /* Terminate access to the dataset then check if it's empty - and it 
+       should be, before writing data to it. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess");
+
+    /* Check that this SDS is still empty after the call to SDsetchunk */
+    check_SDS(fid, "ChunkedData", FAIL, TRUE, &num_errs);
+
+    /* Re-select the "ChunkedData" SDS, then write chunks using SDwritechunk 
+       function */
+
+    /* Get index of dataset using its name */
+    sds_index = SDnametoindex(fid, "ChunkedData");
+    CHECK(sds_index, FAIL, "In test_chunked_SDSs: SDnametoindex");
+
+    /* Select the dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In test_chunked_SDSs: SDselect");
+
+    /* Write the chunk with the coordinates (0,0) */
+    origin[0] = 0;
+    origin[1] = 0;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk1);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Write the chunk with the coordinates (1,0) */
+    origin[0] = 1;
+    origin[1] = 0;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk3);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Write the chunk with the coordinates (0,1) */
+    origin[0] = 0;
+    origin[1] = 1;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk2);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Terminate access to the dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "ChunkedData", FAIL, FALSE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_chunked_SDSs */
+
+/* Test unlimited dimension SDSs.  This routine creates unlimited 
+ * dimension SDSs, writes data to one of the SDSs, and checks for 
+ * emptiness on each without closing the file. */
+static intn
+test_unlimited_SDSs(int32 fid)
+{
+    int32 sds_id, esds_id, sds_index;
+    int32 dim_sizes[2];
+    int32 data[Y_LENGTH][X_LENGTH], append_data[X_LENGTH];
+    int32 start[2], edges[2];
+    intn  status;
+    int   i, j;
+    int   num_errs = 0;   /* number of errors so far */
+
+    /* Data initialization */
+    for (j = 0; j < Y_LENGTH; j++) 
+    {
+        for (i = 0; i < X_LENGTH; i++)
+           data[j][i] = (i + 1) + (j + 1);
+    }
+
+    /* Define dimensions of the array. Make the first dimension 
+       appendable by defining its length to be unlimited */
+    dim_sizes[0] = SD_UNLIMITED;
+    dim_sizes[1] = X_LENGTH;
+
+    /* Create the array datasets */
+    esds_id = SDcreate(fid, "Appendable-No-Data", DFNT_INT32, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_unlimited_SDSs: SDcreate 'Appendable-No-Data'");
+
+    sds_id = SDcreate(fid, "AppendableData", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_unlimited_SDSs: SDcreate 'AppendableData'");
+
+    /* Terminate access to the dataset "Appendable-No-Data" */
+    status = SDendaccess(esds_id);
+
+    /* Define the location and the size of the data to be written 
+       to the second dataset  */
+    start[0] = start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the data */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDwritedata");
+
+    /* Terminate access to the unlimited dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Store the array values to be appended to the dataset */
+    for (i = 0; i < X_LENGTH; i++)
+        append_data[i] = 1000 + i;
+
+    /* Get index of the dataset using its name */
+    sds_index = SDnametoindex(fid, "AppendableData");
+    CHECK(sds_index, FAIL, "In test_unlimited_SDSs: SDnametoindex");
+
+    /* Select the "AppendableData" dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In test_unlimited_SDSs: SDselect 'AppendableData'");
+
+    /* Check if selected SDS is unlimited. If it is not, then terminate 
+       access to the SDS */
+    if (SDisrecord(sds_id)) 
+    {
+        /* Define the location of the append to start at the first column 
+         * of the 11th row of the dataset and to stop at the end of the
+         * eleventh row.  */
+        start[0] = Y_LENGTH;
+        start[1] = 0;
+        edges[0] = 1;
+        edges[1] = X_LENGTH;
+
+        /* Append data to the dataset */
+        status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)append_data);
+        CHECK(status, FAIL, "In test_unlimited_SDSs: SDwritedata");
+    }
+
+    /* Terminate access to the dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Appendable-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}  /* test_unlimited_SDSs */
+
+/* This function checks which of the SDSs in the file are empty/written,
+ * just as in the previous individual tests.  The difference is these
+ * SDSs are read back in after the file is closed and reopened. */
+static intn 
+test_SDSs_infile()
+{
+    int32 fid;
+    intn status;
+    int   num_errs = 0;		/* number of errors so far */
+
+    /* Open the file and initialize the SD interface */
+    fid = SDstart(FILE_NAME, DFACC_READ);
+    CHECK(fid, FAIL, "In test_SDSs_infile: SDstart");
+
+    /* Check that SDS named "EmptyDataset" is empty */
+    check_SDS(fid, "EmptyDataset", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "AppendableData" is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Appendable-No-Data" is empty */
+    check_SDS(fid, "Appendable-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "CompressedData" is NOT empty */
+    check_SDS(fid, "CompressedData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Compressed-No-Data" is empty */
+    check_SDS(fid, "Compressed-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "ChunkedData" is NOT empty */
+    check_SDS(fid, "ChunkedData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Chunked-No-Data" is empty */
+    check_SDS(fid, "Chunked-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "In test_SDSs_infile: SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_SDSs_infile */
+
+/* Test drive for testing the API SDcheckempty. */
+extern int
+test_checkempty()
+{
+    int32 fid;
+    intn status;
+    int num_errs = 0;
+
+    /* Open the file and initialize the SD interface */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "In test_checkempty: SDstart");
+
+    num_errs = num_errs + test_nonspecial_SDSs(fid);
+    num_errs = num_errs + test_compressed_SDSs(fid);
+    num_errs = num_errs + test_chunked_SDSs(fid);
+    num_errs = num_errs + test_unlimited_SDSs(fid);
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "In test_checkempty: SDend");
+
+    /* This function will reopen the file and check the SDSs in it */
+    num_errs = num_errs + test_SDSs_infile();
+
+    return num_errs;
+}
+
+#endif /* HDF */

Copied: packages/libhdf4/trunk/mfhdf/libsrc/tidtypes.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tidtypes.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/tidtypes.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/tidtypes.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,215 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * tidtypes.c - tests the API SDcheckempty.
+ * Structure of the file:
+ *    test_idtype - test driver
+ *	  test_SDAPI_ids    - tests SDidtype on SD API ids: sd, sds, dim ids
+ *	  test_nonSDAPI_ids - tests SDidtype on non SD API ids and invalid id.
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "idtypes.hdf"	/* data file to test ID types */
+#define X_LENGTH      10
+#define Y_LENGTH      10
+#define RANK          2
+
+static intn
+test_SDAPI_ids()
+{
+    int32     fid, dset1, dset2, dim_id;
+    int32     dimsize[RANK];
+    hdf_idtype_t id_type;
+    intn      status;
+    intn      num_errs = 0;         /* number of errors so far */
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_1 */
+    dimsize[0] = X_LENGTH;
+    dimsize[1] = Y_LENGTH;
+    dset1 = SDcreate(fid, "DataSet_1", DFNT_INT32, RANK, dimsize);
+    CHECK(dset1, FAIL, "SDcreate");
+
+    /* Create another X_LENGTH by Y_LENGTH dataset, called DataSet_2 */
+    dset2 = SDcreate(fid, "DataSet_2", DFNT_FLOAT64, RANK, dimsize);
+    CHECK(dset2, FAIL, "SDcreate");
+
+    /* Test SDidtype on the second dataset */
+    id_type = SDidtype(dset2);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Close the datasets */
+    status = SDendaccess(dset1);
+    CHECK(status, FAIL, "SDendaccess");
+    status = SDendaccess(dset2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Re-open the file to test SDidtype more */
+    fid = SDstart(FILE_NAME, DFACC_RDWR);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Test SDidtype on the SD id */
+    id_type = SDidtype(fid);
+    VERIFY(id_type, SD_ID, "SDidtype: id_type");
+
+    /* Get access to the first dataset and test SDidtype on the SDS id */
+    dset1 = SDselect(fid, 0);
+    CHECK(dset1, FAIL, "SDselect");
+    id_type = SDidtype(dset1);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Get access to the second dataset and test SDidtype on the SDS id */
+    dset2 = SDselect(fid, 1);
+    CHECK(dset2, FAIL, "SDselect");
+    id_type = SDidtype(dset2);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Get dimension handle for first dimension of DataSet_1 and test
+       SDidtype on the dimension id */
+    dim_id = SDgetdimid(dset1, 0);
+    CHECK(dim_id, FAIL, "SDgetdimid");
+    id_type = SDidtype(dim_id);
+    VERIFY(id_type, DIM_ID, "SDidtype dim_id");
+
+    /* Close the datasets */
+    status = SDendaccess(dset1);
+    CHECK(status, FAIL, "SDendaccess");
+    status = SDendaccess(dset2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_SDAPI_ids */
+
+static intn
+test_nonSDAPI_ids ()
+{
+    int32     fid, gr_id, vdata_id, ri_id;
+    int32     vdata_ref;
+    intn      status;
+    int32     dims[2]={4,5};    /* dimensions for the empty image */
+    hdf_idtype_t id_type;
+    intn      num_errs = 0;     /* number of errors so far */
+
+    /* Open the HDF file */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+
+    /* Initialize HDF for subsequent vdata access */
+    status = Vstart(fid);
+    CHECK(status, FAIL, "Vstart");
+
+    /* Create a new vdata and give it a name */
+    vdata_id = VSattach(fid, -1, "w");
+    CHECK(vdata_id, FAIL, "VSattach");
+    status = VSsetname(vdata_id, "Vdata_1");
+    CHECK(status, FAIL, "VSsetname");
+
+    /* Terminate access to the vdata */
+    status = VSdetach(vdata_id);
+    CHECK(status, FAIL, "VSdetach");
+
+    /* Terminate access to the Vxxx interface and close the file */
+    status = Vend(fid);
+    CHECK(status, FAIL, "Vend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Open the HDF file again to test SDidtype */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+
+    /* Initialize HDF for subsequent vdata accesses */
+    status = Vstart(fid);
+    CHECK(status, FAIL, "Vstart");
+
+    /* Get access to the vdata "Vdata_1" via its reference number */
+    vdata_ref = VSfind(fid, "Vdata_1");
+    CHECK(vdata_ref, FAIL, "VSfind");
+    vdata_id = VSattach(fid, vdata_ref, "w");
+    CHECK(vdata_id, FAIL, "VSattach");
+
+    /* Test SDidtype on the vdata id */
+    id_type = SDidtype(vdata_id);
+    VERIFY(id_type, NOT_SDAPI_ID, "SDidtype: id_type");
+
+    /* Terminate access to the vdata */
+    status = VSdetach(vdata_id);
+    CHECK(status, FAIL, "VSdetach");
+
+    /* Terminate access to the Vxxx interface and close the file */
+    status = Vend(fid);
+    CHECK(status, FAIL, "Vend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Test SDidtype on a GR raster image */
+
+    /* Open file and initialize the GR interface */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+    gr_id = GRstart(fid);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Create an empty image with default fill value */
+    ri_id = GRcreate(gr_id, "Empty Image", 3, DFNT_FLOAT32, 
+		MFGR_INTERLACE_PIXEL, dims);
+    CHECK(ri_id, FAIL, "GRcreate");
+
+    /* Test SDidtype on the GR raster image id */
+    id_type = SDidtype(ri_id);
+    VERIFY(id_type, NOT_SDAPI_ID, "SDidtype: id_type");
+
+    /* Close the image */
+    status = GRendaccess(ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Shut down the GR interface and close the file */
+    status = GRend(gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_nonSDAPI_ids */
+
+/* Test driver for testing the API SDidtype. */
+extern int
+test_idtype()
+{
+    intn num_errs = 0;         /* number of errors */
+
+    num_errs = num_errs + test_SDAPI_ids();
+    num_errs = num_errs + test_nonSDAPI_ids();
+
+    return num_errs;
+}
+
+#endif /* HDF */

Copied: packages/libhdf4/trunk/mfhdf/libsrc/trank0.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/trank0.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/trank0.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/trank0.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,158 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * trank0.c - tests that several APIs behave "correctly" when an SDS has 
+ * 		rank = 0.
+ * Structure of the file:
+ *    test_rank0 - test routine, called in hdftest.c
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "trank0.hdf"	/* data file to test for rank=0 */
+#define X_LENGTH      3
+#define Y_LENGTH      3
+#define RANK          0
+
+/* Test routine for testing the several APIs with SDS having rank = 0. */
+extern int
+test_rank0()
+{
+    int32     fid, sds1_id, sds2_id, sds_id;
+    int32     dim_sizes[2], array_rank, num_type, attributes;
+    int32     start[2], edges[2];
+    comp_coder_t comp_type;	/* to retrieve compression type into */
+    comp_info c_info;		/* compression information structure */
+    int32     comp_flag;	/* compression flag */
+    HDF_CHUNK_DEF c_def;	/* Chunking definitions */
+    int32     buf[Y_LENGTH][X_LENGTH], buf_dup[Y_LENGTH][X_LENGTH];
+    intn      i, j, status;
+    int32     status_32;
+    intn      num_errs = 0;	/* number of errors so far */
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "test_rank0: SDstart");
+
+    /**** Verify that SDsetcompress fails when dataset has rank 0 ****/
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_1 */
+    dim_sizes[0] = X_LENGTH;
+    dim_sizes[1] = Y_LENGTH;
+    sds1_id = SDcreate(fid, "DataSet_1", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds1_id, FAIL, "test_rank0: SDcreate");
+
+    /* Attempt to set compress but should fail */
+    comp_type = COMP_CODE_DEFLATE;
+    c_info.deflate.level = 6;
+    status = SDsetcompress(sds1_id, comp_type, &c_info);
+    VERIFY(status, FAIL, "test_rank0: SDsetcompress");
+
+    /**** Verify that SDsetchunk fails when dataset has rank 0 ****/
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_2 */
+    sds2_id = SDcreate(fid, "DataSet_2", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds2_id, FAIL, "test_rank0: SDcreate");
+
+    /* Attempt to set chunk but should fail */
+    comp_flag = HDF_CHUNK;
+    status = SDsetchunk(sds_id, c_def, comp_flag);
+    VERIFY(status, FAIL, "test_rank0: SDsetchunk");
+
+     /* Close the SDSs */
+    status = SDendaccess(sds1_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+    status = SDendaccess(sds2_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify that SDwritedata fails when dataset has rank 0 ****/
+
+    /* Initialize buffer and its copy, so later can verify that the buffer
+       is not corrupted */
+    for (j=0; j<Y_LENGTH; j++)
+    {
+        for (i=0; i<X_LENGTH; i++)
+	{
+	    buf[j][i] = i;
+	    buf_dup[j][i] = i;
+	}
+    }
+    /* Select the first dataset */
+    sds_id = SDselect(fid, 0);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Define the location and size of the dataset to be written to the file */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)buf);
+    VERIFY(status, FAIL, "test_rank0:SDwritedata");
+
+     /* Close the SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify that SDreaddata doesn't corrupt user's buffer, when dataset 
+	  has rank 0; at this time, it does (buf[0][0] changed), but EP said
+    	  to just document it for now 2/8/05 - BMR ****/
+
+    /* Select the first dataset */
+    sds_id = SDselect(fid, 0);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)buf);
+    CHECK(status, FAIL, "test_rank0: SDreaddata");
+
+     /* Close the SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify various functions ****/
+
+    /* Select the second dataset */
+    sds_id = SDselect(fid, 1);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, NULL, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "test_rank0: SDgetinfo");
+    VERIFY(array_rank, 0, "test_rank0: SDgetinfo");
+
+    /* Verify that SDisrecord doesn't cause seg. fault */
+    status_32 = SDisrecord(sds_id);
+    VERIFY(status_32, TRUE, "test_rank0: SDisrecord");
+
+     /* Close the SDSs */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /* Close the SD interface */
+    status = SDend(fid);
+    CHECK(status, FAIL, "test_rank0: SDend");
+
+    return num_errs;
+}
+
+#endif /* HDF */

Copied: packages/libhdf4/trunk/mfhdf/libsrc/tsd.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tsd.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/tsd.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/tsd.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * tsd.c - tests SDstart for file with no write permission
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+#include "hfile.h"
+
+#define FILE_NAME     "sdtest.hdf"	/* data file to test ID types */
+
+extern int
+test_sd()
+{
+    int32     fid;
+    intn      status;
+#ifdef WIN32
+    int mode;
+#else
+    mode_t mode;
+#endif
+
+    FILE *ff;
+    intn      num_errs = 0;         /* number of errors so far */
+
+    /* delete the file just to be sure */
+    unlink(FILE_NAME);
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+#ifdef WIN32
+    mode = _S_IREAD;
+#else
+    mode =  S_IRUSR;
+#endif
+
+    status = chmod(FILE_NAME, mode);
+    CHECK(status, FAIL, "chmod");
+
+    /* Create a protected file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    VERIFY(fid, FAIL, "second SDstart");
+
+    ff = HI_OPEN(FILE_NAME, DFACC_READ);
+    CHECK(ff, NULL, "fopen");
+    
+    if (ff != NULL) {
+	    HI_CLOSE(ff);
+    }
+
+#ifdef WIN32
+    mode = _S_IWRITE;
+#else
+    mode =  S_IWUSR;
+#endif
+
+    status = chmod(FILE_NAME, mode);
+    CHECK(status, FAIL, "chmod");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_SDAPI_ids */
+#endif /* HDF */

Copied: packages/libhdf4/trunk/mfhdf/libsrc/tszip.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tszip.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/tszip.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/libsrc/tszip.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,1326 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include "mfhdf.h"
+#include "hdftest.h"
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+#define FILE_NAME8	"SDS_8_sziped.hdf"
+#define FILE_NAME16	"SDS_16_sziped.hdf"
+#define FILE_NAME32	"SDS_32_sziped.hdf"
+#define FILE_NAMEfl32	"SDS_fl32_sziped.hdf"
+#define FILE_NAMEfl64	"SDS_fl64_sziped.hdf"
+#define SDS_NAME	"SzipedData"
+
+#define RANK		2
+#define WIDTH		6
+#define LENGTH		9
+
+static intn 
+test_szip_SDS8bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32	sd_id, sds_id;
+   intn 	status;
+   int32	dim_sizes[2], array_rank, num_type, attributes;
+   char 	name[MAX_NC_NAME];
+   comp_info 	c_info;
+   int32        start[2], edges[2];
+   int8         fill_value = 0; /* Fill value */
+   int          i,j;
+   int    	num_errs = 0;   /* number of errors so far */
+   comp_coder_t comp_type;      /* to retrieve compression type into */
+   comp_info    cinfo;          /* compression information structure */
+   uint32       comp_config;
+   int8         out_data[LENGTH][WIDTH];
+   int8         in_data[LENGTH][WIDTH]={
+	   			 1,1,2,2,3,4,
+	   			 1,1,2,2,3,4,
+				 1,1,2,2,3,4,
+				 3,3,0,4,3,4,
+				 3,3,0,4,3,4,
+				 3,3,0,4,3,4,
+				 0,0,6,6,3,4,
+				 5,5,6,6,3,4,
+				 0,0,6,6,3,4};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME8, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT8, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialization for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD8: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME8, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Retrieve compression informayion about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+} /* test_szip_SDS8bit */
+
+static intn 
+test_szip_SDS16bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int16       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int16	out_data[LENGTH][WIDTH];
+    int16	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME16, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT16, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD16: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME16, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDS16bit */
+
+static intn 
+test_szip_SDS32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int32       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int32	out_data[LENGTH][WIDTH];
+    int32	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME32, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD32: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME32, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDS32bit */
+
+static intn 
+test_szip_SDSfl32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+/*
+    int32	pixels_per_scanline;
+*/
+    int32       start[2], edges[2];
+    float32     fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    float32	out_data[LENGTH][WIDTH];
+    float32	in_data[LENGTH][WIDTH]={
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+				 100.0,100.0,200.0,200.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0,
+				 500.0,500.0,600.0,600.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0};
+
+    /********************* End of variable declaration ***********************/
+
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAMEfl32, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_FLOAT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if (SZ_encoder_enabled()) {
+	/* should pass */
+        CHECK(status, FAIL, "SDsetcompress");
+    } else {
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAMEfl32, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDSfl32bit */
+
+static intn 
+test_szip_SDSfl64bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    float64     fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    float64	out_data[LENGTH][WIDTH];
+    float64	in_data[LENGTH][WIDTH]={
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+				 100.0,100.0,200.0,200.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0,
+				 500.0,500.0,600.0,600.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAMEfl64, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_FLOAT64, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialization for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD64: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAMEfl64, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDSfl64bit */
+
+
+#define FILE_NAME	"SDSchunkedsziped.hdf"
+#define SDS_NAME_CH	"ChunkedData"
+#define RANK_CH         2	/* rank of the chunked data set */
+#define WIDTH_CH 	4	/* width of the chunked data set */
+#define LENGTH_CH	9	/* length of the chunked data set */
+#define CWIDTH		2	/* width of the chunk */
+#define CLENGTH		3	/* length of the chunk */
+
+static intn 
+test_szip_chunk()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32         sd_id, sds_id, sds_index;
+   intn          status;
+   int32         flag, maxcache, new_maxcache;
+   int32         dim_sizes[2], origin[2];
+   HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+   uint32       comp_config;
+   int32         comp_flag;
+   int16         all_data[LENGTH_CH][WIDTH_CH];
+   int32         start[2], edges[2];
+   int16         chunk_out[CLENGTH][CWIDTH];
+   int16         row[CWIDTH] = { 5, 5 };
+   int16         column[CLENGTH] = { 4, 4, 4 };
+   int16         fill_value = 0;   /* Fill value */
+   comp_coder_t  comp_type;        /* to retrieve compression type into */
+   comp_info     cinfo;            /* compression information structure */
+   int    	 num_errs = 0;     /* number of errors so far */
+   int           i,j;
+   /*
+   * Define all chunks.  Note that chunks 4 & 5 are not used to write,
+   * only to verify the read data.  The 'row' and 'column' are used
+   * to write in the place of these chunks.
+   */
+          int16 chunk1[CLENGTH][CWIDTH] = { 1, 1,
+                                            1, 1,
+                                            1, 1 }; 
+
+          int16 chunk2[CLENGTH][CWIDTH] = { 2, 2,
+                                            2, 2,
+                                            2, 2 }; 
+
+          int16 chunk3[CLENGTH][CWIDTH] = { 3, 3,
+                                            3, 3,
+                                            3, 3 }; 
+
+          int16 chunk4[CLENGTH][CWIDTH] = { 0, 4,
+                                            0, 4,
+                                            0, 4 }; 
+
+          int16 chunk5[CLENGTH][CWIDTH] = { 0, 0,
+                                            5, 5,
+                                            0, 0 }; 
+
+          int16 chunk6[CLENGTH][CWIDTH] = { 6, 6,
+                                            6, 6,
+                                            6, 6 };
+
+    /* Initialize chunk lengths. */
+    c_def.comp.chunk_lengths[0] = CLENGTH;
+    c_def.comp.chunk_lengths[1] = CWIDTH;
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface. */
+    sd_id = SDstart (FILE_NAME, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create LENGTH_CHxWIDTH_CH SDS. */
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+    sds_id = SDcreate (sd_id, SDS_NAME_CH,DFNT_INT16, RANK_CH, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for chunking/szip compression testing");
+
+    /* Fill the SDS array with the fill value. */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Set parameters for Chunking/SZIP */
+    c_def.comp.comp_type = COMP_CODE_SZIP;
+    c_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    c_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    c_def.comp.cinfo.szip.bits_per_pixel = 0;
+    c_def.comp.cinfo.szip.pixels = 0;
+    c_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    status = SDsetchunk (sds_id, c_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetchunk");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip chunk: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Set chunk cache to hold maximum of 3 chunks. */
+    maxcache = 3;
+    flag = 0;
+    new_maxcache = SDsetchunkcache (sds_id, maxcache, flag);
+    CHECK(new_maxcache, FAIL, "SDsetchunkcache");
+
+    /* 
+     * Write chunks using SDwritechunk function.  Chunks can be written 
+     * in any order. 
+     */
+
+    /* Write the chunk with the coordinates (0,0). */
+    origin[0] = 0;
+    origin[1] = 0;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk1);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write the chunk with the coordinates (1,0). */
+    origin[0] = 1;
+    origin[1] = 0;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk3);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write the chunk with the coordinates (0,1). */
+    origin[0] = 0;
+    origin[1] = 1;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk2);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write chunk with the coordinates (1,2) using SDwritedata function. */
+    start[0] = 6;
+    start[1] = 2;
+    edges[0] = 3;
+    edges[1] = 2;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) chunk6); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Fill second column in the chunk with the coordinates (1,1) using 
+     * SDwritedata function. */
+    start[0] = 3;
+    start[1] = 3;
+    edges[0] = 3;
+    edges[1] = 1;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) column); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Fill second row in the chunk with the coordinates (0,2) using 
+     * SDwritedata function. */
+    start[0] = 7;
+    start[1] = 0;
+    edges[0] = 1;
+    edges[1] = 2;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) row); 
+    CHECK(status, FAIL, "SDwritedata");
+           
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and access the first data set. */
+    sd_id = SDstart (FILE_NAME, DFACC_READ);
+    sds_index = 0;
+    sds_id = SDselect (sd_id, sds_index);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for chunking/szip compression testing");
+
+    /* Retrieve compression information about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    /* Read the entire data set using SDreaddata function. */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)all_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* 
+    * This is how the entire array should look like:
+    *
+    *          1 1 2 2
+    *          1 1 2 2
+    *          1 1 2 2
+    *          3 3 0 4
+    *          3 3 0 4
+    *          3 3 0 4
+    *          0 0 6 6
+    *          5 5 6 6
+    *          0 0 6 6
+    */
+
+    /* Read chunk #4 with the coordinates (1,1) and verify it. */
+    origin[0] = 1;
+    origin[1] = 1;    	
+    status = SDreadchunk (sds_id, origin, chunk_out);
+    CHECK(status, FAIL, "SDreadchunk");
+
+    for (j=0; j<CLENGTH; j++) 
+    {
+	for (i=0; i<CWIDTH; i++) 
+	{
+	    if (chunk_out[j][i] != chunk4[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in chunk #4, want %ld got %ld\n", j, i, chunk4[j][i], chunk_out[j][i]);
+		num_errs++;
+	    }
+	}
+    }
+
+    /* 
+    * Read chunk #5 with the coordinates (2,0) and verify it.
+    */
+    origin[0] = 2;
+    origin[1] = 0;    	
+    status = SDreadchunk (sds_id, origin, chunk_out);
+    CHECK(status, FAIL, "SDreadchunk");
+
+    for (j=0; j<CLENGTH; j++) 
+    {
+	for (i=0; i<CWIDTH; i++) 
+	    if (chunk_out[j][i] != chunk5[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in chunk #5, want %ld got %ld\n", j, i, chunk5[j][i], chunk_out[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+#else
+    return 0;
+#endif
+}   /* test_szip_chunk */ 
+
+
+#define FILE_NAME_3D	"SDSchunkedsziped3d.hdf"
+#define RANK_CH3         3	/* rank of the chunked data set */
+#define WIDTH_CH 	4	/* width of the chunked data set */
+#define LENGTH_CH	9	/* length of the chunked data set */
+#define Z_CH	11	/* length of the chunked data set */
+#define X_CWIDTH		2	/* width of the chunk */
+#define X_CLENGTH		9	/* length of the chunk */
+#define CZ		2	/* length of the chunk */
+
+   int16         all_data[LENGTH_CH][WIDTH_CH][Z_CH];
+   int16         out_data[LENGTH_CH][WIDTH_CH][Z_CH];
+static intn 
+test_szip_chunk_3d()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32         sd_id, sds_id, sds_index;
+   intn          status;
+   int32         dim_sizes[3];
+   HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+   uint32       comp_config;
+   int32         comp_flag;
+   int32         start[3], edges[3];
+   int16         fill_value = 0;   /* Fill value */
+   comp_coder_t  comp_type;        /* to retrieve compression type into */
+   comp_info     cinfo;            /* compression information structure */
+   int    	 num_errs = 0;     /* number of errors so far */
+   int           i,j,k;
+for (i = 0; i < LENGTH_CH; i++) {
+for (j = 0; j < WIDTH_CH; j++) {
+for (k = 0; k < Z_CH; k++) {
+   out_data[i][j][k] = i*100+j*10+k;
+}}}
+
+    /* Initialize chunk lengths. */
+    c_def.comp.chunk_lengths[0] = X_CLENGTH;
+    c_def.comp.chunk_lengths[1] = X_CWIDTH;
+    c_def.comp.chunk_lengths[2] = CZ;
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface. */
+    sd_id = SDstart (FILE_NAME_3D, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create LENGTH_CHxWIDTH_CH SDS. */
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+    dim_sizes[2] = Z_CH;
+    sds_id = SDcreate (sd_id, SDS_NAME_CH,DFNT_INT16, RANK_CH3, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for chunking/szip compression testing");
+
+    /* Fill the SDS array with the fill value. */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Set parameters for Chunking/SZIP */
+    c_def.comp.comp_type = COMP_CODE_SZIP;
+    c_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    c_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    c_def.comp.cinfo.szip.bits_per_pixel = 0;
+    c_def.comp.cinfo.szip.pixels = 0;
+    c_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    status = SDsetchunk (sds_id, c_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetchunk");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip chunk 3d: SKIPPED\n");
+        return num_errs;
+    }
+
+
+    start[0] = 0;
+    start[1] = 0;
+    start[2] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    edges[2] = Z_CH;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) out_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and access the first data set. */
+    sd_id = SDstart (FILE_NAME_3D, DFACC_READ);
+    sds_index = 0;
+    sds_id = SDselect (sd_id, sds_index);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for chunking/szip compression testing");
+
+    /* Retrieve compression information about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    start[0] = 0;
+    start[1] = 0;
+    start[2] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    edges[2] = Z_CH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)all_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+for (i = 0; i < LENGTH_CH; i++) {
+for (j = 0; j < WIDTH_CH; j++) {
+for (k = 0; k < Z_CH; k++) {
+	    if (out_data[i][j][k] != all_data[i][j][k])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d][%d] want %ld got %ld\n", i, j,k, out_data[i][j][k], all_data[i][j][k]);
+		num_errs++;
+	    }
+    }
+    }
+    }
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+#else
+    return 0;
+#endif
+}   /* test_szip_chunk_3D */ 
+
+/* 
+ * At this time, the use of SZIP compression with unlimited dimension SDSs
+ * is unavailable.  This test program is to verify that the feature is 
+ * correctly disabled.
+ */
+#define FILE_NAME_UNLIM	"SDSunlimitedsziped.hdf"
+#define SDS_NAME_UNLIM	"UnlimitedData"
+static intn 
+test_szip_unlimited()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int32       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int32	out_data[LENGTH][WIDTH];
+    int32	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME_UNLIM, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = SD_UNLIMITED;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	}
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Attempting to set SZIP compression will fail because SZIP is 
+     * not available with unlimited dimension yet */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       VERIFY(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD unlimited: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS; data will be uncompressed */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the written data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME_UNLIM, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for testing szip compression with unlimited dimension");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_unlimited */
+
+/* 
+ * Test drive for testing the szip compression feature with SD interface 
+ */
+extern int 
+test_szip_compression ()
+{
+    int num_errs = 0;
+#ifdef H4_HAVE_LIBSZ
+    num_errs = num_errs + test_szip_SDS8bit();
+    num_errs = num_errs + test_szip_SDS16bit();
+    num_errs = num_errs + test_szip_SDS32bit();
+    num_errs = num_errs + test_szip_SDSfl32bit();
+    num_errs = num_errs + test_szip_SDSfl64bit();
+    num_errs = num_errs + test_szip_chunk();
+    num_errs = num_errs + test_szip_unlimited();
+    num_errs = num_errs + test_szip_chunk_3d();
+#else
+    printf("SKIPPING SZIP compression tests\n");
+#endif
+    return num_errs;
+}

Modified: packages/libhdf4/trunk/mfhdf/libsrc/var.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/var.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/var.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: var.c,v 1.25 2000/08/29 13:56:54 koziol Exp $ */
+/*	$Id: var.c,v 1.26 2001/04/09 17:49:48 bmribler Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -92,6 +92,7 @@
               Free(var->shape) ;
           if(var->dsizes != NULL)
               Free(var->dsizes) ;
+
           if (NC_free_array(var->attrs) == FAIL)
             {
                 ret_value = FAIL;
@@ -135,8 +136,10 @@
 	xszof = NC_xtypelen(var->type) ;
 #endif
 
-	var->shape = NULL ;
-	var->dsizes = NULL ;
+	/* var->shape and var->dsizes were simply set to NULL without 
+	   checking, which caused memory leaks reported in bug# 418.
+	   Added the check and free memory as needed right before assigning
+	   the new shape and dsizes below.  BMR - Apr 8, 01 */
 
 	/*
 	 * Allocate the shape array
@@ -179,6 +182,10 @@
 		}
 		op++ ; ip++ ;
 	}
+
+	/* Free memory if this var already has shape previously allocated */
+	if(var->shape != NULL)
+            Free(var->shape);
 	var->shape = shape ;
 
 	/*
@@ -188,11 +195,15 @@
 	dsizes = (unsigned long *)HDmalloc(ii * sizeof(unsigned long)) ;
 	if(dsizes == NULL)
 	{
-        Free(shape) ;
-        var->shape = NULL;
-		nc_serror("NC_var_dsizes") ;
-		return(-1) ;
+            Free(shape) ;
+            var->shape = NULL;
+	    nc_serror("NC_var_shape") ;
+	    return(-1) ;
 	}
+
+	/* Free memory if this var already has dsizes previously allocated */
+	if(var->dsizes != NULL)
+            Free(var->dsizes);
 	var->dsizes = dsizes ;
 
 	/* 

Modified: packages/libhdf4/trunk/mfhdf/libsrc/xdrposix.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/libsrc/xdrposix.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/libsrc/xdrposix.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -12,7 +12,7 @@
  *
  * -glenn
  */
-/* $Id: xdrposix.c,v 1.21 2000/08/29 23:51:07 wendling Exp $ */
+/* $Id: xdrposix.c,v 1.27 2003/12/10 21:15:14 epourmal Exp $ */
 
 /*
  * 32-bit integer on the host architecture (on the CRAY, this is actually 64
@@ -68,11 +68,13 @@
         typedef u_int ncpos_t ;  /* all unicies */
 #   endif
 #else
-#if defined DOS_FS
-typedef off_t ncpos_t ;
-#else /* macintosh */
-typedef u_long ncpos_t ;
-#endif /* macintosh */
+#  if defined DOS_FS
+      typedef off_t ncpos_t ;
+#  elif defined __APPLE__
+      typedef u_int ncpos_t;
+#  else /* macintosh */
+      typedef u_long ncpos_t ;
+#  endif /* macintosh */
 #endif
 
 typedef struct {
@@ -286,7 +288,7 @@
 
 static bool_t   xdrposix_getlong();
 static bool_t   xdrposix_putlong();
-#if (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 static bool_t   xdrposix_getint();
 static bool_t   xdrposix_putint();
 #endif
@@ -300,9 +302,21 @@
 #if (_MIPS_SZLONG == 64)
 static long *    xdrposix_inline();
 #else
-static netlong *    xdrposix_inline();
+#if (defined __sun && defined _LP64)
+static rpc_inline_t *    xdrposix_inline();
+#else
+#if (defined __x86_64__ )
+static int32_t *    xdrposix_inline();
+#else
+#if (defined __alpha )
+static int *    xdrposix_inline();
+#else
+static netlong *    xdrposix_inline(); 
 #endif
 #endif
+#endif
+#endif
+#endif
 static void xdrposix_destroy();
 
 /*
@@ -322,7 +336,26 @@
     xdrposix_getpos,    /* get offset in the stream */
     xdrposix_setpos,    /* set offset in the stream */
     xdrposix_inline,    /* prime stream for inline macros */
+#if (defined __sun && defined _LP64) || defined __x86_64__
+    xdrposix_destroy,   /* destroy stream */
+#ifndef __x86_64__
+    NULL,               /* no xdr_control function defined */
+#endif
+    /* Solaris 64-bit (arch=v9) has 64 bits long and 32 bits int. */
+    /* It defines the two extra entries for get/put int. here */
+    xdrposix_getint,   /* deserialize a 32-bit int */
+    xdrposix_putint    /* serialize a 32-bit int */
+#else
+#ifdef AIX5L64
+    xdrposix_destroy,
+    NULL,
+    NULL,
+    xdrposix_getint,
+    xdrposix_putint
+#else /*AIX5L64 */
     xdrposix_destroy    /* destroy stream */
+#endif /*AIX5L64 */
+#endif
 };
 
 
@@ -433,17 +466,21 @@
 static bool_t
 xdrposix_getlong(xdrs, lp)
     XDR *xdrs;
+#if (defined __alpha) 
+    int *lp;
+#else
     long *lp;
+#endif
 {
     unsigned char *up = (unsigned char *)lp ;
-#ifdef CRAY
+#if (defined CRAY || defined AIX5L64)   
     *lp = 0 ;
     up += (sizeof(long) - 4) ;
 #endif
     if(bioread((biobuf *)xdrs->x_private, up, 4) < 4)
         return (FALSE);
 #ifdef SWAP
-    *lp = ntohl(*lp);
+    *lp =  ntohl(*lp);
 #endif
     return (TRUE);
 }
@@ -451,7 +488,11 @@
 static bool_t
 xdrposix_putlong(xdrs, lp)
     XDR *xdrs;
+#if (defined __alpha) 
+    int *lp;
+#else
     long *lp;
+#endif
 {
 
     unsigned char *up = (unsigned char *)lp ;
@@ -459,7 +500,7 @@
     netlong mycopy = htonl(*lp);
     up = (unsigned char *)&mycopy;
 #endif
-#ifdef CRAY
+#if (defined CRAY || defined AIX5L64 )
     up += (sizeof(long) - 4) ;
 #endif
 
@@ -472,7 +513,11 @@
 xdrposix_getbytes(xdrs, addr, len)
     XDR *xdrs;
     caddr_t addr;
+#if (defined __alpha)
+    int len;
+#else
     u_int len;
+#endif
 {
 
     if ((len != 0)
@@ -485,7 +530,11 @@
 xdrposix_putbytes(xdrs, addr, len)
     XDR *xdrs;
     caddr_t addr;
+#if (defined __alpha)
+    int len;
+#else
     u_int len;
+#endif
 {
 
     if ((len != 0)
@@ -542,12 +591,30 @@
 #if (_MIPS_SZLONG == 64)
 static long *
 #else
-static netlong *
+#if (defined __sun && defined _LP64)
+static rpc_inline_t *
+#else
+#if (defined  __alpha)
+static int* 
+#else
+#if (defined  __x86_64__)
+static int32_t * 
+#else
+static netlong * 
 #endif
 #endif
+#endif
+#endif
+#endif
 xdrposix_inline(xdrs, len)
     XDR *xdrs;
-    u_int len;
+#if (defined  __alpha)
+int 
+#else
+    u_int
+#endif
+          len;
+
 {
 
     /*
@@ -559,7 +626,7 @@
     return (NULL);
 }
 
-#if (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64  || defined __x86_64__
 
 static bool_t
 xdrposix_getint(xdrs, lp)
@@ -598,7 +665,7 @@
         return (FALSE);
     return (TRUE);
 }
-#endif
+#endif /* end of xdrposix_put(get)int */
 
 int
 NCxdrfile_sync(xdrs)

Copied: packages/libhdf4/trunk/mfhdf/ncdump/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncdump/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/ncdump/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,37 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = ncdump
+man1_MANS = ncdump.1
+
+## Information for building the "ncdump" program
+ncdump_SOURCES = dumplib.c ncdump.c vardata.c
+ncdump_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncdump_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+check: ncdump $(srcdir)/test0.cdl
+	../ncgen/ncgen -o test0.nc -n $(srcdir)/test0.cdl
+	./ncdump test0.nc > test1.cdl
+	../ncgen/ncgen -o test1.nc -n test1.cdl
+	./ncdump -n test0 test1.nc > test2.cdl
+	@cmp test1.cdl test2.cdl && echo "*** ncdump test successful ***" ;     \
+	    rm -f test1.nc test1.cdl test2.cdl
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=test0.nc

Modified: packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,731 +1,503 @@
-# Makefile for ncdump(1).
-#
-# $Id: Makefile.in,v 1.19 2000/08/30 18:43:28 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = ncdump
+man1_MANS = ncdump.1
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ncdump_SOURCES = dumplib.c ncdump.c vardata.c
+ncdump_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncdump_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+#############################################################################
+#############################################################################
+DISTCLEANFILES = test0.nc
+subdir = mfhdf/ncdump
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ncdump$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+am_ncdump_OBJECTS = dumplib.$(OBJEXT) ncdump.$(OBJEXT) vardata.$(OBJEXT)
+ncdump_OBJECTS = $(am_ncdump_OBJECTS)
+ncdump_LDFLAGS =
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dumplib.Po ./$(DEPDIR)/ncdump.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vardata.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(ncdump_SOURCES)
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(ncdump_SOURCES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+all: all-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= ncdump
-BINFILES	= $(PROGRAM)
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-#HDF_INC         = @HDF_INC@
-#CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_NCD)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in ncdump.c ncdump.h  depend msoft.mk \
-		  test0.cdl vardata.c vardata.h dumplib.c dumplib.h ncdump.1 \
-                  make.com msofttab.c
-MANUALS		= ncdump.1
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a
-OBJS		=  ncdump.o vardata.o dumplib.o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
-
-#all::		$(PROGRAM)
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" $(PROGRAM); \
-	fi
-
-
-test:		$(PROGRAM) test0.cdl
-	$(NCGEN) -o test0.nc -n test0.cdl
-	./$(PROGRAM) test0.nc > test1.cdl
-	$(NCGEN) -o test1.nc -n test1.cdl
-	./$(PROGRAM) -n test0 test1.nc > test2.cdl
-	@cmp test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) test successful ***" ; \
-	    rm test1.cdl test1.nc test2.cdl
-
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/ncdump/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ncdump$(EXEEXT): $(ncdump_OBJECTS) $(ncdump_DEPENDENCIES) 
+	@rm -f ncdump$(EXEEXT)
+	$(LINK) $(ncdump_LDFLAGS) $(ncdump_OBJECTS) $(ncdump_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dumplib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ncdump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vardata.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-man
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man: install-man1
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+uninstall-man: uninstall-man1
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-man1 install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+	uninstall-man uninstall-man1
 
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/ncdump
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-#include depend
+check: ncdump $(srcdir)/test0.cdl
+	../ncgen/ncgen -o test0.nc -n $(srcdir)/test0.cdl
+	./ncdump test0.nc > test1.cdl
+	../ncgen/ncgen -o test1.nc -n test1.cdl
+	./ncdump -n test0 test1.nc > test2.cdl
+	@cmp test1.cdl test2.cdl && echo "*** ncdump test successful ***" ;     \
+	    rm -f test1.nc test1.cdl test2.cdl
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncdump/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,49 +0,0 @@
-# Makefile for ncdump(1).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 18:46:36 wendling Exp $
-
-PROGRAM		= ncdump
-BINFILES	= $(PROGRAM)
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-HDF_INC         = @HDF_INC@
-CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-MANIFEST	= Makefile.in ncdump.c ncdump.h  depend msoft.mk \
-		  test0.cdl vardata.c vardata.h dumplib.c dumplib.h ncdump.1 \
-                  make.com msofttab.c
-MANUALS		= ncdump.1
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-OBJS		=  ncdump.o vardata.o dumplib.o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
-
-all::		$(PROGRAM)
-
-
-test:		$(PROGRAM) test0.cdl
-	$(NCGEN) -o test0.nc -n test0.cdl
-	./$(PROGRAM) test0.nc > test1.cdl
-	$(NCGEN) -o test1.nc -n test1.cdl
-	./$(PROGRAM) -n test0 test1.nc > test2.cdl
-	@cmp test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) test successful ***" ; \
-	    rm test1.cdl test1.nc test2.cdl
-
-install::	installed_program installed_manuals
-
-include ../port/master.mk
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/ncdump/ncdump.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncdump/ncdump.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncdump/ncdump.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/README file for copying and redistribution conditions.
- *   $Id: ncdump.c,v 1.15 2000/06/16 19:01:12 koziol Exp $
+ *   $Id: ncdump.c,v 1.16 2003/12/10 21:15:23 epourmal Exp $
  *********************************************************************/
 
 #include <stdio.h>
@@ -18,6 +18,8 @@
 static const char * type_name(nc_type type);
 
 char *progname;
+struct ncdim dims[MAX_NC_DIMS]; /* dimensions */
+long vdims[MAX_NC_DIMS];	/* dimension sizes for a single variable */
 
 static void
 usage()
@@ -248,6 +250,9 @@
  */
 char *fixstr(char *str)
 {
+#ifndef __GNUC__ 
+    char *strdup(const char *);
+#endif  /* linux */
 	char *new_str, *ptr;
 
 	if (!str)
@@ -268,9 +273,10 @@
 }
 
 static void
-do_ncdump(path, specp)
-     char *path;
+do_ncdump(char *path, struct fspec* specp)
+/*     char *path;
      struct fspec* specp;
+*/
 {
 	int ndims;			/* number of dimensions */
 	int nvars;			/* number of variables */
@@ -278,8 +284,6 @@
 	int xdimid;			/* id of unlimited dimension */
 	int dimid;			/* dimension id */
 	int varid;			/* variable id */
-	struct ncdim dims[MAX_NC_DIMS]; /* dimensions */
-	long vdims[MAX_NC_DIMS];	/* dimension sizes for a single variable */
 	struct ncvar var;		/* variable */
 	struct ncatt att;		/* attribute */
 	int id;				/* dimension number per variable */

Copied: packages/libhdf4/trunk/mfhdf/ncgen/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncgen/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/ncgen/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,124 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = ncgen
+
+if HDF_BUILD_FORTRAN
+noinst_PROGRAMS = ctest0 ftest0
+else 
+noinst_PROGRAMS = ctest0
+endif
+
+## Information for building the "ncgen" program
+ncgen_SOURCES = close.c escapes.c generate.c genlib.c getfill.c init.c      \
+                load.c main.c ncgentab.c
+ncgen_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncgen_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+## Recipe for building the ncgentab.c file
+ncgentab.c ncgentab.h: ncgen.h ncgen.y ncgenyy.c
+	$(YACC) -d $(srcdir)/ncgen.y
+	mv y.tab.c ncgentab.c
+	mv y.tab.h ncgentab.h
+
+ncgenyy.c: ncgen.l
+	$(LEX) $(srcdir)/ncgen.l
+	mv lex.yy.c ncgenyy.c
+
+#############################################################################
+##                            Documentation                                ##
+#############################################################################
+
+man1_MANS = ncgen.1
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+NCDUMP=../ncdump/ncdump
+
+if HDF_BUILD_FORTRAN
+check: ncgen $(srcdir)/test0.cdl b-check c-check f-check
+else
+check: ncgen $(srcdir)/test0.cdl b-check c-check
+endif
+
+## Test the "-b" option of ncgen
+b-check:	ncgen $(srcdir)/test0.cdl test1.cdl
+	./ncgen -b test1.cdl
+	$(NCDUMP) test1.nc > test2.cdl
+	@if $(DIFF) test1.cdl test2.cdl; then                               \
+	  echo "*** ncgen -b test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -b test failed ***";                              \
+	fi
+
+## Test the "-c" option of ncgen
+c-check:	test2.cdl ctest0
+	./ctest0        # tests `-c' option, creates ctest0.nc
+	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
+	@if $(DIFF) test1.cdl ctest1.cdl; then                              \
+	  echo "*** ncgen -c test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -c test failed  ***";                             \
+	fi
+
+if HDF_BUILD_FORTRAN
+## Test the "-f" option of ncgen
+f-check:	test1.cdl ftest0
+	./ftest0
+	$(NCDUMP) -n test1 ftest0.nc > ftest1.cdl
+	@if $(DIFF) test1.cdl ftest1.cdl; then                              \
+	  echo "*** ncgen -f test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -f test failed (but roundoff differences are OK) ***"; \
+	fi
+
+ftest0:		ncgen test0.cdl netcdf.inc
+	./ncgen -f -o ftest0.nc $(srcdir)/test0.cdl > test0.f
+	$(F77) $(FFLAGS) -o $@ test0.f $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
+endif
+
+netcdf.inc:
+	ln -s ../fortran/$@ .
+
+test1.cdl:	test0.nc
+	$(NCDUMP) -n test1 test0.nc > $@
+
+test0.nc:	ncgen $(srcdir)/test0.cdl
+	./ncgen -b -o test0.nc $(srcdir)/test0.cdl
+
+ctest0:		ncgen $(srcdir)/test0.cdl
+	./ncgen -c -o ctest0.nc $(srcdir)/test0.cdl > test0.c
+	$(COMPILE) -o $@ test0.c $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
+
+#############################################################################
+##                            Miscellaneous                                ##
+#############################################################################
+
+## This was in the original Makefile.
+vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
+	cp $(srcdir)/ncgentab.h vmstab.h
+	cp $(srcdir)/ncgentab.c vmstab.c
+	cp $(srcdir)/ncgenyy.c vms_yy.c
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = ctest0 ctest0.nc ctest1.cdl ftest0 ftest0.nc ftest1.cdl    \
+                 ncgentab.c ncgentab.h ncgenyy.c netcdf.inc test0.c test0.f \
+                 test0.nc test1.cdl test1.nc test2.cdl

Modified: packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,807 +1,610 @@
-# Makefile for ncgen(1).
-#
-# $Id: Makefile.in,v 1.22 2000/08/30 18:43:30 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = ncgen
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ at HDF_BUILD_FORTRAN_TRUE@noinst_PROGRAMS = ctest0 ftest0
+ at HDF_BUILD_FORTRAN_FALSE@noinst_PROGRAMS = ctest0
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ncgen_SOURCES = close.c escapes.c generate.c genlib.c getfill.c init.c      \
+                load.c main.c ncgentab.c
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ncgen_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncgen_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+#############################################################################
+#############################################################################
+man1_MANS = ncgen.1
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+NCDUMP = ../ncdump/ncdump
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+#############################################################################
+#############################################################################
+DISTCLEANFILES = ctest0 ctest0.nc ctest1.cdl ftest0 ftest0.nc ftest1.cdl    \
+                 ncgentab.c ncgentab.h ncgenyy.c netcdf.inc test0.c test0.f \
+                 test0.nc test1.cdl test1.nc test2.cdl
 
+subdir = mfhdf/ncgen
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ncgen$(EXEEXT)
+ at HDF_BUILD_FORTRAN_TRUE@noinst_PROGRAMS = ctest0$(EXEEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	ftest0$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@noinst_PROGRAMS = ctest0$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
+ctest0_SOURCES = ctest0.c
+ctest0_OBJECTS = ctest0.$(OBJEXT)
+ctest0_LDADD = $(LDADD)
+ctest0_DEPENDENCIES =
+ctest0_LDFLAGS =
+ftest0_SOURCES = ftest0.c
+ftest0_OBJECTS = ftest0.$(OBJEXT)
+ftest0_LDADD = $(LDADD)
+ftest0_DEPENDENCIES =
+ftest0_LDFLAGS =
+am_ncgen_OBJECTS = close.$(OBJEXT) escapes.$(OBJEXT) generate.$(OBJEXT) \
+	genlib.$(OBJEXT) getfill.$(OBJEXT) init.$(OBJEXT) \
+	load.$(OBJEXT) main.$(OBJEXT) ncgentab.$(OBJEXT)
+ncgen_OBJECTS = $(am_ncgen_OBJECTS)
+ncgen_LDFLAGS =
 
-PROGRAM		= ncgen
-BINFILES	= $(PROGRAM)
-#CPP_NETCDF	= -I../libsrc
-#CPPFLAGS	= $(CPPFLAGS_NCG)
-#CFLAGS		= $(CFLAGS_NCG)
-#FFLAGS		= @FFLAGS@
-MANUALS		= ncgen.1
-GARBAGE		= $(PROGRAM) \
-		  ncgenyy.c ncgentab.c ncgentab.h \
-		  test0.nc test1.nc test1.cdl test2.cdl test0.f ctest0 \
-		  ftest0 ftest0.nc ftest1.cdl test0.c ctest0.nc ctest1.cdl
-vms_stuff	= vmstab.c vmstab.h vms_yy.c
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in depend README \
-		  close.c descrip.mms escapes.c generate.c generic.h \
-		  genlib.c genlib.h getfill.c init.c lexyacc.com load.c \
-		  main.c make.com msoft.mk msofttab.c msofttab.h \
-		  msoftyy.c ncgen.1 ncgen.h ncgen.l ncgen.opt ncgen.y \
-		  test.com test0.cdl \
-		  $(vms_stuff)
-LIBNAME		= mfhdf
-LD_NETCDF	= -L../libsrc -lmfhdf $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB)
-OBJS		= main.o generate.o load.o ncgentab.o escapes.o \
-		  getfill.o init.o close.o genlib.o
-#LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(LIBSX)
-#LEX		= @LEX@
-#YACC		= @YACC@
-prefix		= ../../..
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/close.Po ./$(DEPDIR)/ctest0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/escapes.Po ./$(DEPDIR)/ftest0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/generate.Po ./$(DEPDIR)/genlib.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/getfill.Po ./$(DEPDIR)/init.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/load.Po ./$(DEPDIR)/main.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/ncgentab.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = ctest0.c ftest0.c $(ncgen_SOURCES)
 
-all::		$(PROGRAM)
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = ctest0.c ftest0.c $(ncgen_SOURCES)
 
-test:           $(PROGRAM) test0.cdl btest ctest ftest FORCE
+all: all-am
 
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-$(PROGRAM):	main.o
-
-ncgentab.c \
-ncgentab.h:	ncgen.y ncgenyy.c ncgen.h
-	$(YACC) -d ncgen.y
-	mv y.tab.c ncgentab.c
-	mv y.tab.h ncgentab.h
-
-ncgenyy.c:	ncgen.l
-	$(LEX) ncgen.l
-	mv lex.yy.c ncgenyy.c
-
-# The SunOS 4.1.3 yacc(1) doesn't generate correct code.
-#
-vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
-	cp ncgentab.h vmstab.h
-	cp ncgentab.c vmstab.c
-	cp ncgenyy.c vms_yy.c
-
-#
-# test "-b" option of ncgen
-#
-btest:		$(PROGRAM) test0.cdl test1.cdl
-	./$(PROGRAM) -b test1.cdl
-	$(NCDUMP) test1.nc > test2.cdl
-	@$(DIFF) $(DIFF_FLAGS) test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) -b test successful ***"
-
-#
-# test "-c" option of ncgen
-#
-ctest:		test1.cdl ctest0
-	./ctest0		# tests `-c' option, creates ctest0.nc
-	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
-	@$(DIFF) $(DIFF_FLAGS) test1.cdl ctest1.cdl && \
-	    echo "*** $(PROGRAM) -c test successful ***"
-
-ctest0:		ncgen test0.cdl
-	./$(PROGRAM) -c -o ctest0.nc test0.cdl > test0.c
-	$(CC) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -o $@ test0.c $(LIBS)
-
-#
-# test "-f" option of ncgen
-#
-ftest:		test1.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) ftest0; \
-	    ./ftest0 ; \
-	    $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl; \
-	    if $(DIFF) $(DIFF_FLAGS) test1.cdl ftest1.cdl; then \
-		echo "*** ncgen -f test successful ***"; \
-	    else \
-		echo "*** ncgen -f test failed " \
-		    "(but roundoff differences are OK) ***"; \
-	    fi;; \
-	esac
-
-ftest0:		$(PROGRAM) test0.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) netcdf.inc; \
-	    ./$(PROGRAM) -f -o ftest0.nc test0.cdl > test0.f; \
-	    $(FC) $(FFLAGS) -o $@ test0.f $(LIBS);; \
-	esac
-
-test1.cdl:	test0.nc
-	$(NCDUMP) -n test1 test0.nc > $@
-
-test0.nc:	$(PROGRAM) test0.cdl
-	./$(PROGRAM) -b -o test0.nc test0.cdl
-
-netcdf.inc:
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    ln -s ../fortran/$@ .;; \
-	esac
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/ncgen/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+ at HDF_BUILD_FORTRAN_FALSE@ftest0$(EXEEXT): $(ftest0_OBJECTS) $(ftest0_DEPENDENCIES) 
+ at HDF_BUILD_FORTRAN_FALSE@	@rm -f ftest0$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@	$(LINK) $(ftest0_LDFLAGS) $(ftest0_OBJECTS) $(ftest0_LDADD) $(LIBS)
+ncgen$(EXEEXT): $(ncgen_OBJECTS) $(ncgen_DEPENDENCIES) 
+	@rm -f ncgen$(EXEEXT)
+	$(LINK) $(ncgen_LDFLAGS) $(ncgen_OBJECTS) $(ncgen_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+distclean-compile:
+	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/close.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctest0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/escapes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ftest0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/generate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/genlib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/getfill.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/init.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/load.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ncgentab.Po at am__quote@
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+	mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-man
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man: install-man1
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+uninstall-man: uninstall-man1
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-man1 \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-info-am uninstall-man uninstall-man1
 
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
+ncgentab.c ncgentab.h: ncgen.h ncgen.y ncgenyy.c
+	$(YACC) -d $(srcdir)/ncgen.y
+	mv y.tab.c ncgentab.c
+	mv y.tab.h ncgentab.h
 
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
+ncgenyy.c: ncgen.l
+	$(LEX) $(srcdir)/ncgen.l
+	mv lex.yy.c ncgenyy.c
 
-config.status:	cc_id configure
-	./configure --no-create
+ at HDF_BUILD_FORTRAN_TRUE@check: ncgen $(srcdir)/test0.cdl b-check c-check f-check
+ at HDF_BUILD_FORTRAN_FALSE@check: ncgen $(srcdir)/test0.cdl b-check c-check
 
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
+b-check:	ncgen $(srcdir)/test0.cdl test1.cdl
+	./ncgen -b test1.cdl
+	$(NCDUMP) test1.nc > test2.cdl
+	@if $(DIFF) test1.cdl test2.cdl; then                               \
+	  echo "*** ncgen -b test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -b test failed ***";                              \
 	fi
 
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
+c-check:	test2.cdl ctest0
+	./ctest0        # tests `-c' option, creates ctest0.nc
+	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
+	@if $(DIFF) test1.cdl ctest1.cdl; then                              \
+	  echo "*** ncgen -c test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -c test failed  ***";                             \
 	fi
 
-ensure_manifest:	$(MANIFEST)
+ at HDF_BUILD_FORTRAN_TRUE@f-check:	test1.cdl ftest0
+ at HDF_BUILD_FORTRAN_TRUE@	./ftest0
+ at HDF_BUILD_FORTRAN_TRUE@	$(NCDUMP) -n test1 ftest0.nc > ftest1.cdl
+ at HDF_BUILD_FORTRAN_TRUE@	@if $(DIFF) test1.cdl ftest1.cdl; then                              \
+ at HDF_BUILD_FORTRAN_TRUE@	  echo "*** ncgen -f test successful ***";                          \
+ at HDF_BUILD_FORTRAN_TRUE@	else                                                                \
+ at HDF_BUILD_FORTRAN_TRUE@	  echo "*** ncgen -f test failed (but roundoff differences are OK) ***"; \
+ at HDF_BUILD_FORTRAN_TRUE@	fi
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/ncgen
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+ at HDF_BUILD_FORTRAN_TRUE@ftest0:		ncgen test0.cdl netcdf.inc
+ at HDF_BUILD_FORTRAN_TRUE@	./ncgen -f -o ftest0.nc $(srcdir)/test0.cdl > test0.f
+ at HDF_BUILD_FORTRAN_TRUE@	$(F77) $(FFLAGS) -o $@ test0.f $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
 
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
+netcdf.inc:
+	ln -s ../fortran/$@ .
 
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
+test1.cdl:	test0.nc
+	$(NCDUMP) -n test1 test0.nc > $@
 
+test0.nc:	ncgen $(srcdir)/test0.cdl
+	./ncgen -b -o test0.nc $(srcdir)/test0.cdl
 
-# Override the default definition for ncdump(1) in the master makefile.
-#
-NCDUMP		= ../ncdump/ncdump
+ctest0:		ncgen $(srcdir)/test0.cdl
+	./ncgen -c -o ctest0.nc $(srcdir)/test0.cdl > test0.c
+	$(COMPILE) -o $@ test0.c $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
 
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
+#############################################################################
+#############################################################################
+
+vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
+	cp $(srcdir)/ncgentab.h vmstab.h
+	cp $(srcdir)/ncgentab.c vmstab.c
+	cp $(srcdir)/ncgenyy.c vms_yy.c
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncgen/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,132 +0,0 @@
-# Makefile for ncgen(1).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 18:46:40 wendling Exp $
-
-PROGRAM		= ncgen
-BINFILES	= $(PROGRAM)
-CPP_NETCDF	= -I../libsrc
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-FFLAGS		= @FFLAGS@
-MANUALS		= ncgen.1
-GARBAGE		= $(PROGRAM) \
-		  ncgenyy.c ncgentab.c ncgentab.h \
-		  test0.nc test1.nc test1.cdl test2.cdl test0.f ctest0 \
-		  ftest0 ftest0.nc ftest1.cdl test0.c ctest0.nc ctest1.cdl
-vms_stuff	= vmstab.c vmstab.h vms_yy.c
-MANIFEST	= Makefile.in depend README \
-		  close.c descrip.mms escapes.c generate.c generic.h \
-		  genlib.c genlib.h getfill.c init.c lexyacc.com load.c \
-		  main.c make.com msoft.mk msofttab.c msofttab.h \
-		  msoftyy.c ncgen.1 ncgen.h ncgen.l ncgen.opt ncgen.y \
-		  test.com test0.cdl \
-		  $(vms_stuff)
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a @HDF_LIB@ @JPEG_LIB@
-OBJS		= main.o generate.o load.o ncgentab.o escapes.o \
-		  getfill.o init.o close.o genlib.o
-LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(LIBSX)
-LEX		= @LEX@
-YACC		= @YACC@
-prefix		= ../../..
-
-all::		$(PROGRAM)
-
-test:           $(PROGRAM) test0.cdl btest ctest ftest FORCE
-
-install::	installed_program installed_manuals
-
-$(PROGRAM):	main.o
-
-ncgentab.c \
-ncgentab.h:	ncgen.y ncgenyy.c ncgen.h
-	$(YACC) -d ncgen.y
-	mv y.tab.c ncgentab.c
-	mv y.tab.h ncgentab.h
-
-ncgenyy.c:	ncgen.l
-	$(LEX) ncgen.l
-	mv lex.yy.c ncgenyy.c
-
-# The SunOS 4.1.3 yacc(1) doesn't generate correct code.
-#
-vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
-	cp ncgentab.h vmstab.h
-	cp ncgentab.c vmstab.c
-	cp ncgenyy.c vms_yy.c
-
-#
-# test "-b" option of ncgen
-#
-btest:		$(PROGRAM) test0.cdl test1.cdl
-	./$(PROGRAM) -b test1.cdl
-	$(NCDUMP) test1.nc > test2.cdl
-	@diff test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) -b test successful ***"
-
-#
-# test "-c" option of ncgen
-#
-ctest:		test1.cdl ctest0
-	./ctest0		# tests `-c' option, creates ctest0.nc
-	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
-	@diff test1.cdl ctest1.cdl && \
-	    echo "*** $(PROGRAM) -c test successful ***"
-
-ctest0:		ncgen test0.cdl
-	./$(PROGRAM) -c -o ctest0.nc test0.cdl > test0.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ test0.c $(LIBS)
-
-#
-# test "-f" option of ncgen
-#
-ftest:		test1.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) ftest0; \
-	    ./ftest0 ; \
-	    $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl; \
-	    if diff test1.cdl ftest1.cdl; then \
-		echo "*** ncgen -f test successful ***"; \
-	    else \
-		echo "*** ncgen -f test failed " \
-		    "(but roundoff differences are OK) ***"; \
-	    fi;; \
-	esac
-
-ftest0:		$(PROGRAM) test0.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) netcdf.inc; \
-	    ./$(PROGRAM) -f -o ftest0.nc test0.cdl > test0.f; \
-	    $(FC) $(FFLAGS) -o $@ test0.f $(LIBS);; \
-	esac
-
-test1.cdl:	test0.nc
-	$(NCDUMP) -n test1 test0.nc > $@
-
-test0.nc:	$(PROGRAM) test0.cdl
-	./$(PROGRAM) -b -o test0.nc test0.cdl
-
-netcdf.inc:
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    ln -s ../fortran/$@ .;; \
-	esac
-
-include ../port/master.mk
-
-# Override the default definition for ncdump(1) in the master makefile.
-#
-NCDUMP		= ../ncdump/ncdump
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/ncgen/make.com
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncgen/make.com	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncgen/make.com	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
 $! For making NCGEN.EXE on VMS.
 $! --------------------------------------------------------------------------
 $!
-$! $Id: make.com,v 1.5 1996/11/07 00:29:10 sxu Exp $
+$! $Id: make.com,v 1.6 2001/10/22 20:31:09 epourmal Exp $
 $!
 $ if f$getsyi("arch_name") .eqs. "VAX"
 $ then 
@@ -13,7 +13,7 @@
 $ define/nolog sys$clib sys$library:vaxcrtl
 $ endif
 $ ccc := cc 'ccopt  -
-       /opt/nodebug/include=([--.include],[--.hdf.src], -
+       /opt/nodebug/include=([--.include],[--.hdf.src], [--.mfhdf.libsrc], -
      [--.hdf.jpeg],[--.hdf.zlib], sys$library)/nolist    -
      /define=(HDF,VMS,NO_SYS_XDR_INC)
 $

Modified: packages/libhdf4/trunk/mfhdf/ncgen/ncgen.l
===================================================================
--- packages/libhdf4/trunk/mfhdf/ncgen/ncgen.l	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/ncgen/ncgen.l	2007-09-28 21:58:13 UTC (rev 1125)
@@ -2,7 +2,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncgen.l,v 1.10 2000/05/23 18:03:36 acheng Exp $
+ *   $Id: ncgen.l,v 1.13 2003/12/10 21:15:27 epourmal Exp $
  *********************************************************************/
 
 #define	STREQ(a, b)	(*(a) == *(b) && strcmp((a), (b)) == 0)
@@ -134,7 +134,7 @@
 		    yyerror(errstr);
 		}
 
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || defined __ia64__
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		if (dd < INT_MIN  ||  dd > INT_MAX) 
 #else
 #if defined (_CRAYMPP)

Copied: packages/libhdf4/trunk/mfhdf/nctest/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/nctest/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,32 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+TESTS = nctest
+check_PROGRAMS = nctest
+
+# Information for building the "ncgen" program
+nctest_SOURCES = add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c  \
+                 error.c misctest.c rec.c slabs.c val.c varget_unlim.c      \
+                 varget.c vargetg.c varput.c varputg.c vardef.c vartests.c  \
+                 vputget.c vputgetg.c
+nctest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+nctest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=test2.nc test.nc

Modified: packages/libhdf4/trunk/mfhdf/nctest/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/nctest/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,729 +1,529 @@
-# Makefile for netCDF (semi)exhaustive test.
-#
-# $Id: Makefile.in,v 1.21 2000/08/30 00:11:23 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+TESTS = nctest
+check_PROGRAMS = nctest
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+# Information for building the "ncgen" program
+nctest_SOURCES = add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c  \
+                 error.c misctest.c rec.c slabs.c val.c varget_unlim.c      \
+                 varget.c vargetg.c varput.c varputg.c vardef.c vartests.c  \
+                 vputget.c vputgetg.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+nctest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+nctest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+#############################################################################
+#############################################################################
+DISTCLEANFILES = test2.nc test.nc
+subdir = mfhdf/nctest
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+check_PROGRAMS = nctest$(EXEEXT)
+am_nctest_OBJECTS = add.$(OBJEXT) atttests.$(OBJEXT) cdftests.$(OBJEXT) \
+	dimtests.$(OBJEXT) driver.$(OBJEXT) emalloc.$(OBJEXT) \
+	error.$(OBJEXT) misctest.$(OBJEXT) rec.$(OBJEXT) \
+	slabs.$(OBJEXT) val.$(OBJEXT) varget_unlim.$(OBJEXT) \
+	varget.$(OBJEXT) vargetg.$(OBJEXT) varput.$(OBJEXT) \
+	varputg.$(OBJEXT) vardef.$(OBJEXT) vartests.$(OBJEXT) \
+	vputget.$(OBJEXT) vputgetg.$(OBJEXT)
+nctest_OBJECTS = $(am_nctest_OBJECTS)
+nctest_LDFLAGS =
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/add.Po ./$(DEPDIR)/atttests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdftests.Po ./$(DEPDIR)/dimtests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/driver.Po ./$(DEPDIR)/emalloc.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/error.Po ./$(DEPDIR)/misctest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/rec.Po ./$(DEPDIR)/slabs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/val.Po ./$(DEPDIR)/vardef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/varget.Po ./$(DEPDIR)/varget_unlim.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vargetg.Po ./$(DEPDIR)/varput.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/varputg.Po ./$(DEPDIR)/vartests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vputget.Po ./$(DEPDIR)/vputgetg.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(nctest_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(nctest_SOURCES)
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+all: all-am
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= nctest
-#CPP_NETCDF	= -I../libsrc
-#CPPFLAGS	= $(CPPFLAGS_NCT)
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-#CFLAGS		= $(CFLAGS_NCT)
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in README add.c add.h atttests.c cdftests.c \
-		  depend dimtests.c driver.c emalloc.c emalloc.h error.c \
-		  error.h misctest.c msoft.mk rec.c slabs.c testcdf.h \
-		  tests.h val.c val.h vardef.c varget.c vargetg.c varput.c \
-		  varputg.c vartests.c vputget.c vputgetg.c make.com
-LIBNAME		= mfhdf
-LD_NETCDF	= -L../libsrc -lmfhdf
-SRCS		= varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
-		  vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
-		  atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
-OBJS		= varget.o vargetg.o varput.o varputg.o vardef.o vartests.o \
-		  vputget.o vputgetg.o driver.o cdftests.o dimtests.o  rec.o \
-		  atttests.o misctest.o add.o error.o emalloc.o val.o slabs.o
-#LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-GARBAGE		= $(PROGRAM) lint.out *.nc *.cdf *.log
-
-all::		program
-
-test:		$(PROGRAM)
-	@ echo "==========================="
-	@ echo "netCDF C interface tests"
-	@ echo "==========================="
-	./$(PROGRAM)
-
-$(PROGRAM):   ../libsrc/libmfhdf.a
-
-install::
-
-nctime:		nctime.o
-	$(CC) $(CFLAGS) $(CFLAGS_NETCDF) nctime.o $(LIBS) -o $@
-
-debug:      ../libsrc/libmfhdf.a
-	purify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o pnctest
-
-perfs:      ../libsrc/libmfhdf.a
-	quantify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o qnctest
-
-saber_src:
-	#load -C $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(SRCS) $(LIBS)
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/nctest/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+nctest$(EXEEXT): $(nctest_OBJECTS) $(nctest_DEPENDENCIES) 
+	@rm -f nctest$(EXEEXT)
+	$(LINK) $(nctest_LDFLAGS) $(nctest_OBJECTS) $(nctest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/add.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atttests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdftests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dimtests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/driver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/emalloc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/error.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/misctest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rec.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/slabs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/val.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vardef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varget_unlim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vargetg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varput.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varputg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vartests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vputget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vputgetg.Po at am__quote@
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
-
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list='$(TESTS)'; \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xpass=`expr $$xpass + 1`; \
+	        failed=`expr $$failed + 1`; \
+	        echo "XPASS: $$tst"; \
+	      ;; \
+	      *) \
+	        echo "PASS: $$tst"; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xfail=`expr $$xfail + 1`; \
+	        echo "XFAIL: $$tst"; \
+	      ;; \
+	      *) \
+	        failed=`expr $$failed + 1`; \
+	        echo "FAIL: $$tst"; \
+	      ;; \
+	      esac; \
 	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+	      skip=`expr $$skip + 1`; \
+	      echo "SKIP: $$tst"; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	  done; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="All $$all tests passed"; \
+	    else \
+	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all tests failed"; \
+	    else \
+	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    skipped="($$skip tests were not run)"; \
+	    test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  echo "$$dashes"; \
+	  echo "$$banner"; \
+	  test -n "$$skipped" && echo "$$skipped"; \
+	  test -n "$$report" && echo "$$report"; \
+	  echo "$$dashes"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+clean-generic:
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+dvi: dvi-am
 
+dvi-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+info: info-am
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+info-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-data-am:
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-exec-am:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+install-info: install-info-am
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-man:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+installcheck-am:
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+mostlyclean: mostlyclean-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+pdf: pdf-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+pdf-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+ps: ps-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+ps-am:
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+uninstall-am: uninstall-info-am
 
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-info-am
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/nctest
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/nctest/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/nctest/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,53 +0,0 @@
-# Makefile for netCDF (semi)exhaustive test.
-#
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:37 georgev Exp $
-
-PROGRAM		= nctest
-CPP_NETCDF	= -I../libsrc
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-MANIFEST	= Makefile.in README add.c add.h atttests.c cdftests.c \
-		  depend dimtests.c driver.c emalloc.c emalloc.h error.c \
-		  error.h misctest.c msoft.mk rec.c slabs.c testcdf.h \
-		  tests.h val.c val.h vardef.c varget.c vargetg.c varput.c \
-		  varputg.c vartests.c vputget.c vputgetg.c make.com
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-SRCS		= varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
-		  vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
-		  atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
-OBJS		= varget.o vargetg.o varput.o varputg.o vardef.o vartests.o \
-		  vputget.o vputgetg.o driver.o cdftests.o dimtests.o  rec.o \
-		  atttests.o misctest.o add.o error.o emalloc.o val.o slabs.o
-LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB)
-GARBAGE		= $(PROGRAM) lint.out *.cdf *.log
-
-all::		program
-
-test:		$(PROGRAM)
-	./$(PROGRAM)
-
-$(PROGRAM):   ../libsrc/libnetcdf.a
-
-install::
-
-nctime:		nctime.o
-	$(CC) $(CFLAGS) nctime.o $(LIBS) -o $@
-
-debug:      ../libsrc/libnetcdf.a
-	purify $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o pnctest
-
-perfs:      ../libsrc/libnetcdf.a
-	quantify $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o qnctest
-
-saber_src:
-	#load -C $(CPPFLAGS) $(SRCS) $(LIBS)
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/trunk/mfhdf/nctest/driver.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/driver.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/nctest/driver.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: driver.c,v 1.8 1998/01/14 19:32:40 bmribler Exp $
+ *   $Id: driver.c,v 1.10 2003/12/10 21:15:30 epourmal Exp $
  *********************************************************************/
 
 #include "netcdf.h"
@@ -22,6 +22,8 @@
 FILE *dbg_file;
 #endif
 
+#include <stdlib.h>
+
 #ifdef macintosh
     #include <LowMem.h>
 #endif
@@ -38,7 +40,12 @@
 #endif
 {
     static char testfile[] = "test.nc";
+    static char unlim_testfile_name[] = "test_unlim.nc";
+    char *unlim_testfile;
 
+    int name_size;
+    char *srcdir;
+
 #ifdef macintosh
 	Ptr	currStackBase, newApplLimit, currApplLimit, currHeapEnd;
 
@@ -112,6 +119,25 @@
 
     test_ncvarget(testfile);
 
+    name_size = strlen(unlim_testfile_name) + 1;
+    srcdir = getenv("srcdir");
+
+    if (srcdir)
+        name_size += strlen(srcdir) + 1;
+
+    unlim_testfile = calloc(name_size, 1);
+
+    if (srcdir) {
+        strcpy(unlim_testfile, srcdir);
+
+        if (srcdir[strlen(srcdir) - 1] != '/')
+            strcat(unlim_testfile, "/");
+    }
+
+    strcat(unlim_testfile, unlim_testfile_name);
+    test_ncvarget_unlim(unlim_testfile);
+    free(unlim_testfile);
+
     test_ncvarputg(testfile);
 
     test_ncvargetg(testfile);

Modified: packages/libhdf4/trunk/mfhdf/nctest/slabs.c
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/slabs.c	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/nctest/slabs.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: slabs.c,v 1.5 1996/03/26 22:43:31 georgev Exp $
+ *   $Id: slabs.c,v 1.7 2004/12/16 21:36:17 epourmal Exp $
  *********************************************************************/
 
 #include "netcdf.h"
@@ -22,8 +22,11 @@
 #define XSIZE	5
 #define YSIZE   6
 #define ZSIZE   4
+/* Added new function for character and byte so we will not overflow; pgcc
+   compiler screamed at VF macro */
+#define VFC(w)  (1000*w[0]+100*w[1]+10*w[2]+w[3])%64 + 48
 /* Any function that maps dimension values 1-1 to values is OK here */
-#define VF(w)  1000*w[0]+100*w[1]+10*w[2]+w[3]
+#define VF(w)  (1000*w[0]+100*w[1]+10*w[2]+w[3])
 #define NVARS   6		/* number of variables */
 
 
@@ -40,6 +43,8 @@
      long val;			/* value to store */
 {
     static char pname[] = "val_stuff";
+#ifdef WRONG_for_PGCC /* This way caused a lot of problems for PGI CC compiler
+                         EIP 2004/12/15 */
     union gp {
 	char cp[1];
 	short sp[1];
@@ -68,6 +73,26 @@
 	break;
     default:
 	error("%s: bad type, test program error", pname);
+#endif /*WRONG_for_PGCC*/
+    switch (type) {
+    case NC_BYTE:
+    case NC_CHAR:
+	((char *)v)[ii] = (char) val;
+	break;
+    case NC_SHORT:
+        ((short *)v)[ii] = (short)val;
+	break;
+    case NC_LONG:
+	((nclong *)v)[ii] = (nclong)val;
+	break;
+    case NC_FLOAT:
+        ((float *)v)[ii] = (float)val;
+	break;
+    case NC_DOUBLE:
+	((double *)v)[ii] = (double)val;
+	break;
+    default:
+	error("%s: bad type, test program error", pname);
     }
 }
 
@@ -88,6 +113,8 @@
      long val;			/* value to compare with */
 {
     static char pname[] = "val_diff";
+#ifdef WRONG_for_PGCC /* This way caused a lot of problems for PGI CC compiler
+                         EIP 2004/12/15 */
     union gp {
 	char cp[1];
 	short sp[1];
@@ -112,6 +139,22 @@
       default:
 	error("%s: bad type, test program error", pname);
 	return (-1);
+#endif /*WRONG_for_PGCC*/
+    switch (type) {
+      case NC_BYTE:
+      case NC_CHAR:
+	return (((char*)v)[ii] != (char) val);
+      case NC_SHORT:
+	return (((short*)v)[ii] != (short) val);
+      case NC_LONG:
+	return (((nclong*)v)[ii] != (nclong) val);
+      case NC_FLOAT:
+	return (((float*)v)[ii] != (float) val);
+      case NC_DOUBLE:
+	return (((double*)v)[ii] != (double) val);
+      default:
+	error("%s: bad type, test program error", pname);
+	return (-1);
     }
 }
 
@@ -193,9 +236,8 @@
     }
 
     for (iv = 0; iv < NVARS; iv++) { /* test each type of variable */
-
+        
 	v = emalloc(WSIZE*XSIZE*YSIZE*ZSIZE * nctypelen(va[iv].type));
-
 	/* fill it with values using a function of dimension indices */
 	ii = 0;
 	for (iw=0; iw < WSIZE; iw++) {
@@ -207,13 +249,16 @@
 		    for (iz=0; iz < ZSIZE; iz++) {
 			corner[3] = iz;
 			/* v[ii++] = VF(corner); */
-			val_stuff(va[iv].type, v, ii, VF(corner));
+                        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) 
+			val_stuff(va[iv].type, v, ii, VFC(corner));
+                        else
+                        val_stuff(va[iv].type, v, ii, VF(corner));
 			ii++;
 		    }
 		}
 	    }
 	}
-	
+ 	
 	for (idim = 0; idim < NDIMS; idim++) {
 	    corner[idim] = 0;
 	    edge[idim] = dims[idim].size;
@@ -242,11 +287,22 @@
 	    nerrs++;
 	}
 	/* if (v[0] != VF(point)) */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
+
+	if (val_diff(va[iv].type, v, 0, VFC(point))) {
+	    error("%s: ncvarget got wrong value for point", pname);
+	    nerrs++;
+        }
+        }
+        else
+        {
 	if (val_diff(va[iv].type, v, 0, VF(point))) {
 	    error("%s: ncvarget got wrong value for point", pname);
 	    nerrs++;
 	}
-	
+        }
+	 /*endif NC_BYTE || NC_CHAR */
+                
 	/* get an interior vector in each direction */
 	for (idim=0; idim < NDIMS; idim++) {
 	    for (jdim=0; jdim < NDIMS; jdim++) {
@@ -263,10 +319,19 @@
 	    for (ii=corner[idim]; ii <= edge[idim]; ii++) {
 		point[idim] = ii;
 		/* if (v[ii-1] != VF(point)) */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR){ 
+		if (val_diff(va[iv].type, v, ii-1, VFC(point))) {
+		    error("%s: ncvarget got wrong value for vector", pname);
+		    nerrs++;
+		}
+                }
+        else
+                {
 		if (val_diff(va[iv].type, v, ii-1, VF(point))) {
 		    error("%s: ncvarget got wrong value for vector", pname);
 		    nerrs++;
 		}
+                }
 	    }
 	}
 
@@ -291,7 +356,21 @@
 			point[idim] = ii;
 			point[jdim] = jj;
 			/* if (v[(ii-1)*edge[jdim]+jj-1] != VF(point)) { */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
 			if (val_diff(va[iv].type, v,
+				     (ii-1)*(int)edge[jdim]+jj-1, VFC(point))) {
+			    error("%s: ncvarget got wrong value in plane", pname);
+			    error("idim=%d,jdim=%d,ii=%d,jj=%d",
+				  idim,
+				  jdim,
+				  ii,
+				  jj);
+			    nerrs++;
+			}
+                        }
+         else
+                        {
+			if (val_diff(va[iv].type, v,
 				     (ii-1)*(int)edge[jdim]+jj-1, VF(point))) {
 			    error("%s: ncvarget got wrong value in plane", pname);
 			    error("idim=%d,jdim=%d,ii=%d,jj=%d",
@@ -301,6 +380,7 @@
 				  jj);
 			    nerrs++;
 			}
+                        }
 		    }
 		}
 	    }
@@ -333,8 +413,25 @@
 				point[kdim] = kk;
 				/* if (v[((ii-1)*edge[jdim]+jj-1)*
 				   edge[kdim]+kk-1] != VF(point)) { */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
 				if (val_diff(va[iv].type,v,
 					     ((ii-1)*(int)edge[jdim]+jj-1)*
+					     (int)edge[kdim]+kk-1,VFC(point))) {
+				    error("%s: ncvarget got wrong value in cube", pname);
+				    error("idim=%d,jdim=%d,kdim=%d,ii=%d,jj=%d,kk=%d",
+					  idim,
+					  jdim,
+					  kdim,
+					  ii,
+					  jj,
+					  kk);
+				    nerrs++;
+				}
+                                }
+         else
+                                {
+				if (val_diff(va[iv].type,v,
+					     ((ii-1)*(int)edge[jdim]+jj-1)*
 					     (int)edge[kdim]+kk-1,VF(point))) {
 				    error("%s: ncvarget got wrong value in cube", pname);
 				    error("idim=%d,jdim=%d,kdim=%d,ii=%d,jj=%d,kk=%d",
@@ -346,6 +443,7 @@
 					  kk);
 				    nerrs++;
 				}
+                                }
 			    }
 			}
 		    }
@@ -353,7 +451,7 @@
 	    }
 	}
 	Free((char *)v);
-    }
+   } 
     return nerrs;
 }
 

Copied: packages/libhdf4/trunk/mfhdf/nctest/test_unlim.cdl (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.cdl)
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/test_unlim.cdl	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/nctest/test_unlim.cdl	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,31 @@
+netcdf new {
+dimensions:
+	x    = 2;
+	y    = 3;
+	time = UNLIMITED ; // (12 currently)
+variables:
+        float a(x,y);
+	int date(time) ;
+	int time(time) ;
+        short b(time, y, x);
+data:
+ a = 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;
+
+ date = 840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816, 
+    840915, 841016, 841115, 841216 ;
+
+ time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ;
+  
+ b = 1, 1, 2, 2, 3, 3,
+     4, 4, 5, 5, 6, 6,
+     7, 7, 8, 8, 9, 9,
+    10, 10, 11, 11, 12, 12,
+    13, 13, 14, 14, 15, 15,
+    16, 16, 17, 17, 18, 18,
+    19, 19, 20, 20, 21, 22,
+    23, 23, 24, 24, 25, 25,
+    26, 26, 27, 27, 28, 28,
+    29, 29, 30, 30, 31, 31,
+    32, 32, 33, 33, 34, 34,
+    35, 35, 36, 36, 37, 37 ;
+}

Copied: packages/libhdf4/trunk/mfhdf/nctest/test_unlim.nc (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.nc)
===================================================================
(Binary files differ)

Modified: packages/libhdf4/trunk/mfhdf/nctest/tests.h
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/tests.h	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/nctest/tests.h	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: tests.h,v 1.3 1996/03/26 22:43:32 georgev Exp $
+ *   $Id: tests.h,v 1.4 2003/12/10 21:15:31 epourmal Exp $
  *********************************************************************/
 
 #undef PROTO
@@ -78,6 +78,9 @@
 extern void	test_ncvargetg	PROTO((
 				       char*
 				       ));
+extern void	test_ncvarget_unlim	PROTO((
+				       char*
+				       ));
 extern void	test_ncrecinq	PROTO((
 				       char*
 				       ));

Copied: packages/libhdf4/trunk/mfhdf/nctest/varget_unlim.c (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/nctest/varget_unlim.c)
===================================================================
--- packages/libhdf4/trunk/mfhdf/nctest/varget_unlim.c	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/nctest/varget_unlim.c	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,161 @@
+/*
+ * This tests uses HDF NetCDF APIs to read the NetCDF file test_unlim.nc
+ * generated with the NetCDF Library v3.5 from test_unlim.cdl
+ */
+    
+#include <stdio.h>
+#include <stdlib.h>
+#include "netcdf.h"
+#include "testcdf.h"            /* defines in-memory test cdf structure */
+#include "error.h"
+#include "tests.h"
+#include "alloc.h"
+#include "emalloc.h"
+#ifdef HDF  
+#include "hdf.h" 
+#endif  
+
+float a_val[2][3] = {
+                      {1.0, 2.0, 3.0}, 
+                      {4.0, 5.0, 6.0}
+                    };
+int   date_val[12] = {840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816,
+                      840915, 841016, 841115, 841216 };
+int   time_val[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
+short b_val[][3][2] = {
+                      {{1, 1}, {2, 2}, {3, 3}},
+                      {{4, 4}, {5, 5}, {6, 6}},
+                      {{7, 7}, {8, 8}, {9, 9}},
+                      {{10, 10}, {11, 11}, {12, 12}},
+                      {{13, 13}, {14, 14}, {15, 15}},
+                      {{16, 16}, {17, 17}, {18, 18}},
+                      {{19, 19}, {20, 20}, {21, 22}},
+                      {{23, 23}, {24, 24}, {25, 25}},
+                      {{26, 26}, {27, 27}, {28, 28}},
+                      {{29, 29}, {30, 30}, {31, 31}},
+                      {{32, 32}, {33, 33}, {34, 34}},
+                      {{35, 35}, {36, 36}, {37, 37}}
+                                                    };
+/*
+ * Test ncvarget for variables with unlimited dimensions (bug #897)
+ */
+void
+test_ncvarget_unlim(path)
+     char *path;		/* name of writable netcdf file to open */
+{
+    int nerrs = 0;
+    static char pname[] = "test_ncvarget_unlim";
+    
+    int status;
+    int ncid;
+    int var_id;
+    float a[2][3];
+    int date[12];
+    int time[12];
+    short val[12][3][2];
+    long start[3], count[3];
+    int i, j, n;
+
+    (void) fprintf(stderr, "*** Testing %s ...\t", &pname[5]);
+	if ((ncid = ncopen(path, NC_NOWRITE)) == -1) {
+             error("%s: ncopen failed", pname);
+             return;
+        }
+
+/* Reading 3D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "b");
+        start[0] = 0;
+        start[1] = 0;
+        start[2] = 0;
+        count[0] = 12;
+        count[1] = 3;
+        count[2] = 2;
+	
+        if(status = ncvarget (ncid, var_id, start, count, val) == -1) {
+           error("%s: ncvarget failed for variable b in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+         for (i=0; i <3; i++)   {
+          for (j=0; j<2 ; j++)   {
+             if (val[n][i][j] != b_val[n][i][j]) {
+             nerrs++;
+             printf(" Wrong value of variable b at index %d,%d,%d\n", n,i,j);
+             }
+          }
+         }
+        }
+
+/* Reading 2D array */
+
+	var_id = ncvarid( ncid, "a");
+        start[0] = 0;
+        start[1] = 0;
+        count[0] = 2;
+        count[1] = 3;
+	
+        if(status = ncvarget (ncid, var_id, start, count, a) == -1) {
+           error("%s: ncvarget failed for variable a in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+         for (i=0; i <2; i++)   {
+          for (j=0; j<3 ; j++)   {
+             if (a[i][j] != a_val[i][j]) {
+             nerrs++;
+             printf(" Wrong value of variable a at index %d,%d\n", i,j);
+             }
+          }
+         }
+        
+
+/* Reading 1D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "date");
+        start[0] = 0;
+        count[0] = 12;
+	
+        if(status = ncvarget (ncid, var_id, start, count, date) == -1) {
+           error("%s: ncvarget failed for variable date in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+             if (date[n] != date_val[n]) {
+             nerrs++;
+             printf(" Wrong value of variable date at index %d\n", n);
+             }
+        }
+
+/* Reading 1D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "time");
+        start[0] = 0;
+        count[0] = 12;
+	
+        if(status = ncvarget (ncid, var_id, start, count, time) == -1) {
+           error("%s: ncvarget failed varaible time in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+             if (time[n] != time_val[n]) {
+             nerrs++;
+             printf(" Wrong value of variable time at index %d\n", n);
+             }
+        }
+
+	status = ncclose(ncid);
+
+
+    if (nerrs > 0)
+      (void) fprintf(stderr,"FAILED! ***\n");
+    else
+      (void) fprintf(stderr,"ok ***\n");
+}

Copied: packages/libhdf4/trunk/mfhdf/port/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/port/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/port/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,2 @@
+noinst_LIBRARIES = libudport.a
+libudport_a_SOURCES = uddummy.c

Modified: packages/libhdf4/trunk/mfhdf/port/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/port/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/port/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,777 +1,392 @@
-# This is the makefile for the Unidata portability package.
-#
-# $Id: Makefile.in,v 1.13 2000/08/30 00:11:26 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+noinst_LIBRARIES = libudport.a
+libudport_a_SOURCES = uddummy.c
+subdir = mfhdf/port
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+libudport_a_AR = $(AR) cru
+libudport_a_LIBADD =
+am_libudport_a_OBJECTS = uddummy.$(OBJEXT)
+libudport_a_OBJECTS = $(am_libudport_a_OBJECTS)
 
-SHELL = /bin/sh
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/uddummy.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libudport_a_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am configure configure.in
+SOURCES = $(libudport_a_SOURCES)
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+all: all-am
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
-
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefex)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-#PACKAGE		= udport
-LIBRARY		= udport
-#MAJOR_NO	= @MAJOR_NO@
-#MINOR_NO	= @MINOR_NO@
-
-#CPPFLAGS	= $(CPPFLAGS_PORT)
-#CFLAGS		= @CFLAGS@
-
-#PORT_CFORTRAN	= @PORT_CFORTRAN@
-#NEED_FORTC	= @NEED_FORTC@
-
-#PORT_HEADERS	= @PORT_HEADERS@
-config_headers	= signal.h stdarg.h stddef.h stdlib.h string.h time.h \
-		  udconfig.h udposix.h
-made_headers	= float.h limits.h
-#LIBOBJS		= uddummy.o @LIBOBJS@
-
-prefix		= ../../..
-
-#SUBDIRS	= @PORT_SUBDIRS@
-SUBDIRS		= $(PORT_SUBDIRS)
-SUBDIR_TARGETS	= fortc/all fortc/install fortc/clean fortc/distclean
-MANIFEST = $(DISTFILES)
-DISTFILES        = COPYRIGHT CUSTOMIZE HISTORY Makefile.in VERSION aclocal.m4 \
-		  $(PORT_MANIFEST) \
-		  configure configure.in depend master.mk.in uddummy.c
-
-# Note that the `all' target might not make `fortc/all'.  That will depend 
-# on whether or not that utility is required.
-
-all::		FORCE $(PORT_HEADERS)
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) $(SBUDIR_MACROS) fortc/all; \
-	else \
-	    :; \
-	fi
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library
-
-# We install the portability library modules directly into an installed
-# portability library even though the package using this portability library
-# (the client package) probably doesn't reference the installed one.  This is
-# done because the client package might be another library and linking
-# against it might require some modules of this library.  We don't install
-# the portability library just created because different packages can require
-# different modules.
-#
-install::	$(LIBOBJS)
-	$(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(LIBDIR)
-	$(AR) rcuv $(LIBDIR)/libudport.a $(LIBOBJS)
-	$(RANLIB) $(LIBDIR)/libudport.a
-
-clean::		FORCE
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/clean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) config
-
-distclean::
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/distclean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) $(config_headers) config master.mk
-
-Makefile:	Makefile.in master.mk.in
-
-float.h:	config
-	./config -f > $@
-limits.h:	config
-	./config -l > $@
-cfortran.h:	cfortran_h
-	if test "$(PORT_CFORTRAN)" = stdc; then \
-	    sed 's/\/\*\*\//##/g' cfortran_h > $@; \
-	else \
-	    cp cfortran_h $@; \
-	fi
-
-# C compiler information program:
-#
-# NB: config(1) must be compiled unoptimized.  We first assume that `signed
-# char' is valid; if that doesn't work, then we assume it's invalid.  If
-# that doesn't work, the user will have to determine the appropriate
-# compilation flags (see config.c).
-#
-# If the following program won't compile, then contact
-# support at unidata.ucar.edu (ask for Steve).
-#
-config:               config.c
-	if $(CC) config.c -o config 2> /dev/null; then \
-		: true; \
-	else \
-		$(CC) -DNO_SC config.c -o config; \
-	fi
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/port/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libudport.a: $(libudport_a_OBJECTS) $(libudport_a_DEPENDENCIES) 
+	-rm -f libudport.a
+	$(libudport_a_AR) libudport.a $(libudport_a_OBJECTS) $(libudport_a_LIBADD)
+	$(RANLIB) libudport.a
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/uddummy.Po at am__quote@
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-info-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-noinstLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-info install-info-am \
+	install-man install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags uninstall uninstall-am uninstall-info-am
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/port
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/port/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/port/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/port/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,104 +0,0 @@
-# This is the makefile for the Unidata portability package.
-#
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:38 georgev Exp $
-
-PACKAGE		= udport
-LIBRARY		= udport
-MAJOR_NO	= @MAJOR_NO@
-MINOR_NO	= @MINOR_NO@
-
-CPPFLAGS	= -I. @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-
-PORT_CFORTRAN	= @PORT_CFORTRAN@
-NEED_FORTC	= @NEED_FORTC@
-
-PORT_HEADERS	= @PORT_HEADERS@
-config_headers	= signal.h stdarg.h stddef.h stdlib.h string.h time.h \
-		  udconfig.h udposix.h
-made_headers	= float.h limits.h
-LIBOBJS		= uddummy.o @LIBOBJS@
-
-prefix		= ../../..
-
-SUBDIRS		= @PORT_SUBDIRS@
-SUBDIR_TARGETS	= fortc/all fortc/install fortc/clean fortc/distclean
-MANIFEST        = COPYRIGHT CUSTOMIZE HISTORY Makefile.in VERSION aclocal.m4 \
-		  @PORT_MANIFEST@ \
-		  configure configure.in depend master.mk.in uddummy.c
-
-# Note that the `all' target might not make `fortc/all'.  That will depend 
-# on whether or not that utility is required.
-
-all::		FORCE $(PORT_HEADERS)
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/all; \
-	else \
-	    :; \
-	fi
-	@$(MAKE) $(MFLAGS) library
-
-# We install the portability library modules directly into an installed
-# portability library even though the package using this portability library
-# (the client package) probably doesn't reference the installed one.  This is
-# done because the client package might be another library and linking
-# against it might require some modules of this library.  We don't install
-# the portability library just created because different packages can require
-# different modules.
-#
-install::	$(LIBOBJS)
-	$(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(LIBDIR)
-	$(AR) rcuv $(LIBDIR)/libudport.a $(LIBOBJS)
-	$(RANLIB) $(LIBDIR)/libudport.a
-
-clean::		FORCE
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/clean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) config
-
-distclean::
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/distclean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) $(config_headers) config master.mk
-
-Makefile:	Makefile.in master.mk.in
-
-float.h:	config
-	./config -f > $@
-limits.h:	config
-	./config -l > $@
-cfortran.h:	cfortran_h
-	if test "$(PORT_CFORTRAN)" = stdc; then \
-	    sed 's/\/\*\*\//##/g' cfortran_h > $@; \
-	else \
-	    cp cfortran_h $@; \
-	fi
-
-# C compiler information program:
-#
-# NB: config(1) must be compiled unoptimized.  We first assume that `signed
-# char' is valid; if that doesn't work, then we assume it's invalid.  If
-# that doesn't work, the user will have to determine the appropriate
-# compilation flags (see config.c).
-#
-# If the following program won't compile, then contact
-# support at unidata.ucar.edu (ask for Steve).
-#
-config:               config.c
-	if $(CC) config.c -o config 2> /dev/null; then \
-		: true; \
-	else \
-		$(CC) -DNO_SC config.c -o config; \
-	fi
-
-include master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Copied: packages/libhdf4/trunk/mfhdf/xdr/Makefile.am (from rev 832, packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.am)
===================================================================
--- packages/libhdf4/trunk/mfhdf/xdr/Makefile.am	                        (rev 0)
+++ packages/libhdf4/trunk/mfhdf/xdr/Makefile.am	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,3 @@
+lib_LIBRARIES = libxdr.a
+libxdr_a_SOURCES = xdr.c xdrfloat.c xdrstdio.c xdrarray.c
+include_HEADERS = xdr.h types.h

Modified: packages/libhdf4/trunk/mfhdf/xdr/Makefile.in
===================================================================
--- packages/libhdf4/trunk/mfhdf/xdr/Makefile.in	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/xdr/Makefile.in	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,747 +1,450 @@
-# Makefile for the eXternal Data Representation (XDR) library routines 
-# used by the Network CDF library (needed if and only if the native xdr(3)
-# implementation is broken or doesn't exist).
-#
-# $Id: Makefile.in,v 1.20 2000/08/30 21:55:50 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+lib_LIBRARIES = libxdr.a
+libxdr_a_SOURCES = xdr.c xdrfloat.c xdrstdio.c xdrarray.c
+include_HEADERS = xdr.h types.h
+subdir = mfhdf/xdr
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+libxdr_a_AR = $(AR) cru
+libxdr_a_LIBADD =
+am_libxdr_a_OBJECTS = xdr.$(OBJEXT) xdrfloat.$(OBJEXT) \
+	xdrstdio.$(OBJEXT) xdrarray.$(OBJEXT)
+libxdr_a_OBJECTS = $(am_libxdr_a_OBJECTS)
 
-SHELL = /bin/sh
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/xdr.Po ./$(DEPDIR)/xdrarray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrfloat.Po ./$(DEPDIR)/xdrstdio.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libxdr_a_SOURCES)
+HEADERS = $(include_HEADERS)
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(libxdr_a_SOURCES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+all: all-am
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefex)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = -L$(TOP_SRCDIR)/hdf/src -ldf
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = -ljpeg
-ZLIB_LIB = -lz
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= xdrtest
-#OS		= @OS@
-#CPP_XDR		= @CPP_XDR@
-#CPPFLAGS	= $(CPPFLAGS_XDR)
-#CFLAGS		= $(CFLAGS_XDR)
-HEADERS		= xdr.h types.h
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in NOTICE.h README depend \
-		  byteordr.c descrip.mms htonl.mar make.com msoft.mk \
-		  ntohl.mar test_xdr.sav types.h xdr.c xdr.h xdrarray.c \
-		  xdrfloat.c xdrstdio.c $(PROGRAM).c $(PROGRAM).opt \
-		  testout.sav
-LIBOBJS		= $(XDR_LIBOBJS)
-LIBNAME		= mfhdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS)
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= ../libsrc/libmfhdf.a
-LIBS		= $(LD_XDR) $(LIBSX)
-INSTALL_DEPS	= $(XDR_INSTALL_DEPS)
-prefix		= ../../..
-GARBAGE		= test.xdr $(PROGRAM)_out.new
-
-
-all::         FORCE
-	@if test -z "$(LIBOBJS)"; then \
-	  : true; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(REMOTE_LIBRARY); \
-	fi
-
-# The formatted file `$(PROGRAM)_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to SMALL rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.xdr' which MUST be byte-for-byte
-# identical with `test_xdr.sav'.
-#
-test:		$(PROGRAM)
-	@ echo "========================="
-	@ echo "netCDF XDR tests start"
-	@ echo "========================="
-	./$(PROGRAM) > $(PROGRAM)_out.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) $(PROGRAM)_out.new testout.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes formatted test ***"; \
-	else \
-	    echo "*** XDR fails formatted test ***"; \
-	    echo "The above differences are OK iff due to rounding"; \
-	    exit 0; \
-	fi
-	@cmd="cmp test.xdr test_xdr.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes binary test ***"; \
-	else \
-	    echo "*** XDR fails binary test ***"; \
-	    exit 1; \
-	fi
-
-install::
-
-install-includes::
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/xdr/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libxdr.a: $(libxdr_a_OBJECTS) $(libxdr_a_DEPENDENCIES) 
+	-rm -f libxdr.a
+	$(libxdr_a_AR) libxdr.a $(libxdr_a_OBJECTS) $(libxdr_a_LIBADD)
+	$(RANLIB) libxdr.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrfloat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrstdio.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS)'; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-includeHEADERS
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-libLIBRARIES
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-includeHEADERS \
+	install-info install-info-am install-libLIBRARIES install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includeHEADERS \
+	uninstall-info-am uninstall-libLIBRARIES
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/xdr
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Deleted: packages/libhdf4/trunk/mfhdf/xdr/Makefile.in_orig
===================================================================
--- packages/libhdf4/trunk/mfhdf/xdr/Makefile.in_orig	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mfhdf/xdr/Makefile.in_orig	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,69 +0,0 @@
-# Makefile for the eXternal Data Representation (XDR) library routines 
-# used by the Network CDF library (needed if and only if the native xdr(3)
-# implementation is broken or doesn't exist).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:50 wendling Exp $
-
-PROGRAM		= xdrtest
-OS		= @OS@
-CPP_XDR		= @CPP_XDR@
-CPPFLAGS	= $(CPP_XDR) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-HEADERS		= xdr.h types.h
-MANIFEST	= Makefile.in NOTICE.h README depend \
-		  byteordr.c descrip.mms htonl.mar make.com msoft.mk \
-		  ntohl.mar test_xdr.sav types.h xdr.c xdr.h xdrarray.c \
-		  xdrfloat.c xdrstdio.c $(PROGRAM).c $(PROGRAM).opt \
-		  testout.sav
-LIBOBJS		= @XDR_LIBOBJS@
-LIBNAME		= netcdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS)
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= ../libsrc/libnetcdf.a
-LIBS		= $(LD_XDR) $(LIBSX)
-INSTALL_DEPS	= @XDR_INSTALL_DEPS@
-prefix		= ../../..
-GARBAGE		= test.xdr $(PROGRAM)_out.new
-
-
-all::         FORCE
-	@if test -z "$(LIBOBJS)"; then \
-	  : true; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(REMOTE_LIBRARY); \
-	fi
-
-# The formatted file `$(PROGRAM)_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to SMALL rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.xdr' which MUST be byte-for-byte
-# identical with `test_xdr.sav'.
-#
-test:		$(PROGRAM)
-	./$(PROGRAM) > $(PROGRAM)_out.new
-	@cmd="diff -w $(PROGRAM)_out.new testout.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes formatted test ***"; \
-	else \
-	    echo "*** XDR fails formatted test ***"; \
-	    echo "The above differences are OK iff due to rounding"; \
-	    exit 0; \
-	fi
-	@cmd="cmp test.xdr test_xdr.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes binary test ***"; \
-	else \
-	    echo "*** XDR fails binary test ***"; \
-	    exit 1; \
-	fi
-
-install::
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Deleted: packages/libhdf4/trunk/mkinstalldirs
===================================================================
--- packages/libhdf4/trunk/mkinstalldirs	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/mkinstalldirs	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,32 +0,0 @@
-#!/bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Last modified: 1994-03-25
-# Public domain
-
-errstatus=0
-
-for file in ${1+"$@"} ; do 
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d in ${1+"$@"} ; do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here

Deleted: packages/libhdf4/trunk/release_notes/ABOUT_4.1r4
===================================================================
--- packages/libhdf4/trunk/release_notes/ABOUT_4.1r4	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/release_notes/ABOUT_4.1r4	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,95 +0,0 @@
-
-                          ABOUT HDF 4.1 Release 4
-                                October 2000 
-
-INTRODUCTION
-
-This document describes the differences between HDF 4.1r3 and
-HDF 4.1r4.  It is written for people who are familiar with
-previous releases of HDF and wish to migrate to HDF 4.1r4.
-
-The HDF 4.1r4 documentation can be found on the NCSA ftp server 
-(ftp.ncsa.uiuc.edu) in the directory:
-
-     /HDF/HDF/Documentation/HDF4.1r4/
-
-First-time HDF users are encouraged to read the FAQ in this
-release for more information about HDF.  Users can also look
-at the home page for HDF at:
-
-     http://hdf.ncsa.uiuc.edu/
-
-If you have any questions or comments, please send them to:
-
-     hdfhelp at ncsa.uiuc.edu
-
-CONTENTS
-
-- New Features and Changes
-- Platforms Tested
-- Known Problems
-
-New Features and Changes:
-========================
-
-This release focuses on new features and changes added to the
-GR interface.
-
-o Two new utilities have been added to HDF, gif2hdf and hdf2gif.
-  The gif2hdf utility will convert a GIF image into an HDF file
-  containing a GR image. The hdf2gif utility will convert an HDF GR 
-  image into a GIF image. 
-  
-o Chunking and chunking with compression have been added to the
-  GR interface.
-
-o JPEG compression with the GR interface was not working properly.
-  This problem has been fixed.
-
-Several hdp options have been added:
-  
-o Added -s option to dumpgr and dumpsds to allow printing data 
-  as a stream instead of breaking the lines at 65 characters. 
-
-o Added option -c to dumpgr and dumpsds to allow printing clean output 
-  for attributes with type DFNT_CHAR. With this option, hdp will print 
-  space characters, such as horizontal tabs, CRs, and LFs, as they are 
-  instead of "\digit" (still the default.)  This option also prints "..." 
-  for one or more null characters among the data.
-
-o Added option -l to dumpgr to allow printing data in different interlace
-  modes.
-
-
-Platforms Tested:
-================
-
-HDF 4.1 Release 4 has been tested on the following platforms:
-
-   Cray J90  (available after initial 4.1r4 release)
-   Cray T3E                      
-   DEC Alpha/Digital Unix
-   DEC Alpha/OpenVMS
-   Exemplar
-   FreeBSD
-   HP-UX 
-   IRIX 
-   IRIX64 (-n32, -64)
-   Linux
-   Solaris
-   Solaris x86
-   SP
-   Windows NT/98/2000
-
-For more information on the platforms that were tested and for
-which we provide pre-compiled binaries, please refer to the following
-web page (accessible from the HDF home page):
-
-     http://hdf.ncsa.uiuc.edu/platforms.html
-
-
-Known Problems:
-==============
-
-o The ncgen utility fails on the IBM SP.
-

Copied: packages/libhdf4/trunk/release_notes/HISTORY.txt (from rev 832, packages/libhdf4/branches/upstream/current/release_notes/HISTORY.txt)
===================================================================
--- packages/libhdf4/trunk/release_notes/HISTORY.txt	                        (rev 0)
+++ packages/libhdf4/trunk/release_notes/HISTORY.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,2585 @@
+==========================================================================
+=                                                                        =
+=       This files conatins a history of the HDF4.* releases.            =
+=                                                                        =
+=       To find information about a particular release search            =
+=       for %%%4.#r# string, for example 4.1r2.                          =
+=       List of all releases is on the top of the file.                  =
+=                                                                        =
+=       Documents in this file refer to several *.txt files that were    =
+=       originally stored in the release_notes directory of the HDF4     =
+=       source tree. Those file are now combined into one misc_docs.txt  =
+=       file in the same directory.                                      =
+=                                                                        =
+==========================================================================    
+
+List of the HDF4 releases
+
+4.2r0          December  2003
+4.2r0-Beta     September 2003
+4.1r5          November  2001
+4.1r4          October   2000
+4.1r3          May       1999
+4.1r2          March     1998 
+4.1r1          February  1997
+4.1b1          December  1996 
+4.0r2          July      1996 
+4.0r1          February  1996
+4.0b2          November  1995
+4.0b1          July      1995 
+4.0.alpha      November  1994
+
+
+==========================================================================    
+ 
+
+%%%4.2r0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+                          HDF 4.2 Release 0
+                           December 2003
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r5 and
+HDF 4.2r0.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r0
+
+The HDF 4.2r0 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     ftp://hdf.ncsa.uiuc.edu/HDF/Documentation/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Support for new platforms
+- Bugs fixed since HDF4.1r5
+- Documentation
+- Platforms Tested
+- Known problems
+
+New Features and Changes:
+========================
+
+o IMPORTANT: HDF4 HAS A NEW CONFIGURATION 
+
+  ZLIB and JPEG libraries were removed from the HDF4 distribution source.
+  ZLIB and JPEG have to be installed on the system before HDF4 library
+  can be built or HDF4 precompiled binaries can be used.
+  Please read INSTALL in the top HDF4 directory for instructions
+  how to build the HDF4 library and applications.
+
+o HDF4 has an optional SZIP compression method; in order to use SZIP compression,
+  SZIP library has to be installed on the system. Please refer to the INSTALL 
+  file for instructions on how to build with/without the SZIP Library.
+  SZIP in HDF4 is free for non-commercial use; 
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html 
+  for information regarding commercial use. 
+
+  For more information about SZIP compression
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/ and 
+  the "HDF4 Reference Manual" entries for the GRsetcompress and 
+  SDsetcompress functions. 
+
+o IMPORTANT note about prebuild binaries:
+
+  NCSA precompiled binaries has SZIP compression method enabled for all platforms
+  except Crays T3E and SV1 and Linux 2.4 SuSE x86_64. To use the binaries download
+  the SZIP library from http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/
+
+o The following new tools have been added
+
+      hrepack
+      hdiff
+      hdfimport
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0 documentation set for more
+  information.
+
+o fp2hdf is removed. It is replaced with hdfimport.
+
+o Helper scripts to facilitate HDF4 installation and compilation were added:
+  
+      h4cc   - to compile C application with the HDF4 Libraries
+      h4fc   - to compiler Fortran applications with the HDF4 Libraries
+      h4redeploy - to fix binary installation
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0 documentation set for more
+  information.
+
+Support for new platforms 
+=========================
+
+o HDF4 was ported to the following platforms
+
+      AIX 5.1 64-bit version
+      MacOSX
+      Linux 2.4 RH8 and RH9 
+      Linux 2.4 RH8 64-bit, SuSE 64-bit
+      Linux 2.4 ia64
+      Linux 2.4 SGI (Altrix)
+
+
+Bugs fixed since HDF4.1r5
+=========================
+
+1. "hdp dumpgr" and "hdp dumpsds" have two new options:
+        -g to suppress the data of global (or file) attributes
+        -l to suppress the data of local attributes
+
+2. The problem where hdp failed on a very long file name has been
+   fixed. (bug #693)
+
+3. The problem where VSinquire failed when being called on a vdata
+   that had no fields defined, has been fixed. (bug #626)
+
+4. When the values of VGNAMELENMAX and VSNAMELENMAX are changed
+   the hdp output doesn't reflect the change. This problem is 
+   now fixed. (bug #606)
+
+5. hdp dumpvg sometimes failed when reading a file that had a vgroup 
+   being inserted into another.  This has been fixed. (bug #477)
+
+6. hdf2gif failed when a user tried it on JPEG compressed images. (Bug #601).
+   The problem is now fixed. An error message is displayed if the image is not
+   8-bit. If the image is 24-bit, the message suggests using hdf2jpeg.
+
+7. ncdump failed to read NetCDF files 3.5 when there was more than one variable
+   with unlimited dimensions. Fixed.
+
+8. The NetCDF part of the HDF4 library was not ported to Compaq True64 system. 
+   Fixed.
+
+9. The hdp commands dumpsds, dumpgr, dumpvd, and dumpvg now display an 
+    informative message when a non-HDF file is given as input. (Bug #817)
+
+10. The compilation warnings and error on the macro HDFclose are fixed.
+    (Bug #818)
+
+Documentation
+==============
+
+    Entries for new utilities hdiff, hrepack, hdfimport and helper
+    scripts h4cc, h4fc, and h4redeply were added to the Reference Manual.
+
+Platforms Tested
+================
+
+HDF 4.2 Release 0 has been tested on the following platforms:
+
+    AIX 5.1  (32 and 64-bit)      xlc 6.0.0.2
+                                  xlf 8.1.1
+    Cray T3E sn6606 2.0.6.08      Cray Standard C Version 6.6.0.2
+                                  Cray Fortran Version 3.6.0.2
+    Cray SV1 sn9617 10.0.1.2      Cray Standard C Version 6.6.0.2
+                                  Cray Fortran Version 3.6.0.2
+    FreeBSD 4.9                   gcc 2.95.4
+                                  g++ 2.95.4
+    HP-UX B.11.00                 HP C  HP92453-01 A.11.01.20 
+                                  HP F90 v2.4
+                                  HP ANSI C++ B3910B A.03.13
+    IRIX64 6.5 (64 & n32)         MIPSpro cc 7.3.1.3m
+                                  F90 MIPSpro 7.3.1.3m 
+    Linux 2.4.20-20.7 (RH8)       gcc 3.3.1
+                                  Intel(R) C++ Version 7.1
+                                  Intel(R) Fortran Compiler Version 7.1
+    Linux 2.4.20-20.9 (RH9)       gcc 3.2.2
+    Linux 2.4.21-2.9.5ws x86_64   gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-16)
+                                  g77 based on gcc version 3.2.3
+    Linux 2.4.19-SMP #1 x86_64    gcc version 3.3.2 (SuSE Linux)
+                                  g77 version 3.3.2
+    OSF1 V5.1                     Compaq C V6.4-014
+				  Compaq Fortran V5.5-1877
+    SunOS 5.7(32 and 64 bit)      WorkShop Compilers 5.0 98/12/15 C 5.0
+     (Solaris 2.7)                WorkShop Compilers 5.0 98/10/25 
+                                  FORTRAN 77 5.0
+                                  gcc 3.2.2
+                                  g77 GNU Fortran (GCC 3.2.2) 3.2.2 
+    SunOS 5.8(32 and 64 bit)      Sun WorkShop 6 update 2 C 5.3
+     (Solaris 2.8)                Sun WorkShop 6 update 2 Fortran 77 5.3 
+
+    IA-32 Linux 2.4.9-31pctr      Intel(R) C++ Version 7.0
+                                  Intel(R) Fortran Compiler Version 7.0
+                                  
+    IA-64 Linux 2.4.16 ia64       Intel(R) C++ Version 7.0
+                                  Intel(R) Fortran Compiler Version 7.0
+    IA-64 Linux 2.4.19-SMP        Intel(R) C++  Version 7.1
+                                  Intel(R) Fortran Compiler Version 7.1
+                                  gcc 3.2
+                                  g77 GNU Fortran (GCC 3.2) 3.2
+    IA-64 Linux 2.4.21-sgi        Intel(R) C++  Version 7.1
+    (Altrix)                      Intel(R) Fortran Compiler Version 7.1
+    Windows 2000 (NT5.0)          MSVC++ 6.0
+                                  DEC Visual Fortran 6.0
+                                  Intel C and F90 compilers version 7.1
+    Windows XP                    MSVC++.NET
+    MAC OS X                      Darwin 6.8
+                                  gcc Apple Computer, Inc. GCC 
+                                  version 1175, based on gcc version 3.1
+                                  
+
+Known problems
+==============
+
+o  SZIP Library is not available for Crays SV1 and T3E
+   Fortran APIs do not support SZIP compression.
+
+o  NetCDF tests nctest (C) and ftest (Fortran) fail to read from NetCDF 3.5 files
+
+o  On Linux RH8 64-bit SZIP tests fail if library is compiled in production
+   mode. All tests pass in the debug mode.
+
+o  This release doesn't support VMS system.
+
+o  On Linux with gcc compilers Fortran NetCDF APIs cannot read attributes, variables,
+   and dimensions when name contain spaces.
+
+o  HDF4 Library cannot be built with PGI compilers.
+
+o  N-Bit compression is not supported with Fortran APIs.
+
+o  Using both fill-value and compression on SD datasets doesn't work.
+
+o  --prefix defines where the installation path is.  This version has
+   the default set as /usr/local which is different from previous versions.
+
+o  New utilities hdiff and hrepack are not available for Windows 2000.
+
+%%%4.2r0-Beta%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.2 Release 0-Beta
+                               September 2003
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r5 and
+HDF 4.2r0-Beta.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r0-Beta
+
+The HDF 4.2r0-Beta documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/pub/outgoing/hdf4/4.2-Beta/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+
+New Features and Changes:
+========================
+
+o ZLIB and JPEG libraries were removed from the HDF4 distribution source.
+  Please read INSTALL-4.2r0-Beta in the top HDF4 directory for instructions
+  how to build HDF4 Library and applications.
+
+o HDF4 has an optional SZIP compression; please refer to the INSTALL-4.2r0-Beta 
+  file for instructions how to build with/without the SZIP Library.
+  SZIP in HDF4 is free for non-commercial use; 
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html 
+  for information regarding commercial use. 
+
+  For more information about SZIP compression
+  see http://hdf.ncsa.uiuc.edu/HDF5/doc_resource/SZIP/ and the "HDF4 Reference Manual"
+  entries for the GRsetcompress and SDsetcompress functions. 
+
+o The following new tools have been added
+
+      hrepack
+      hdiff
+      hdfimport
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0-Beta documentation set for more
+  information.
+
+o HDF4 was ported to the following platforms
+
+      AIX 5.1 64-bit version
+      MacOSX
+      Linux 2.4 RH8 and RH9
+
+Please refer to the bugs_fixed.txt file for more details on bugs that were 
+fixed.
+
+
+Platforms Tested:
+================
+
+HDF 4.2 Release 0-Beta has been tested on the following platforms:
+
+   FreeBSD 4.9
+   HP-UX B.11.00 
+   AIX 5.1 (32 and 64-bit)
+   IRIX64 6.5 (-n32, -64)
+   Linux 2.4
+   Solaris 2.7, 2.8 (32 and 64-bit)
+   MacOSX
+
+   No precompiled binaries is available for this release.
+
+
+
+%%%4.1r5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 5 
+                               November 2001 
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r4 and
+HDF 4.1r5.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r5.
+
+The HDF 4.1r5 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r5/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+
+New Features and Changes:
+========================
+
+o The following Vdata routines were added:
+
+     VSsetblocksize/vsfsetblsz -- sets the block size of the 
+                                  linked-block element.
+     VSsetnumblocks/vsfsetnmbl -- sets the number of blocks for 
+                                  a linked-block element.
+     VSgetblockinfo/vsfgetblinfo -- retrieves the block size and the number 
+                                    of blocks of a linked-block element.
+
+o  Two routines were added to get compression information for the SD and
+   GR interfaces, including chunked elements: SDgetcompress/sfgcompress 
+   and GRgetcompress/mggcompress. 
+
+   Note: 
+
+   - For a JPEG image, GRgetcompress only returns the compression type, not 
+     the compression information (i.e, quantity and force_baseline).  This 
+     information is not currently retrievable.
+
+   - Getting compression type for JPEG chunked images is not working yet.
+
+o  "hdp dumpgr" has a new option, -pd, to print palette data only.  Also,
+   whenever option -p or -pd is given, only palettes are printed, and no 
+   images or file attributes. 
+
+o  A new FORTRAN function, heprntf (HEprint), was added.  It takes two
+   arguments: file name and level.  If the file name string has 0 length,
+   then error messages will be printed to standard output. 
+
+o  On Windows, the unresolved symbol (error_top) error has been fixed when 
+   calling HEclear and linking with the DLL.  Users who want to use the HDF 
+   DLL should define HDFAPDLL in their applications.  Simply go to Project 
+   Settings and add HDFAPDLL as the predefined constant.
+
+o  A memory leak in the netCDF portion of the HDF/mfhdf distribution
+   was fixed. 
+
+o  The "#define NULL" was removed since ANSI C compilers are required to
+   define NULL.
+
+o  When using "hdp dumpgr", data was being printed in the range of 0-250
+   when it should have been between 0-168.  This problem is now fixed.
+
+Please refer to the bugs_fixed.txt file for more details on bugs that were 
+fixed.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 5 has been tested on the following platforms:
+
+   Cray SV1 10.0.0.8
+   Cray T3E sn6711 2.0.5.55                     
+   Compaq Tru64 Unix (OSF1) 5.1
+   DEC Alpha/OpenVMS AXP 7.2-1
+   FreeBSD 4.4
+   HP-UX B.11.00 
+   IBM SP 4.3
+   IRIX 6.5 
+   IRIX64 6.5 (-n32, -64)
+   Linux 2.2.18smp
+   Solaris 2.7, 2.8
+   Windows NT/98/2000
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+Know problmes:
+
+Writing n-bit datasets from FORTRAN with the SD interface is not working.
+
+SDgetchunkinfo does not return compression coding or modelling type.
+
+Using both fill-values and compression on SD datasets is not currently
+working, don't use one or the other.
+
+Dumping compressed Vdatas with vshow or hdp is not working.
+
+Reading or writing compressed images with the GR interface is not working.
+
+
+
+%%%4.1r4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 4
+                                October 2000 
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r3 and
+HDF 4.1r4.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r4.
+
+The HDF 4.1r4 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r4/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+
+New Features and Changes:
+========================
+
+This release focuses on new features and changes added to the
+GR interface.
+
+o Two new utilities have been added to HDF, gif2hdf and hdf2gif.
+  The gif2hdf utility will convert a GIF image into an HDF file
+  containing a GR image. The hdf2gif utility will convert an HDF GR 
+  image into a GIF image. 
+  
+o Chunking and chunking with compression have been added to the
+  GR interface.
+
+o JPEG compression with the GR interface was not working properly.
+  This problem has been fixed.
+
+Several hdp options have been added:
+  
+o Added -s option to dumpgr and dumpsds to allow printing data 
+  as a stream instead of breaking the lines at 65 characters. 
+
+o Added option -c to dumpgr and dumpsds to allow printing clean output 
+  for attributes with type DFNT_CHAR. With this option, hdp will print 
+  space characters, such as horizontal tabs, CRs, and LFs, as they are 
+  instead of "\digit" (still the default.)  This option also prints "..." 
+  for one or more null characters among the data.
+
+o Added option -l to dumpgr to allow printing data in different interlace
+  modes.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 4 has been tested on the following platforms:
+
+   Cray J90  (available after initial 4.1r4 release)
+   Cray T3E                      
+   DEC Alpha/Digital Unix
+   DEC Alpha/OpenVMS
+   Exemplar
+   FreeBSD
+   HP-UX 
+   IRIX 
+   IRIX64 (-n32, -64)
+   Linux
+   Solaris
+   Solaris x86
+   SP
+   Windows NT/98/2000
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+
+Known Problems:
+==============
+
+o The ncgen utility fails on the IBM SP.
+
+
+%%%4.1r3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 3
+                               May 7, 1999
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r2 and
+HDF 4.1r3.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r3.
+The release notes provide more in-depth information concerning
+the topics discussed here.  The HDF 4.1r3 documentation can be
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r3
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Acknowledgements
+
+New Features and Changes:
+========================
+
+o HDF 4.1r2 was unable to properly read HDF SDSs created with HDF 3.3x.
+  It did not read the correct SDS names.  This problem has been fixed.
+
+o Many problems have been fixed with the GR interface, including the
+  following:
+
+  - The GR interface can now read compressed files created with the 
+    DFR8 and DF24 interfaces, except for those which were compressed 
+    with IMCOMP compression.
+  
+  - The GR interface can read and write images compressed with RLE, 
+    GZIP and Skipping Huffman compression methods.
+
+  - Palettes can now be written and read properly with the GR interface.
+
+  - 24-bit raster images can now be read by the GR interface.
+
+o You can now create an SDS with a name up to 256 characters in length.
+  The previous limit was 64.
+
+o HDF now supports IJP JPEG version 6b and Gzip version 1.1.3.
+
+o Numerous hdp problems have been fixed, including the following:
+
+  - hdp no longer fails on an HDF file which contains a vdata that no 
+    records have been written to.
+
+  - hdp no longer fails on the PC and Mactinosh dumping large SDSs.
+
+  - GR file attributes can now be displayed.
+
+  - A palette can now be dumped with the GR command.
+
+o SDfileinfo no longer returns the wrong number of datasets for old
+  files created with the DFSD interface.
+
+o This will be the last release that SunOS 4.1.4 is supported.
+
+Check the ./bugs_fixed.txt for other changes that are not listed
+here.
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 3 has been tested on the following platforms:
+
+   Cray J90                  
+   Cray T90 (CFP, IEEE)         
+   Cray T3E                      
+   DEC Alpha/Digital Unix
+   DEC Alpha/OpenVMS
+   DEC Alpha NT
+   VAX OpenVMS
+   Exemplar
+   FreeBSD
+   HP-UX 10.2
+   IRIX 6.5
+   IRIX64 6.5 (-n32, -64)
+   Linux
+   Macintosh 
+   Solaris
+   Solaris x86
+   SP
+   SunOS 4.1.4
+   Windows NT/95
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+
+Known Problems:
+==============
+
+o On Alpha OpenVMS version 6.2, the DF.OLB and MFHDF.OLB Libraries 
+  should be created with optimization turned off. Otherwise hdftest 
+  fails (the sfgichnk function returns incorrect information).
+
+o On VAX Open VMS 6.2, the ncgen utility core dumps and an error occurs
+  when reading GR image data with user-defined fill values.
+
+o If you encounter problems building on a platform, please be sure to
+  check the INSTALL file at the top of the HDF source tree, in case 
+  these problems are documented in section 2.5, Platform-specific Notes.
+
+o On the NT, the hdp utility fails in the debug version when using the 
+  list command.
+
+Acknowledgements:
+================
+
+Fortner Software LLC ("Fortner") created the reference implementations
+for the Macintosh and Windows NT/95 of the HDF 4.1r3 library.  For more 
+information, please refer to the macintosh.txt and windows.txt files in 
+the ./release_notes/ directory.
+
+
+%%%4.1r2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                        ABOUT HDF 4.1 Release 2 
+                            March 16, 1998
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r1 and
+HDF 4.1r2.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r2.
+The release notes provide more in-depth information concerning
+the topics discussed here.  The HDF 4.1r2 documentation can be
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/Documentation/HDF4.1r2
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+- Acknowledgements
+
+New Features and Changes:
+========================
+
+o Data chunking is now supported with the GR interface.  New routines
+  for creating and manipulating chunked GR images have been added.  Please
+  refer to the ./release_notes/new_functions.txt file and HDF Reference 
+  Manual for information on using chunked GRs.
+
+o In previous releases, many C routines existed for which there were  
+  no Fortran counterparts.  With HDF 4.1r2, we have added a Fortran 
+  routine for most C routines.  Please check the 
+  ./release_notes/new_functions.txt file for a list of the new 
+  functions added to HDF.
+
+o This is the first release in which the Java Products (the Java-based
+  HDF Viewer (JHV) and the Java HDF interface (JHI)) are incorporated in 
+  the HDF release itself.  For information on the Java Products, please
+  refer to the HDF home page under Information about HDF
+  (http://hdf.ncsa.uiuc.edu/about.html).
+
+o In the SD interface, HDF now defaults to ONLY storing the new version 
+  of the dimension representation added in HDF 4.0r1. 
+
+  When the dimension representation was changed in 4.0r1, the HDF library 
+  defaulted to include both the new and old dimension representations in 
+  an HDF file.  Now, this new dimension representation is stored by default.
+  The SDsetdimval_comp function can be used to change the dimension 
+  representation stored.
+ 
+  Following is a detailed description of the difference between the
+  new and old representations:
+
+    Prior to HDF 4.0r1, a vgroup was used to represent a dimension.  The 
+    vgroup had a single field vdata with a class of "DimVal0.0".  The vdata 
+    had <dimension size> number of records, with each record having a fake 
+    value from 0, 1, 2 ... , (<dimension size> - 1).  The fake values were 
+    not really required and took up a large amount of space. For applications 
+    that created large one dimensional array datasets, the disk space taken by 
+    these fake values almost doubled the size of the HDF file. In order to omit 
+    the fake values, the new version for a dimension vdata was implemented.
+ 
+    The new version uses the same structure as the old version.  The
+    only differences are that the vdata has only 1 record with a value
+    of <dimension size> and that the vdata's class is "DimVal0.1",  to
+    distinguish it from the old version.
+
+o Platforms dropped with this release:  Cray Y-MP, T3D, and Linux (a.out)  
+
+o Extensive changes have been made to the Reference Manual and User's
+  Guide.  The updated Reference Manual is available with this release.  The
+  updated User's Guide will be available in the near future.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 2 has been tested on the following platforms:
+
+   Cray T90 (CFP, IEEE)            IRIX 6.2 
+   Cray T3E                        IRIX64 6.4 (-n32, -64)
+   DEC Alpha/Digital Unix          Linux (elf) 
+   Exemplar                        Solaris  
+   FreeBSD                         Solaris x86 
+   HP-UX 9.03                      SP2 
+   HP-UX 10.2                      SunOS 
+   IRIX 5.3                   
+
+** The Windows NT/95, Macintosh, Dec Alpha OpenVMS and VAX OpenVMS 
+   releases are not available with this release of HDF4.1r2.  Separate 
+   releases for these platforms will be available in the near future. 
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+Known Problems:
+==============
+
+o Writing n-bit datasets from FORTRAN with the SD interface is not working.
+
+o SDgetchunkinfo does not return compression coding or modeling type.
+
+o Using both fill-values and compression on SD datasets is not currently
+  working; don't use one or the other.
+
+o Dumping compressed Vdatas with vshow or hdp is not working.
+
+o Reading or writing compressed images with the GR interface is not working.
+
+o With the GR interface, you cannot create a raster image without writing data 
+  to it.
+
+
+Important Fixes:
+===============
+
+o HDF no longer core dumps when reading a NetCDF file.
+
+o HDF now supports little-endian conversion for VAX and Dec 
+  Alpha OpenVMS.
+
+o The problems that occurred on the Cray with HDF 4.1r1 have
+  been corrected.
+
+See the ./release_notes/bugs_fixed.txt file for more information
+on bugs fixed in this release.
+
+Acknowledgements:
+================
+
+Fortner Software LLC ("Fortner") created the reference implementations
+for Macintosh and Windows NT/95 of the HDF 4.1r2 library, which will
+be available in the near future.  For more information, please refer to 
+the macintosh.txt and windows.txt files [in the ./release_notes/ directory]. 
+(see above).
+
+==================new_functions.txt==================================
+
+This file contains a list of the new functions added with HDF 4.1r2.
+The functions in parenthesis were already present in the HDF library,
+and are included for clarity.
+
+C                     FORTRAN                 Description
+--------------------------------------------------------------------------------
+
+(SDsetcompress)       sfscompress             compresses SDS
+
+(SDwritechunk)        sfwchnk                 writes the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDwritechunk)        sfwcchnk                writes the specified chunk of
+                                              CHARACTER data to the SDS
+
+(SDreadchunk)         sfrchnk                 reads the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDreadchunk)         sfrcchnk                reads the specified chunk of
+                                              CHARACTER data to the SDS
+ 
+(SDsetchunk)          sfschnk                 makes the SDS a chunked SDS
+ 
+(SDsetchunkcache)     sfscchnk                sets the maximum number of chunks
+                                              to cache
+ 
+(SDgetchunkinfo)      sfgichnk                gets info on SDS
+
+(SDsetblocksize)      sfsblsz                 sets block size 
+
+(SDisrecord)          sfisrcrd                checks if an SDS is unlimited
+
+
+
+(GRsetcompress)       mgscompress             compresses raster image
+
+GRsetchunk            mgschnk                 makes a raster image a chunked
+                                              raster image
+
+GRgetchunkinfo        mggichnk                gets info on a raster image
+
+GRsetchunkcache       mgscchnk                sets the maximum number of chunks
+                                              to cache
+
+
+(Hgetlibversion)      hglibver                gets version of the HDF Library
+
+(Hgetfileversion)     hgfilver                gets version of the HDF file
+
+
+Vdeletetagref        vfdtr                    deletes tag/ref pair ( HDF object)
+                                              from a vgroup
+
+(VSfindclass)        vsffcls                  finds class with a specified 
+                                              name in a vdata
+
+VSdelete             vsfdlte                  deletes a vdata
+
+Vdelete              vdelete                  deletes a vgroup
+
+
+
+=====================================================================
+
+
+%%%4.1r1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.1 Release 1
+                              February 21, 1997
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r2 and
+HDF 4.1r1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r1.
+The release notes provide more in-depth information concerning 
+the topics discussed here.  The HDF 4.1r1 documentation can be 
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/Documentation/HDF4.1r1
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+
+
+New Features and Changes:
+========================
+
+o Attributes are now supported in both the vdata and vgroup 
+  APIs.  In the vdata API, attributes can be attached to either 
+  vdata fields or vdatas; in the vgroup API, attributes can be 
+  attached to vgroups.  This new functionality can also be used
+  to attach attributes to vdatas and vgroups created by earlier
+  versions of the HDF library.  However, the old versions of
+  the HDF library cannot read the new version vdatas and vgroups.
+  A vdata/vgroup having attributes will become a new version 
+  vdata/vgroup.  For more information, please refer to the file 
+  ../release_notes/vattr.txt, the man pages for the new functions, 
+  and the HDF 4.1 User's Guide.
+
+o Data chunking is now supported in SD scientific data sets.  
+  When data chunking is used, an n-dimensional SDS is stored 
+  as a series of n-dimensional chunks, improving performance on 
+  certain types of partial read operations.
+
+  New routines for creating and manipulating chunked SD 
+  scientific data sets have been provided, and two preexisting 
+  SD I/O routines, SDreaddata and SDwritedata, have also been 
+  modified to work with chunked SDSs.  For more information, please 
+  refer to the file ../release_notes/sd_chunk_examples.txt, the man
+  page for sd_chunk, and the HDF 4.1 User's Guide.
+
+o Due to certain limitations in the way compressed SDS datasets are stored, 
+  data which has been compressed is not completely writable in ways that 
+  uncompressed datasets are.  The "rules" for writing to a compressed 
+  dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  i.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  i.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.  
+
+  Please refer to the HDF 4.1 User's Guide for more information.
+
+o HDF now creates free format FORTRAN include files.  In order to make 
+  FORTRAN 90 programs be able to use HDF include files (*.inc), HDF4.1r1 
+  creates F90 versions of these files during the 'make' process on UNIX 
+  platforms, by replacing 'C' or 'c' in column 1 with '!'.  Continuation 
+  lines in hdf.inc have been eliminated. The F90 version files are named 
+  as hdf.f90, dffunc.f90 and netcdf.f90.
+
+o Several performance improvements have been added. Test programs on SPARC
+  20/Solaris 2.5 show that when creating an hdf file with 2500 3D (10x10x10)
+  float32 SDSs, the program execution speed is improved by 2.5 - 4.8 times,
+  and SDend is faster by 4.3 - 20 times.
+
+o A new function, SDsetfillmode, has been added.  It can be used to prevent 
+  SDwritedata from pre-filling the dataset with a user defined or default 
+  fill value, so that better performance can be obtained.
+
+o SGI has changed some compiler default settings in IRIX 6.2.
+  We decided to explicitly define the settings of various ABI related
+  options.  For the 64 bit OS ("uname -s" returns IRIX64), HDF uses
+  "-64 -mips4" code.  For the traditional 32 bit OS ("uname -s" returns
+  IRIX), HDF uses "-32 -mips2".  To use n32 mode on IRIX64, HDF uses
+  "-n32 -mips3" code.  Note that in the previous release (4.0r2), HDF
+  used only "-n32".  In IRIX 6.1 and before, "-n32" defaulted to
+  "-mips4" code but in IRIX 6.2, it defaults to mips3 or mips4 code.
+  We decided to explicitly set it to "-n32 -mips3".  Therefore,
+  applications linking with the HDF library must be compiled with
+  the same explicit ABI options.
+
+o This will be the last release that we support the CM5.
+
+  HDF 4.1 Beta 1 USERS ONLY
+  -------------------------
+
+o The SD chunking routine names were changed to be more consistent
+  with the SD interface. The names of the routines are now in lower
+  case, after the two initial "SD" characters.  For example,
+  SDwriteChunk() has been changed to SDwritechunk().
+
+o The _HDF_ENTIRE_VDATA variable has been changed to _HDF_VDATA.
+  For those users already using it, a macro called _HDF_ENTIRE_VDATA
+  has been added, which is defined as _HDF_VDATA.
+
+o You can now create an empty compressed SDS.
+
+  Please refer to the ../release_notes/bugs_fixed.txt file for changes 
+  in this release.
+ 
+Platforms Tested:
+================
+
+HDF 4.1 Release 1 has been tested on the following platforms:
+
+  CM5 Parallel I/O, 4.1.3_U1
+  DEC Alpha/Digital Unix 3.2
+  DEC Alpha/OpenVMS AXP 6.2
+  DEC VAX OpenVMS 6.2
+  Exemplar 9.03
+  Free BSD 2.2
+  HP-UX 9.03
+  HP-UX 10.10
+  IRIX 5.3
+  IRIX 6.2_64
+  IRIX 6.2_n32 
+  IRIX 6.4_64
+  IRIX 6.4_n32
+  Linux A.OUT 1.2.4
+  Linux ELF 2.0.27 (C only)
+  Macintosh PowerPC (C only) 
+  SP2 4.1
+  Solaris 2.5
+  Solaris_x86 2.5 (C only)
+  SunOS 4.1.3
+  Windows NT/95 (C only)
+
+Known Problems:
+==============
+
+o With the SD interface, you are unable to overwrite
+  existing compressed data, that is not stored in
+  "chunked" form.  This is due to compression algorithms 
+  not being suitable for "local" modifications in a compressed 
+  datastream.   
+
+o There are no plans to add the DF24writeref function 
+  to the DF24 interface.  This function will be removed
+  from the documentation.
+
+Important Fixes:
+===============
+
+o If you opened a file in Read Only mode with the SD interface
+  (using SDstart), it would create the file if the file did not
+  exist.  This no longer occurs.
+
+o HDF 4.0r2 did not recognize JPEG images created by HDF 3.3r4.
+  This has been fixed.
+
+See the ../release_notes/bugs_fixed.txt file for more information
+on bugs fixed in this release.
+
+
+%%%4.1b1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.1 Beta 1
+                              December 6, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r2 and
+HDF 4.1b1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1b1.
+The release notes provide more in-depth information concerning 
+the topics discussed here.  For documentation, please refer
+to the HDF 4.0r2 documentation which can be found on the NCSA 
+ftp server (ftp.ncsa.uiuc.edu) in the directory 
+/HDF/Documentation/HDF4.0r2.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+
+
+New Features and Changes:
+-------------------------
+
+o Attributes are now supported in both the vdata and vgroup 
+  APIs.  In the vdata API, attributes can be attached to either 
+  vdata fields or vdatas; in the vgroup API, attributes can be 
+  attached to vgroups.  This new functionality can be used
+  to attach attributes to vdatas and vgroups created by earlier
+  versions of the HDF library.  However, the old versions of
+  the HDF library cannot read the new version vdatas and vgroups.
+  A vdata/vgroup having attributes will become a new version 
+  vdata/vgroup.  For more information, please refer to the file 
+  ../release_notes/vattr.txt, as well as the man pages for the
+  new functions.
+
+o Data chunking is now supported in SD scientific data sets.  
+  When data chunking is used, an n-dimensional SDS is stored 
+  as a series of n-dimensional chunks, improving performance on 
+  certain types of partial read operations.
+
+  New routines for creating and manipulating chunked SD 
+  scientific data sets have been provided, and two preexisting 
+  SD I/O routines, SDreaddata and SDwritedata, have also been 
+  modified to work with chunked SDSs.  For more information, please 
+  refer to the file ../release_notes/sd_chunk_examples.txt, as
+  well as the man page for sd_chunk.
+
+  More information will be included in the HDF 4.1 documentation,
+  which will be available with the release of HDF 4.1.  
+
+o Due to certain limitations in the way compressed SDS datasets are stored, 
+  data which has been compressed is not completely writable in ways that 
+  uncompressed datasets are.  The "rules" for writing to a compressed 
+  dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  i.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  i.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.  
+
+  Please refer to the ../release_notes/comp_SDS.txt file for more information.
+
+o A new file, ../release_notes/compile.txt, contains instructions on
+  compiling applications on the supported platforms.  If you encounter
+  problems with it, please let us know at hdfhelp at ncsa.uiuc.edu. 
+
+o SGI has changed some compiler default settings in IRIX 6.2.
+  We decided to explicitly define the settings of various ABI related
+  options.  For the 64 bit OS ("uname -s" returns IRIX64), HDF uses
+  "-64 -mips4" code.  For the traditional 32 bit OS ("uname -s" returns
+  IRIX), HDF uses "-32 -mips2".  To use n32 mode on IRIX64, HDF uses
+  "-n32 -mips3" code.  Note that in the previous release (4.0r2), HDF
+  used only "-n32".  In IRIX 6.1 and before, "-n32" defaulted to
+  "-mips4" code but in IRIX 6.2, it defaults to mips3 or mips4 code.
+  We decided to explicitly set it to "-n32 -mips3".  Therefore,
+  applications linking with the HDF library must be compiled with
+  the same explicit ABI options.
+
+Platforms Tested:
+-----------------
+
+HDF 4.1b1 has been tested on the following platforms:
+
+  DEC Alpha/Digital Unix 3.2
+  DEC Alpha/OpenVMS AXP v6.2
+  DEC VAX OpenVMS v6.2
+  Free BSD 2.2
+  HP-UX 9.03
+  IRIX 5.3
+  IRIX 6.2_64
+  IRIX 6.2_n32 
+  Linux ELF 1.2.13 (C only)
+  Macintosh PowerPC (C only) (not ready yet)
+  SP2 4.1
+  Solaris 2.5
+  SunOS 4.1.3
+  Windows NT/95 (C only)
+  YMP 9.0.2asC
+
+Known Problems:
+---------------
+
+o With the SD interface, you are unable to overwrite
+  existing compressed data, that is not stored in
+  "chunked" form.  This is due to compression algorithms 
+  not being suitable for "local" modifications in a compressed 
+  datastream.  For more information, please refer to 
+  the ../release_notes/comp_SDS.txt file. 
+
+o With 4.0r1p1, you could type "hdp list -a <HDF file>
+  to get a list of the file attributes associated with
+  a file.  This does not currently work.
+
+o There are no plans to add the DF24writeref function 
+  to the DF24 interface.  This function will be removed
+  from the documentation.
+
+o When running "make test" on OpenVMS, Test 3 (float32) of the 
+  chunking tests fails, and has therefore been commented out.
+
+o When running the tests on Window NT/95, Test 2 (uint16) of the
+  chunking tests fails, and will be commented out.
+ 
+
+Important Fixes:
+----------------
+
+o If you opened a file in Read Only mode with the SD interface
+  (using SDstart), it would create the file if the file did not
+  exist.  This no longer occurs.
+
+o HDF 4.0r2 did not recognize JPEG images created by HDF 3.3r4.
+  This has been fixed.
+
+See the ../release_notes/bug_fixed.txt file for more information
+on bugs fixed in this release.
+
+
+%%%4.0r2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.0 Release 2
+                                July 19, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r1p1 and
+HDF 4.0r2.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.0r2.
+The documentation and release notes provide more in-depth 
+information concerning the topics discussed here.  The HDF 4.0
+documentation can be found on the NCSA ftp server in the
+directory /HDF/Documentation/HDF4.0/Users_Guide.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+
+
+New Features and Changes:
+-------------------------
+
+o HDF now supports unlimited number of access IDs and files IDs.
+
+o The vdata field size limit has been increased from 32000 to 65535.
+
+o The hdp utility has been updated to:
+   - view a GR object
+   - recognize the new compression methods
+   - view descriptive annotations
+   - display the library version of the HDF file
+
+o SDsetattr and GRsetattr now check for both MAX_ORDER and 
+  MAX_FIELD_SIZE.
+
+o The handling of DFNT_CHAR in all Fortran interfaces has been 
+  cleaned up.  See release_notes/Fortran_APIs.txt for more 
+  information.
+
+o When appending compressed data onto the end of an unlimited
+  dimension SDS, the SD interface no longer writes the fill-values
+  in locations where they will immediately be over-written by data.
+  This was done for the compression layer, but has the added
+  enhancement of improving performance.
+
+o On the Cray, there were boundary problems when foreign data did not
+  start from the 64-bit boundary.  This has been fixed.
+
+o There are no longer the following name collisions with the HDF 
+  libraries:
+     -  AVS (HPread, HPwrite)
+     -  Windows SDK (_hread) 
+     -  ODL library (_HDF_<constant>)
+
+o The 32-bit mode for IRIX 6.1 previously used the '-32' option which
+  produces mips1 code.  It has been changed to use '-n32' which
+  produces mips4 code.  This runs faster on the Power Challenges.
+  Users who must use the '-32' option can link their code with
+  the IRIX 5.3 HDF library.
+
+o The compression problems have been fixed when using HDF on IRIX 6.1 
+  with the -n32 (see Known Problems below).
+
+o The zlib and jpeg libraries have been updated.  The versions included
+  with HDF 4.0 Release 2 are:
+
+      zlib version 1.0.2
+      jpeg version 6a (7-Feb-96)
+       
+o The hdfls utility has been updated to:
+    - support the new compression modes
+    - display the library version of the HDF file
+
+o Support for the 16-bit architecture has been pulled out of HDF.
+
+o The directories separator in the directory variable used by the
+  function HXsetdir (Fortran equivalent: hxsdir) is the verticle bar
+  ('|') now.  It used to be the colon (':') symbol, but a colon is
+  a legal symbol for a file pathname in the MacOS system.
+
+o The code has been rearranged so that most applications' binaries
+  will be smaller.
+
+o A new routine, VSfpack(), has been added.  Please see the HDF man
+  page on how to use this routine.
+
+o A new routine, GRluttoref(), has been added.  Please see the HDF man
+  page on how to use this routine. 
+
+o Several internal problems have been fixed with the GR interface.
+
+
+Changes in Compiling the Source Code:
+
+o A new compile option, '-DHAVE_NETCDF', has been added, to avoid conflicts 
+  in linking the HDF/MFHDF library with the original netCDF library. 
+  This is only available for the C-interface.  However, keep in 
+  mind that you cannot read/write HDF files using the netCDF libraries.  
+  See section 2.4.3.2 in the INSTALL file for more information.  
+
+o When compiling and installing HDF, the default location to place the
+  binaries, has been changed from /usr/local/bin to NewHDF in the
+  source directory.  For example, assuming the library source is loaded 
+  at /usr/local/src/hdf, the following commands will result in the HDF 
+  binaries being placed in the directory /usr/local/src/hdf/dev/NewHDF.
+
+        cd dev
+        ./configure -v
+        make 
+        make test
+        make install
+
+o The Fortran test output has been cleaned up and shortened, when 
+  running "make test".  Previously, the Fortran tests on the hdf/
+  side consisted of multiple Fortran programs invoked by a C frontend.  
+  The test programs were changed to subroutines and combined as one 
+  Fortran program.  The C frontend was also changed to produce a 
+  'directive' file, called fortest.arg, which contains directives to 
+  run the Fortran test program.
+
+
+Platforms Tested:
+-----------------
+
+HDF 4.0r2 has been tested on the following platforms:
+
+  AIX                           Linux ELF
+  C90                           MAC 
+  CM5                           SP2  (single node)
+  Digital Unix 3.2              Solaris_2.4
+  Exemplar 9.03                 Solaris 2.5
+  Free BSD                      Solaris_x86 2.4  (C only)
+  Fujitsu  (C only)             SunOS 4.1.4
+  HP-UX                         T3D  (C only)
+  IRIX 6.1 w/-n32 bit option    VMS
+  IRIX 6.1 w/-64 bit option     Windows NT/95
+  IRIX 5.3                      YMP
+  Linux A.OUT                   
+
+
+Known Problems:
+---------------
+
+o On the SunOS platform, there is a bug when using sfscal()/sfgcal() 
+  routines with gcc and f77.
+ 
+o On the VMS platform, there is a bug with float64 data.
+
+o For IRIX 6.1, the stdio.h file gives a false warning message if both 
+  the '-n32' and '-ansi' options are used for the C compiler.  We have 
+  temporarily removed the '-ansi' option from our autoconfiguration
+  for the Irix6_32 system, to avoid these messages.  We have verified
+  that the culprit in stdio.h has been corrected in IRIX 6.2, and plan
+  to put the '-ansi' option back in our next release.
+
+o The compression tests produce errors for FLOAT32 data if the '-O'
+  option is used on IRIX 6.1, for both the '-64' bit and '-n32'
+  bit modes.  It did not produce errors when using the '-32' bit 
+  option or when not using the '-O' option.  We are unsure whether the 
+  errors are due to the compression code or the IRIX C optimizer.  For 
+  now, we have chosen to compile the HDF library without the '-O' option, 
+  while we investigate the problem. 
+
+%%%4.0r1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                    ABOUT HDF4.0 Release 1
+                       February 7, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF4.0r1 and
+HDF3.3r4.  It is written for people who are familiar with 
+previous releases of HDF and wish to migrate to HDF4.0r1.
+The documentation and release notes provide more in-depth 
+information concerning the topics discussed here.  The HDF 4.0
+documentation can be found on the NCSA ftp server in the
+directory /HDF/Documentation/HDF4.0/Users_Guide.  For more 
+history behind the implementation of the items listed here, 
+refer to the ABOUT_4.0.alpha, ABOUT_4.0b1 and ABOUT_4.0b2 files.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- Important Changes (that will affect you) 
+- New Features and Changes
+- Changes in Utilities
+- Known Problems
+
+
+Important Changes: 
+-----------------
+
+  1. Several changes have been made to the libraries in HDF4.0
+     which affect the way that users compile and link their
+     programs:
+
+      * The mfhdf library has been renamed to libmfhdf.a from 
+        libnetcdf.a in previous releases.
+
+      * HDF 4.0 libraries now use v5 of the Independent JPEG Group 
+        (IJG) JPEG file access library.
+
+      * Gzip library libz.a is added in HDF4.0r1, in order to 
+        support "deflate" style compression of any object in 
+        HDF files.
+
+     Due to these changes, users are required to specify four
+     libraries when compiling and linking a program:  libmfhdf.a,
+     libdf.a, libjpeg.a and libz.a, even if your program
+     does not use JPEG or GZIP compression.  For example:
+
+     For C:
+
+        cc -o myprog myprog.c -I<path of include files> \
+              <path of libmfhdf.a> <path of libdf.a> \
+              <path of libjpeg.a> <path of libz.a>
+       or
+  
+        cc -o myprog myprog.c -I<path of include files> \
+              -L<path of libraries> -lmfhdf -ldf -ljpeg -lz
+
+     For FORTRAN:
+
+        f77 -o myprog myprog.f <path of libmfhdf.a> \
+              <path of libdf.a> <path of libjpeg.a> \
+              <path of libz.a>
+       or
+   
+        f77 -o myprog myprog.f -L<path of libraries> \
+              -lmfhdf -ldf  -ljpeg -lz
+
+     NOTE: The order of the libraries is important: libmfhdf.a
+           first, then libdf.a, followed by libjpeg.a and libz.a.
+     
+     This is also discussed in Items 1, 2, and 3 of the New 
+     Features and Changes section of this document.
+
+  2. The HDF 4.0 library will ONLY compile with ANSI C compilers.
+     See Item 4 in the New Features and Changes section of this
+     document for more information.
+
+  3. The HDF library and netCDF library on Unix systems can now be 
+     automatically configured and built with one command.  See Item 5 
+     in the New Features and Changes section of this document for more
+     information.
+
+  4. In HDF 4.0, the FORTRAN programs dffunct.i and constant.i
+     have been changed to dffunct.inc and hdf.inc.  See Item 16 in
+     the New Features and Changes section of this document for more 
+     information.
+  
+  5. Platforms tested on: IRIX (5.3, 6.1 (32 bit and 64 bit)), 
+     SunOS 4.1.4, Solaris (ver 2.4, 2.5), Solaris x86, 
+     HP-UX, Digital Unix, AIX, LINUX (A.OUT), CM5, YMP,
+     FreeBSD, C90, Exemplar, Open VMS, and SP2 (single node only). 
+
+     HDF 4.0 is not yet available on the Macintosh for HDF4.0r1.
+
+  6. The HDF 4.0 binaries for each tested platform are available. 
+     Unix binaries are located in the bin/ directory.  Binaries for 
+     Windows NT are located in the zip/ directory. 
+     
+
+New Features and Changes:
+------------------------
+
+  1. Changes to the mfhdf library
+     The mfhdf library has been renamed to libmfhdf.a from libnetcdf.a 
+     in previous releases. To link a program with HDF4.0r1
+     libraries, four libraries are required:  libmfhdf.a, libdf.a, 
+     libjpeg.a and libz.a. 
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  2. JPEG Group v5b library
+     HDF Version 4.0 libraries now use v5 of the Independent 
+     JPEG Group (IJG) JPEG file access library.
+
+     The JPEG library will need to be linked with user's 
+     applications whether they are compressed with JPEG or not.
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  3. Gzip library added
+     New with this release is support for gzip "deflate" style 
+     compression of any object in an HDF file.  This is supported 
+     through the standard compression interface function calls 
+     (HCcreate, SDsetcompress, GRsetcompress).  The ABOUT_4.0b2 
+     file contains additional information on this. 
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  4. ANSI C only
+     As was previously noted in the HDF newsletters, this release 
+     of the HDF library will compile only with ANSI C compilers. 
+     This shift to ANSI C compliance has been accompanied by a large 
+     clean up in the source code. An attempt has been made to remove 
+     all warnings and informational messages that the compilers on 
+     supported platforms occasionally emit, but this may not be 
+     completely clean for all user sites. 
+
+  5. Auto configuration 
+     Both the HDF library and netCDF library on Unix systems now use 
+     the same configure script and can be configured uniformally with 
+     one command. See the README and the INSTALL files at the top 
+     level of HDF4.0r1 for detailed instructions on configuration and 
+     installation.
+
+     A consequence of the auto configuration is that on UNIX systems 
+     without FORTRAN installed, the top level config/mh-<sys> will 
+     need to have the 'FC' macros defined to "NONE" for correct 
+     configuration. 
+     
+  6. New version of dimension record
+     In HDF4.0b1 and previous releases of the SDS interface, a vgroup 
+     was used to represent a dimension.  The vgroup had a single field 
+     vdata with a class of "DimVal0.0".  The vdata had <dimension size> 
+     number of records, with each record having a fake value from 
+     0, 1, 2 ... , (<dimension size> - 1).  The fake values were not 
+     really required and took up a large amount of space. For 
+     applications that created large one dimensional array datasets, the 
+     disk space taken by these fake values almost doubled the size of the 
+     HDF file. In order to omit the fake values, a new version of 
+     dimension vdata was implemented.
+
+     The new version uses the same structure as the old version.  The 
+     only differences are that the vdata has only 1 record with a value
+     of <dimension size> and that the vdata's class is "DimVal0.1",  to
+     distinguish it from the old version.
+
+     No change was made in unlimited dimensions.
+
+     Functions added to support this are:
+     
+       - SDsetdimval_comp -- sets backward compatibility mode for a 
+         dimension.  The default mode is compatible in HDF4.0r1, and 
+         will be incompatible in HDF4.1. See the man page of 
+         SDsetdimval_comp(3) for detail.
+
+       - SDisdimval_bwcomp(dimid) -- gets the backward compatibility
+         mode of a dimension. See the man page of SDisdimval_bwcomp(3) 
+         for detail.
+
+  7. Reading CDF files
+     With HDF 4.0 limited support for reading CDF files was added to 
+     the library. This support is still somewhat in the development 
+     stage and is therefore limited. 
+
+     To begin with, unlike the netCDF merger, the CDF API is not 
+     supported. Rather, the SD and netCDF APIs can be used to access 
+     information pulled out of CDF files. 
+
+     The type of files supported are limited to CDF 2.X files. The 
+     header information is different between CDF 1.X and 2.X files. In 
+     addition, all of the files must be stored as single-file CDFs in 
+     network encoding. 
+
+     If there is user demand, and support, the types of CDF files 
+     that are readable may be increased in the future. 
+
+  8. Parallel I/O interface on CM5 
+     An extension using the parallel IO in CM5 has been added to
+     the SDS interface. Initial tests have resulted in about
+     25 MBytes/second IO throughput using the SDA (Scalable
+     Disk Array) file system. The library provides interfaces
+     for both C* and CMF programming languages. The ABOUT_4.0.alpha
+     file has more information concerning this.
+
+     Users will find some examples in the directory
+     mfhdf/CM5/Examples.
+
+     The parallel I/O interface stores scientific datasets in
+     external files.  New options have been added to hdfls and
+     hdfpack to handle them.  A new utility, hdfunpac, was
+     created for external files handling, too. 
+
+  9. Support for SGI Power Challenge running IRIX6.1 
+     Power Challenge is now supported, both in the native 64-bit 
+     and the 32-bit objects modes.  Note that the Power Challenge 
+     native 64 bits objects use 64 bits long integers. Users should
+     be careful when using the netcdf interface.  They should declare 
+     their variables as "nclong", not "long". 
+
+ 10. Multi-file Annotation Interface (ANxxx)
+     The multi-file annotation Interface is for accessing 
+     file labels and descriptions, and object labels and 
+     descriptions. It allows users to keep open more than 
+     one file at a time, and to access more than one 
+     annotation at a time.  It also allows multiple labels 
+     and multiple descriptions to be applied to an HDF object 
+     or HDF file. 
+   
+ 11. Multi-file Raster Image (GRxxx) interface
+     The new Generic Raster (GR) interface provides a set of 
+     functions for manipulating raster images of all kinds.  
+     This interface allows users to keep open more than one 
+     file at a time, and to "attach" more than one raster 
+     image at a time.  It supports a general framework 
+     for attributes within the RIS data-model, allowing 
+     'name = value' style metadata.  It allows access to 
+     subsamples and subsets of images.  
+ 
+     The GRreqlutil and GRreqimageil functions allow for different 
+     methods of interlacing images in memory.  The images are 
+     interlaced in memory only, and are actually written to disk in 
+     "pixel" interlacing.
+
+ 12. Compression for HDF SDS
+     Two new compression functions have been added to the SD
+     interface for HDF 4.0:  SDsetcompress and SDsetnbitdataset.
+
+     SDsetcompress allows users to compress a scientific dataset 
+     using any of several compression methods.  Initially three 
+     schemes, RLE encoding, an adaptive Huffman compression 
+     algorithm,  and  gzip 'deflation' compression are available. 
+
+     SDsetnbitdataset allows for storing a scientific dataset 
+     using integers whose size is any number of bits between 1 and 
+     32 (instead of being restricted to 8, 16 or 32-bit sizes). 
+     Access to the data stored in an n-bit data item is transparent
+     to the calling program.  The ABOUT_4.0.alpha file has an in-depth
+     description concerning this ("n-bit SDS" listed under Item 2).  
+
+ 13. External Path Handling
+     New functions have been added to allow applications to 
+     specify directories to create or search for external 
+     files.  
+     
+      - HXsetcreatedir (hxscdir for FORTRAN) 
+      - HXsetdir (hxsdir for FORTRAN)
+
+ 14. I/O performance improvement 
+     HDF 4.0 unofficially supports file page buffering.  With HDF 4.1
+     it will be officially supported.  The file page buffering allows 
+     the file to be mapped to user memory on a per page basis i.e. a 
+     memory pool of the file.  With regards to the file system, page 
+     sizes can be allocated based on the file system page-size or 
+     in a multiple of the file system page-size. This allows for fewer 
+     pages to be managed as well as accommodating the user's file usage 
+     pattern.  See the top level INSTALL file and the 
+     release_notes/page_buf.txt file for creating the library with
+     this support and using it.
+     
+ 15. Improvement in memory usage and general optimizations
+     Considerable effort was put into this release (since the b2 
+     release) to reduce the amount of memory used per file and by the 
+     library in general.  In general terms, we believe that the library 
+     should have at least half as large of a memory footprint during 
+     the course of its execution and is more frugal about allocating 
+     large chunks of memory.
+ 
+     Much time was spent optimizing the low-level HDF routines for this 
+     release to be faster than they have been in the past also.  
+     Applications which make use of files with many (1000+) datasets 
+     should notice significant improvements in execution speed.
+ 
+ 16. In hdf/ there are two files for FORTRAN programs to include
+     the values and functions defined in HDF. They were
+     originally named as constant.i and dffunct.i. The extension .i
+     caused problems on some machines since *.i is used by cc as
+     an "intermediate" file produced by the cpp preprocessor. In
+     HDF 4.0 dffunct.i has been changed to dffunct.inc, and constant.i 
+     has been changed to hdf.inc. Users' existing FORTRAN application
+     programs need to make the corresponding changes, if they
+     include the .i files, in order to compile with HDF4.0. 
+
+ 17. Limits file
+     A new file, limits.txt, has been added to the ftp server.  
+     It is aimed at HDF applications programmers and defines the
+     upper bounds of HDF 4.0. This information is also found in the
+     hdf/src/hlimits.h file.  Refer to the ABOUT_4.0.alpha for 
+     historical information concerning this.
+
+ 18. Pablo available
+     HDF4.0 supports creating an instrumented version of the HDF 
+     library(libdf-inst.a). This library, along with the Pablo 
+     performance data capture libraries, can be used to gather data 
+     about I/O behavior and procedure execution times.  See the top
+     level INSTALL file and the hdf/pablo/README.Pablo file for
+     further information.
+
+ 19. Support for the IBM SP-2 
+     The HDF library has been ported to run in a single SP2 node.
+     It does not support the parallel or distributed computing for
+     multiple SP-2 nodes yet.
+
+ 20. Miscellaneous fixes
+
+     - To avoid conflicts with C++, internal structures' fields which
+       were named 'new' have been renamed.
+
+     - The maximum number of fields in a vdata now is decided by 
+       VSFIELDMAX.
+
+     - The platform number subclass problem when an external data file 
+       was in Little_endian format has been fixed.
+
+     - Unlimited dimension was not handled correctly by the HDF3.3r4
+       FORTRAN interface.  This problem has been fixed in HDF4.0r1.
+
+Changes to utilities:
+--------------------
+
+   o hdf/util/ristosds 
+     Ristosds now converts several raster images into a 3D uint8, 
+     instead of float32, SDS. 
+
+   o hdf/util/hdfls
+     New options have been added to support the parallel I/O
+     interface on CM5.
+
+   o hdf/util/hdfpack
+     New options have been added to support the parallel I/O
+     interface on CM5.
+
+   o hdf/util/hdfunpac
+     This is a new utility for external file handling for the
+     parallel I/O interface on CM5.
+
+   o mfhdf/dumper/hdp
+     Hdp is a new command line utility designed for quick display of 
+     contents and data objects.  It can list the contents of hdf files 
+     at various levels with different details.  It can also dump the 
+     data of one or more specific objects in the file.  See hdp.txt in 
+     the release notes for more information.
+
+Known Problems:
+--------------
+
+   o On the IRIX4 platform, fp2hdf creates float32 and float64 values
+     incorrectly.   
+
+   o On the SP2, the hdp command gives a false message of "Failure to
+     allocate space" when the hdf file has no annotations to list. 
+
+   o On the C90, hdfed fails inconsistently when opening hdf files
+     more than once in the same hdfed session.
+
+   o Currently there is a problem in re-writing data in the middle
+     of compressed objects.
+  
+   o VMS gives an error on the test for Little Endian float64.
+
+   o If the external element test in hdf/test/testhdf fails
+     and there is no subdirectory "testdir" in hdf/test/,
+     create one via "mkdir" and run the test again. (The
+     "testdir" should have been created by "make". But
+     the "make" in some old systems does not support the
+     creation commands.)
+
+%%%4.0b2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                ABOUT HDF4.0 Beta 2
+                   Nov 14, 1995
+ 
+CONTENTS
+ 
+     1. The mfhdf side library is renamed to libmfhdf.a,
+        versus libnetcdf.a in previous releases
+     2. New version of dimension record  
+     3. New features
+        GR interface
+        Gzip library is added
+        Unified configuration of library
+        I/O performance improvement
+     4. New functions added
+        Fortran functions hxscdir and hxsdir         
+        SDsetdimval_comp
+        SDisdimval_bwcomp
+     5. SGI Power Challenge running IRIX6.1 is now supported
+     6. Pablo available  
+     7. Platforms tested
+     8. Changes in release notes 
+     9. Bug fixes and Known problems
+
+
+1. The mfhdf side library is renamed to libmfhdf.a, versus libnetcdf.a 
+   in previous releases. To link a program with HDF4.0b2 libraries, 
+   one needs four libraries, libmfhdf.a, libdf.a, libjpeg.a and libz.a 
+   (see "Gzip library is added" in item 3 below):
+
+      cc -o myprog myprog.c -I<path of include files> \
+            libmfhdf.a libdf.a libjpeg.a libz.a
+
+   Note, the order of the libraries is important.
+
+2. New version of dimension record  
+   HDF4.0b1 and previous releases use a vgroup to represent a dimension.
+   The vgroup has a single field vdata with class "DimVal0.0".
+   The vdata has <dimension size> number of records, each record has a
+   fake value from 0, 1, 2 ... , (<dimension size> - 1 ). The fake values
+   are not really required and take a lot of space. For applications that
+   create large one dimensional array datasets the disk space taken by
+   these fake values almost double the size of the HDF file. In order to
+   omit the fake values, a new version of dimension vdata is proposed.
+
+   The new version uses the same structure as the old version. The only
+   differences are that the vdata has only 1 record with value
+   <dimension size> and that the vdata's class is "DimVal0.1" to
+   distinguish it from the old version. 
+
+   No change is made in Unlimited dimensions. 
+   
+   See file dimval.txt in subdirectoy release_notes/ of HDF4.0b2 release
+   for our policy on the backward compatibility of this dimension version.
+
+3. New features
+   . New with this beta release is the support for different methods of
+     interlacing images in memory.  This feature is supported through the 
+     GRreqlutil and GRreqimageil functions rescribed in the mf_ris.txt 
+     document in this directory.  Please note that the images are 
+     interlaced in memory only, all images are actually written to disk 
+     in "pixel" interlacing.
+
+   . Gzip library is added
+     New with this release is support for gzip "deflate" style compression
+     of any object in an HDF file.  This is supported through the standard
+     compression interface function calls (HCcreate, SDsetcompress,
+     GRsetcompress) by using the COMP_CODE_DEFLATE parameter for the coding
+     type.  The comp_info structure has a new member, deflate.level, which
+     specifies how much effort to expend trying to compress data.  Values
+     for deflate.level must be between 1-9, with 1 being small amounts of
+     effort (time) and 9 being maximum effort (most time and compression),
+     the default value is 6.
+     Currently, due to our use of the gzip "zlib" library for support of
+     this feature, users must link with the "libz.a" library produced by
+     zlib.  (See item1 above). 
+
+          cc -o myprog myprog.c -I<path of include files> \
+                  libmfhdf.a libdf.a libjpeg.a libz.a
+
+     Note, the order of the libraries is important. 
+
+     Also, this method of compression currently has several known bugs 
+     when used on a 64-bit architecture (DEC Alpha processors, Cray 
+     machines, and SGI Power Challenge machines in 64-bit "mode").
+
+   . Unified configuration of library
+     Both sides of the library now use the same configure script and
+     can be configured uniformly through one makefile fragment. Please
+     see the top-level INSTALL file in the distribution for further 
+     details.
+
+   . I/O performance improvement 
+     This version of the distribution also has preliminary support for 
+     file page buffering. Note that is a *Beta* release and is not 
+     supported officially. As such it is is provided as is.
+     The file page buffering allows the file to be mapped to user memory on 
+     a per page basis i.e a memory pool of the file. With regards to the 
+     file system, page sizes can be allocated based on the file system 
+     page-size or if the user wants in some multiple of the file system 
+     page-size. This allows for fewer pages to be managed along with 
+     accommodating the users file usage pattern. Please see the 
+     documentation in 'release_notes/page_buf.txt'.
+     
+     We have also reduced the memory requirements for several of the 
+     internal HDF library data structures, for greater efficiency. 
+
+4. Functions added
+   . Fortran interface functions added for the set external path features.
+     They are hxscdir and hxsdir.  See the man page of HXsetcreatedir(3)
+     and HXsetdir(3) for detail.
+   . SDsetdimval_comp -- sets backward compatibility mode for a dimension.
+     The default mode is compatible in HDF4.0b2, and will be 
+     incompatible in HDF4.1. See the man page of SDsetdimval_comp(3)
+     for detail. 
+   . SDisdimval_bwcomp(dimid) -- gets the backward compatibility mode
+     of a dimension. See the man page of SDisdimval_bwcomp(3) for
+     detail. 
+
+5. SGI Power Challenge running IRIX6.1 is now supported
+   Power Challenge is now supported, both in the native 64-bit and the 
+   32-bit objects modes.  Note that the Power Challenge native 64 bits 
+   objects use 64 bits long integers, users should be careful when using 
+   the netcdf interface.  They should declare their variables as "nclong", 
+   not "long".
+
+6. Pablo available  
+   This version of the distribution has support to create an 
+   instrumented version of the HDF library(libdf-inst.a). This 
+   library along the Pablo performance data capture libraries 
+   can be used to gather data about I/O behaviour and procedure 
+   execution times. Please see the documentation 
+   release_notes/Pablo.txt in the distribution for further details.
+
+7. Platforms tested
+    HDF4.0b2 has been tested on the following systems:
+    SunOS 4.1.3, SunOS 5.3 and 5.4(Solaris 2.3 and 2.4), 
+    Linux_a.out, Linux_elf, SGI/IRIX5.2, SGI/IRIX5.3,
+    SGI Power Challenge/IRIX6.1 (32- and 64-bit), HP/UX 9.01,
+    IBM RS6000/AIX, Cray C90, Cray YMP, DEC alpha/UNIX (OSF), 
+    DecStation/MIPSEL (ncdump doesn't work), Free BSD 2.0, 
+    Solaris_x86, Convex Exemplar/HPUX, and CM5 parallel I/O. 
+    See the INSTALL file at the top level of HDF4.0b2 for more 
+    details.
+
+8.  Changes in release notes
+    The directory release_notes/ contains writeups for the alpha
+    and beta releases of HDF4.0. Those files can be used as temporary
+    documents for HDF4.0 before the official documentation is 
+    available. 
+
+    Newly added: ABOUT_4.0b2, Pablo.txt, dimval.txt, and page_buf.txt
+    Files changed: bug_fixed.txt and parallel_CM5.txt.
+    AOUBT_4.0.alpha is also included. 
+
+9. Fixes and Known problems
+
+   Problems fixed:
+     . To avoid conflicts with C++, internal structures' fields which
+       were named 'new' have been renamed.
+     . Maximum number of fields in a vdata now is decided by VSFIELDMAX.
+     . Vshow and hdp are fixed. Now they can handle as many fields 
+       as defined by VSFIELDMAX.
+     . Fixed platform number subclass problem when external data file was
+       in Little_endian format. 
+     . A file hdf/src/hlimits.h has been added to hold definitions for
+       maximum number of open files and other limits. 
+     . Miscelianeous fixes
+   
+   Known problems:
+     . Hfidinquire not included in binaries
+     . Gzip doesn't work on 64-bit machines.
+     . Currently there is a problem in appending data to compressed objects.  
+     . Hfidinquire is in the source code, but it is not included in the
+       pre-compiled code. If your program uses Hfidinquire, you need to
+       re-compile libdf.a. 
+
+
+%%%4.0b1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+               ABOUT HDF4.0 Beta 1
+                 July 25, 1995
+
+CONTENTS
+
+    1. New features in the HDF4.0 Beta 1 release
+    2. Bugs fixed and known problems
+    3. Platforms tested
+    4. Installation of HDF4.0 Beta 1 on WindowsNT/95
+    5. Known problems in compilation, testing and
+       installation of HDF4.0b1
+    6. Installing without FORTRAN support
+
+1. New features in HDF4.0 Beta 1 release
+
+   o Auto configuration 
+     It is now possible to automatically configure and build 
+     both the HDF library and netCDF library with one command. 
+     See the README and the INSTALL files at the top level of 
+     HDF4.0beta1 for detailed instructions on configuring and 
+     installation.
+     
+   o Multi-file Annotation Interface (ANxxx)
+
+     The multi-file annotation Interface is for accessing 
+     file labels and descriptions, and object labels and 
+     descriptions. It allows users to keep open more than 
+     one file at a time, and to access more than one 
+     annotation at a time.  It also allows multiple labels 
+     and multiple descriptions to be applied to an HDF object 
+     or HDF file. 
+   
+     A draft of the documentation for this interface is in 
+            ./mf_anno.txt.
+
+   o Multi-file Raster Image (GRxxx) interface
+     The new Generic Raster (GR) interface provides a set of 
+     functions for manipulating raster images of all kinds.  
+     This interface allows users to keep open more than one 
+     file at a time, and to "attach" more than one raster 
+     image at a time.  It supports a general framework 
+     for attributes within the RIS data-model, allowing 
+     'name = value' style metadata.  It allows access to 
+     subsamples and subsets of images.  HDF4.0beta1 includes
+     a C interface only. The Fortran interface will be available 
+     in the next release. 
+ 
+     A draft of the documentation for this interface is in 
+            ./mf_ris.txt.
+
+   o New Compression Algorithms and interface
+     A new low-level compression interface has been added to 
+     HDF which allows any data-object to be compressed 
+     using a variety of algorithms.  Currently only two 
+     compression algorithms are supported: Run-Length 
+     Encoding (RLE) and adaptive Huffman.
+  
+     A draft of the documentation for this interface is in 
+            ./compression.txt
+
+   o JPEG Group v5b library
+     HDF Version 4.0 libraries now use v5 of the Independent 
+     JPEG Group (IJG) JPEG file access library. For more details
+     about JPEG library see
+ 
+            ./JPEG_v5b.txt 
+
+     The JPEG library will need to be linked with a user's 
+     applications whether they are compressed with JPEG or not.
+
+     For example on a SUN SPARC, if the .h files are in the 
+     directory "incdir", and all libraries are in "libdir,"
+     the following command should be used to compile a 
+     C program "myprog.c":
+
+     cc -DSUN -DHDF -Iincdir myprog.c libdir/libnetcdf.a \
+         libdir/libdf.a  /libdir/libjpeg.a -o myprog
+
+     or
+
+     cc -DSUN -DHDF -Iincdir myprog.c -L libdir -lnetcdf \
+         -ldf -ljpeg -o myprog
+
+     Note that the order is important: libnetcdf.a must occur first,
+     then libdf.a, and then libjpeg.a.
+  
+     For FORTRAN programs, use command line:
+
+      f77 -o myprogf myprogf.f libdir/libnetcdf.a \
+         libdir/libdf.a libdir/libjpeg.a
+
+    or
+
+      f77 -o myprogf myprogf.f -L libdir -lnetcdf -ldf -ljpeg
+  
+     Note that the order is important: libnetcdf.a, then libdf.a 
+     and then libjpeg.a.
+ 
+   o Compression for HDF SDS (not completely working)
+     Work is almost complete on the addition of two
+     new compression functions to the SD interface. 
+
+     One function, which still has some known bugs, will 
+     allow users to compress a scientific dataset using 
+     any of several compression methods.  Initially two 
+     schemes,  RLE encoding and an adaptive Huffman 
+     compression algorithms, will be available. 
+
+     A second function is available for storing a scientific 
+     dataset using integers whose size is any number of bits 
+     between 1 and 32 (instead of being restricted to 8, 16 
+     or 32-bit sizes). 
+
+     A draft of the documentation for these functions is in
+            ./comp_SDS.txt
+
+
+   o External Path Handling
+     New functions have been added to allow applications to 
+     specify directories to create or search for external 
+     files. More explanation can be found in:
+   
+            ./external_path.txt.
+ 
+          
+   o Parallel I/O for the CM5
+     An extension using the parallel I/O facilities on a  CM5 
+     has been added to the SDS interface.  Initial tests have 
+     resulted in about 25 MBytes/second I/O throughput using the 
+     SDA (Scalable Disk Array) file system. The library 
+     provides interfaces for both C* and CMF programming
+     languages. See:
+
+            ./parallel_CM5.txt for details.
+
+
+   o HDF dumper
+     Hdp is a command line utility designed for quick 
+     display of contents and data of HDF3.3 objects, RIS, 
+     SDS, Vdata, and Vgroup. It can list the contents of 
+     hdf files at various levels with different details. 
+     It can also dump the data of one or more specific 
+     objects in the file.  See:
+
+            ./hdp.txt for details.
+
+     Currently hdp works on SunOS and LINUX only. 
+
+2. Bugs fixed and known problems
+
+  Several bugs or problems, such as failure in setting 
+  and getting scales for unlimited dimensions, missing 
+  Fortran version of VSQxxxx functions, failure in 
+  defining more than 36 fields in Vdatas, etc. were 
+  fixed in this beta release. For more details about
+  fixed and un-fixed bugs and problems please see:
+  
+            ./bug_fixed.txt.
+
+3. HDF4.0 Beta 1 has been tested on the following systems:
+SunOS 4.1.3, SunOS 5.3 (Solaris 2.3), Linux, SGI/IRIX5.3, 
+SGI Power Challenge/IRIX6.0 (32-bit mode only), HP/UX 9.01, 
+IBM RS6000/AIX (C only), C3880/ConvexOS,11.0, CM5, Cray C90,
+DEC alpha/OSF (C only), DecStation/MIPSEL (C only), Windows NT,
+Free BSD 2.0, and Convex Exemplar/HPUX. See the INSTALL 
+file at the top level of HDF4.0b1 for more details.
+
+4. Installing HDF4.0 Beta 1 on Windows NT and Windows 95
+Since Windows NT, Windows '95 (Chicago) and Windows 3.1 
+(with the Win 32s extensions) all are designed to run 
+the same 32-bit code, we have decided to support only 
+32-bit libraries and code on the MS-Windows platform.  
+To build the HDF, JPEG and netCDF libraries and utilities, 
+follow the instructions listed in:
+
+            ./install_winNT.txt. 
+   
+5. Known problems in compilation,testing and installation
+   of HDF4.0b1:
+
+   . On SunOS, tsdmmsf.f in hdf/test/fortest fails
+   . On C90, mfhdf/fortran test doesn't configure correctly.
+     The adaptive Huffman algorithm does not work right 
+     either.  Due to this problem, when running 
+     hdf/test/testhdf the test module comp prints out 
+     error messages.  
+   . On DecStation/MIPSEL, ncdump gives a segmentation fault.
+   . The Fortran interface has not been tested on IBM RS6000, 
+     DecStation/MIPSEL, and Dec Alpha/OSF because a Fortran 
+     compiler is not available on those machines in our group.
+   . If the external element test in hdf/test/testhdf fails 
+     and there is no subdirectory "testdir" in hdf/test/, 
+     create one via "mkdir" and run the test again. (The 
+     "testdir" should have been created by "make". But 
+     the "make" in some old systems does not support the 
+     creation commands.)
+   . A bug was found in the "mfhdf.h" file late in the testing
+     stage. The error occured in the CM5 parallel I/O 
+     extension only. The fix is not included in the source
+     release, but it is avalable in the binary release for 
+     the CM5 version.  Please retrieve the fix there. 
+   . SDsetcompress does not work correctly.
+   . Hdp now works on SunOS and LINUX only. Commands dumpsds, 
+     dumpvd and dumpvg have different problems on other platforms.
+     See mfhdf/dumper/README for more details. 
+
+6. Installing without FORTRAN support:
+   . On UNIX systems without a FORTRAN system installed, 
+     the config/mh-<sys> will need to have the 'FC' macros 
+     defined to "NONE" for correct configuration and the 
+     target "allnofortran" should be used to build the 
+     distribution, instead of the target "all".
+
+
+%%%4.0alpha%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT_4.0.alpha
+
+This file was last updated: November 8, 1994 
+
+
+INTRODUCTION 
+
+This is a preliminary document describing the differences
+between HDF4.0 (Alpha) and HDF3.3r3. It is written for people
+who already use HDF3.3r3 or earlier versions and wish to be
+HDF4.0 Alpha testers. Special emphasis is given to changes
+that might be required in existing code. 
+
+The files ABOUT_3.3r3, ABOUT_3.3r2 and ABOUT_3.3r1 which were 
+released along with previous releases contain detailed
+descriptions of HDF3.3. Those files can be found in this 
+directory. First-time HDF users are encouraged to read the FAQ 
+file in directory HDF/ for more information about HDF and where 
+to get HDF documentation. 
+
+If you have any questions or comments, please send them to: 
+
+hdfhelp at ncsa.uiuc.edu. 
+
+Contents 
+
+1. Changes in include file names for FORTRAN programs 
+2. New features supported by HDF4.0 
+      ANSI C only 
+      n-bit SDS 
+      Reading CDF files 
+      Parallel I/O interface on CM5 
+      Installing HDF Libraries With CM5 Parallel IO Extension 
+3. Changes in HDF utilities 
+      hdp -- HDF dumper 
+      ristosds 
+      hdfls 
+      hdfpack 
+      hdfunpac 
+4. Platforms tested 
+5. Limits of the current release 
+
+1. Changes in include file names for FORTRAN programs
+
+   In hdf/ there are two files for FORTRAN programs to include
+   the values and functions defined in HDF. They were
+   originally named as constant.i and dffunct.i. The extension .i
+   causes problems on some machines since *.i is used by cc as
+   an "intermediate" file produced by the cpp preprocessor. In
+   HDF 4.0 dffunct.i is changed to dffunct.inc, and constant.i is
+   changed to hdf.inc. Users' existing FORTRAN application
+   programs need to make the corresponding changes, if they
+   include the .i files, in order to compile with HDF4.0. 
+
+2. New Features supported by HDF4.0
+
+   ANSI C only
+
+      As previously noted in the HDF newsletters, the next
+      major release of the HDF library will compile only with
+      ANSI C compilers. Backward compatibility will be
+      provided through an ANSI->K&R filter which will need to
+      be run on each source file in order to convert the ANSI
+      style code into K&R style code. Currently the entire HDF
+      library has been converted to ANSI code, but the filter
+      is not yet in place. Future alpha releases may have the
+      code filter in place, but it will definitely be in place
+      for the first beta release. This shift to ANSI C
+      compliance has been accompanied by a large cleanup in
+      the source code. An attempt has been made to remove all
+      warnings and informational messages that the compilers
+      on supported platforms occasionally emit, but this may
+      not be completely clean for all user sites. 
+
+   n-bit SDS
+
+      Support for n-bit integer data has been incorporated
+      into this release of the HDF library. The n-bit support
+      is currently incorporated into the call to
+      SDsetnbitdataset, future releases may incorporate high
+      level access through the DFSD interface also. Access to
+      the data stored in an n-bit data item is transparent to
+      the calling program. 
+
+      For example to store an unsigned 12-bit integer (which
+      is represented unpacked in memory as an unsigned 16-bit
+      integer), with no sign extension or bit filling and
+      which starts at bit 14 (counting from the right with bit
+      zero being the lowest) the following setup & call would
+      be appropriate: 
+
+      intn sign_ext = FALSE; 
+
+      intn fill_one = FALSE; 
+
+      intn start_bit= 14; 
+
+      intn bit_len = 12; 
+
+      SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+      Further reads and writes to this dataset would
+      transparently convert the 16-bit unsigned integers from
+      memory into 12-bit unsigned integers stored on disk. The
+      corresponding FORTRAN function name is sfsnbit which
+      takes the same parameters in the same order.
+
+      A breakdown of the parameters to the SDsetnbitdataset
+      call is as follows: 
+
+      int32 sds_id - The id of a scientific dataset returned from
+      SDcreate or SDselect. intn start_bit - This value
+      determines the bit position of the highest end of the
+      n-bit data to write out. Bits in all number- types are
+      counted from the right starting with 0. For example, in
+      the following bit data, "01111011", bits 2 and 7 are set
+      to 0 and all the other bits are set to one. 
+
+      intn bit_len - The number of bits in the n-bit data to
+      write, including the starting bit, counting towards the
+      right (i.e. lower bit numbers). For example, starting at
+      bit 5 and writing 4 bits from the following bit data,
+      "01111011", would write out the bit data, "1110", to the
+      dataset on disk. 
+
+      intn sign_ext - Whether to use the top bit of the n-bit
+      data to sign-extend to the highest bit in the memory
+      representation of of the data. For example, if 9-bit
+      signed integer data is being extracted from bits 17-25
+      (nt=DFNT_INT32, start_bit=25, bit_len=9, see below for
+      full information about start_bit & bit_len parameters)
+      and the bit in position 25 is a 1, then when the data is
+      read back in from the disk, bits 26-31 will be set to a
+      1, otherwise bit 25 will be a zero and bits 26-31 will
+      be set to 0. This bit-filling takes higher precendence
+      (i.e. is performed after) the fill_one (see below)
+      bit-filling. 
+
+      intn fill_one - Whether to fill the "background" bits with
+      1's or 0's. The "background" bits of a n-bit dataset are
+      those bits in the in-memory representation which fall
+      outside of the actuall n-bit field stored on disk. For
+      example, if 5 bits of an unsigned 16-bit integer
+      (in-memory) dataset located in bits 5-9 are written to
+      disk with the fill_one parameter set to TRUE (or 1),
+      then when the data is read back into memory at a future
+      time, bits 0-4 and 10-15 would be set to 1. If the same
+      5-bit data was written with a fill_one value of FALSE
+      (or 0), then bits 0-4 and 10-15 would be set to 0. This
+      setting has a lower precedence (i.e. is performed first)
+      than the sign_ext setting. For example, using the
+      sign_ext example above, bits 0-16 and 26-31 will first
+      be set to either 1 or 0 based on the fill_one parameter,
+      and then bits 26-31 will be set to 1 or 0 based on
+      bit-25's value. 
+
+   Reading CDF files
+
+      With HDF 4.0 limited support for reading CDF files was
+      added to the library. This support is still somewhat in
+      the development stage and is therefore limited. 
+
+      To begin with, unlike the netCDF merger, the CDF API is
+      not supported. Rather, the SD and netCDF APIs can be
+      used to access information pulled out of CDF files. 
+
+      The type of files supported are limited to CDF 2.X
+      files. The header information is different between CDF
+      1.X and 2.X files. In addition, all of the files must be
+      stored as single-file CDFs in network encoding. 
+
+      If there is user demand, and support, the types of CDF
+      files readable may be increased in the future. 
+
+   Parallel I/O interface on CM5 
+
+      An extension using the parallel IO in CM5 is added to
+      the SDS interface. Initial tests have resulted in about
+      25 MBytes/second IO throughput using the SDA (Scalable
+      Disk Array) file system. The library provides interfaces
+      for both C* and CMF programming languages. Read the
+      section "Installing HDF Libraries With CM5 Parallel IO
+      Extension" below for specific installation instructions.
+
+      Users will find some examples in the directory
+      mfhdf/CM5/Examples. Please send comments, bugs reports,
+      etc. to acheng at ncsa.uiuc.edu. 
+
+      The parallel I/O interface stores scientific datasets in
+      external files. New options have been added to hdfls and
+      hdfpack to handle them. A new utility program, hdfunpac,
+      is created for external files handling too. See the man
+      pages for details. 
+
+   Installing HDF Libraries With CM5 Parallel IO Extension
+
+      The current alpha version requires two major steps to
+      install the HDF libraries (libdf.a and libnetcdf.a). Works
+      are in progress to make it simpler in the production
+      release. Bear with us for now. 
+
+      1) Compile and install the ordinary HDF libraries,
+      include files and utilities according to the
+      instructions for a Sun Microsystem machine. 
+
+      2) To make the HDF library with CM5 parallel IO
+      extension: There are two new libraries, libdfcm5.a and
+      libnetcdfcm5.a that are similar to libdf.a and
+      libnetcdf.a. 
+
+      For libdf.a 
+
+              cd hdf
+              cp MAKE.CM5 Makefile
+              cp src/Makefile.CM5 src/Makefile
+              make libdf          # create the parallel IO libdf.a
+               # to install it in /usr/local/lib
+              cp src/libdf.a /usr/local/lib/libdfcm5.a
+              ranlib /usr/local/lib/libdfcm5.a
+           
+
+      For libnetcdf.a 
+
+              cd mfhdf
+              # edit CUSTOMIZE to use "gcc" as the CC compiler
+              # and add "-DCM5" to the CFLAGS variable.
+              ./configure
+              (cd libsrc; make )      # compile the library
+              # to install it in /usr/local/lib
+              cp libsrc/libnetcdf.a /usr/local/lib/libnetcdfcm5.a
+              ranlib /usr/local/lib/libnetcdfcm5.a
+           
+
+3. Changes in HDF utilities
+
+   hdp -- HDF dumper 
+      A new utility hdp is under development to list contents
+      of HDF files and to dump data of HDF objects. A
+      prototype is included in HDF4.0 Alpha for users to play
+      with and comment on. Development will continue based on
+      users' feedback. More information is contained in
+      HDF/HDF4.0.alpha/mfhdf/dumper/README. 
+
+   ristosds 
+      Ristosds now converts several raster images into a 3D
+      uint8, instead of float32, SDS. 
+
+   hdfls 
+      New options to recognize external elements. 
+
+   hdfpack 
+      New options to pack external elements back into the main
+      file. 
+
+   hdfunpac 
+      New utility program to unpack scientific datasets to
+      external elements. Can be used to prepare for CM5
+      parallel IO access. 
+
+4. HDF 4.0 Alpha has been tested on the following machines
+
+   Platform                'base library'              HDF/netCDF
+   ---------------------------------------------------------------
+   Sun4/SunOs                    X                         X
+   Sun4/SOLARIS                  X                         X
+   IBM/RS6000                    X                         X
+   SGI/IRIX4                     X                         X
+   Convex/ConvexOS *             X                         X
+   Cray Y-MP/UNICOS              X                         X
+   Cray/C90                      X                         X
+   NeXT/NeXTSTEP                 X                         X
+   HP/UX 9.01                    X                         X
+   DecStation/MIPSEL             X                         X
+   IBM PC - MSDOS               **                        ***
+   IBM PC - Windows 3.1         **                        ***
+   IBM PC - Windows NT           X                         X
+   DEC Alpha/OSF                 X                         X
+   CM5/                          X                         X
+
+   Fujitsu VP/UXPM               X
+   Intel i860                    X
+   Mac/MacOS 
+   VMS
+
+    * When compiling the mfhdf section of the library on a Convex3 you will
+      need to set the environment variable 'MACHINE' to 'c3' before running
+      the configure script.
+
+    ** There is no FORTRAN support for either PC version of HDF4.0 Alpha
+
+    *** The netCDF half of the HDF/netCDF merger is not working correctly,
+         but the multi-file SD interface is working correctly.
+
+5. Limits of the current release
+
+   Sometimes it is important for HDF users to be aware of
+   certain limits in using HDF files and HDF libraries. This
+   section is aimed at HDF applications programmers and
+   reflects upperbounds as of HDF 4.0. 
+
+   Limits that are #define'd are fully capitalized and the
+   file where the symbol is defined is given in parentheses at
+   the end of the sentence. If the #define's are changed in
+   order to meet the needs of an application, it is important
+   to make sure that all other users, who would share the HDF
+   library and the hdf files of the application, are aware of
+   the changes. 
+
+   If a limit has no #define, the size of the maximum storage
+   allocated for that item is given; it would, generally,
+   require a large amount of modification of the HDF library
+   to change. 
+
+   If a limit is listed as a number type (e.g. int16) then it
+   refers to the largest number that can be represented using
+   that type. That is: 
+
+           int16 -- 32,767
+           int32 -- 2,147,483,647.
+
+   H-Level Limits
+   --------------
+
+      MAX_FILE files open at a single time (hfile.h) 
+      MAX_ACC access records open at a single time (hfile.h) 
+      int16 total tags (fixed) 
+      int32 max length and offset of an element in an HDF file (fixed) 
+
+   Vgroup Limits
+   -------------
+      MAX_VFILE vset files open at a single time (hdf.h)
+      int16 elements in a Vgroup (fixed) 
+      VGNAMELENMAX max length of a Vgroup name or class (vg.h) 
+
+   Vdata Limits
+   ------------
+      MAX_VFILE vset files open at a single time (hdf.h)
+      VSFIELDMAX fields in a Vdata (hdf.h) 
+      FIELDNAMELENMAX characters in a single field name (hdf.h) 
+      MAX_ORDER max field order in a Vdata (hdf.h) 
+      VSNAMELENMAX max length of a Vdata name or class (hdf.h) 
+      int16 max width in bytes of a Vdata record. (fixed) 
+      Vdatas can have a maximum field width of MAX_FIELD_SIZE bytes. (hdf.h)
+           
+   Raster Images
+   -------------
+      int32 width or height of a raster image. (fixed) 
+
+   SD Limits
+   ---------
+      MAX_VAR_DIMS dimensions per dataset (defined in netcdf.h
+          included by mfhdf.h) 
+      int32 maximum dimension length (fixed) 
+      MAX_NC_ATTRS attributes for a given object (defined in netcdf.h 
+          included by mfhdf.h) 
+      MAX_NC_NAME maximum length of a name of a dataset 
+          (defined in netcdf.h included by mfhdf.h) 
+
+   Other Convensions / Issues
+   --------------------------
+      Some utility programs (e.g. ncgen) expect dataset names to be 
+      composed of only alphanumeric, '-' and '_' characters. 
+

Copied: packages/libhdf4/trunk/release_notes/RELEASE.txt (from rev 832, packages/libhdf4/branches/upstream/current/release_notes/RELEASE.txt)
===================================================================
--- packages/libhdf4/trunk/release_notes/RELEASE.txt	                        (rev 0)
+++ packages/libhdf4/trunk/release_notes/RELEASE.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,207 @@
+
+                          HDF 4.2 Release 1
+                            February, 2005
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.2r0 and
+HDF 4.2r1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r1.
+
+The HDF 4.2r1 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     ftp://hdf.ncsa.uiuc.edu/HDF/Documentation/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+  -- Configuration
+  -- Library
+  -- Utilities
+- Support for new platforms and compilers
+- Bugs fixed since HDF4.2r1
+- Documentation
+- Platforms Tested
+- Known problems
+
+New Features and Changes:
+========================
+    Configuration
+    ============= 
+     
+     * By default HDF4 libraries and utilities are installed under 
+       <source_dir>/NewHDF
+                                               12/01/2004 EIP
+     * Windows configuration, build and testing procedures have been changed. 
+       Please see INSTALL_WINDOWS.txt file for more information
+                                               02/12/2005 EIP 
+    Library
+    ========= 
+    * New API SDidtype was added to the library (bug #766)
+                                               01/23/2005 EIP for BMR
+    * HCgetcompress renamed to HCPgetcompress
+    * New API HCget_config_info added
+    * The default chunk cache size was changed for 2D and higher
+      chunks
+    * Pablo instumentation was removed
+   
+    Utilities
+    ========= 
+     * hdiff and hrepack are supported on Windows.
+     * Substantial performance improvements in hdiff and hrepack
+
+Support for new platforms and compilers
+=======================================
+     * Fortran IBM xlf v 8.1 and Absoft f95 version 8.2 compilers 
+       are supported on Mac OSX.
+                                                          12/07/2004 EIP
+     * Absoft Fortran compiler f95 version 9.0 is supported on Linux 2.4 
+                                                          12/07/2004 EIP
+     * PGI C and Fortran compilers are supported on Linux 2.4 
+     * Intel C and Fortran compilers are supported on Linux 2.4
+     * Cray TS IEEE is supported.
+
+
+Bugs fixed since HDF4.2r0
+=========================
+ * VERY IMPORTANT:
+   Data compressed with SZIP may be corrupted; fixed. For more
+   information see "HDF4.2r1 SZIP Release Notes" available at
+   http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/SZIP_HDF4_2r1.pdf
+                                            02/12/2005 EIP 
+ * Fortran couldn't read names with spaces when NetCDF interfaces
+   were used; fixed
+                                            02/12/2005 EIP
+ * Library failed to compile in presence of the NetCDF library; fixed
+                                            11/22/2004 EIP
+ * h4fc couldn't create object files; fixed 
+
+                                            01/23/2005 EIP
+ * When rank of SDS is 0, some SD APIs give segmentation fault (bug 1045);
+   fixed
+                                            01/23/2005 EIP for BMR
+ * Some GR images with special elements are read in as duplicate
+   (bug 814); fixed
+                                            02/14/2005 BMR
+
+ * Many bugs fixed in hdiff and hrepack utilities
+
+Documentation
+==============
+   Documentation contains multiple bug fixes and improvements. 
+
+Platforms Tested
+================
+
+HDF 4.2 Release 1 has been tested on the following platforms:
+
+    AIX 5.1  (32 and 64-bit)      xlc 6.0.0.6
+                                  xlf 8.1.1.6
+    AIX 5.2  (32 and 64-bit)      xlc 6.0.0.8
+                                  xlf 8.1.1.7
+    Cray SV1 10.0.1.2             Cray Standard C Version 6.6.0.3.6
+                                  Cray Fortran: Version 3.6.0.3.1
+    Cray TS IEEE                  Cray Standard C Version 6.4.0.3
+                                  Cray Fortran: Version 3.4.0.0
+
+    FreeBSD 4.9                   gcc 2.95.4
+                                  GNU Fortran 0.5.25 
+    HP-UX B.11.00                 HP C  HP92453-01 A.11.01.20 
+                                  HP F90 v2.4
+                                  HP ANSI C++ B3910B A.03.13
+
+    IRIX64 6.5 (64 & n32)         MIPSpro cc 7.3.1.3m
+                                  F90 MIPSpro 7.3.1.3m 
+
+    Linux 2.4.20.28               gcc 2.96, GNU Fortran 0.5.25,
+                                  Absoft Fortran 9.0
+                                  Intel(R) C++ and Fortran Compilers 
+                                  Version 8.1
+    Linux 2.4.21-268-smp #1 SMP x86_64 (AMD)
+                                  gcc 3.3.1
+                                  GNU Fortran (GCC) 3.3.1
+                                  Intel(R) C++ and Fortran Compilers
+                                  Version 8.1
+                                  PGI C and Fortran Compilers Version 5.2-1
+    Linux 2.4.21-27.0.1.ELsmp #1 SMP
+                                  gcc 3.2.3
+                                  PGI C and Fortran Compilers Version 5.2-1 
+
+    Linux 2.4.21-sgi303rp05012313_10138 (Altix) 
+                                  Intel C++ and Intel Fortran Verison 8.1
+    
+    Linux 2.4.20-31.9smp_perfctr_lustre (IA-32)
+                                  Intel(R) C++ Version 8.0
+                                  Intel(R) Fortran Compiler Version 8.0
+    Linux 2.4.21.SuSE_241.bef1 (IA-64)
+                                  Intel(R) C++ Version 8.0
+                                  Intel(R) Fortran Compiler Version 8.0
+   
+    OSF1 V5.1                     Compaq C V6.5-303 
+				  HP Fortran V5.5A-3548
+                                  HP Fortran Compiler X5.5A-4085-48E1K
+
+    SunOS 5.7(32 and 64 bit)      WorkShop Compilers 5.0 98/12/15 C 5.0
+     (Solaris 2.7)                
+                                  WorkShop Compilers 5.0 99/09/16 FORTRAN 77 5.0 patch 107596-03
+                                  gcc 3.2.2
+                                  g77 GNU Fortran (GCC 3.2.2) 3.2.2 
+    SunOS 5.8(32 and 64 bit)      Sun WorkShop 6 update 2 C 5.3
+     (Solaris 2.8)                Sun WorkShop 6 update 2 Fortran 77 5.3 
+
+    SunOS 5.9 (32 and 64 bit)     Sun C 5.6 compiler, Sun Fortran 95 8.0
+
+    Windows 2000 (NT5.0)          MSVC++ 6.0
+                                  DEC Visual Fortran 6.0
+                                  Intel C and F90 compilers version 7.1
+    Windows XP                    MSVC++.NET, Intel Fortran 8.1 (static libraries only)
+    MAC OS X Darwin 7.7           gcc  3.3
+                                  IBM Fortran xlf 8.1
+                                  Absoft Fortran 8.2
+                                  
+                                  
+
+Known problems
+==============
+
+o  SZIP Library is not available for Crays SV1 and TS
+   Fortran APIs do not support SZIP compression.
+
+o SZIP compression cannot be used with GR interfaces. For more information
+  see "HDF4.2r1 SZIP Release Notes" available at 
+  http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/SZIP_HDF4_2r1.pdf
+
+o  This release doesn't support VMS system.
+
+o  N-Bit compression is not supported with Fortran APIs.
+
+o  Using both fill-value and compression on SD datasets doesn't work.
+
+o  SDgetdimscale incorrectly returns FAIL and or returns incorrect data
+   when the associated SDS has the same name as the dimension.
+
+o  When using PGI compilers make sure that JPEG library is also compiled with 
+   PGI C compiler; linking with JPEG built with gcc causes JPEG library tests
+   to fail.  To bypass the problem
+
+       x Set LIBS flag to $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+          where $PGI_JPEG_INSTALL_DIR points to the installtion directory
+          for the PGI-compiled JPEG library:
+
+          setenv LIBS $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+
+       x Use  --with-jpeg=$PGI_JPEG_INSTALL_DIR
+         configure flag to configure with the PGI-compiled JPEG library:
+
+          ./configure --with-jpeg=$PGI_JPEG_INSTALL_DIR --with-zlib....

Modified: packages/libhdf4/trunk/release_notes/bugs_fixed.txt
===================================================================
--- packages/libhdf4/trunk/release_notes/bugs_fixed.txt	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/release_notes/bugs_fixed.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,4 +1,94 @@
+For bugs fixed in the current release see RELEASE.txt file
+For bugs fixed in all releases after HDF4.2r0-Beta see HISTORY.txt file.
 
+HDF4.2r0-Beta
+========
+1. "hdp dumpgr" and "hdp dumpsds" have two new options:
+        -g to suppress the data of global (or file) attributes
+        -l to suppress the data of local attributes
+
+2. The problem where hdp failed on very long file name has been
+   fixed. (bug #693)
+
+3. The problem where VSinquire failed when being called on a vdata
+   that has no fields defined, has been fixed. (bug #626)
+
+4. A user attempted to change the values of VGNAMELENMAX and VSNAMELENMAX
+   to 256 for her own use, but the hdp output showed that the change was
+   not in effect.  This problem is now fixed. (bug #606)
+
+5. hdp dumpvg failed sometimes when reading a file that has a vgroup 
+   being inserted into another.  This has been fixed. (bug #477)
+
+6. fp2hdf when used with -p option did the opposite of what it was supposed
+   to do with palette files. This problem is now fixed. (bug #800). However
+   the utility hdfimport should be used in the future instead of fp2hdf.
+
+7. hdf2gif failed when a user tried it on JPEG compressed images. (Bug #601).
+   The problem is now fixed. An error message is displayed if the image is not
+   8-bit. If the image is 24-bit, the message suggests using hdf2jpeg.
+
+8. ncdump failed to read NetCDF files 3.5 when there were more than one variable
+   with unlimited dimensions. Fixed.
+
+9. NetCDF part of the HDF4 Library was not ported to Compaq True64 system. Fixed.
+
+10. The hdp commands dumpsds, dumpgr, dumpvd, and dumpvg now display an 
+    informative message when a non-HDF file is given as input. (Bug #817)
+
+11. The compilation warnings and error on the macro HDFclose are fixed.
+    (Bug #818)
+
+HDF4.1r5
+========
+1. The following VS routines are added as requested (bug #267):
+     VSsetblocksize/vsfsetblsz -- sets the block size of the linked-block element.
+     VSsetnumblocks/vsfsetnmbl -- sets the number of blocks for 
+                                  a linked-block element.
+     VSgetblockinfo/vsfgetblinfo -- retrieves the block size and the 
+                                    number of blocks of a linked-block element.
+
+2. When using SDsetdimscale to set the data type for a dimension to 
+   an unsigned type, the type became signed inadvertently (bug #172).  
+   This problem is now fixed.
+
+3. The memory leak in the netCDF part of the HDF/mfhdf distribution
+   is fixed. (bug #418)
+
+4. When using "hdp dumpgr", data was being printed in the range of 0-250
+   when it should be 0-168 (bug #422).  This problem is now fixed.
+
+5. hdp dumpgr has a new option to print palette data only -pd.  Also,
+   whenever option -p or -pd is given, only palettes are printed, no 
+   images nor file attributes. (bug #439)
+
+6. The "#define NULL" was removed since ANSI C compilers are required to
+   define NULL. (bug #448)
+
+7. Giving NULL to the fieldname argument in VSsetfields now returns
+   FAIL instead of causing segmentation fault. (bug #554)
+
+8. Giving a NULL to the argument name in several name setting routines
+   now returns FAIL instead of causing segmentation fault. (bug #514)
+
+9. Two routines were added to get compression information for the SD and
+   GR interfaces, including chunked elements: SDgetcompress/sfgcompress 
+   and GRgetcompress/mggcompress. (bug #307)  
+   Note: 
+   - for a JPEG image, GRgetcompress only returns the compression type, not 
+     the compression information (i.e, quantity and force_baseline) because 
+     this information currently is not retrievable.
+   - getting compression type for JPEG chunked images is not working yet.
+
+10.  Added new fortran function heprntf (HEprint) that takes two
+     arguments: file name and level. If file name string has 0 length
+     error messages will be printed to the standard output. 
+
+11.  Fix the linking bug of unresolved symbol(error_top) DLL when HEclear 
+     was called by users. Users who want to use hdf DLL should define HDFAPDLL 
+     in their applications. Simply going to project setting and adding HDFAPDLL
+     as the predefined constant should work.
+
 HDF4.1r4
 ========
 1. Fixed GR JPEG compression problem.

Deleted: packages/libhdf4/trunk/release_notes/compile.txt
===================================================================
--- packages/libhdf4/trunk/release_notes/compile.txt	2007-09-28 21:43:40 UTC (rev 1124)
+++ packages/libhdf4/trunk/release_notes/compile.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -1,236 +0,0 @@
- 
-COMPILING A PROGRAM
-                  
-Following are instructions for compiling an application program on the 
-platforms supported by HDF, using the binaries that we provide.  For
-Unix, the information on options to specify comes from the configuration 
-files (mh-*) in the HDF source code (under ../HDF4.1r4/config).   
-
-In general, you compile your program as shown below.  If your platform is 
-not specified in the section, "INSTRUCTIONS FOR SPECIFIC PLATFORMS", then 
-use these instructions.  If you are unable to compile your program on Unix, 
-please check the configuration file for your platform for the correct 
-options.
-
-C:
-    cc -o <your program> <your program>.c -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-   or
-
-    cc -o <your program> <your program>.c -I<path for hdf include directory> \
-          <path for libmfhdf.a>  <path for libdf.a> \
-          <path for libjpeg.a> <path for libz.a>
-
-FORTRAN:
-    f77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-   
-   or
-   
-    f77 -o <your program> <your program>.f  \
-          <path for libmfhdf.a>  <path for libdf.a> \
-          <path for libjpeg.a> <path for libz.a>
-
-NOTE: The order of the libraries is important: libmfhdf.a first,
-followed by libdf.a, then libjpeg.a and libz.a.  The libjpeg.a
-library is optional.
-
-INSTRUCTIONS FOR SPECIFIC PLATFORMS
-===================================
-
-Cray:
-----
-C:
-    cc  -O -s -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -O 1 -o <your program> <your program>.f  \
-         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Dec Alpha/Digital Unix:
-----------------------
-C:
-    cc -Olimit 2048 -std1 -o <your program> <your program>.c \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
- 
-Dec Alpha/OpenVMS AXP:
----------------------
-   To compile your programs, prog.c and prog1.for, with the HDF library, 
-   mfhdf.olb, df.olb, and libz.olb are required.  The libjpeg.olb library 
-   is optional.
-
-   cc/opt/nodebug/define=(HDF,VMS)/nolist/include=<dir for include> prog.c
-   fort prog1.for
-   link/nodebug/notraceback/exec=prog.exe  prog.obj, prog1.obj, -
-         <dir for lib>mfhdf/lib -
-         <dir for lib>df/lib, <dir for lib>libjpeg/lib,  -
-         <dir for lib>libz/lib, sys$library:vaxcrtl/lib
-
-   NOTE: The order of the libraries is important: mfhdf.olb first,
-   followed by df.olb then libjpeg.olb and libz.olb.
-
-Exemplar:
---------
-C:
-    cc -ext -nv -no <your program> <your program>.c \
-       -I<path for hdf include directory> \
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    fc  -sfc -72 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-   NOTE: These instructions are for Convex/HP Exemplar machines running
-   versions of the OS ealier than 10.x.  For machines running version
-   10.x of HP-UX, follow the instructions for HP-UX 10.2.
-
-FreeBSD:
--------
-C:
-    cc -ansi -Wall -pedantic -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
- 
-HP-UX:
------
-C:
-    cc -Ae -s -o <your program> <your program>.c \
-       -I<path for hdf include directory> \
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
- 
-
-IRIX 6.x:
---------
-C:
-    cc -ansi -n32 -mips3 -O -s -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -n32 -mips3 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-IRIX64 with 64-bit mode:
-------------------------
-C:
-    cc -ansi -64 -mips4 -O -s -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -64 -mips4 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-  
-IRIX64 with n32-bit mode:
--------------------------
-C:
-    cc -ansi -n32 -mips4 -O -s -o <your program> <your program>.c \
-     -I<path for hdf include directory> \
-     -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -n32 -mips4 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Linux:
------
-C:
-    gcc -ansi -D_BSD_SOURCE -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    g77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Solaris:
--------
-   The -lnsl is necessary in order to include the xdr library.
-
-C:
-    cc -Xc -xO2 -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-       -L/usr/lib -lnsl
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-        -L/usr/lib -lnsl
-
-Solaris_x86 (C only):
---------------------
-    The -lnsl is necessary in order to include the xdr library.
-
-    gcc -ansi -O -o <your program> <your program>.c \
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
-        -L/usr/lib -lnsl
-
-SP:
----
-C:
-    xlc -qlanglvl=ansi -O -o <your program> <your program>.c \
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-
-T3E:
----
-C:
-    
-    cc -X m -s -o <your program> <your program>.c \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -X m -Wl"-Dpermok=yes" -Wl"-s" -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-
-Windows NT/98/2000:
-------------------
-Using Microsoft Visual C++ version 6.x:
-
-Under Tools->Options, select the folder, Directories:
-   Under "Show directories for", select "Include files".
-   Add the following directories:
-      C:<path to HDF includes>\INCLUDE  
-
-Under "Show directories for", select "Library files":
-   Add the following directories:
-      C:<path to HDF libs>\LIB        
-
-Under Project->Settings, select folder, Link:
-   Add the following libraries to the beginning of the list of
-   Object/Library Modules:
-         hd414.lib hm414.lib (single-threaded release version)
-         hd414d.lib hm414d.lib (single-threaded debug version)
-
-         hd414m.lib hm414m.lib (multi-threaded release version)
-         hd414md.lib hm414md.lib (multi-threaded debug version)
-
-
-

Copied: packages/libhdf4/trunk/release_notes/misc_docs.txt (from rev 832, packages/libhdf4/branches/upstream/current/release_notes/misc_docs.txt)
===================================================================
--- packages/libhdf4/trunk/release_notes/misc_docs.txt	                        (rev 0)
+++ packages/libhdf4/trunk/release_notes/misc_docs.txt	2007-09-28 21:58:13 UTC (rev 1125)
@@ -0,0 +1,3525 @@
+
+This file was created for the HDF4.2r0. release to store the documents
+that were in the release_notes directory of the main HDF4 source tree
+since the 4.0.alpha release. See also HISTORY.txt file for more information.
+
+File contains the following *.txt files:
+
+
+Fortran_APIs.txt
+JPEG.txt
+Pablo.txt
+comp_SDS.txt
+compile.txt
+compression.txt
+dimval.txt
+external_path.txt
+hdp.txt
+install_winNT.txt
+macintosh.txt
+mf_anno.txt
+mf_ris.txt
+new_functions.txt
+page_buf.txt
+sd_chunk_examples.txt
+vattr.txt
+windows.txt
+
+To search for a particular document use "filename.txt=" string, for example 
+to seach for the beginning of the new_functions.txt file,
+use "new_functions.txt=" string
+
+================================Fortran_APIs.txt============================
+
+Problem:
+========
+
+In HDF4.0r1 and previous versions of HDF several Fortran 
+routines declared a formal parameter as character*(*) or 
+integer while the actual parameter was a character or 
+a numeric type. This caused problems on some systems, 
+such as VMS and T3D. 
+
+With HDF 4.0r2 and later releases, these routines have either 
+been replaced by 2 routines, one for character type parameters 
+and another for numeric type parameters; or, a new routine has 
+been added for char type parameters and the old routine is used 
+for numeric type parameters only. Those routines that were replaced 
+by two routines should be phased out in the future. However, in 
+order to not break currently working applications they are 
+still supported. New applications should use the new routines. 
+
+Routines and parameters affected:
+================================
+1. Write vdata
+
+Old:
+    vsfwrit(vsid, databuf, n_rec, interlace)
+        character*(*) databuf
+
+HDF4.0r2:
+    
+    Write to a vdata from a character buffer:
+      vsfwrtc(vsid, cbuf, n_rec, interlace) 
+           character*(*) cbuf
+    Write to a vdata from an integer buffer (for numeric values):
+      vsfwrt(vsid, buf, n_rec, interlace)  
+           integer  buf
+
+2. Read vdata
+ 
+Old:
+    vsfread(vsid, buf, n_recs, interlace)
+         character*(*) buf
+HDF4.0r2:
+    Read records into a character buffer:
+      vsfrdc(vsid, cbuf, n_recs, interlace)
+          character*(*) cbuf
+    Read records into an integer buffer (for numeric values):
+      vsfrd(vsid, buf, n_recs, interlace)
+          integer buf
+
+3. High level function for creating a single field single
+   component vdata
+ 
+Old:
+    vhfsd(f, field, buf, n, dtype, vsname, vsclass)
+         integer buf
+HDF4.0r2:
+    Store a simple character dataset in a vdata:
+      vhfscd(f,field,cbuf,n,dtype,vsname,vsclass)
+         character*(*) cbuf
+    Store a simple numeric dataset in a vdata
+      vhfsd(f, field, buf, n, dtype, vsname, vsclass)
+         integer buf
+
+4. High level function for creating a single field multi-
+   component vdata
+Old:
+    vhfsdm (f,field,buf,n,dtype,vsname,vsclass,order)
+         integer buf
+HDF4.0r2:
+    Store an aggregate char dataset in a vadata:      
+      vhfscdm (f,field,cbuf,n,dtype,vsname,vsclass,order)
+         character*(*) cbuf
+    Store a simple numeric dataset in a vdata
+      vhfsdm(f,field,buf,n,dtype,vsname,vsclass,order)
+         integer buf
+
+5. Write GR image
+Old:
+    mgwrimg(riid, start,stride,count,data)
+      <valid numeric type> data
+HDF4.0r2:
+    Write character type image data
+     mgwcimg(riid, start, stride, count, cdata)
+         character*(*)  cdata
+    Write numeric type image data
+      mgwrimg(riid, start,stride,count,data)
+      <valid numeric type> data
+
+6. Read GR image
+Old:
+    mgrdimg(riid,start,stride,count,data)
+      integer data
+HDF4.0r2:
+    Read character type image data
+      mgrcimg(riid,start,stride,count,cdata)
+          character*(*) cdata
+    Read numeric type image data
+      mgrdimg(riid,start,stride,count,data)
+          <valid numeric type> data
+
+7. Write LUT
+Old:
+    mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
+      <valid numeric type> data
+HDF4.0r2:
+    Write character type palette:
+      mgwclut(lutid,ncomp,data_type,interlace,nentries,cdata)
+          character*(*) cdata
+    Write numeric type palette:
+      mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
+          <valid numeric type> data
+
+8. Read LUT
+Old:
+    mgrdlut(lutid, data)
+      <valid numeric type> data
+HDF4.0r2:
+    Read char type palette:
+      mgrclut(lutid,cdata)
+        character*(*) cdata
+    Read numeric type palette:
+      mgrdlut(lutid, data) 
+        <valid numeric type> data
+
+9. Set GR attribute
+Old:
+    mgsattr(riid, name, nt, count, data)
+      character*(*) data
+HDF4.0r2:
+    Add char type attribute to a raster image
+      mgscatt(riid, name, nt, count, cdata)
+        character*(*) cdata
+    Add a numeric attribute to a raster image
+      mgsnatt(riid, name, nt, count, data)
+        integer data
+
+10. Get GR attribute
+Old:
+    mggattr(riid, index, data)
+      <valid numeric type> data
+HDF4.0r2:
+    Get a char type attribute:
+      mggcatt(riid, index, cdata)
+        character*(*) cdata
+    Get a numeric type attribute:
+      mggnatt(riid, index, data)
+        integer data
+
+11. Write SDS data
+Old:
+    sfwdata(sdsid,start,stride,end,values)
+      <valid numeric type> values
+HDF4.0r2
+    Write char type SDS data
+      sfwcdata(sdsid,start,stride,end,cvalues)
+        character*(*) cvalues
+    Write numeric type SDS data
+      sfwdata(sdsid,start,stride,end,values)
+        <valid numeric type> values
+
+12. Read SDS data
+Old:
+    sfrdata(sdsid,start,stride,end,values)
+      <valid numeric type> values
+HDF4.0r2
+    Read char type SDS data
+      sfrcdata(sdsid,start,stride,end,cvalues)
+        character*(*) cvalues
+    Read numeric type SDS data
+      sfrdata(sdsid,start,stride,end,values)
+        <valid numeric type> values
+
+13. Add an attribute to an object in SD interface
+Old:
+    sfsattr(id, name, nt, count, data)
+      character*(*) data
+HDF4.0r2
+    Add a char type attribute to an object
+      sfscatt(id, name, nt, count, cdata)
+        character*(*) cdata
+    Add a numeric type attribute to an object
+      sfsnatt(id, name,nt, count,data)
+        integer data
+
+14. Get contents of an attribute
+Old:
+    sfrattr(id, index, buf)
+      <valid numeric type> buf
+HDF4.0r2:
+    Get a char type attribute
+      sfrcatt(id, index, cbuf)
+        character*(*) cbuf
+    Get a numeric type attribute
+      sfrnatt(id, index, buf)
+        <valid numeric type> buf   
+
+15. Set fill value
+Old:
+    sfsfill(id, val)
+      <valid numeric type> val
+HDF4.0r2
+    Set a char type fill value
+      sfscfill(id, cval)
+        character cval
+    Set a numeric type fill value
+      sfsfill(id, val)
+        <valid numeric type> val
+
+16. Get fill value
+Old:
+    sfgfill(id, val)
+      <valid numeric type> val
+HDF4.0r2
+    Get char type fill value
+      sfgcfill(id, cval)
+        character cval
+    Get numeric type fill value
+      sfgfill(id, val)
+        <valid numeric type> val
+
+
+============================================================================
+================================JPEG.txt====================================
+
+Independant JPEG Group library
+    Version 4.1b of the HDF-netCDF library uses v6a of the Independent
+JPEG Group (IJG) JPEG file access library.  For most users of the HDF library,
+this will be completely transparent.  For users who are integrating the HDF
+library into an existing application which uses the IJG's JPEG library, linking
+with the HDF library is now much simpler and should be completely painless.
+The JPEG library will need to be linked with user's applications when raster
+images are being used (whether they are compressed with JPEG or not).
+
+     cc -o <myprog> myprog.c -I<include path> <path for libmfhdf.a> \
+           <path for libdf.a> <path for libjpeg.a>
+
+     Note: order of the libraries is important, the mfhdf library must be first
+and be followed by the hdf library.
+============================================================================
+================================Pablo.txt===================================
+
+
+Pablo Instrumentation of HDF
+===========================
+    This version of the distribution has support to create an instrumented 
+    version of the HDF library(libdf-inst.a). This library along with
+    the Pablo performance data capture libraries can be used to gather data
+    about I/O behavior and procedure execution times.  
+
+    More detailed documentation on how to use the instrumented version of
+    the HDF library with Pablo can be found in the Pablo directory 
+    '$(toplevel)/hdf/pablo'. 
+     See the provided '$(toplevel)/hdf/pablo/README.Pablo'
+     and the Postscript file '$(toplevel)/hdf/pablo/Pablo.ps'.
+
+    At this time only an instrumented version of the core HDF library libdf.a 
+    can be created. Future versions will have support for the SDxx interface
+    found in libmfhdf.a. Current interfaces supported are ANxx, GRxx, DFSDxx,
+    DFANxx, DFPxx, DFR8xx, DF24xx, Hxx, Vxx, and VSxx.
+
+    To enable the creation of an instrumented library the following section
+    in the makefile fragment($(toplevel)/config/mh-<os>) must be uncommented 
+    and set.
+
+    # ------------ Macros for Pablo Instrumentation  --------------------
+    # Uncomment the following lines to create a Pablo Instrumentation
+    # version of the HDF core library called 'libdf-inst.a'
+    # See the documentation in the directory 'hdf/pablo' for further 
+    # information about Pablo and what platforms it is supported on
+    # before enabling. 
+    # You need to set 'PABLO_INCLUDE' to the Pablo distribution 
+    # include directory to get the files 'IOTrace.h' and 'IOTrace_SD.h'.
+    #PABLO_FLAGS  = -DHAVE_PABLO
+    #PABLO_INCLUDE = -I/hdf2/Pablo/Instrument.HP/include
+
+    After setting these values you must re-run the top-level 'configure' script.
+    Make sure that your start from a clean re-build(i.e. 'make clean') after
+    re-running the toplevel 'configure' script and then run 'make'.
+    Details on running configure can be found in the section
+    'General Configuration/Installation - Unix' found in the top-level 
+    installation file '$(toplevel)/INSTALL'.
+============================================================================
+================================comp_SDS.txt================================
+
+Limitations of compressed SDS datasets
+    Due to certain limitations in the way compressed datasets are stored, data
+which has been compressed is not completely writable in ways that uncompressed
+datasets are.  The "rules" for writing to a compressed dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  I.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  I.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.
+
+    Generally speaking, these mean that it is impossible to overwrite existing
+compressed data which is not stored in "chunked" form.  This is due to 
+compression algorithms not being suitable for "local" modifications in a
+compressed datastream.  Please send questions about compression to the
+general HDF support e-mail address:  hdfhelp at ncsa.uiuc.edu
+
+Compression for HDF SDS
+The SDsetcompress and SDsetnbitdataset functions are used as
+higher-level routines to access the HCcreate function (HCcreate is described
+in the reference manual).  SDsetnbitdataset allows for the storage of 1-32 bit 
+integer values (instead of being restricted to 8, 16 or 32-bit sizes) in a
+scientific dataset. SDsetcompress can be used to compress a scientific dataset
+through the SD interface instead of dropping down to the lower-level H
+interface.
+
+N-bit SDS using SDsetnbitdataset:
+
+    The interface to SDsetnbitdataset is described below:
+
+    intn SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+    int32 sds_id - The id of a scientific dataset returned from SDcreate or
+        SDselect.
+        
+    intn start_bit - This value determines the bit position of the highest end
+        of the n-bit data to write out. Bits in all number-types are counted
+        from the right starting with 0. For example, in the following bit data,
+        "01111011", bits 2 and 7 are set to 0 and all the other bits are set to
+        one. 
+
+    intn bit_len - The number of bits in the n-bit data to write, including the
+        starting bit, counting towards the right (i.e. lower bit numbers). For
+        example, starting at bit 5 and writing 4 bits from the following bit
+        data, "01111011", would write out the bit data, "1110", to the dataset
+        on disk. 
+
+    intn sign_ext - Whether to use the top bit of the n-bit data to sign-extend
+        to the highest bit in the memory representation of the data. For
+        example, if 9-bit signed integer data is being extracted from bits
+        17-25 (nt=DFNT_INT32, start_bit=25, bit_len=9, see below for full
+        information about start_bit & bit_len parameters) and the bit in
+        position 25 is a 1, then when the data is read back in from the disk,
+        bits 26-31 will be set to a 1, otherwise bit 25 will be a zero and bits
+        26-31 will be set to 0. This bit-filling takes higher precedence (i.e.
+        is performed after) the fill_one (see below) bit-filling. 
+
+    intn fill_one - Whether to fill the "background" bits with 1's or 0's.
+        The "background" bits of a n-bit dataset are those bits in the
+        in-memory representation which fall outside of the actual n-bit field
+        stored on disk. For example, if 5 bits of an unsigned 16-bit integer
+        (in-memory) dataset located in bits 5-9 are written to disk with the
+        fill_one parameter set to TRUE (or 1), then when the data is read back
+        into memory at a future time, bits 0-4 and 10-15 would be set to 1. If
+        the same 5-bit data was written with a fill_one value of FALSE (or 0),
+        then bits 0-4 and 10-15 would be set to 0.  This setting has a lower
+        precedence (i.e. is performed first) than the sign_ext setting. For
+        example, using the sign_ext example above, bits 0-16 and 26-31 will
+        first be set to either 1 or 0 based on the fill_one parameter, and then
+        bits 26-31 will be set to 1 or 0 based on bit-25's value. 
+    
+    RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
+
+    The corresponding FORTRAN function name is sfsnbit which takes the
+    same parameters in the same order.
+
+    For example, to store an unsigned 12-bit integer (which is represented
+    unpacked in memory as an unsigned 16-bit integer), with no sign extension
+    or bit filling and which starts at bit 14 (counting from the right with bit
+    zero being the lowest) the following setup & call would be appropriate: 
+
+    intn sign_ext = FALSE; 
+    intn fill_one = FALSE; 
+    intn start_bit= 14; 
+    intn bit_len = 12; 
+    SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+    Further reads and writes to this dataset would transparently convert the
+    16-bit unsigned integers from memory into 12-bit unsigned integers stored
+    on disk.
+
+    More details about this function can be found in the HDF library reference
+    manual.
+
+Compressed SDS data using SDsetcompress:
+
+        The SDsetcompress function call contains a subset of the parameters to
+the HCcreate function call described in compression.txt and performs the same
+types of compression.
+
+    The interface to SDsetcompress is described below:
+
+    intn SDsetcompress(sds_id,comp_type,c_info);
+
+    int32 sds_id - The id of a scientific dataset returned from SDcreate or
+        SDselect.
+
+    int32 comp_type - The type of compression to encode the dataset with.
+        The values are the same as for HCcreate:
+            COMP_CODE_NONE - for no compression
+            COMP_CODE_RLE - for RLE encoding
+            COMP_CODE_SKPHUFF - for adaptive Huffman
+            COMP_CODE_DEFLATE - for gzip 'deflation'
+
+    comp_info *c_info - Information needed for the encoding type chosen.
+        For COMP_CODE_NONE and COMP_CODE_RLE, this is unused and can be set to
+        NULL.  For COMP_CODE_SKPHUFF, the structure skphuff in this union needs
+        information about the size of the data elements in bytes (see example
+        below).  For COMP_CODE_DEFLATE, the structure deflate in this union
+        need information about "effort" to try to compress with (see example
+        below).  For more information about the types of compression 
+        see the compression.txt document in this directory.
+
+    RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
+
+    Similarly to the HCcreate function, SDsetcompress can be used to create
+    compressed dataset or to compress existing ones.
+
+    For example, to compress unsigned 16-bit integer data using the adaptive
+    Huffman algorithm, the following setup and call would be used:
+
+    comp_info c_info;
+    c_info.skphuff.skp_size=sizeof(uint16);
+    SDsetcompress(sds_id,COMP_CODE_SKPHUFF,&c_info);
+
+    Further reads and writes to this dataset would transparently convert the
+    16-bit unsigned integers from memory into a compressed representation on
+    disk.
+
+    For example, to compress a dataset using the gzip deflation algorithm, with
+    the maximum effort to compress the data, the following setup and call would
+    be used:
+
+    comp_info c_info;
+    c_info.deflate.level=9;
+    SDsetcompress(sds_id,COMP_CODE_DEFLATE,&c_info);
+
+    Currently, SDsetcompress is limited to creating new datasets or appending
+    new slices/slabs onto existing datasets.  Overwriting existing data in a
+    dataset will be supported at some point in the future.
+
+    More details about this function can be found in the HDF library reference
+    manual.
+
+============================================================================
+================================compile.txt=================================
+
+ 
+COMPILING A PROGRAM
+                  
+Following are instructions for compiling an application program on the 
+platforms supported by HDF, using the binaries that we provide.  For
+Unix, the information on options to specify comes from the configuration 
+files (mh-*) in the HDF source code (under ../HDF4.1r5/config).   
+
+In general, you compile your program as shown below.  If your platform is 
+not specified in the section, "INSTRUCTIONS FOR SPECIFIC PLATFORMS", then 
+use these instructions.  If you are unable to compile your program on Unix, 
+please check the configuration file for your platform for the correct 
+options.
+
+C:
+    cc -o <your program> <your program>.c -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+   or
+
+    cc -o <your program> <your program>.c -I<path for hdf include directory> \
+          <path for libmfhdf.a>  <path for libdf.a> \
+          <path for libjpeg.a> <path for libz.a>
+
+FORTRAN:
+    f77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+   
+   or
+   
+    f77 -o <your program> <your program>.f  \
+          <path for libmfhdf.a>  <path for libdf.a> \
+          <path for libjpeg.a> <path for libz.a>
+
+NOTE: The order of the libraries is important: libmfhdf.a first,
+followed by libdf.a, then libjpeg.a and libz.a.  The libjpeg.a
+library is optional.
+
+INSTRUCTIONS FOR SPECIFIC PLATFORMS
+===================================
+
+Cray:
+----
+C:
+    cc  -O -s -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -O 1 -o <your program> <your program>.f  \
+         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Dec Alpha/Digital Unix:
+----------------------
+C:
+    cc -Olimit 2048 -std1 -o <your program> <your program>.c \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+ 
+Dec Alpha/OpenVMS AXP:
+---------------------
+   To compile your programs, prog.c and prog1.for, with the HDF library, 
+   mfhdf.olb, df.olb, and libz.olb are required.  The libjpeg.olb library 
+   is optional.
+
+   cc/opt/nodebug/define=(HDF,VMS)/nolist/include=<dir for include> prog.c
+   fort prog1.for
+   link/nodebug/notraceback/exec=prog.exe  prog.obj, prog1.obj, -
+         <dir for lib>mfhdf/lib -
+         <dir for lib>df/lib, <dir for lib>libjpeg/lib,  -
+         <dir for lib>libz/lib, sys$library:vaxcrtl/lib
+
+   NOTE: The order of the libraries is important: mfhdf.olb first,
+   followed by df.olb then libjpeg.olb and libz.olb.
+
+Exemplar:
+--------
+C:
+    cc -ext -nv -no <your program> <your program>.c \
+       -I<path for hdf include directory> \
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    fc  -sfc -72 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+   NOTE: These instructions are for Convex/HP Exemplar machines running
+   versions of the OS ealier than 10.x.  For machines running version
+   10.x of HP-UX, follow the instructions for HP-UX 10.2.
+
+FreeBSD:
+-------
+C:
+    cc -ansi -Wall -pedantic -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+ 
+HP-UX:
+-----
+C:
+    cc -Ae -s -o <your program> <your program>.c \
+       -I<path for hdf include directory> \
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+ 
+
+IRIX 6.x:
+--------
+C:
+    cc -ansi -n32 -mips3 -O -s -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -n32 -mips3 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+IRIX64 with 64-bit mode:
+------------------------
+C:
+    cc -ansi -64 -mips4 -O -s -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -64 -mips4 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+  
+IRIX64 with n32-bit mode:
+-------------------------
+C:
+    cc -ansi -n32 -mips4 -O -s -o <your program> <your program>.c \
+     -I<path for hdf include directory> \
+     -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -n32 -mips4 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Linux:
+-----
+C:
+    gcc -ansi -D_BSD_SOURCE -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    g77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Solaris:
+-------
+   The -lnsl is necessary in order to include the xdr library.
+
+C:
+    cc -Xc -xO2 -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
+       -L/usr/lib -lnsl
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
+        -L/usr/lib -lnsl
+
+Solaris_x86 (C only):
+--------------------
+    The -lnsl is necessary in order to include the xdr library.
+
+    gcc -ansi -O -o <your program> <your program>.c \
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
+        -L/usr/lib -lnsl
+
+SP:
+---
+C:
+    xlc -qlanglvl=ansi -O -o <your program> <your program>.c \
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+
+T3E:
+---
+C:
+    
+    cc -X m -s -o <your program> <your program>.c \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -X m -Wl"-Dpermok=yes" -Wl"-s" -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+
+Windows NT/98/2000:
+------------------
+Using Microsoft Visual C++ version 6.x:
+
+Under Tools->Options, select the folder, Directories:
+   Under "Show directories for", select "Include files".
+   Add the following directories:
+      C:<path to HDF includes>\INCLUDE  
+
+Under "Show directories for", select "Library files":
+   Add the following directories:
+      C:<path to HDF libs>\LIB        
+
+Under Project->Settings, select folder, Link:
+   Add the following libraries to the beginning of the list of
+   Object/Library Modules:
+         hd415.lib hm415.lib (single-threaded release version)
+         hd415d.lib hm415d.lib (single-threaded debug version)
+
+         hd415m.lib hm415m.lib (multi-threaded release version)
+         hd415md.lib hm415md.lib (multi-threaded debug version)
+
+
+
+============================================================================
+================================compression.txt=============================
+
+Compression Algorithms and interface
+
+    The low-level compression interface allows any data object to be 
+compressed using a variety of algorithms.  This is completely transparent 
+to users once the data has been compressed initially - further data written
+to an object or read from it are compressed or decompressed internally to
+the library, without user intervention.  (For information on compressing
+SDS datasets, see the ../release_notes/comp_SDS.txt file.)  
+
+Currently only three compression algorithms are supported: Run-Length Encoding 
+(RLE), adaptive Huffman, and an LZ-77 dictionary coder (the gzip 'deflation' 
+algorithm).  Plans for future algorithms include an Lempel/Ziv-78 dictionary 
+coding, an arithmetic coder and a faster Huffman algorithm.
+
+    The public interface for this routine is contained in the user-level
+function call, HCcreate.  The interface to HCcreate is described below:
+
+int32 HCcreate(id,tag,ref,model_type,m_info,coder_type,c_info);
+    int32 id;                IN: the file id to create the data in (from Hopen)
+    uint16 tag,ref;          IN: the tag/ref pair of the data object which
+                                    is to be compressed
+    comp_model_t model_type; IN: the type of modeling to use, currently
+                                    only COMP_MODEL_STDIO is supported, which
+                                    indicates data is transferred in the
+                                    same way as C I/O functions operate.
+    model_info *m_info;      IN: Information needed for the modeling type chosen
+                                    Nothing needed for COMP_MODEL_STDIO,
+                                    so NULL can be used.
+    comp_coder_t coder_type; IN: the type of encoding to use from the following:
+                                    COMP_CODE_NONE - for no compression
+                                    COMP_CODE_RLE - for RLE encoding
+                                    COMP_CODE_SKPHUFF - for adaptive Huffman
+                                    COMP_CODE_DEFLATE - for gzip 'deflation'
+    comp_info *c_info;       IN: Information needed for the encoding type chosen
+                                    For COMP_CODE_NONE and COMP_CODE_RLE,
+                                    this is unused and can be set to NULL.
+                                    For COMP_CODE_SKPHUFF, the structure skphuff
+                                    in this union needs information about the
+                                    size of the data elements in bytes (see
+                                    examples below).
+                                    For COMP_CODE_DEFLATE, the structure deflate
+                                    in this union needs information about the
+                                    "effort" to encode data with.  Higher
+                                    values of 'level' member indicate more
+                                    compression effort.  Values may range from
+                                    0 (minimal compression, fastest time) to
+                                    9 (maximum compression, slowest time).
+    RETURNS
+        Return an AID to the newly created compressed element, FAIL on error.
+
+    HCcreate will compress an existing data object with the specified 
+compression method, or it can create a new data object which will contain
+compressed data when it is written to.  In either case, Hendaccess must be
+called to release the AID allocated by HCcreate.  In the first two examples
+below the datasets already exist, in the final example the dataset is created
+by the HCcreate call.  There is currently no FORTRAN equivalent for this
+function.  More details about this function can be found in the HDF reference
+manual.
+
+The following example shows how to compress a scientific dataset data object
+(which is composed of multi-dimensional 32-bit integer data) using the
+adaptive Huffman encoding:
+    {
+        int32 aid;
+        comp_info c_info;
+
+        c_info.skphuff.skp_size=sizeof(int32);
+        aid=HCcreate(file_id, DFTAG_SD, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_SKPHUFF,&c_info);
+        .
+        .
+        <access data object>
+        .
+        .
+        Hendaccess(aid);
+    }
+
+The following example shows show to compress a raster image data object
+using the RLE algorithm:
+    {
+        int32 aid;
+
+        aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_RLE,NULL);
+        .
+        .
+        <access data object>
+        .
+        .
+        Hendaccess(aid);
+    }
+
+The following example shows how to create a new data object whose data
+will compressed as it is written:
+    {
+        int32 aid;
+
+        aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_RLE,NULL);
+        .
+        .
+        Hwrite(aid,len,data);
+        .
+        .
+        Hendaccess(aid);
+    }
+============================================================================
+================================dimval.txt==================================
+
+             New Version of Dimension Values
+             ===============================
+
+HDF4.0b1 and previous releases use a vgroup to represent a dimension.
+The vgroup has a single field vdata with class "DimVal0.0".
+The vdata has <dimension size> number of records, each record has a 
+fake value from 0, 1, 2 ... , (<dimension size> - 1 ). The fake values 
+are not really required and take a lot of space. For applications that 
+create large one dimensional array datasets the disk space taken by 
+these fake values almost double the size of the HDF file. In order to 
+omit the fake values, a new version of dimension vdata has been proposed.
+
+The new version uses the same structure as the old version. The only
+differences are that the vdata has only 1 record with value 
+<dimension size> and that the vdata's class is "DimVal0.1" to 
+distinguish it from the old version.
+
+However, existing tools and utilities which were compiled with the old
+version can't recognize the new dimensions of hdf files created using
+HDF4.0b2 or later version. This could cause problems for HDF users.
+To solve this problem, we are planning to implement a transitional 
+policy:
+
+1. Starting from HDF4.0b2 both versions of the dimension will be
+   created by default. The old tools recognize the "DimVal0.0" 
+   dimension.
+2. A new function SDsetdimval_comp (sfsdmvc) is added which can 
+   be called for a specific dimension to suppress the creation 
+   of the "DimVal0.0" vdata for that dimension. Users who store 
+   big 1D arrays should use this function to create "DimVal0.1" 
+   only.  See the man page for sdsetdimval_comp.3. 
+3. A new function SDisdimval_bwcomp (sfisdmvc) is added which 
+   can be called to get the current compatibility mode of a 
+   dimension. See the man page for sdisdimval_bwcomp.3. 
+4. HDF4.0b2 and later version of HDF libraries can recognize both
+   old and new versions of dimensions. This means old HDF files can 
+   always be read by new HDF libraries.
+5. HDF4.1 will create only "DimVal0.1" by default and function 
+   SDsetdimval_comp should be called if "DimVal0.0" is also desired.  
+   The transition time period is ended.
+6. Existing tools and utilities should be re-compiled with HDF4.0b2
+   or later releases during that transition time period.
+7. A new utility will be written to remove redundant "DimVal0.0" from 
+   the files created during the transition time period.
+8. A new utility will be written to convert "DimVal0.1" to "DimVal0.0"
+   for special cases.
+
+Please send bug reports, comments and suggestions to hdfhelp at ncsa.uiuc.edu.
+
+
+============================================================================
+================================external_path.txt===========================
+
+User Settable File Location for External Elements
+
+Users sometimes encounter situations (e.g., disk space shortage,
+different filesystem names) that the external file containing the data
+of the external element has to reside in a directory different from the
+one it was created.  The user may set up symbolic pointers to forward
+the file locations but this does not work if the external filename is
+an absolute path type containing directory components that do not exist
+in the local system.
+
+A new feature is added such that an application can provide a list of
+directories for the HDF library to search for the external file.  This
+is set by the function call HXsetdir or via the environment variable
+$HDFEXTDIR.  See the man page HXsetdir(3) for details.
+
+A similar feature is also added to direct the HDF library to create the
+external file of a _new_ external element in the given directory.  An
+example for the need of this feature is that an application wants to
+create multiple external element files with certain naming conventions
+(e.g., Data950101, Data950102) while all these files share a common
+parent directory (project123/DataVault).  Different users will have a
+different choice of the common parent directory.  This can be set by
+the function call HXsetcreatedir or the environment variable
+$HDFEXTCREATEDIR.  See the man page for HXsetcreatedir (1) for detail.
+
+============================================================================
+================================hdp.txt=====================================
+
+           hdp -- HDF dumper 
+
+
+NAME
+     hdp - HDF dumper
+
+SYNOPSIS
+     hdp [hdp options] hdp command [command options] <filename list>
+
+DESCRIPTION
+     
+     hdp is a command line utility designed for quick display of 
+     contents and data of HDF3.3 objects. It can list the contents 
+     of hdf files at various levels with different details. It can 
+     also dump the data of one or more specific objects in the file. 
+
+
+HDP OPTIONS
+
+    Currently, there is only one option.
+
+    -H  Display usage information about the specified command.
+        If no command is specified, -H lists all available commands.
+
+
+HDP COMMANDS
+
+     hdp currently has two types of commands: list and dump. Other 
+     types of commands such as those for editing may be added in the
+     future.
+     
+     hdp list <filename list>
+         lists contents of files in <filename list> 
+
+     hdp dumpsds <filename list>
+         displays data of NDGs and SDGs in the listed files.
+
+     hdp dumpvd <filename list>
+         displays data of vdatas in the listed files.
+   
+     hdp dumpvg <filename list>
+         displays data of objects in vgroups in the listed files.
+
+     hdp dumprig <filename list>
+         displays data of RIGs in the listed files.
+
+     hdp dumpgr <filename list>
+         displays data of general RIGs in the listed files.
+
+HDP COMMAND OPTIONS
+
+(Note: options preceeded by an * have not yet been implemented.)
+
+
+     hdp list [format options] [content ops] [filter ops] [order ops] 
+	      <filename list>
+     --------------------------------------------------------------------------
+
+      Format options
+          decide how the info of objects will be presented on the screen.
+       
+        -s  (short format) under each tag #, all ref's of that tag are listed
+            in one or more lines, same as the output of hdfls. (default)
+
+        -l  (long format) one object per line. Each line contains tag-name, 
+            tag/ref and the index of this tag in the file.(e.g., the ith NDG 
+	    in the file).
+
+        -d  debug format, one object per line. Each line contains tag_name,
+            tag/ref, index, offset, and length, same as the output of hdfls -d.
+
+	no	tagname	   tag	  ref	index/tag	offset	length
+        --      -------    ---    ---   ---------       ------  ------
+
+	1	DFTAG_NT   106      2      1          
+        2       DFTAG_SD   701      3      1
+        ...
+
+
+         Content options
+              allow contents be displayed.
+  
+            -n  display the name or label of the object, if there is any.
+                -n puts you in -l format automatically.
+
+            -c  display the class of the object, if there is any. -l format.
+
+            -a  display description of the object, if there is any. -l format.
+
+         Filter options
+              select certain type of objects to display, default is all.
+
+            -g  display groups only. Objects which do not belong to 
+                any group will not be displayed. Nested groups will be
+                displayed in tree format.
+
+            -t <number>  display objects with specified tag number . e.g. 
+                         720 for NDG.
+            -t <name>    display objects with specified tag name.
+
+         Order options
+              sort the output list in different orders.
+ 
+            -ot  by tag # (default)
+            -of  by the order in file DDlist.
+            -og  by group
+            -on  by name(label)
+
+    hdp dumpsds [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which SDS to dump.
+
+             -i <index> dump SDS's with indices specified in <index>; 
+			  indices correspond to the order of the SDS in the file
+             -r <ref>    dump SDS's with reference numbers specified in <ref>
+             -n <name>   dump SDS's with names specified in <name>
+             -a           dump all SDS's in the file. (default)
+
+	     Options -i, -r, and -n can be used inclusively to specify
+	     different SDS's.
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref 
+
+	     These options are exclusive.
+
+          Output options
+
+             -o <filename> specify <filename> as output file name
+             -b            binary output
+             -x            ascii text output (default)
+
+	     Options -b and -x are exclusive, but each can be used with
+	     option -o.
+
+	  Format options
+	     -c    print space characters as they are, not \digit
+	     -g    do not print data of file (global) attributes
+	     -l    do not print data of local attributes
+	     -s    do not add carriage return to a long line - dump as a stream
+
+	     Options in this category can be used inclusively.
+
+	  Note: Any combination of an option from each of the categories can
+		be used as long as the criteria of that category are met.
+
+    hdp dumpvd [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which vdata to dump.
+
+             -i <index>   dump vdatas with indices in <index>; indices 
+			  correspond to the order of the vdatas in the 
+			  files
+             -r <ref>     dump vdatas with reference numbers specified in
+			  <ref>
+             -n <name>    dump vdatas with names specified in <name>
+             -c <class>   dump vdatas with classes specified in <class>
+             -a           dump all vdatas in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref
+             -f <fields> dump data of specified fields
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+           * -b         binary file
+             -t         text ascii file (default)
+
+    hdp dumpvg [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which vgroups to dump.
+
+             -i <index>   dump vgroups with indices specified in <index>; 
+			  indices correspond to the order of the vgroups 
+			  specified in the files
+             -r <ref>     dump vgroups with reference numbers specified in <ref>
+             -n <name>    dump vgroups with names specified in <name>
+             -c <class>   dump vgroups with classes specified in <class>
+             -a           dump all vgroups in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+           * -b         binary file
+             -t         text ascii file (default)
+
+    Note: Unless the "-d" option is specified, a graphical representation of
+	  the file will be given after the data has been displayed. 
+
+    hdp dumprig [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which RIG to dump.
+
+             -i <index>   dump RIGs with indices specified in <index>; 
+			  indices correspond to the order of the RIGs 
+			  specified in the files
+             -r <ref>     dump RIGs with reference numbers specified in <ref>
+             -a           dump all RIGs in the file. (default)
+             -m  8|24     dump the RIGs of 8-bit or 24-bit. By default all
+                             RIGs in the file will be dumped
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+             -b         binary file
+             -t         text ascii file (default)
+
+    hdp dumpgr [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which general RIGs to dump.
+
+             -i <index>   dump general RIG's with indices specified in 
+                          <index>; indices correspond to the order of 
+                          the RIG in the file
+             -r <ref>     dump general RIG's with reference numbers 
+                          specified in <ref>
+             -n <name>    dump general RIG's with names specified in <name>
+             -a           dump all general RIG's in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+             -b         binary file
+             -t         ascii text file (default)
+
+          Note: any combination of an option from each of the three categories
+                can be used; but no more than one option from one category is
+                allowed.
+============================================================================
+================================install_winNT.txt===========================
+
+      Install HDF4.1 Release 2 on Windows NT and Windows 95, and Alpha NT.
+
+Since Windows NT, Windows '95 (Chicago) and Windows 3.1
+(with the Win 32s extensions) all are designed to run the same 32-bit code, our 
+decision is to support only 32-bit libraries and code on the MS-Windows 
+platform. We are not planning on supporting any 16-bit versions in the 
+foreseeable future.
+
+The instructions which follow assume that you will be using one of 
+the 'zip' files that we provide, either the binary code release
+(hdf41r2.zip) or the source code release (hdf41r2s.zip).
+In building HDF from source code you may select between 
+two build environment options depending on your
+application and environment needs.  Each option has it's own zip file:
+
+
+Option I, (select Win32nof.zip)
+Test and Utility configuration : HDF library, tests, and utilities, no fortran,
+available for Win32 Intel platform only.
+
+Option II, (select Win32full.zip)
+Full configuration : HDF library, tests, and utilities, with fortran
+This version has been built and tested using DEC Visual Fortran on both
+the Win32 Intel platform and the Win32 Alpha platform.
+
+
+
+Building from Binary Code Release (hdf41r2.zip)
+===============================================
+To install the HDF, JPEG, zlib and mfhdf libraries and utilities, 
+it is assumed that you have done the following:
+      
+
+      1. Create a directory structure to unpack the library. For 
+      example: 
+
+	    c:\					(any drive)
+           MyHDFstuff\				(any folder name)
+
+      2. Copy the binary archive (HDF41r2.zip) to that directory 
+      and unpack it by running WinZip on HDF41r2.zip (the binary archive).
+      This should create a directory called 'HDF41r2' which 
+      contains the following files and directories.
+
+            c:\MyHDFstuff\HDF41r2\lib             ( Debug and Release versions of HDF libraries )
+            c:\MyHDFstuff\HDF41r2\include         ( HDF include files )
+            c:\MyHDFstuff\HDF41r2\bin             ( HDF utilities files )
+            c:\MyHDFstuff\HDF41r2\release_notes   ( release notes )
+            c:\MyHDFstuff\HDF41r2\install_NT_95   ( this file)
+
+      
+      3. If you are building an application that uses the HDF library 
+         the following locations will need to be specified for locating
+         header files and linking in the HDF libraries:
+ 
+            C:\MyHDFstuff\HDF41r2\lib
+            C:\MyHDFstuff\HDF41r2\include
+
+
+
+
+
+Building from Source Code Release (hdf41r2s.zip)
+===============================================
+
+STEP I:  Preconditions
+
+To build the HDF, JPEG, zlib and mfhdf libraries and utilities, 
+it is assumed that you have done the following:
+      
+      1. Installed MicroSoft Developer Studio, and Visual C++ 5.0.
+         Visual Fortran 5.0 is needed if you are going to build the
+         full HDF Library with Fortran support.
+
+      2. Set up a directory structure to unpack the library. For 
+      example: 
+
+	    c:\					(any drive)
+           MyHDFstuff\				(any folder name)
+
+      3. Copy the source distribution archive to that directory 
+      and unpack it using the appropriate archiver options to
+      create a directory  hierarchy.
+         
+      Run WinZip on HDF41r2s.zip (the entire source tree).
+      This should create a directory called 'HDF41r2' which 
+      contains several files and directories.
+      
+      ( Note for those using the Win32 Alpha platform:
+        If you do not have a Winzip utility for your Alpha system
+        you can download the needed executables from: 
+        http://www.cdrom.com/pub/infozip ) 
+       
+STEP II: Select Installation type and Build.
+
+You may select one of 2 ways to build the HDF library and 
+utilities, depending on your environment and application needs.
+
+Option I, (select Win32nof.zip)
+Test and Utility configuration : HDF library, tests, and utilities, no fortran
+
+Option II, (select Win32full.zip)
+Full configuration : HDF library, tests, and utilities, with fortran
+
+
+
+STEP III: Follow Instructions for Option I, or II
+
+
+INSTRUCTIONS FOR OPTION I, TEST AND UTILITY INSTALLATION, NO FORTRAN
+                 (Win32 Intel platform only)
+
+	*** Builds hdf library, hdf utilities, 
+	*** test programs and batch files. No fortran code.
+ 
+        1. You will use Win32nof.zip 
+           Unpack dev\win32nof.zip in directory dev\
+           
+            Run WinZip on 
+               c:\myHDFstuff\HDF41r2\Win32nof.zip
+               This archive contains a Developer Studio project "dev" and 
+               two batch files. 
+               40 project files (*.dsp files) will be created when 
+               Win32nof.zip is expanded.
+
+         2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
+            "Open Workspace" option. 
+            Then open  c:\myHDFstuff\HDF41r2\dev.dsw workspace. 
+
+	 3. Select "Build", then Select "Set Active Configuration".
+            Select "dev -- Win32Debug" as active configuration.
+            Select "Build" and "Build dev.exe" to
+            build the Debug version of the HDF41r2 tree.
+
+	 4. Select "Build", then Select "Set Active Configuration".
+            Select "dev -- Win32Release" as active configuration.
+            Select "Build" and "Build dev.exe" to
+            build the Release version of the HDF41r2 tree.
+	
+         5. In command prompt window run the test batch file 
+            win32noftst.bat in directory HDF41r2\.
+
+         6. If all tests passed, run the installation batch file 
+       win32ins.bat in directory HDF41r2\. Commands in this file will create
+       subdirectories bin\, include\ and lib\ in HDF41r2\. The bin dirctory
+       will contain the HDF utilities, the include directory will contain 
+       header files, and the lib directory will contain:
+               jpeg.lib     - JPEG Library
+               jpegd.lib    - JPEG Library with DEBUG option
+               libsrc.lib   - multi-file SDS Inteface routines
+               libsrcd.lib  - multi-file SDS Inteface routines with DEBUG option
+               src.lib      - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines
+               srcd.lib     - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines with DEBUG option
+               xdr.lib      - XDR Library
+               xdrd.lib     - XDR Library with DEBUG option
+               zlib.lib     - GNU Zip Library 
+               zlibd.lib    - GNU Zip Library with DEBUG option 
+  
+
+INSTRUCTIONS FOR OPTION II, FULL INSTALLATION WITH FORTRAN
+
+        
+	*** Builds the hdf library, hdf utility programs, test programs,
+	*** and batch files. Includes fortran source code to be
+        *** compiled with Digital Visual Fortran on either a Win32 Intel
+        *** machine or a Win32 Alpha machine.
+
+	1. Unpack HDF41r2\Win32full.zip in directory HDF41r2\. 
+         
+        2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
+           "Open Workspace" option. 
+           Then open  c:\myHDFstuff\HDF41r2\dev.dsw workspace. 
+
+        3. Select "Build", then Select "Set Active Configuration".
+           Select as the active configuration "dev -- Win32Debug" 
+           if you have a Win32 Intel processor OR 
+           select "dev-Win32AlphaDbg" if you have a Win32 Alpha processor. 
+           Select "Build" and "Build dev.exe" to
+           build the Debug version of the HDF41r2 tree.
+           You will see that Digital Visual Fortran compiler is invoked
+           by Visual C++ Development environment in compiling the fortran code.
+
+        4. Select "Build", then Select "Set Active Configuration".
+           Select as the active configuration"dev -- Win32Release"
+           if you have a Win32 Intel processor OR
+           select "dev-Win32AlphaRel" if you have a Win32 Alpha processor.
+           Select "Build" and "Build dev.exe" to
+           build the Release version of the HDF41r2 tree.
+		
+        5. In command prompt window run the test batch file which
+       resides in the HDF41r2 directory.
+       Run win32tst.bat if you have a Win32 Intel platform OR 
+       run win32ALPHAtst.bat if you have the Win32 Alpha platform.
+
+	6. If all tests passed, run the installation batch file which
+       resides in the HDF41r2 directory
+       Run win32ins.bat if you have a Win32 Intel platform OR
+       run win32ALPHAins.bat if you have a Win32 Alpha platform.
+       Commands in these files will create
+       subdirectories bin\, include\ and lib\ in HDF41r2\. The bin dirctory
+       will contain the HDF utilities, include directory will contain 
+       header files, and the lib directory will contain:
+               jpeg.lib     - JPEG Library
+               jpegd.lib    - JPEG Library with DEBUG option
+               libsrc.lib   - multi-file SDS Inteface routines
+               libsrcd.lib  - multi-file SDS Inteface routines with DEBUG option               src.lib      - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines
+               srcd.lib     - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+               xdrd.lib     - XDR Library with DEBUG option
+               zlib.lib     - GNU Zip Library 
+               zlibd.lib    - GNU Zip Library with DEBUG option
+ 
+
+
+STEP IV:
+
+BUILDING AN APPLICATION USING THE HDF LIBRARY - SOME HELPFUL POINTERS
+=====================================================================
+
+If you are building an application that uses the HDF library 
+the following locations will need to be specified for locating
+header files and linking in the HDF libraries:
+ 
+            <top-level HDF directory>\lib
+            <top-level HDF directory>\include
+
+where <top-level HDF directory> may be C:\myHDFstuff\dev or C:\MyHDFstuff\HDF41r2\
+
+Please refer to the <top-level HDF directory>\release_notes\compile.txt file
+for more information on compiling an application with the HDF libraries.
+
+
+MORE HELPFUL POINTERS
+=====================
+(as described in terms of installing the  nofortran configuration)
+
+Here are some notes that may be of help if you are not familiar
+with using the Visual C++ Development Environment.
+
+Project name and location issues: 
+         The files in Win32nof.zip must end up in the HDF41r2\ directory
+         installed by HDF41r2s.zip
+
+         If you must install dev.dsw and dev.dsp in 
+         another directory, relative to HDF41r2\ , you will be asked to
+	 locate the above 5 sub-project files, when you open the
+	 project dev.dsw.
+	 
+	 If you want to rename dev (the entire project),
+	 you will need to modify two files
+	 dev.dsw and dev.dsp as text
+	 (contrary to the explicit warnings in the files).
+
+	 You can also modify dev.dsw and dev.dsp
+	 as text, to allow these 2 files to be installed
+	 in another directory.
+
+
+
+  Settings... details:
+  If you create your own project, the necessary settings can be
+  read from the dev.dsp file(as text), or from the
+  Project Settings in the Developer Studio project settings 
+dialog.
+
+    Project
+	  Settings
+	      C/C++
+		  Category
+		     PreProcessor
+			 Code Generation
+			    Use run-time Library
+				   These are all set to use Single-Threaded.
+				   or Single-Threaded debug.
+
+
+
+
+============================================================================
+================================macintosh.txt===============================
+
+Fortner Software LLC ("Fortner") created the reference implementation for
+Macintosh of the HDF 4.1r3 library, providing C-language bindings to all
+4.1r3 features.
+
+The Macintosh reference implementation of the HDF 4.1r3 library was implemented
+and tested on a PowerMac Model 7600/120 running MacOS 8.5.1 using Metrowerks
+CodeWarrior Pro1.  The library has also been run on a PowerMac G3.  
+
+Fortner cannot be certain that the libraries will run on other versions of
+Macintoshes (or clones) or MacOS versions, or when built using other
+development tools.  (In particular, this Macintosh implementation has not
+addressed use with non-PowerPC versions of Macintosh [i.e., 680x0-based
+Macintoshes]).  Migrating the Macintosh reference implementation to other
+development and/or run-time environments is the responsibility of the
+library user.
+
+First-time HDF users are encouraged to read the FAQ in this release for
+more information about HDF.  Users can also look at the home page for HDF
+at:
+
+    http://hdf.ncsa.uiuc.edu/
+
+Please send questions, comments, and recommendations regarding the
+Macintosh version of the HDF library to:
+
+    hdfhelp at ncsa.uiuc.edu
+ 
+
+============================================================================
+================================mf_anno.txt=================================
+
+ Annotation access through the Multi-file Annotation Interface(ANxxx)
+ ==================================================================== 
+
+ These routines are for accessing file labels, file descriptions, data
+labels and data descriptions(i.e. all are annotations). General access
+requires the routines Hopen() and ANstart() to be called first and the 
+last call to be ANend() and Hclose() which ends annotation handling on the file
+and closes the file. Basic annotation manipulation involes dealing
+with  handles(ann_id's) foreach annotation and annotation interface 
+handle(an_id). 
+
+
+NOTES: 
+  Note that the annotation types are enumerated. 
+  TYPE here refers to file/data label/description types 
+  They are AN_FILE_LABEL, AN_FILE_DESC, AN_DATA_LABEL, AN_DATA_DESC
+  The tag/ref refers to data tag/ref.
+
+  AN_DATA_LABEL = 0, /* Data label */
+  AN_DATA_DESC  = 1, /* Data description */
+  AN_FILE_LABEL = 2, /* File label */
+  AN_FILE_DESC  = 3  /* File description */ 
+
+In C-code you need to declare the annotation type using the 
+enumerated type defintion.
+
+e.g. C-code fragment to write a File label
+
+#include "hdf.h"
+...
+..
+char fname[10] = {"ann.hdf"};
+char *file_lab[1] = {"File label #1: This is a file label"};
+
+int32   file_id; /* file id */
+int32   an_id;   /* annotation interface id */
+int32   ann_id;  /* annotation id */
+ann_type myanntype;  /* annotation type */
+
+/* Start Annotation inteface and create file */
+file_id = Hopen(fname, DFACC_CREATE,0);
+an_id = ANstart(file_id);
+
+/* Set annotation type to file label */
+myanntype = AN_FILE_LABEL;
+
+/* Create id for file label */
+ann_id = ANcreatef(an_id, myanntype);
+
+/* Write file label */
+ANwriteann(ann_id, file_lab[0], HDstrlen(file_lab[0]));
+
+/* end access to file label */
+ANendaccess(ann_id);
+
+/* end access to file and close it*/
+ANend(an_id);
+Hclose(file_id);
+....
+...
+
+NOTE: You could also call ANcreatef() like this 
+        ANcreatef(an_handle, AN_FILE_LABEL);
+      without using the intermediate variable.
+
+ ROUTINES NEEDED:
+================
+ Hopen    - Opening the file, returns a file handle
+ Hclose   - Close the file.
+ 
+ NEW ROUTINES:
+===============
+ ANstart     - open file for annotation handling, returns annotation
+               interface id
+ ANfileinfo  - get number of file/data annotations in file. Indices returned
+               are used in ANselect() calls.
+ ANend       - end access to annotation handling on file
+ ANcreate    - create a new data annotation and return an id(ann_id)
+ ANcreatef   - create a new file annotation and return an id(ann_id)
+ ANselect    - returns an annotation id(ann_id) from index for 
+               a particular annotation TYPE. This id is then used for
+               calls like ANwriteann(), ANreadann(), ANannlen(),..etc
+ ANnumann:   - return number of annotations that match TYPE/tag/ref
+ ANannlist:  - return list of id's(ann_id's) that match TYPE/tag/ref
+ ANannlen:   - get length of annotation given id(ann_id)
+ ANreadann:  - read annotation given id(ann_id)
+ ANwriteann: - write annotation given id(ann_id)
+ ANendaccess - end access to annotation using id(ann_id)
+
+
+Routines:
+----------
+
+C:
+/* ------------------------------- ANstart -------------------------------- 
+ NAME
+	ANstart -- open file for annotation handling
+ USAGE
+	int32 ANstart(file_id)
+        int32  file_id;    IN: file id
+
+ RETURNS
+        An annotation interface ID or FAIL
+ DESCRIPTION
+        Start annotation handling on the file and return an interface id.
+
+ 
+Fortran: afstart(file_id)
+
+/*------------------------------- ANfileinfo ----------------------------
+ NAME
+    ANfileinfo
+ PURPOSE
+    Report high-level information about the ANxxx interface for a given file.
+ USAGE
+    intn ANfileinfo(an_id, n_file_label, n_file_desc, n_data_label, n_data_desc)
+        int32 an_id;          IN:  annotation interface ID
+        int32 *n_file_label;  OUT: the # of file labels
+        int32 *n_file_desc;   OUT: the # of file descriptions
+        int32 *n_data_label;  OUT: the # of data labels
+        int32 *n_data_desc;   OUT: the # of data descriptions
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    Reports general information about the number of file and data
+    annotations in the file. This routine is generally used to find
+    the range of acceptable indices for ANselect calls.
+
+Fortran: affileinfo(an_id, num_flabel, num_fdesc, num_dlabel, num_ddesc)
+
+/* -------------------------------- ANend ---------------------------------
+ NAME
+	ANend -- close annotation handling on a file
+ USAGE
+	int32 ANend(an_id)
+        int32 an_id;         IN: annotation interface ID for the file
+ RETURNS
+        SUCCEED / FAIL
+ DESCRIPTION
+      Closes annotation handling on the gvien annotation interface id.
+
+
+Fortran: afend(an_id)
+
+/* ------------------------------ ANcreate ---------------------------- 
+ NAME
+	ANcreate - create a new data annotation and return an id
+ USAGE
+	int32 ANcreate(an_id, tag, ref, type )
+        int32 an_id;    IN: annotation interface ID
+        uint16 tag;     IN: tag of item to be assigned annotation
+        uint16 ref;     IN: reference number of itme to be assigned ann
+        ann_type  type: IN: AN_DATA_LABEL for data labels, 
+                            AN_DATA_DESC for data descriptions,
+ RETURNS
+        An ID to an annotation which can either be a label or description
+ DESCRIPTION
+        Creates a data annotation, returns an 'ann_id' to work with the new 
+        annotation which can either be a label or description.
+
+
+Fortran: afcreate(an_id, tag, ref, type)
+
+/* ------------------------------ ANcreatef ---------------------------- 
+ NAME
+	ANcreatef - create a new file annotation and return an id
+ USAGE
+	int32 ANcreatef(an_id, type )
+        int32 an_id;    IN: annotation interface ID
+        ann_type  type: IN:  AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+ RETURNS
+        An ID to an annotation which can either be a file label or description
+ DESCRIPTION
+        Creates a file annotation, returns an 'ann_id' to work with the new 
+        file annotation which can either be a label or description.
+
+Fortran: afcreatef(an_id, type)
+
+
+/* ------------------------------- ANselect ------------------------------- 
+ NAME
+	ANselect -- get an annotation ID from index of 'type'
+ USAGE
+	int32 ANselect(an_id, index, type)
+        int32 an_id;    IN: annotation interface ID
+        int32 index;    IN: index of annottion to get ID for
+        ann_type  type: IN: AN_DATA_LABEL for data labels, 
+                            AN_DATA_DESC for data descriptions,
+                            AN_FILE_LABEL for file labels,
+                            AN_FILE_DESC for file descritpions.
+ RETURNS
+        An ID to an annotation type which can either be a label or description 
+ DESCRIPTION
+        The position index is ZERO based
+
+Fortran: afselect(an_id, index, type)
+
+
+/*------------------------------- ANnumann ---------------------------------
+ NAME
+   ANnumann -- find number of annotation of 'type' that 
+                 match the given element tag/ref 
+ USAGE
+       intn  ANnumann(an_id, type, elem_tag, elem_ref)
+       int32  an_id;     IN: annotation interface ID
+       int    type:      IN: AN_DATA_LABEL for data labels, 
+                             AN_DATA_DESC for data descriptions,
+                             AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+       uint16 elem_tag,: IN: tag of item of which this is annotation
+       uint16 elem_ref;  IN: ref of item of which this is annotation
+ RETURNS
+       number of annotation found if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Find number of annotation of 'type' for the given element 
+       tag/ref pair. Here an element is either a file label/desc or
+       data label/desc.
+
+
+Fortran: afnumann(an_id, type, tag, ref)
+
+
+/*--------------------------------------------------------------------------
+ NAME
+   ANannlist -- generate list of annotation ids of 'type' that 
+                 match the given element tag/ref 
+ USAGE
+       intn  ANannlist(an_id, type, elm_tag, elem_ref, ann_list[])
+       int32  an_id;     IN: annotation interface ID
+       ann_type  type:   IN: AN_DATA_LABEL for data labels, 
+                             AN_DATA_DESC for data descriptions,
+                             AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+       uint16 elem_tag,: IN: tag of element of which this is annotation
+       uint16 elem_ref;  IN: ref of element of which this is annotation
+       int32  ann_list[]; OUT: array of ann_id's that match criteria.
+ RETURNS
+       number of annotations ids found if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Find and generate list of annotation ids of 'type' for the given 
+       element tag/ref pair
+
+
+Fortran: afannlist(an_id,type, tag, ref, alist[])
+
+
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANannlen -- get length of annotation givne annotation id
+ USAGE
+       int32 ANannlen(ann_id)
+       int32 ann_id;   IN: annotation id
+ RETURNS
+       length of annotation if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Get the length of the annotation specified.
+
+
+Fortran: afannlen(ann_id)
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANwriteann -- write annotation given ann_id
+ USAGE
+       intn ANwriteann(ann_id, ann, ann_len)
+       char *ann_id;   IN: annotation id
+       char *ann;      IN: annotation to write
+       int32 ann_len;  IN: length of annotation
+
+ RETURNS
+       SUCCEED (0) if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Checks for pre-existence of given annotation, replacing old one if it
+       exists. Writes out annotation.
+
+Fortran: afwriteann(ann_id, ann, annlen)
+
+
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANreadann -- read annotation given ann_id
+ USAGE
+       intn ANreadann(ann_id, ann, maxlen)
+       int32 ann_id;   IN: annotation id (handle)
+       char *ann;     OUT: space to return annotation in
+       int32 maxlen;   IN: size of space to return annotation in
+ RETURNS
+       SUCCEED (0) if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Gets tag and ref of annotation.  Finds DD for that annotation.
+       Reads the annotation, taking care of NULL terminator, if necessary.
+       
+
+Fortran: afreadann(ann_id, ann, maxlen)
+
+
+
+/* ----------------------------------------------------------------------- 
+ NAME
+	ANendaccess -- end access to an annotation given it's id
+ USAGE
+	intn ANendaccess(ann_id)
+        int32 an_id;    IN: annotation id
+ RETURNS
+        SUCCEED or FAIL
+ DESCRIPTION
+        Terminates access to an annotation. 
+
+
+Fortran: afendaccess(ann_id)
+
+
+ 
+
+
+
+============================================================================
+================================mf_ris.txt==================================
+
+                  The multi-file RIS interface
+                  =============================
+
+Contents:
+
+ Introduction
+ How to access files and images in the new interface
+ "Name = value" attributes in the new interface
+ Dealing with annotations in the new interface
+ Work not yet completed, bugs, limitations
+ A listing or routines
+ Descriptions of GR routines
+   File level interface
+   Dataset Manipulation
+   ID/Ref/Index Functions
+   Interlace Request Functions
+   LUT/Palette I/O Functions
+   Special Element Functions
+   Attribute Functions
+
+
+Introduction
+============
+The new Generic Raster (GR) interface provides a set of functions for
+manipulating raster images of all kinds.  This new interface is meant to
+replace the older RIS8 and RIS24 interfaces, although these older
+interfaces will continue to be supported.
+
+Generic raster images are composed of "pixels" which can have multiple
+components, including but not limited to 8-bit unsigned integers.  Each image
+can have multiple palettes associated with it and other 'attributes' in the
+same "name=value" style as the SD*() routines have.
+
+
+The new GR interface was motivated by a number of needs:
+
+o  The need for multi-file, multi-object access to raster images, allowing
+users to keep open more than one file at a time, and to "attach" more than
+one raster image at a time.
+
+o  A need to further integrate the netCDF data-model with the HDF data-models.
+
+o  A need for a more general framework for attributes within the RIS
+data-model (allowing 'name = value' style metadata).
+
+o  A need to be able to access subsamples and subsets of images.
+
+
+IMPORTANT:  The added functionality represented by this new interface has
+necessitated a change in how raster images are physically represented on
+disk.   As a result programs using the old single-file RIS interfaces will
+only be able to read the data out of files produced by the new interface.
+The metadata / attributes will not be accessible.
+
+The following chart represents what can be done with the various interfaces
+available in HDF 4.0b1:
+
+              old RIS-API    new GR-API
+
+old RIS         CRW             CRW
+HDF files
+
+new RIS          r              CRW
+HDF files
+
+'R' means read, 'W' means write and 'C' means create.  Entries with dashes
+'-' represent functionality which has not yet been implemented.  'r' stands
+for the ability to only read the data, not the metadata.
+
+
+Work not yet completed, bugs, limitations
+===========================================
+
+Misc. stuff left to do:
+    Deal with special elements for images.
+    GRrename for images.
+    GRsetflags to suppress writing fill data and to suppress fillvalue attr.
+
+Features not supported:
+    Full support for multiple palettes with each RI.
+    Support for named palettes with each RI.
+    Support for palettes with non-standard formats.
+    Deletion of attributes or images (would require changing the way index
+        numbers are handled)
+
+Other limitations:
+   Currently the following design limitations are still in place:
+   1 - Cannot have pixels or palette entries which contain mixed variable
+        types, i.e. all the pixel/palette components must be of the same
+        number type.
+   2 - Currently all the components must be of valid HDF number types,
+        fractional bytes (i.e. 6-bit components) or 'plain' multiple byte values
+        are not handled, although they can be packed into the next larger
+        sized number type in order to hold them.
+
+
+
+How to access files and images in the new interface
+======================================================
+
+
+Here are the steps involved in accessing images in the new interface:
+
+1. Open or create the file using Hopen.  This provides you with a file ID to
+be used in step 2.
+
+2. Activate the GR interface for the file with the file ID obtained from
+step 1, using GRstart.  This provides you with a GR interface ID (GR ID).
+
+3. Optionally obtain information about the raster images in the file and
+global GR attributes using GRfileinfo.  Use the GR ID from step 2 to refer
+to the image file.
+
+4. Optionally find the index of a raster image, by name using
+GRnametoindex, or by reference number using GRreftoindex.
+
+5. Select for access an image with a given index, using GRselect for each
+image.  Each call to GRselect returns a raster image ID (RI ID) for
+subsequent accesses involving the corresponding image.
+
+5. Access the image by its RI ID, using routines such as GRgetiminfo (to
+get information about the image) and GRreadimage (to read all or part of an
+image).
+
+6. Terminate access to a given image using GRendaccess.
+
+7. Terminate access to the GR interface for the file, using GRend.
+
+8. Close the file using Hclose.
+
+Notice that in the GR interface, images are identified in several ways.
+Before an image is accessible ("attached"), it is identified by index,
+name, and reference number. The index describes the relative position of
+the image in the file. The name is a character string associated with the
+image, and the reference number is a unique integer.  An image's name is
+assigned by the program when it is created, and the reference number is
+assigned by the HDF library when it is created. After an image is attached
+, it is identified by an raster image identifier, or RI ID.
+
+The following code fragment illustrates the steps involved in accessing the
+image in a file and printing information about them.
+
+
+    /* Open the file and initialize the GR interface */
+    hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
+    grid=GRstart(hdf_file_id);
+
+    /* Obtain information about the images in the file */
+    GRfileinfo(grid,&n_datasets,&n_attrs);
+
+    /* Attach to each image and print information about it */
+    for(i=0; i<n_datasets; i++)
+      {
+          riid=GRselect(grid,i);
+          GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
+
+          printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld,
+                    dim[0]=%ld, dim[1]=%ld, n_attrs=%ld\n",
+                    i, riid, ncomp, nt, il, dimsizes[0],
+                    dimsizes[1], n_attrs);
+
+          /* Detach from the image */
+          GRendaccess(riid);
+      } /* end for */
+
+    /* Shut down the GR interface and close the file */
+    GRend(grid);
+    Hclose(hdf_file_id);
+
+
+
+"Name = value" attributes in the new interface
+===============================================
+
+Attributes of the form "name = value" were introduced in HDF 3.3, but at
+that time they were available only for SDSs and files.  In HDF 4.0 we have
+added the ability to attach local and global attributes to raster images
+and raster image dimensions.
+
+An attribute's "name" is a string, and "value" is the associated value or
+values.  If an attribute contains more than one value, all values must be
+of the same type.  For example the attribute 'valid_range' attribute might
+be assigned values the maximum and minimum valid values for a given image.
+
+Raster attributes can be "local" or "global."  A local raster image
+attribute is one that applies to one raster image only. Global raster image
+attributes apply to all of the images in a file.
+
+Attributes for raster images are created by the routine GRsetattr.
+Existing attributes are selected by giving an object pointer and an
+attribute index.  The functions GRattrinfo, GRfindattr, and GRgetattr may
+be used in combination to read attributes and their values.  GRattrinfo
+gets the name , number type, and number of values for an attribute with a
+given index.  GRfindattr gets the index of an attribute with a given name,
+and GRreadattr reads the values associate with an attribute with a given
+index.
+
+The following example illustrates how to attach GR image attributes, and
+also GR global (file) attributes.
+
+    /* Open file and initialize the GR interface */
+    hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
+    grid=GRstart(hdf_file_id);
+
+    /* Create a global attribute  -- applies to all rasters in the file */
+    HDstrcpy(attr_name,"Test1");
+    HDstrcpy(u8_attr,"Attribute value 1");
+    GRsetattr(grid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
+
+    GRfileinfo(grid,&n_datasets,&n_attrs);
+
+    /* select every image in the file, and
+       assign a local attribute to each */
+    for(i=0; i<n_datasets; i++)
+      {
+          /* Attach to image with index==i */
+          riid=GRselect(grid,i);
+
+          /* Create an attribute for the image */
+          HDstrcpy(attr_name,"Image1");
+          HDstrcpy(u8_attr,"Attribute value 1");
+          GRsetattr(riid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
+
+          GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
+
+          printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld, dim[0]=%ld,
+                  dim[1]=%ld, n_attrs=%ld\n",i,riid,ncomp,nt,il,
+                  dimsizes[0], dimsizes[1],n_attrs);
+
+                for(j=0; j<n_attrs; j++)
+                  {
+                    GRattrinfo(riid,j,attr_name,&nt,&ncomp);
+
+                    GRgetattr(riid,j,u8_attr);
+                    printf("Image #%d Attribute #%d: Name=%s, Value=%s\n",
+                             i,j,attr_name,u8_attr);
+                  } /* end for */
+
+          /* Detach from the image */
+          GRendaccess(riid);
+      } /* end for */
+
+    /* Shut down the GR interface */
+    GRend(grid);
+
+    /* Close the file */
+    Hclose(hdf_file_id);
+
+
+
+Dealing with annotations in the new interface
+================================================
+
+The new GR interface allows you to reference rasters explicitly, by "GR
+id".  A GR id is different from its reference number.  Since annotation
+routines attach annotations to objects by reference number, there needs to
+be a mechanism for determining the reference number of a raster image,
+given its id. This is made possible by the addition of the routine
+GRidtoref.
+
+A similar problem occurs when going the other way.  For example, a call to
+DFANlabellist returns the reference numbers of objects that are
+annotated.  If those objects are RISs (i.e. they have the tag DFTAG_RIG),
+we need to map the reference numbers to the corresponding images.  For
+this, a two-step process is required.  You can use the function
+GRreftoindex to get the index, or position, of the dataset that has a
+certain reference number, then you use the routine GRselect to get the id
+for the image in that position.
+
+
+A listing or routines
+======================
+
+File/Interface Functions:
+int32 GRstart(int32 hdf_file_id)
+    - Initializes the GR interface for a particular file. Returns a 'grid' to
+        specify the GR group to operate on.
+intn GRfileinfo(int32 grid, int32 *n_datasets, int32 *n_attrs)
+    - Returns information about the datasets and "global" attributes for the
+        GR interface.
+intn GRend(int32 grid)
+    - Terminates multi-file GR access for a file.
+
+Image I/O Functions:
+int32 GRcreate(int32 grid,char *name,int32 ncomp,int32 nt,int32 il,int32
+dimsizes[2])
+    - Defines a raster image in a file.  Returns a 'riid' to work with the new
+        raster image.
+int32 GRselect(int32 grid,int32 index)
+    - Selects an existing RI to operate on.
+int32 GRnametoindex(int32 grid,char *name)
+    - Maps a RI name to an index which is returned.
+intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32
+*il,int32 dimsizes[2],int32 *n_attr)
+    - Gets information about an RI which has been selected/created.
+intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],int32
+count[2],VOIDP data)
+    - Writes image data to an RI.  Partial dataset writing and subsampling is
+        allowed, but only with the dimensions of the dataset (ie. no UNLIMITED
+        dimension support)
+intn GRreadimage(int32 riid,int32 start[2],int32 stride[2],int32
+count[2],VOIDP data)
+    - Read image data from an RI.  Partial reads and subsampling are allowed.
+intn GRendaccess(int32 riid)
+    - End access to an RI.
+
+Dimension Functions:
+int32 GRgetdimid(int32 riid,int32 index)
+    - Get a dimension id ('dimid') for an RI to assign atrributes to. [Later]
+intn GRsetdimname(int32 dimid,char *name)
+    - Set the name of a dimension. [Later]
+int32 GRdiminfo(int32 dimid,char *name,int32 *size,int32 *n_attr)
+    - Get information about the dimensions attributes and size. [Later]
+
+ID/Ref/Index Functions:
+uint16 GRidtoref(int32 riid)
+    - Maps an riid to a reference # for annotating or including in a Vgroup.
+int32 GRreftoindex(int32 hdf_file_id,uint16 ref)
+    - Maps the reference # of an RI into an index which can be used with
+        GRselect.
+
+Interlace Request Functions:
+intn GRreqlutil(int32 riid,intn il)
+    - Request that the next LUT read from an RI have a particular interlace.
+intn GRreqimageil(int32 riid,intn il)
+    - Request that the image read from an RI have a particular interlace.
+
+LUT/Palette I/O Functions:
+int32 GRgetlutid(int32 riid,int32 index)
+    - Get a palette id ('palid') for an RI.
+intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
+    - Gets information about a palette.
+intn GRwritelut(int32 riid,int32 ncomps,int32 nt,int32 il,int32
+nentries,VOIDP data)
+    - Writes out a palette for an RI.
+intn GRreadlut(int32 palid,VOIDP data)
+    - Reads a palette from an RI.
+
+Special Element Functions:
+int32 GRsetexternalfile(int32 riid,char *filename,int32 offset)
+    - Makes the image data of an RI into an external element special element.
+intn GRsetaccesstype(int32 riid,uintn accesstype)
+    - Sets the access for an RI to be either serial or parallel I/O.
+intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+    - Makes the image data of an RI into a compressed special element.
+
+Attribute Functions:
+intn GRsetattr(int32 dimid|riid|grid,char *name,int32 attr_nt,int32
+count,VOIDP data)
+    - Write an attribute for an object.
+int32 GRattrinfo(int32 dimid|riid|grid,int32 index,char *name,int32
+*attr_nt,int32 *count)
+    - Get attribute information for an object.
+intn GRgetattr(int32 dimid|riid|grid,int32 index,VOIDP data)
+    - Read an attribute for an object.
+int32 GRfindattr(int32 dimid|riid|grid,char *name)
+    - Get the index of an attribute with a given name for an object.
+
+
+
+Routine Descriptions
+====================
+
+Most of the routines in the GR interface return a status value of type intn
+(native integers).  If the status is equal to SUCCEED the routine completed
+successfully.  If it is equal to FAIL an error occurred, information about
+the error may be available by calling HEprint(filestream, 0).  SUCCEED and
+FAIL are defined in hdf.h for C users and in constant.i for Fortran
+programs.
+
+All IDs (hdf_file_id, grid, riid) are int32 quantities.
+
+Prototypes for these functions can be found in the file hproto.h
+
+Routines that can be called from C are all of the form GRxxx
+
+More details about all the routines below can be found in the HDF reference
+manual.
+
+
+File level interface:
+=====================
+
+These routines initialize and de-initialize the GR interface, and provide
+information about the raster images in a file.
+
+GRstart
+-------
+    Initialize the GR*() interface for a given HDF file.
+ USAGE
+    int32 GRstart(hdf_file_id)
+        int32 hdf_file_id;          IN: file ID from Hopen
+ RETURNS
+    Return grid (GR ID) on success, or FAIL
+ DESCRIPTION
+    Initializes the GR*() interface to operate on the HDF file which was
+    specified by hdf_file_id.  This routine must be called before any further
+    GR*() routines are called for a file.
+
+GRfileinfo
+----------
+    Report high-level information about the GR*() interface for a given file.
+ USAGE
+    intn GRfileinfo(grid, n_datasets, n_attrs)
+        int32 grid;                 IN: GR ID to get information about
+        int32 *n_datasets;          OUT: the # of GR datasets in a file
+        int32 *n_attrs;             OUT: the # of "global" GR attributes
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    Reports general information about the number of datasets and "global"
+    attributes for the GR interface.  This routine is generally used to find
+    the range of acceptable indices for GRselect calls.
+
+
+GRend
+-----
+    Terminate the GR*() interface for a given HDF file.
+ USAGE
+    intn GRend(grid)
+        int32 grid;          IN: GR ID from GRstart
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Terminates access to the GR*() interface for a file.
+
+
+DataSet Manipulation
+=====================
+
+GRcreate
+--------
+    Create a new raster image.
+
+ USAGE
+    int32 GRcreate(grid, name, ncomp, nt, il, dimsizes)
+        int32 grid;         IN: GR ID from GRstart
+        char *name;         IN: Name of raster image to create
+        int32 ncomp;        IN: Number of components in image
+        int32 nt;           IN: Number type of each component
+        int32 il;           IN: Interlace of the components in the image
+        int32 dimsizes[2];  IN: Dimensions of the new image
+
+ RETURNS
+    A valid riid (Raster-Image ID) on success, or FAIL.
+
+ DESCRIPTION
+    Creates a new raster image in a file.
+
+ASSUMPTIONS
+    All components must be the same number-type.
+
+
+GRselect
+--------
+    Select a raster image to operate on.
+ USAGE
+    int32 GRselect(grid,index)
+        int32 grid;          IN: GR ID from GRstart
+        int32 index;         IN: Which raster image to select (indexed from 0)
+ RETURNS
+    A valid riid (Raster-Image ID) on success, or FAIL.
+
+ DESCRIPTION
+    Selects a raster image from the file to work on.  This ID is needed for
+    all operations on the image dataset, including reading/writing data,
+    annotations, etc.
+
+
+
+GRnametoindex
+-------------
+    Map a raster image name to an index.
+ USAGE
+    int32 GRnametoindex(grid,name)
+        int32 grid;          IN: GR ID from GRstart
+        char *name;          IN: Name of raster image to search for
+ RETURNS
+    A valid index on success, or FAIL.
+
+ DESCRIPTION
+    Searches for a raster image based on the name provided.  This routine
+    maps from names of raster images to indices inside the GR group.
+
+GRgetiminfo
+-----------
+    Gets information about a raster image.
+
+ USAGE
+    intn GRgetiminfo(riid,name,ncomp,nt,il,dimsizes,n_attr)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        char *name;         OUT: name of raster image
+        int32 *ncomp;       OUT: number of components in image
+        int32 *nt;          OUT: number type of components
+        int32 *il;          OUT: interlace of the image
+        int32 *dimsizes;    OUT: size of each dimension
+        int32 *n_attr;      OUT: the number of attributes for the image
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Looks up information about an image which has been selected or created
+    with the GR routines.  Each of the parameters can be NULL, in which case
+    that piece of information will not be retrieved.
+
+GRwriteimage
+------------
+    Writes raster data to an image
+
+ USAGE
+    intn GRwriteimage(riid,start,stride,edge,data)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 start[2];     IN: array containing the offset in the image of the
+                                image data to write out
+        int32 stride[2];    IN: array containing interval of data being written
+                                along each edge.  strides of 0 are illegal
+                                (and generate an error)
+                                ie. stride of 1 in each dimension means
+                                writing contiguous data, stride of 2 means
+                                writing every other element out along an edge.
+        int32 count[2];     IN: number of elements to write out along each edge.
+        VOIDP data;         IN: pointer to the data to write out.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Writes image data to an RI.  Partial dataset writing and subsampling is
+        allowed, but only within the dimensions of the dataset (ie. no UNLIMITED
+        dimension support)
+
+ ASSUMPTIONS
+    If the stride parameter is set to NULL, a stride of 1 will be assumed.
+
+
+GRreadimage
+-----------
+    Read raster data for an image
+
+ USAGE
+    intn GRreadimage(riid,start,stride,edge,data)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 start[2];     IN: array containing the offset in the image of the
+                                image data to read in
+        int32 stride[2];    IN: array containing interval of data being read
+                                along each edge.  strides of 0 are illegal
+                                (and generate an error)
+                                ie. stride of 1 in each dimension means
+                                reading contiguous data, stride of 2 means
+                                reading every other element out along an edge.
+        int32 count[2];     IN: number of elements to read in along each edge.
+        VOIDP data;         IN: pointer to the data to read in.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Read image data from an RI.  Partial dataset reading and subsampling is
+        allowed.
+
+ASSUMPTIONS
+    If the stride parameter is set to NULL, a stride of 1 will be assumed.
+
+
+
+GRendaccess
+-----------
+    End access to an RI.
+
+ USAGE
+    intn GRendaccess(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    End access to an RI.  Further attempts to access the RI ID will result in
+    an error.
+
+
+Dimension Functions
+===================
+(these have not been completed)
+
+
+ID/Ref/Index Functions
+======================
+
+GRidtoref
+---------
+    Maps an RI ID to a reference # for annotating or including in a Vgroup.
+
+ USAGE
+    uint16 GRidtoref(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    A valid reference # on success or FAIL
+
+ DESCRIPTION
+    Maps an riid to a reference # for annotating or including in a Vgroup.
+
+
+GRreftoindex
+------------
+    Maps the reference # of an RI into an index which can be used with GRselect.
+
+ USAGE
+    int32 GRreftoindex(grid,ref)
+        int32 grid;         IN: GR ID from GRstart
+        uint16 ref;         IN: reference number of raster image to map to index
+
+ RETURNS
+    A valid index # on success or FAIL
+
+ DESCRIPTION
+    Maps the reference # of an RI into an index which can be used with GRselect.
+
+
+Interlace Request Functions
+===========================
+
+
+GRreqlutil
+----------
+    Request that the next LUT read from an RI have a particular interlace.
+
+ USAGE
+    intn GRreqlutil(riid,il)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        intn il;            IN: interlace for next LUT.  From the following
+                                values (found in mfgr.h):
+                      MFGR_INTERLACE_PIXEL      - pixel interlacing
+                      MFGR_INTERLACE_LINE       - line interlacing
+                      MFGR_INTERLACE_COMPONENT  - component/plane interlacing
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Request that the next LUT read from an RI have a particular interlace.
+
+
+
+GRreqimageil
+------------
+    Request that the image read from an RI have a particular interlace.
+
+ USAGE
+    intn GRreqimageil(riid,il)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        intn il;            IN: interlace for next RI.  From the following
+                                values (found in mfgr.h):
+                      MFGR_INTERLACE_PIXEL      - pixel interlacing
+                      MFGR_INTERLACE_LINE       - line interlacing
+                      MFGR_INTERLACE_COMPONENT  - component/plane interlacing
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Request that the image read from an RI have a particular interlace.
+
+
+
+
+LUT/Palette I/O Functions
+=========================
+
+GRgetlutid
+----------
+    Get a LUT id ('lutid') for an RI.
+
+ USAGE
+    int32 GRgetlutid(riid,index)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 lut_index;    IN: Which LUT image to select (indexed from 0)
+
+ RETURNS
+    Valid LUT ID on success, FAIL on failure
+
+ DESCRIPTION
+    Get a LUT id ('lutid') for accessing LUTs in an RI.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    Currently only supports one LUT per image, at index 0 and LUTID==RIID.
+
+
+
+
+intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
+    - Gets information about a palette.
+
+
+
+GRwritelut
+----------
+    Writes out a LUT for an RI.
+
+ USAGE
+    intn GRwritelut(riid,name,ncomps,nt,il,nentries,data)
+        int32 lutid;        IN: LUT ID from GRgetlutid
+        char *name;         IN: name of LUT image
+        int32 ncomp;        IN: number of components in LUT
+        int32 nt;           IN: number type of components
+        int32 il;           IN: interlace of the LUT
+        int32 nentries;     IN: the number of entries for the LUT
+        VOIDP data;         IN: LUT data to write out
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Writes out a LUT for an RI.
+
+
+GRreadlut
+---------
+    Reads a LUT from an RI.
+
+ USAGE
+    intn GRreadlut(lutid,data)
+        int32 lutid;        IN: LUT ID from GRgetlutid
+        VOIDP data;         IN: buffer for LUT data read in
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Reads a LUT from an RI.
+
+
+
+
+Special Element Functions
+=========================
+
+
+GRsetexternalfile
+-----------------
+    Makes the image data of an RI into an external element special element.
+
+ USAGE
+    intn GRsetexternalfile(riid,filename,offset)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        char *filename;     IN: name of the external file
+        int32 offset;       IN: offset in the external file to store the image
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Makes the image data of an RI into an external element special element.
+        Cause the actual data for a dataset to be stored in an
+        external file.  This can only be done once for any given
+        dataset and it is the user's responsibility to make sure the
+        external datafile is transported when the "header" file is
+        moved.  The offset is the number of byte from the beginning of
+        the file where the data should be stored.  This routine can
+        only be called on HDF 3.3 files (i.e. calling on an XDR-based
+        netCDF file that was opened with the multi-file interface will
+        fail).
+
+
+
+
+
+GRsetaccesstype
+---------------
+    Sets the access for an RI to be either serial or parallel I/O.
+
+ USAGE
+    intn GRsetaccesstype(riid,accesstype)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        uintn accesstype;   IN: access type for image data, from the following
+                                values:
+                                    DFACC_SERIAL - for serial access
+                                    DFACC_PARALLEL - for parallel access
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Sets the access for an RI to be either serial or parallel I/O.
+
+
+
+
+GRsetcompress
+-------------
+    Compressed the image data of an RI.
+
+ USAGE
+    intn GRsetcompress(riid,comp_type,cinfo)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 comp_type;    IN: type of compression, from list in hcomp.h
+        comp_info *cinfo;   IN: compression specific information
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Compressed the image data of an RI.
+    (Makes the image data of an RI into a compressed special element)
+
+
+
+
+Attribute Functions
+===================
+
+GRsetattr
+---------
+    Write an attribute for an object.
+
+ USAGE
+    intn GRsetattr(dimid|riid|grid,name,attr_nt,count,data)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        char *name;             IN: name of attribute
+        int32 attr_nt;          IN: number-type of attribute
+        int32 count;            IN: number of entries of the attribute
+        VOIDP data;             IN: attribute data to write
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Write an attribute for an object (function will figure out ID type).
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    Currently does not allow changing NT of an existing attribute.
+
+
+
+
+GRattrinfo
+----------
+    Get attribute information for an object.
+
+ USAGE
+    intn GRattrinfo(dimid|riid|grid,index,name,attr_nt,count)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        int32 index;            IN: index of the attribute for info
+        char *name;             OUT: name of attribute
+        int32 attr_nt;          OUT: number-type of attribute
+        int32 count;            OUT: number of entries of the attribute
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Get attribute information for an object.
+
+
+
+
+GRgetattr
+---------
+    Read an attribute for an object.
+
+ USAGE
+    intn GRgetattr(dimid|riid|grid,index,data)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        int32 index;            IN: index of the attribute for info
+        VOIDP data;             OUT: data read for attribute
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Read an attribute for an object.
+
+
+
+
+GRfindattr
+----------
+    Get the index of an attribute with a given name for an object.
+
+ USAGE
+    int32 GRfindattr(int32 dimid|riid|grid,char *name)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        char *name;             IN: name of attribute to search for
+
+ RETURNS
+    Valid index for an attribute on success, FAIL on failure
+
+ DESCRIPTION
+    Get the index of an attribute with a given name for an object.
+
+
+
+
+
+
+
+
+============================================================================
+================================new_functions.txt===========================
+
+This file contains a list of the new functions added with HDF 4.1r2.
+The functions in parenthesis were already present in the HDF library,
+and are included for clarity.
+
+C                     FORTRAN                 Description
+--------------------------------------------------------------------------------
+
+(SDsetcompress)       sfscompress             compresses SDS
+
+(SDwritechunk)        sfwchnk                 writes the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDwritechunk)        sfwcchnk                writes the specified chunk of
+                                              CHARACTER data to the SDS
+
+(SDreadchunk)         sfrchnk                 reads the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDreadchunk)         sfrcchnk                reads the specified chunk of
+                                              CHARACTER data to the SDS
+ 
+(SDsetchunk)          sfschnk                 makes the SDS a chunked SDS
+ 
+(SDsetchunkcache)     sfscchnk                sets the maximum number of chunks
+                                              to cache
+ 
+(SDgetchunkinfo)      sfgichnk                gets info on SDS
+
+(SDsetblocksize)      sfsblsz                 sets block size 
+
+(SDisrecord)          sfisrcrd                checks if an SDS is unlimited
+
+
+
+(GRsetcompress)       mgscompress             compresses raster image
+
+GRsetchunk            mgschnk                 makes a raster image a chunked
+                                              raster image
+
+GRgetchunkinfo        mggichnk                gets info on a raster image
+
+GRsetchunkcache       mgscchnk                sets the maximum number of chunks
+                                              to cache
+
+
+(Hgetlibversion)      hglibver                gets version of the HDF Library
+
+(Hgetfileversion)     hgfilver                gets version of the HDF file
+
+
+Vdeletetagref        vfdtr                    deletes tag/ref pair ( HDF object)
+                                              from a vgroup
+
+(VSfindclass)        vsffcls                  finds class with a specified 
+                                              name in a vdata
+
+VSdelete             vsfdlte                  deletes a vdata
+
+Vdelete              vdelete                  deletes a vgroup
+
+
+
+============================================================================
+================================page_buf.txt================================
+
+****************************** Beta Version *********************************
+File Caching(Beta release)
+=================================
+    This version of the distribution has preliminary support for file caching.
+
+*NOTE*: This version is NOT officially supported on all platforms
+        and has not been extensively tested. As such it is provided as is.
+        It will be supported officially in a later release.
+
+    The file caching allows the file to be mapped to user memory on 
+    a per page basis i.e a memory pool of the file. With regards to the 
+    file system, page sizes can be allocated based on the file system page-size 
+    or if the user wants in some multiple of the file system page-size. This 
+    allows for fewer pages to be managed along with accommodating the users file
+    usage pattern.
+
+    The current version supports setting the page-size and number of pages
+    in the memory pool through user C-routines(Fortran will be added in the
+    next release). The default is 8192 bytes for page-size and 1 for number 
+    of pages in the pool.
+
+    Two user C-routines are provided: one to set the values for page-size and
+    number of pages to cache, and the other to inquire the current values being 
+    used for the pagesize and number of pages cached.
+
+    Routines:(The names may change in the future...)
+    -------------------------------------------------
+    Hmpset(int pagesize, int maxcache, int flags)
+    --------------------------------------------
+    o  Set the pagesize and maximum number of pages to cache on the next
+       open/create of a file. A pagesize that is a power of 2 is recommended.
+       'pagesize' must be greater than MIN_PAGESIZE(512) bytes and 
+       'maxcache' must be greater than or equal to 1. Valid values
+       for both arguments are required when using this call.
+
+       The values set here only affect the next open/creation of a file and
+       do not change a particular file's paging behaviour after it has been
+       opened or created. This maybe changed in a later release.
+
+       Use flags argument of 'MP_PAGEALL' if the whole file is to be cached
+       in memory otherwise pass in zero. In this case the value for 'maxcache'
+       is ignored. You must pass in a valid value for 'pagesize' when
+       using the flag 'MP_PAGEALL'. 
+ 
+    Hmpget(int *pagesize, int *maxcache, int flags)
+    ----------------------------------------------
+    o   This gets the last pagesize and maximum number of pages cached for
+        the last open/create of a file. The 'flags' variable is not used.
+    
+    In this version a new file memory pool is created for every file that is
+    created/opened and can not be shared. Future versions will allow sharing 
+    of the file memory pool with other threads/processes.
+
+    To enable the creation of a library using page caching the following 
+    section in the makefile fragment($(toplevel)/config/mh-<os>) must be 
+    uncommented and set.
+
+    # ------------ Macros for Shared Memory File Buffer Pool(fmpool) ------
+    # Uncomment the following lines to enable shared memory file buffer pool
+    # version of the HDF core library libdf.a. Please read the
+    # documentation before enabling this feature.
+    #FMPOOL_FLAGS  = -DHAVE_FMPOOL
+
+    After setting these values you must re-run  the toplevel 'configure' script.
+    Make sure that your start from a clean re-build(i.e. 'make clean') after
+    re-running the toplevel 'configure' script and then run 'make'.
+    Details on running configure can be found in the section
+    'General Configuration/Installation - Unix' in the installation file 
+    '$(toplevel)/INSTALL'.
+
+    The file caching version of libdf.a is automatically tested
+    when the regular HDF and netCDF tests are run. The page caching
+    version has been tested only on a few UNIX platforms and is NOT
+    available for the Macintosh ,IBM-PC(Windows NT/95) or VMS.
+
+****************************** Beta Version *********************************
+============================================================================
+================================sd_chunk_examples.txt=======================
+
+/**************************************************************************
+File: sd_chunk_examples.c
+
+  Examples for writing/reading SDS with Chunking and Chunking w/ Compression.
+   - Sample C-code using SDS chunking routines. 
+   - No real error checking is done and the value of 'status' should 
+     be checked for proper values.
+
+5 Examples are shown, 1 for 2-D array, 3 for 3-D arrays and
+                      1 for 2-D array with compression..
+
+  Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+  Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
+             Write data using SDwritedata().
+             Read data using SDreaddata().
+
+  Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+  Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+             Write data using SDwritedata().
+             Read data using SDreadchunk().
+
+  Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression.
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+Author - GeorgeV
+Date   - 11/25/96
+********************************************************************/
+
+#include "mfhdf.h"
+
+/* arrays holding dim info for datasets */
+static int32  d_dims[3]     = {2, 3, 4};  /* data dimensions */
+static int32  edge_dims[3]  = {0, 0, 0};  /* edge dims */
+static int32  start_dims[3] = {0, 0, 0};  /* starting dims  */
+
+/* data arrays layed out in memory  */
+
+/* used in Example 1 and 5 */
+static uint16  u16_2data[9][4] =
+{ 
+   {11, 21, 31, 41},
+   {12, 22, 32, 42},
+   {13, 23, 33, 43},
+   {14, 24, 34, 44},
+   {15, 25, 35, 45},
+   {16, 26, 36, 46},
+   {17, 27, 37, 47},
+   {18, 28, 38, 48},
+   {19, 29, 39, 49},
+};
+
+/* uint16 3x2 chunk arrays used in example 1 and 5*/
+static uint16  chunk1_2u16[6] = {11, 21, 
+                                 12, 22, 
+                                 13, 23};
+
+static uint16  chunk2_2u16[6] = {31, 41, 
+                                 32, 42, 
+                                 33, 43};
+
+static uint16  chunk3_2u16[6] = {14, 24, 
+                                 15, 25, 
+                                 16, 26};
+
+static uint16  chunk4_2u16[6] = {34, 44, 
+                                 35, 45, 
+                                 36, 46};
+
+static uint16  chunk5_2u16[6] = {17, 27, 
+                                 18, 28, 
+                                 19, 29};
+
+static uint16  chunk6_2u16[6] = {37, 47, 
+                                 38, 48, 
+                                 39, 49};
+
+
+/* uint16 1x1x4 chunk arrays used in example 3 */
+static uint16  chunk1_3u16[4] =  { 0, 1, 2, 3};
+
+static uint16  chunk2_3u16[4] =  { 10, 11, 12, 13};
+
+static uint16  chunk3_3u16[4] =  { 20, 21, 22, 23};
+
+static uint16  chunk4_3u16[4] =  { 100, 101, 102, 103};
+
+static uint16  chunk5_3u16[4] =  { 110, 111, 112, 113};
+
+static uint16  chunk6_3u16[4] =  { 120, 121, 122, 123};
+
+
+/* Used in Examples 2 and 4 */
+static uint16  u16_3data[2][3][4] =
+{
+    {
+        { 0, 1, 2, 3},
+        { 10, 11, 12, 13},
+        { 20, 21, 22, 23}},
+    {
+        { 100, 101, 102, 103},
+        { 110, 111, 112, 113},
+        { 120, 121, 122, 123}}};
+
+/*
+ * Main routine
+ */
+int main(int argc, char *argv[])
+{
+   int32 f1;                    /* file handle */
+   int32 sdsid;                 /* SDS handle */
+   uint16  inbuf_3u16[2][3][4]; /* Data array read for Example 2 and 3*/
+   uint16  inbuf_2u16[5][2];    /* Data array read for Example 1 */
+   uint16  ru16_3data[4];       /* whole chunk input buffer */
+   uint16  fill_u16 = 0;        /* fill value */
+   HDF_CHUNK_DEF chunk_def;     /* Chunk defintion set */ 
+   HDF_CHUNK_DEF rchunk_def;    /* Chunk defintion read */ 
+   int32   cflags;              /* chunk flags */
+   comp_info cinfo;             /* compression info */
+   intn status;
+
+   ncopts = NC_VERBOSE;
+
+    /* create file */
+    f1 = SDstart("chunk.hdf", DFACC_CREATE);
+
+    /* 
+      Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* create a  9x4 SDS of uint16 in file 1 */
+    d_dims[0] = 9;
+    d_dims[1] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 3x2 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 3;
+    chunk_def.chunk_lengths[1] = 2;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 3 chunks */
+    status = SDsetchunkcache(sdsid, 3, 0);
+
+    /* Write data use SDwritechunk */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 2;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
+ 
+    /* read a portion of data back in using SDreaddata
+       i.e  5x2 subset of the whole array */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    edge_dims[0] = 5;
+    edge_dims[1] = 2;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
+
+   /* This 5x2 array should look somethink like this
+         {{23, 24, 25, 26, 27},
+          {33, 34, 35, 36, 37}}    
+    */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* 
+      Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
+                 Write data using SDwritedata().
+                 Read data using SDreaddata().
+    */
+
+    /* create a new 2x3x4 SDS of uint16 in file 1 */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_2", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS
+       chunk is 2x3x2 which will create 2 chunks */
+    chunk_def.chunk_lengths[0] = 2;
+    chunk_def.chunk_lengths[1] = 2;
+    chunk_def.chunk_lengths[2] = 3;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 2 chunks*/
+    status = SDsetchunkcache(sdsid, 2, 0);
+
+    /* Write data using SDwritedata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
+
+    /* read data back in using SDreaddata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
+
+    /* Verify the data in inbuf_3u16 against u16_3data[] */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* 
+      Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_3", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 1x1x4 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 1;
+    chunk_def.chunk_lengths[1] = 1;
+    chunk_def.chunk_lengths[2] = 4;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 4 chunks*/
+    status = SDsetchunkcache(sdsid, 4, 0);
+
+    /* Write data use SDwritechunk */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_3u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_3u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_3u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_3u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 0;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_3u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 1;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_3u16);
+ 
+    /* read data back in using SDreaddata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
+
+    /* Verify the data in inbuf_3u16 against u16_3data[] */
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+
+    /* 
+      Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+                 Write data using SDwritedata().
+                 Read data using SDreadchunk().
+    */
+
+    /* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_4", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS
+       chunk is 1x1x4 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 1;
+    chunk_def.chunk_lengths[1] = 1;
+    chunk_def.chunk_lengths[2] = 4;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 4 chunks */
+    status = SDsetchunkcache(sdsid, 4, 0);
+
+    /* Write data using SDwritedata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
+
+    /* read data back in using SDreadchunk and verify against
+       the chunk arrays chunk1_3u16[] ... chunk6_3u16[] */
+
+    /* read chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 3 */
+    start_dims[0] = 0;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 5 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 6 */
+    start_dims[0] = 1;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+
+    /* 
+      Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* create a  9x4 SDS of uint16 in file 1 */
+    d_dims[0] = 9;
+    d_dims[1] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 3x2 which will create 6 chunks 
+       Compression set will be GZIP. 
+       Note that 'chunk_def' is a union. 
+       See the man page 'sd_chunk.3' for more info on the union. */
+    chunk_def.comp.chunk_lengths[0] = 3;
+    chunk_def.comp.chunk_lengths[1] = 2;
+    chunk_def.comp.comp_type = COMP_CODE_DEFLATE; /* GZIP */
+    chunk_def.comp.cinfo.deflate.level = 6;       /* Level */
+
+    /* set Chunking with Compression */
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK | HDF_COMP);
+
+    /* Set Chunk cache to hold 3 chunks */
+    status = SDsetchunkcache(sdsid, 3, 0);
+
+    /* Write data use SDwritechunk 
+       NOTE: This is the recommended way when using Compression */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 2;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
+ 
+    /* read a portion of data back in using SDreaddata
+       i.e  5x2 subset of the whole array */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    edge_dims[0] = 5;
+    edge_dims[1] = 2;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
+
+   /* This 5x2 array should look somethink like this
+         {{23, 24, 25, 26, 27},
+          {33, 34, 35, 36, 37}}    
+    */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* Close down SDS interface */
+    status = SDend(f1);
+
+}
+============================================================================
+================================vattr.txt===================================
+
+        Vgroup and vdata attributes 
+                   9/8/96
+ 
+Vdata/vgroup version
+--------------------
+Previously (up to HDF4.0r2), the vdata and vgroup version was 3, 
+VSET_VERSION.  With attributes added, the version number has been 
+changed to 4, VSET_NEW_VERSION. For backward compatibility, a vdata 
+or a vgroup will still have version number 3 if it has no attribute(s) 
+assigned. 
+
+Attribute
+---------
+An attribute has a name, data type, a number of values and the 
+values.  All values of an attribute should be of the same data type.
+For example, 10 characters, or 2 32-bit integers.
+
+Any number of attributes can be assigned to a vgroup, a vdata 
+(entire vdata) or any field of a vdata.  An attribute name should be 
+unique in its scope.  For example, a field attribute name 
+should be unique among all attributes of that field. 
+
+Attributes in HDF files
+-----------------------
+Attributes will be stored in vdatas.  The vdata's name is
+the attribute name specified by the user. Its class is 
+"Attr0.0", _HDF_ATTRIBUTE.  
+
+All attributes of a vgroup or a vdata will be included in 
+the vgroup represented by DFTAG_VG,  or the vdata header,
+DFTAG_VH. 
+ 
+Vdata/Vgroup attribute routines (see man pages for more info)
+----------------------------------------------------------
+  intn VSfindex(int32 vsid, char *fieldname, int32 *fldindex)
+       find out the index of a field given the field name.
+  intn VSsetattr(int32 vsid, int32 findex, char *attrname, 
+                 int32 datatype, int32 count, VOIDP values)
+       set attr for a field of a vdata or for the vdata.
+       if the attr already exists the new values will replace
+          the current ones, provided the datatype and order
+          have not been changed.
+  intn VSnattrs(int32 vsid)
+       total number of attr for a vdata and its fields
+  int32 VSfnattrs(int32 vsid, int32 findex) 
+       number of attrs for a vdata or a field of it
+  intn VSfindattr(int32 vsid, int32 findex, char *attrname)
+       get index of an attribute with a given name
+  intn VSattrinfo(int32 vsid, int32 findex, intn attrindex,
+                  char *name, int32 *datatype, int32 *count,
+                    int32 *size);
+       get info about an attribute
+  intn VSgetattr(int32 vsid, int32 findex, intn attrindex, 
+                 VOIDP values)
+       get values of an attribute
+  intn VSisattr(int32 vsid)
+       test if a vdata is an attribute of other object
+  intn Vsetattr(int32 vgid,  char *attrname, int32 datatype,
+                int32 count, VOIDP values) 
+       set attr for a vgroup
+  intn Vnattrs(int32 vgid)
+       number of attrs for a vgroup
+  intn Vfindattr(int32 vgid, char *attrname)
+       get index of an attribute with a given name
+  intn Vattrinfo(int32 vgid, intn attrindex, char *name, 
+                 int32 *datatype, int32 *count, int32 *size)
+       get info about an attribute
+  intn Vgetattr(int32 vgid, intn attrindex, VOIDP values)
+       get values of an attribute
+  int32 Vgetversion(int32 vgid)
+       get vset version of a vgroup
+  ( int32 VSgetversion(int32 vsid) already exists.) 
+
+Changes in the vdata header in HDF files :
+------------------------------------------
+1. If attributes or other new features are assigned:
+     o version number will be VSET_NEW_VERSION (4, 
+         defined in vg.h)
+     o the new DFTAG_VH looks like:
+           
+       interlace  number_records hdf_rec_size n_fields
+         2 bytes        4              2           2
+       datatype_field_n offset_field_n order_field_n fldnmlen_n
+         2*n_fields        2*n_fields     2*n_fields  2*n_fields
+       fldnm_n namelen name classlen class extag exref version
+                 2            2             2     2      2
+       more  flags  < nattrs  field_index attr0_tag/ref 
+        2      4         4         4         2/2        
+       field_index  attr1_tag/ref ...> version  more extra_byte
+             4           2/2          
+ 
+   If no attributes or other new features were assigned, 
+       version number is still VSET_VERSION and the old 
+       vdata header will be written out.
+
+2. In the old implementation the 'version' and 'more' fields
+   follow the 'exref' field. In order to not break existing
+   applications the new implementation keeps these two
+   fields and adds a duplication of 'version' and 'more'
+   at the end, along with an extra byte which was not 
+   documented in the old documentation. 
+
+3. The field "flags" of  uint32: 
+           bit 0 -- has attr
+           bit 1 -- 15  -- unused.
+     o Fields follow the 'flags' are:
+           total_number_of_attrs this vdata has  (4 bytes)
+           vs_attr_list  (#_attrs * 8 bytes (4+2+2))
+            (field_index, attr_vdata_tag, attr_vdata_ref) 
+       the flags and attribute fields are added after the 
+           first 'more' fields.
+ 
+Changes in the vgroup data in HDF files 
+---------------------------------------
+1. If has attribute(s):
+      o add a flag field, uint16,
+          bit 0 -- has attr
+          bit 1-15  -- unused.
+      o version number will be changed to 4 
+      o fields following the flag are:
+          number_of_attrs 
+          vg_attr_list 
+        the above fields are added preceding the version field
+      o vg_attr_list consists of a list of attribute_tag/ref
+         pairs
+   If no attribute:
+      No changes in vgroup data and version number is still 3
+============================================================================
+================================windows.txt=================================
+
+Fortner Software LLC ("Fortner") created the reference implementation for
+Windows of the HDF 4.1r3 library, providing C-language bindings to all
+4.1r3 features.
+
+The Windows reference implementation of the 4.1r3 library was implemented
+and tested on a Pentium PC running Windows95 4.00.950 using Microsoft
+Developers Studio 97 Visual C++ Version 5.00.   The library has also been
+run on Pentium PC running WindowsNT version 4.0.
+
+Fortner cannot be certain that the libraries will run on other versions of
+Windows or when built using other development tools.  (In particular, this
+Windows implementation has not addressed use with Windows 3.x, or non-PC
+versions of WindowsNT).  Migrating the Windows reference implementation to
+other development and/or run-time environments is the responsibility of the
+library user.
+
+First-time HDF users are encouraged to read the FAQ in this release for
+more information about HDF.  Users can also look at the home page for HDF
+at:
+
+    http://hdf.ncsa.uiuc.edu/
+
+Please send questions, comments, and recommendations regarding the Windows
+version of the HDF library to:
+
+    hdfhelp at ncsa.uiuc.edu
+ 
+============================================================================




More information about the Pkg-grass-devel mailing list