[DebianGIS-dev] r823 - in packages: . h5utils h5utils/branches h5utils/branches/upstream h5utils/branches/upstream/current h5utils/branches/upstream/current/colormaps

frankie at alioth.debian.org frankie at alioth.debian.org
Mon May 14 18:39:31 UTC 2007


Author: frankie
Date: 2007-05-14 18:39:27 +0000 (Mon, 14 May 2007)
New Revision: 823

Added:
   packages/h5utils/
   packages/h5utils/branches/
   packages/h5utils/branches/upstream/
   packages/h5utils/branches/upstream/current/
   packages/h5utils/branches/upstream/current/AUTHORS
   packages/h5utils/branches/upstream/current/COPYING
   packages/h5utils/branches/upstream/current/ChangeLog
   packages/h5utils/branches/upstream/current/INSTALL
   packages/h5utils/branches/upstream/current/Makefile.am
   packages/h5utils/branches/upstream/current/Makefile.in
   packages/h5utils/branches/upstream/current/NEWS
   packages/h5utils/branches/upstream/current/README
   packages/h5utils/branches/upstream/current/aclocal.m4
   packages/h5utils/branches/upstream/current/arrayh4.c
   packages/h5utils/branches/upstream/current/arrayh4.h
   packages/h5utils/branches/upstream/current/arrayh5.c
   packages/h5utils/branches/upstream/current/arrayh5.h
   packages/h5utils/branches/upstream/current/colormaps/
   packages/h5utils/branches/upstream/current/colormaps/autumn
   packages/h5utils/branches/upstream/current/colormaps/bluered
   packages/h5utils/branches/upstream/current/colormaps/bone
   packages/h5utils/branches/upstream/current/colormaps/colorcube
   packages/h5utils/branches/upstream/current/colormaps/cool
   packages/h5utils/branches/upstream/current/colormaps/copper
   packages/h5utils/branches/upstream/current/colormaps/dkbluered
   packages/h5utils/branches/upstream/current/colormaps/flag
   packages/h5utils/branches/upstream/current/colormaps/gray
   packages/h5utils/branches/upstream/current/colormaps/green
   packages/h5utils/branches/upstream/current/colormaps/hot
   packages/h5utils/branches/upstream/current/colormaps/hsv
   packages/h5utils/branches/upstream/current/colormaps/jet
   packages/h5utils/branches/upstream/current/colormaps/lines
   packages/h5utils/branches/upstream/current/colormaps/pink
   packages/h5utils/branches/upstream/current/colormaps/prism
   packages/h5utils/branches/upstream/current/colormaps/spring
   packages/h5utils/branches/upstream/current/colormaps/summer
   packages/h5utils/branches/upstream/current/colormaps/vga
   packages/h5utils/branches/upstream/current/colormaps/winter
   packages/h5utils/branches/upstream/current/colormaps/yarg
   packages/h5utils/branches/upstream/current/colormaps/yellow
   packages/h5utils/branches/upstream/current/compile
   packages/h5utils/branches/upstream/current/config.h.in
   packages/h5utils/branches/upstream/current/configure
   packages/h5utils/branches/upstream/current/configure.ac
   packages/h5utils/branches/upstream/current/copyright.h
   packages/h5utils/branches/upstream/current/depcomp
   packages/h5utils/branches/upstream/current/h4fromh5.c
   packages/h5utils/branches/upstream/current/h5fromh4.1
   packages/h5utils/branches/upstream/current/h5fromh4.c
   packages/h5utils/branches/upstream/current/h5fromitxt.c
   packages/h5utils/branches/upstream/current/h5fromtxt.1
   packages/h5utils/branches/upstream/current/h5fromtxt.c
   packages/h5utils/branches/upstream/current/h5math.1
   packages/h5utils/branches/upstream/current/h5math.c
   packages/h5utils/branches/upstream/current/h5read.cc
   packages/h5utils/branches/upstream/current/h5topng.1.in
   packages/h5utils/branches/upstream/current/h5topng.c
   packages/h5utils/branches/upstream/current/h5totxt.1
   packages/h5utils/branches/upstream/current/h5totxt.c
   packages/h5utils/branches/upstream/current/h5tov5d.1
   packages/h5utils/branches/upstream/current/h5tov5d.c
   packages/h5utils/branches/upstream/current/h5tovtk.1
   packages/h5utils/branches/upstream/current/h5tovtk.c
   packages/h5utils/branches/upstream/current/h5utils.c
   packages/h5utils/branches/upstream/current/h5utils.h
   packages/h5utils/branches/upstream/current/install-sh
   packages/h5utils/branches/upstream/current/missing
   packages/h5utils/branches/upstream/current/writepng.c
   packages/h5utils/branches/upstream/current/writepng.h
   packages/h5utils/tags/
Log:
[svn-inject] Installing original source of h5utils

Added: packages/h5utils/branches/upstream/current/AUTHORS
===================================================================
--- packages/h5utils/branches/upstream/current/AUTHORS	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/AUTHORS	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1 @@
+h5utils was written by Steven G. Johnson (stevenj at alum.mit.edu).

Added: packages/h5utils/branches/upstream/current/COPYING
===================================================================
--- packages/h5utils/branches/upstream/current/COPYING	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/COPYING	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,375 @@
+#############################################################################
+
+			The h5utils package is
+	Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+	     by the Massachusetts Institute of Technology
+
+#############################################################################
+	  The following license applies to all files in the
+	    h5utils package, EXCEPT h5tov5d.c (see below).
+#############################################################################
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#############################################################################
+	   The following license applies ONLY to h5tov5d.c.
+#############################################################################
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+     Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+   Everyone is permitted to copy and distribute verbatim copies
+    of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.

Added: packages/h5utils/branches/upstream/current/ChangeLog
===================================================================
--- packages/h5utils/branches/upstream/current/ChangeLog	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/ChangeLog	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1 @@
+Generated by mkdist.sh

Added: packages/h5utils/branches/upstream/current/INSTALL
===================================================================
--- packages/h5utils/branches/upstream/current/INSTALL	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/INSTALL	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+

Added: packages/h5utils/branches/upstream/current/Makefile.am
===================================================================
--- packages/h5utils/branches/upstream/current/Makefile.am	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/Makefile.am	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,50 @@
+COLORMAPS = colormaps/autumn colormaps/bluered colormaps/bone		\
+colormaps/colorcube colormaps/cool colormaps/copper colormaps/flag	\
+colormaps/gray colormaps/green colormaps/hot colormaps/hsv		\
+colormaps/jet colormaps/lines colormaps/pink colormaps/prism		\
+colormaps/spring colormaps/summer colormaps/vga colormaps/winter	\
+colormaps/yarg colormaps/yellow colormaps/dkbluered
+
+EXTRA_MANS = h5topng.1.in h5tov5d.1 h5fromh4.1 h5math.1
+EXTRA_DIST = h5read.cc copyright.h $(COLORMAPS) $(EXTRA_MANS)
+
+noinst_PROGRAMS = h5fromitxt # quick hack, not really supported
+bin_PROGRAMS = h5totxt h5fromtxt h5tovtk @MORE_H5UTILS@
+EXTRA_PROGRAMS = h5topng h5tov5d h5fromh4 h4fromh5 h5math
+
+dist_man_MANS = h5totxt.1 h5fromtxt.1 h5tovtk.1 @MORE_H5UTILS_MANS@
+nodist_man_MANS = @H5TOPNG_MAN@
+
+COMMON_SRC = arrayh5.c arrayh5.h h5utils.c h5utils.h
+
+h5totxt_SOURCES = h5totxt.c $(COMMON_SRC)
+h5fromtxt_SOURCES = h5fromtxt.c $(COMMON_SRC)
+h5fromitxt_SOURCES = h5fromitxt.c $(COMMON_SRC)
+h5tovtk_SOURCES = h5tovtk.c $(COMMON_SRC)
+
+h5topng_SOURCES = h5topng.c writepng.c writepng.h $(COMMON_SRC)
+h5topng_LDADD = @PNG_LIBS@
+
+h5tov5d_SOURCES = h5tov5d.c $(COMMON_SRC)
+h5tov5d_CPPFLAGS = $(AM_CPPFLAGS) @V5D_INCLUDES@
+h5tov5d_LDADD = @V5D_FILES@
+
+h5fromh4_SOURCES = h5fromh4.c arrayh4.c arrayh4.h $(COMMON_SRC)
+h5fromh4_LDADD = @H4_LIBS@
+
+h4fromh5_SOURCES = h4fromh5.c arrayh4.c arrayh4.h $(COMMON_SRC)
+h4fromh5_LDADD = @H4_LIBS@
+
+h5math_SOURCES = h5math.c $(COMMON_SRC)
+h5math_LDADD = -lmatheval
+
+octdir = @OCT_INSTALL_DIR@
+oct_DATA = @H5READ@
+
+h5read.oct: h5read.cc arrayh5.h arrayh5.o
+	mkoctfile $(DEFS) $(CPPFLAGS) $(srcdir)/h5read.cc arrayh5.o $(LDFLAGS) $(LIBS)
+
+clean-hook:
+	rm -f h5read.oct
+
+nobase_dist_pkgdata_DATA = $(COLORMAPS)

Added: packages/h5utils/branches/upstream/current/Makefile.in
===================================================================
--- packages/h5utils/branches/upstream/current/Makefile.in	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/Makefile.in	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,813 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  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.
+
+# 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.
+
+ at SET_MAKE@
+
+
+SOURCES = $(h4fromh5_SOURCES) $(h5fromh4_SOURCES) $(h5fromitxt_SOURCES) $(h5fromtxt_SOURCES) $(h5math_SOURCES) $(h5topng_SOURCES) $(h5totxt_SOURCES) $(h5tov5d_SOURCES) $(h5tovtk_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+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 = :
+noinst_PROGRAMS = h5fromitxt$(EXEEXT)
+bin_PROGRAMS = h5totxt$(EXEEXT) h5fromtxt$(EXEEXT) h5tovtk$(EXEEXT) \
+	@MORE_H5UTILS@ $(am__empty)
+EXTRA_PROGRAMS = h5topng$(EXEEXT) h5tov5d$(EXEEXT) h5fromh4$(EXEEXT) \
+	h4fromh5$(EXEEXT) h5math$(EXEEXT)
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
+	$(nobase_dist_pkgdata_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/h5topng.1.in $(top_srcdir)/configure AUTHORS COPYING \
+	ChangeLog INSTALL NEWS compile depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = h5topng.1
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(octdir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am__objects_1 = arrayh5.$(OBJEXT) h5utils.$(OBJEXT)
+am_h4fromh5_OBJECTS = h4fromh5.$(OBJEXT) arrayh4.$(OBJEXT) \
+	$(am__objects_1)
+h4fromh5_OBJECTS = $(am_h4fromh5_OBJECTS)
+h4fromh5_DEPENDENCIES =
+am_h5fromh4_OBJECTS = h5fromh4.$(OBJEXT) arrayh4.$(OBJEXT) \
+	$(am__objects_1)
+h5fromh4_OBJECTS = $(am_h5fromh4_OBJECTS)
+h5fromh4_DEPENDENCIES =
+am_h5fromitxt_OBJECTS = h5fromitxt.$(OBJEXT) $(am__objects_1)
+h5fromitxt_OBJECTS = $(am_h5fromitxt_OBJECTS)
+h5fromitxt_LDADD = $(LDADD)
+am_h5fromtxt_OBJECTS = h5fromtxt.$(OBJEXT) $(am__objects_1)
+h5fromtxt_OBJECTS = $(am_h5fromtxt_OBJECTS)
+h5fromtxt_LDADD = $(LDADD)
+am_h5math_OBJECTS = h5math.$(OBJEXT) $(am__objects_1)
+h5math_OBJECTS = $(am_h5math_OBJECTS)
+h5math_DEPENDENCIES =
+am_h5topng_OBJECTS = h5topng.$(OBJEXT) writepng.$(OBJEXT) \
+	$(am__objects_1)
+h5topng_OBJECTS = $(am_h5topng_OBJECTS)
+h5topng_DEPENDENCIES =
+am_h5totxt_OBJECTS = h5totxt.$(OBJEXT) $(am__objects_1)
+h5totxt_OBJECTS = $(am_h5totxt_OBJECTS)
+h5totxt_LDADD = $(LDADD)
+am__objects_2 = h5tov5d-arrayh5.$(OBJEXT) h5tov5d-h5utils.$(OBJEXT)
+am_h5tov5d_OBJECTS = h5tov5d-h5tov5d.$(OBJEXT) $(am__objects_2)
+h5tov5d_OBJECTS = $(am_h5tov5d_OBJECTS)
+h5tov5d_DEPENDENCIES =
+am_h5tovtk_OBJECTS = h5tovtk.$(OBJEXT) $(am__objects_1)
+h5tovtk_OBJECTS = $(am_h5tovtk_OBJECTS)
+h5tovtk_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(h4fromh5_SOURCES) $(h5fromh4_SOURCES) \
+	$(h5fromitxt_SOURCES) $(h5fromtxt_SOURCES) $(h5math_SOURCES) \
+	$(h5topng_SOURCES) $(h5totxt_SOURCES) $(h5tov5d_SOURCES) \
+	$(h5tovtk_SOURCES)
+DIST_SOURCES = $(h4fromh5_SOURCES) $(h5fromh4_SOURCES) \
+	$(h5fromitxt_SOURCES) $(h5fromtxt_SOURCES) $(h5math_SOURCES) \
+	$(h5topng_SOURCES) $(h5totxt_SOURCES) $(h5tov5d_SOURCES) \
+	$(h5tovtk_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS) $(nodist_man_MANS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+nobase_dist_pkgdataDATA_INSTALL = $(install_sh_DATA)
+octDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(nobase_dist_pkgdata_DATA) $(oct_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+H4TOH5 = @H4TOH5@
+H4_LIBS = @H4_LIBS@
+H5READ = @H5READ@
+H5TOH4 = @H5TOH4@
+H5TOPNG_MAN = @H5TOPNG_MAN@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKOCTFILE = @MKOCTFILE@
+MORE_H5UTILS = @MORE_H5UTILS@
+MORE_H5UTILS_MANS = @MORE_H5UTILS_MANS@
+OBJEXT = @OBJEXT@
+OCTAVE = @OCTAVE@
+OCT_INSTALL_DIR = @OCT_INSTALL_DIR@
+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@
+PNG_LIBS = @PNG_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+V5D_FILES = @V5D_FILES@
+V5D_INCLUDES = @V5D_INCLUDES@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+datadir_val = @datadir_val@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+COLORMAPS = colormaps/autumn colormaps/bluered colormaps/bone		\
+colormaps/colorcube colormaps/cool colormaps/copper colormaps/flag	\
+colormaps/gray colormaps/green colormaps/hot colormaps/hsv		\
+colormaps/jet colormaps/lines colormaps/pink colormaps/prism		\
+colormaps/spring colormaps/summer colormaps/vga colormaps/winter	\
+colormaps/yarg colormaps/yellow colormaps/dkbluered
+
+EXTRA_MANS = h5topng.1.in h5tov5d.1 h5fromh4.1 h5math.1
+EXTRA_DIST = h5read.cc copyright.h $(COLORMAPS) $(EXTRA_MANS)
+dist_man_MANS = h5totxt.1 h5fromtxt.1 h5tovtk.1 @MORE_H5UTILS_MANS@
+nodist_man_MANS = @H5TOPNG_MAN@
+COMMON_SRC = arrayh5.c arrayh5.h h5utils.c h5utils.h
+h5totxt_SOURCES = h5totxt.c $(COMMON_SRC)
+h5fromtxt_SOURCES = h5fromtxt.c $(COMMON_SRC)
+h5fromitxt_SOURCES = h5fromitxt.c $(COMMON_SRC)
+h5tovtk_SOURCES = h5tovtk.c $(COMMON_SRC)
+h5topng_SOURCES = h5topng.c writepng.c writepng.h $(COMMON_SRC)
+h5topng_LDADD = @PNG_LIBS@
+h5tov5d_SOURCES = h5tov5d.c $(COMMON_SRC)
+h5tov5d_CPPFLAGS = $(AM_CPPFLAGS) @V5D_INCLUDES@
+h5tov5d_LDADD = @V5D_FILES@
+h5fromh4_SOURCES = h5fromh4.c arrayh4.c arrayh4.h $(COMMON_SRC)
+h5fromh4_LDADD = @H4_LIBS@
+h4fromh5_SOURCES = h4fromh5.c arrayh4.c arrayh4.h $(COMMON_SRC)
+h4fromh5_LDADD = @H4_LIBS@
+h5math_SOURCES = h5math.c $(COMMON_SRC)
+h5math_LDADD = -lmatheval
+octdir = @OCT_INSTALL_DIR@
+oct_DATA = @H5READ@
+nobase_dist_pkgdata_DATA = $(COLORMAPS)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+h5topng.1: $(top_builddir)/config.status $(srcdir)/h5topng.1.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(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
+
+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
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+h4fromh5$(EXEEXT): $(h4fromh5_OBJECTS) $(h4fromh5_DEPENDENCIES) 
+	@rm -f h4fromh5$(EXEEXT)
+	$(LINK) $(h4fromh5_LDFLAGS) $(h4fromh5_OBJECTS) $(h4fromh5_LDADD) $(LIBS)
+h5fromh4$(EXEEXT): $(h5fromh4_OBJECTS) $(h5fromh4_DEPENDENCIES) 
+	@rm -f h5fromh4$(EXEEXT)
+	$(LINK) $(h5fromh4_LDFLAGS) $(h5fromh4_OBJECTS) $(h5fromh4_LDADD) $(LIBS)
+h5fromitxt$(EXEEXT): $(h5fromitxt_OBJECTS) $(h5fromitxt_DEPENDENCIES) 
+	@rm -f h5fromitxt$(EXEEXT)
+	$(LINK) $(h5fromitxt_LDFLAGS) $(h5fromitxt_OBJECTS) $(h5fromitxt_LDADD) $(LIBS)
+h5fromtxt$(EXEEXT): $(h5fromtxt_OBJECTS) $(h5fromtxt_DEPENDENCIES) 
+	@rm -f h5fromtxt$(EXEEXT)
+	$(LINK) $(h5fromtxt_LDFLAGS) $(h5fromtxt_OBJECTS) $(h5fromtxt_LDADD) $(LIBS)
+h5math$(EXEEXT): $(h5math_OBJECTS) $(h5math_DEPENDENCIES) 
+	@rm -f h5math$(EXEEXT)
+	$(LINK) $(h5math_LDFLAGS) $(h5math_OBJECTS) $(h5math_LDADD) $(LIBS)
+h5topng$(EXEEXT): $(h5topng_OBJECTS) $(h5topng_DEPENDENCIES) 
+	@rm -f h5topng$(EXEEXT)
+	$(LINK) $(h5topng_LDFLAGS) $(h5topng_OBJECTS) $(h5topng_LDADD) $(LIBS)
+h5totxt$(EXEEXT): $(h5totxt_OBJECTS) $(h5totxt_DEPENDENCIES) 
+	@rm -f h5totxt$(EXEEXT)
+	$(LINK) $(h5totxt_LDFLAGS) $(h5totxt_OBJECTS) $(h5totxt_LDADD) $(LIBS)
+h5tov5d$(EXEEXT): $(h5tov5d_OBJECTS) $(h5tov5d_DEPENDENCIES) 
+	@rm -f h5tov5d$(EXEEXT)
+	$(LINK) $(h5tov5d_LDFLAGS) $(h5tov5d_OBJECTS) $(h5tov5d_LDADD) $(LIBS)
+h5tovtk$(EXEEXT): $(h5tovtk_OBJECTS) $(h5tovtk_DEPENDENCIES) 
+	@rm -f h5tovtk$(EXEEXT)
+	$(LINK) $(h5tovtk_LDFLAGS) $(h5tovtk_OBJECTS) $(h5tovtk_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/arrayh4.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/arrayh5.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h4fromh5.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5fromh4.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5fromitxt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5fromtxt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5math.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5topng.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5totxt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5tov5d-arrayh5.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5tov5d-h5tov5d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5tov5d-h5utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5tovtk.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/h5utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/writepng.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+h5tov5d-h5tov5d.o: h5tov5d.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-h5tov5d.o -MD -MP -MF "$(DEPDIR)/h5tov5d-h5tov5d.Tpo" -c -o h5tov5d-h5tov5d.o `test -f 'h5tov5d.c' || echo '$(srcdir)/'`h5tov5d.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-h5tov5d.Tpo" "$(DEPDIR)/h5tov5d-h5tov5d.Po"; else rm -f "$(DEPDIR)/h5tov5d-h5tov5d.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='h5tov5d.c' object='h5tov5d-h5tov5d.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-h5tov5d.o `test -f 'h5tov5d.c' || echo '$(srcdir)/'`h5tov5d.c
+
+h5tov5d-h5tov5d.obj: h5tov5d.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-h5tov5d.obj -MD -MP -MF "$(DEPDIR)/h5tov5d-h5tov5d.Tpo" -c -o h5tov5d-h5tov5d.obj `if test -f 'h5tov5d.c'; then $(CYGPATH_W) 'h5tov5d.c'; else $(CYGPATH_W) '$(srcdir)/h5tov5d.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-h5tov5d.Tpo" "$(DEPDIR)/h5tov5d-h5tov5d.Po"; else rm -f "$(DEPDIR)/h5tov5d-h5tov5d.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='h5tov5d.c' object='h5tov5d-h5tov5d.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-h5tov5d.obj `if test -f 'h5tov5d.c'; then $(CYGPATH_W) 'h5tov5d.c'; else $(CYGPATH_W) '$(srcdir)/h5tov5d.c'; fi`
+
+h5tov5d-arrayh5.o: arrayh5.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-arrayh5.o -MD -MP -MF "$(DEPDIR)/h5tov5d-arrayh5.Tpo" -c -o h5tov5d-arrayh5.o `test -f 'arrayh5.c' || echo '$(srcdir)/'`arrayh5.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-arrayh5.Tpo" "$(DEPDIR)/h5tov5d-arrayh5.Po"; else rm -f "$(DEPDIR)/h5tov5d-arrayh5.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arrayh5.c' object='h5tov5d-arrayh5.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-arrayh5.o `test -f 'arrayh5.c' || echo '$(srcdir)/'`arrayh5.c
+
+h5tov5d-arrayh5.obj: arrayh5.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-arrayh5.obj -MD -MP -MF "$(DEPDIR)/h5tov5d-arrayh5.Tpo" -c -o h5tov5d-arrayh5.obj `if test -f 'arrayh5.c'; then $(CYGPATH_W) 'arrayh5.c'; else $(CYGPATH_W) '$(srcdir)/arrayh5.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-arrayh5.Tpo" "$(DEPDIR)/h5tov5d-arrayh5.Po"; else rm -f "$(DEPDIR)/h5tov5d-arrayh5.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arrayh5.c' object='h5tov5d-arrayh5.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-arrayh5.obj `if test -f 'arrayh5.c'; then $(CYGPATH_W) 'arrayh5.c'; else $(CYGPATH_W) '$(srcdir)/arrayh5.c'; fi`
+
+h5tov5d-h5utils.o: h5utils.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-h5utils.o -MD -MP -MF "$(DEPDIR)/h5tov5d-h5utils.Tpo" -c -o h5tov5d-h5utils.o `test -f 'h5utils.c' || echo '$(srcdir)/'`h5utils.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-h5utils.Tpo" "$(DEPDIR)/h5tov5d-h5utils.Po"; else rm -f "$(DEPDIR)/h5tov5d-h5utils.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='h5utils.c' object='h5tov5d-h5utils.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-h5utils.o `test -f 'h5utils.c' || echo '$(srcdir)/'`h5utils.c
+
+h5tov5d-h5utils.obj: h5utils.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT h5tov5d-h5utils.obj -MD -MP -MF "$(DEPDIR)/h5tov5d-h5utils.Tpo" -c -o h5tov5d-h5utils.obj `if test -f 'h5utils.c'; then $(CYGPATH_W) 'h5utils.c'; else $(CYGPATH_W) '$(srcdir)/h5utils.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/h5tov5d-h5utils.Tpo" "$(DEPDIR)/h5tov5d-h5utils.Po"; else rm -f "$(DEPDIR)/h5tov5d-h5utils.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='h5utils.c' object='h5tov5d-h5utils.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(h5tov5d_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o h5tov5d-h5utils.obj `if test -f 'h5utils.c'; then $(CYGPATH_W) 'h5utils.c'; else $(CYGPATH_W) '$(srcdir)/h5utils.c'; fi`
+uninstall-info-am:
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(mkdir_p) "$(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
+install-nobase_dist_pkgdataDATA: $(nobase_dist_pkgdata_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_dist_pkgdata_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  $(nobase_dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+
+uninstall-nobase_dist_pkgdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_dist_pkgdata_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+install-octDATA: $(oct_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(octdir)" || $(mkdir_p) "$(DESTDIR)$(octdir)"
+	@list='$(oct_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(octDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(octdir)/$$f'"; \
+	  $(octDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(octdir)/$$f"; \
+	done
+
+uninstall-octDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(oct_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(octdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(octdir)/$$f"; \
+	done
+
+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: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.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; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.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
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/. $(distdir)/colormaps
+	@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"; \
+	    $(mkdir_p) "$(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
+	-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
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# 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
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	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 ../.. && umask 077 && mkdir "$$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 \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${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-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(octdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+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
+
+clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man install-nobase_dist_pkgdataDATA \
+	install-octDATA
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man: install-man1
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-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-info-am uninstall-man \
+	uninstall-nobase_dist_pkgdataDATA uninstall-octDATA
+
+uninstall-man: uninstall-man1
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+	clean-binPROGRAMS clean-generic clean-noinstPROGRAMS ctags \
+	dist dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ \
+	dist-zip distcheck distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-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-nobase_dist_pkgdataDATA install-octDATA 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 uninstall-nobase_dist_pkgdataDATA \
+	uninstall-octDATA
+
+
+h5read.oct: h5read.cc arrayh5.h arrayh5.o
+	mkoctfile $(DEFS) $(CPPFLAGS) $(srcdir)/h5read.cc arrayh5.o $(LDFLAGS) $(LIBS)
+
+clean-hook:
+	rm -f h5read.oct
+# 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:

Added: packages/h5utils/branches/upstream/current/NEWS
===================================================================
--- packages/h5utils/branches/upstream/current/NEWS	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/NEWS	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,163 @@
+h5utils 1.10 (9/2/05)
+
+  * Added h4fromh5 utility.  (NCSA seems to be no longer shipping
+    the HDF5/HDF4 conversion tools with the latest HDF5 release.)
+
+  * Added dkbluered color map, which is similar to bluered but
+    uses a somewhat wider range of colors.
+
+h5utils 1.9.1 (8/5/04)
+
+  * Fix h5topng compilation failure with some non-C99 compilers;
+    thanks to Maarten van Reeuwijk for the bug report.
+
+h5utils 1.9 (7/12/04)
+
+  * Added new h5math utility, which creates and combines HDF5 datasets
+    using a user-specified mathematical expression.  (Requires GNU
+    libmatheval to be installed.)
+
+  * h5topng: Matlab-like start:end or start:step:end notation for
+    slice indices, to allow a whole sequence of slices to be output as
+    a sequence of PNG images.
+
+  * h5topng: if contour/overlay dataset does not have same dimensions
+    as output data, it is periodically "tiled" over the output.
+
+h5utils 1.8 (5/22/04)
+
+  * New -A and -a options for h5topng to allow translucent overlays
+    from one file onto another (an alternative or complement to the
+    -C contour-overlay option).
+
+  * h5topng uses 24-bit direct color by default (use -8 option for
+    old 8-bit behavior).
+
+  * h5topng uses columns/rows for x/y by default (use -T to swap),
+    the opposite of the old behavior.
+
+  * There is no default -z 0 slice dimension in h5topng/h5totxt any more.
+    You must specify a slice for 3+ dimensional data in h5topng.
+    h5totxt dumps the whole data file by default unless one or more
+    slices are specified.
+
+  * Support specifying multiple slice dimensions for 4+ dimensional
+    datasets, with new "-t" option to indicate final dimension.
+
+  * Slices are also supported now in h5tovtk and h5tov5d.
+
+  * New -. option in h5totxt to specify number of significant digits; 
+    output 16 digits by default instead of 6, previously.
+
+h5utils 1.7.1 (3/16/02)
+
+  * Fixed array overrun in h5topng that caused a floating-point exception
+    on Alphas; thanks to Marin Soljacic for the bug report.
+
+h5utils 1.7 (3/9/02)
+
+  * h5topng now supports multiple, user-definable color tables, a number
+    of which are provided.  INCOMPATIBLE CHANGE: the -c option now has
+    the syntax: -c <colortable>.  The old behavior corresponds to the
+    included "bluered" colortable, invoked via: -c bluered.
+
+  * New -R option for h5topng to use a consistent color scale for
+    all specified files.
+
+  * New -0 option for h5topng and h5totxt that shifts the origin of the
+    slice coordinates to the dataset center.
+
+  * Added h5tovtk program to output VTK (Visualization ToolKit) data files.
+
+  * Support -T (transpose dimensions) option in h5tov5d.
+
+  * Fixed bug in h5topng that caused extra rows/columns of garbage pixels
+    to be written at the edges of images when scaling was used.
+
+  * When compiling the h5read Octave plugin, respect the CPPFLAGS and LDFLAGS 
+    environment variables.  Thanks to Max Colice for the bug report.
+
+  * Fixed problem when --without-h5tov5d and --without-h5fromh4 are used. 
+    Thanks to Nikola Ivanov Nikolov for the fix.
+
+h5utils 1.6 (1/17/01)
+
+  * Don't build h5fromh4 if the superior h4toh5 tool (from HDF5 1.4)
+    is present.  Also added --{with,without}-h5fromh4 option to
+    configure to force whether h5fromh4 is built.
+
+h5utils 1.5.1 (12/9/00)
+
+  * Support manually disabling Octave plugin support
+    (configure --without-octave) in case of C++ problems.
+
+  * Support Vis5d+ and Debian HDF header file locations.
+
+h5utils 1.5 (7/9/00)
+
+  * Added h5fromh4 program to convert HDF4 datasets to HDF5 format.
+
+  * Added -S <s> option to h5topng as a shortcut for -X <s> -Y <s>.
+
+h5utils 1.4 (5/28/00)
+
+  * Added h5fromtxt program to convert text input to an HDF5 dataset.
+
+h5utils 1.3.4 (1/31/00)
+
+  * Improved -C contour plotting in h5topng.
+
+  * Fix in h5topng man page (thanks to Christoph Becher).
+
+h5utils 1.3.3 (1/30/00)
+
+  * Bug fix in h5topng (would sometimes output solid black images).
+    Thanks to Karl Koch for the bug report.
+
+h5utils 1.3.2 (1/28/00)
+
+  * Added h5topng -Z option to center color scale on zero.
+
+  * Now support h5topng -C filename:dataset.
+
+h5utils 1.3.1 (1/27/00)
+
+  * Bug fixes in dataset name-handling, especially when using h5tov5d to
+    join multiple datasets into one output file.
+
+h5utils 1.3 (1/21/00)
+
+  * You can now specify individual datasets within a file by using
+    <filename>:<dataset> instead of just <filename> with h5topng,
+    h5totxt, and h5tov5d.
+
+h5utils 1.2.3: (1/20/00)
+
+  * Fixed minor bug in 'h5totxt -h'.
+
+h5utils 1.2.2: (1/12/00)
+
+  * Makefile now includes CPPFLAGS in the compiler flags, making it
+    easier to use header files in non-standard locations.  (CPPFLAGS
+    is the proper place to put -I flags for the configure script.)
+
+h5utils 1.2.1:  (1/1/00)
+
+  * Modified -o option of h5tov5d to join datasets into a single Vis5d file.
+
+h5utils 1.2:  (12/31/99)
+
+  * Added h5tov5d program for converting to Vis5d format.
+
+  * Improved installation; h5read.oct now goes into the sitewide Octave
+    plugins directory, and things work correctly when only some of the
+    utilities are compiled.
+
+h5utils 1.1:  (12/6/99)
+
+  * Added h5totxt program for exporting 2d slices of HDF5 files to text
+    suitable for importing into a spreadsheet.
+
+h5utils 1.0:  (11/22/99)
+
+  * Initial release.

Added: packages/h5utils/branches/upstream/current/README
===================================================================
--- packages/h5utils/branches/upstream/current/README	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/README	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,34 @@
+			       h5utils
+		  http://ab-initio.mit.edu/h5utils/
+
+h5utils is a set of utilities for visualization and conversion of
+scientific data in the free, portable HDF5 format.  HDF5 was developed
+in the National Center for Supercomputing Applications at the
+University of Illinois.
+
+Besides providing a simple tool for batch visualization as PNG images,
+h5utils also includes programs to convert HDF5 datasets into the
+formats required by other free visualization software (e.g. plain
+text, Vis5d, and VTK).
+
+The included utilities are:
+
+    * h5fromtxt and h5totxt: convert ASCII data (e.g. comma or tab
+      delimited) to/from HDF5.
+    * h5topng: convert 2d slices of HDF5 datasets to PNG images, with
+      a variety of color tables and other options.
+    * h5tov5d: convert HDF5 datasets to the format used by the free
+      3d+ visualization tool Vis5d.
+    * h5tovtk: convert HDF5 datasets to VTK format for use by the free
+      Visualization ToolKit (along with supporting programs like MayaVi).
+    * h5read.oct: a plug-in for GNU Octave (a Matlab-like program) to
+      read 2d slices of HDF5 datasets (the latest versions of Octave
+      include native support for HDF5).
+    * h5fromh4: convert HDF (version 4) datasets to HDF5; mostly
+      superceded by the h4toh5 program included with recent versins of HDF5.
+
+This package is developed by Steven G. Johnson (stevenj at alum.mit.edu),
+and is free software that should easily install under any Unix-like
+operating system (e.g. GNU/Linux).
+
+See the COPYING file for license and copyright information.

Added: packages/h5utils/branches/upstream/current/aclocal.m4
===================================================================
--- packages/h5utils/branches/upstream/current/aclocal.m4	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/aclocal.m4	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,891 @@
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  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.
+
+# Copyright (C) 2002, 2003, 2005  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.
+
+# 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.9"])
+
+# 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.9.5])])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  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.
+
+# 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.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# 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.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ 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])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# serial 8
+
+# 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
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch 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
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' 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 build
+  --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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+#serial 3
+
+# _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
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  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 "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# serial 12
+
+# 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.
+
+# 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_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+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_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# 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([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_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 (C) 2001, 2003, 2005  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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+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)])
+
+# Copyright (C) 2003, 2005  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.
+
+# serial 2
+
+# 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])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# serial 4
+
+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])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  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.
+
+# serial 3
+
+# 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
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 4
+
+# 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
+])
+
+# Copyright (C) 2003, 2004, 2005  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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  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.
+
+# serial 3
+
+# _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.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 4
+
+# 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)])
+
+# Copyright (C) 2001, 2003, 2005  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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# 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])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+

Added: packages/h5utils/branches/upstream/current/arrayh4.c
===================================================================
--- packages/h5utils/branches/upstream/current/arrayh4.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/arrayh4.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,235 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "config.h"
+#include "arrayh4.h"
+
+#ifdef VERBOSE
+#  define WHEN_VERBOSE(x) x
+#else
+#  define WHEN_VERBOSE(x) 
+#endif
+
+int arrayh4_create(arrayh4 *b, int32 numtype, intn rank, const int32 *dims)
+{
+     int i;
+     
+     b->rank = rank;
+     b->N = 1;
+     for (i = 0; i < rank; ++i) {
+	  b->dims[i] = dims[i];
+	  b->N *= dims[i];
+	  if (numtype == DFNT_FLOAT64)
+	       b->scale.d[i] = NULL;
+	  else
+	       b->scale.f[i] = NULL;
+     }
+     b->numtype = numtype;
+     if (numtype == DFNT_FLOAT64) {
+	  b->p.d = (float64 *) malloc(b->N * sizeof(float64));
+	  if (!b->p.d)
+	       return 0;
+     } else if (numtype == DFNT_FLOAT32) {
+	  b->p.f = (float32 *) malloc(b->N * sizeof(float32));
+	  if (!b->p.f)
+	       return 0;
+     }
+     return 1;
+}
+
+int arrayh4_clone(arrayh4 *b, arrayh4 a)
+{
+     int dim, i;
+
+     i = arrayh4_create(b, a.numtype, a.rank, a.dims);
+
+     if (!i)
+	  return 0;
+
+     /* copy the axes scales: */
+
+     if (a.numtype == DFNT_FLOAT64) {
+	  for (dim = 0; dim < a.rank; ++dim)
+	       if (a.scale.d[dim]) {
+		    b->scale.d[dim] = (float64 *) malloc(a.dims[dim] * 
+							 sizeof(float64));
+		    if (!b->scale.d[dim])
+			 return 0;
+		    for (i = 0; i < a.dims[dim]; ++i)
+			 b->scale.d[dim][i] = a.scale.d[dim][i];
+	       }
+     }
+     else if (a.numtype == DFNT_FLOAT32) {
+	  for (dim = 0; dim < a.rank; ++dim)
+	       if (a.scale.f[dim]) {
+		    b->scale.f[dim] = (float32 *) malloc(a.dims[dim] * 
+							 sizeof(float32));
+		    if (!b->scale.f[dim])
+			 return 0;
+		    for (i = 0; i < a.dims[dim]; ++i)
+			 b->scale.f[dim][i] = a.scale.f[dim][i];
+	       }
+     }
+
+     return 1;
+}
+
+void arrayh4_destroy(arrayh4 a)
+{
+     int i;
+
+     if (a.numtype == DFNT_FLOAT64) {
+	  free(a.p.d);
+	  for (i = 0; i < a.rank; ++i)
+	       free(a.scale.d[i]);
+     }
+     else if (a.numtype == DFNT_FLOAT32) {
+	  free(a.p.f);
+	  for (i = 0; i < a.rank; ++i)
+	       free(a.scale.f[i]);
+     }
+}
+
+int arrayh4_read(char *fname, arrayh4 *a, int require_rank)
+{
+     int32 numtype;
+     intn rank;
+     int32 dims[ARRAYH4_MAX_RANK];
+     int dim;
+     
+     WHEN_VERBOSE(printf("Reading arrayh4 from \"%s\"...\n", fname));
+     
+     if (require_rank < 0 || require_rank > ARRAYH4_MAX_RANK)
+	  return 0;
+     
+     DFSDclear();
+     DFSDgetdims(fname, &rank, dims, ARRAYH4_MAX_RANK);
+     
+     WHEN_VERBOSE(printf("   rank = %d", rank));
+     
+     if (require_rank && require_rank != rank)
+	  return 0;
+     
+     WHEN_VERBOSE(printf(", dimensions are "));
+     
+     for (dim = 0; dim < rank; ++dim) {
+	  WHEN_VERBOSE(printf("%s%d", dim ? "x" : "", (int) dims[dim]));
+     }
+     
+     WHEN_VERBOSE(printf("\n"));
+     
+     DFSDgetNT(&numtype);
+     
+     arrayh4_create(a, numtype, rank, dims);
+     
+     if (a->numtype == DFNT_FLOAT64) {
+	  WHEN_VERBOSE(printf("   double precision\n"));
+	  DFSDgetdata(fname, a->rank, a->dims, (VOIDP) a->p.d);
+	  
+	  for (dim = 0; dim < a->rank; ++dim) {
+	       a->scale.d[dim] = (float64 *) malloc(a->dims[dim] * 
+						    sizeof(float64));
+	       if (FAIL == DFSDgetdimscale(dim+1, a->dims[dim], 
+					   (VOIDP) a->scale.d[dim])) {
+		    free(a->scale.d[dim]);
+		    a->scale.d[dim] = NULL;
+	       }
+	  }
+     } else if (a->numtype == DFNT_FLOAT32) {
+	  WHEN_VERBOSE(printf("   single precision\n"));
+	  DFSDgetdata(fname, a->rank, a->dims, (VOIDP) a->p.f);
+	  
+	for (dim = 0; dim < a->rank; ++dim) {
+	     a->scale.f[dim] = (float32 *) malloc(a->dims[dim] * 
+						  sizeof(float32));
+	     if (FAIL == DFSDgetdimscale(dim+1, a->dims[dim], 
+					 (VOIDP) a->scale.f[dim])) {
+		  free(a->scale.f[dim]);
+		  a->scale.f[dim] = NULL;
+	     }
+	}
+     } else
+	  return 0;
+     
+     return 1;
+}
+
+#define MIN2(a,b) ((a) < (b) ? (a) : (b))
+#define MAX2(a,b) ((a) > (b) ? (a) : (b))
+
+int arrayh4_write(char *fname, arrayh4 a)
+{
+     int i;
+     WHEN_VERBOSE(printf("Writing arrayh4 to \"%s\"...\n", fname));
+     
+     remove(fname);
+     
+     DFSDclear();
+     DFSDsetdims(a.rank, a.dims);
+     DFSDsetNT(a.numtype);
+     
+     if (a.numtype == DFNT_FLOAT64) {
+	  float64 minval = 1e40, maxval = -1e40;
+	  
+	  for (i = 0; i < a.N; ++i) {
+	       minval = MIN2(minval, a.p.d[i]);
+	       maxval = MAX2(maxval, a.p.d[i]);
+	  }
+	  DFSDsetrange(&maxval, &minval);
+	  DFSDadddata(fname, a.rank, a.dims, (VOIDP) a.p.d);
+	  
+	  for (i = 0; i < a.rank; ++i)
+	       if (a.scale.d[i])
+		    DFSDgetdimscale(i+1, a.dims[i], (VOIDP) a.scale.d[i]);
+     } else if (a.numtype == DFNT_FLOAT32) {
+	  float32 minval = 1e20, maxval = -1e20;
+	  
+	  for (i = 0; i < a.N; ++i) {
+	       minval = MIN2(minval, a.p.f[i]);
+	       maxval = MAX2(maxval, a.p.f[i]);
+	  }
+	  DFSDsetrange(&maxval, &minval);
+	  DFSDadddata(fname, a.rank, a.dims, (VOIDP) a.p.f);
+	  
+	  for (i = 0; i < a.rank; ++i)
+	       if (a.scale.f[i])
+		    DFSDgetdimscale(i+1, a.dims[i], (VOIDP) a.scale.f[i]);
+     } else
+	  return 0;
+     
+     return 1;
+}
+
+short arrayh4_conformant(arrayh4 a, arrayh4 b)
+{
+     int dim;
+     
+     if (a.numtype != b.numtype || a.N != b.N || a.rank != b.rank)
+	  return 0;
+     for (dim = 0; dim < a.rank; ++dim)
+	  if (a.dims[dim] != b.dims[dim])
+	       return 0;
+     return 1;
+}

Added: packages/h5utils/branches/upstream/current/arrayh4.h
===================================================================
--- packages/h5utils/branches/upstream/current/arrayh4.h	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/arrayh4.h	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,57 @@
+/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ARRAYH4_H
+#define ARRAYH4_H
+
+#if defined(HAVE_HDF_H)
+#  include <hdf.h>
+#elif defined(HAVE_HDF_HDF_H)
+#  include <hdf/hdf.h>
+#endif
+
+#define ARRAYH4_MAX_RANK 10
+
+typedef struct {
+  int32 numtype;
+  intn rank;
+  int32 dims[ARRAYH4_MAX_RANK];
+  int N;
+  union {
+    float32 *f;
+    float64 *d;
+  } p;
+  union {
+    float32 *f[ARRAYH4_MAX_RANK];
+    float64 *d[ARRAYH4_MAX_RANK];
+  } scale;
+} arrayh4;
+
+extern int arrayh4_create(arrayh4 *b, int32 numtype,
+			  intn rank, const int32 *dims);
+extern int arrayh4_clone(arrayh4 *b, arrayh4 a);
+extern void arrayh4_destroy(arrayh4 a);
+extern int arrayh4_read(char *fname, arrayh4 *a, int require_rank);
+extern int arrayh4_write(char *fname, arrayh4 a);
+extern short arrayh4_conformant(arrayh4 a, arrayh4 b);
+
+#endif

Added: packages/h5utils/branches/upstream/current/arrayh5.c
===================================================================
--- packages/h5utils/branches/upstream/current/arrayh5.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/arrayh5.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,436 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <hdf5.h>
+
+#include "arrayh5.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "arrayh5 error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+#define CHK_MALLOC(p, t, n) CHECK(p = (t *) malloc(sizeof(t) * (n)), "out of memory")
+
+/* Normally, HDF5 prints out all sorts of error messages, e.g. if a dataset
+   can't be found, in addition to returning an error code.  The following
+   macro can be wrapped around code to temporarily suppress error messages. */
+
+#define SUPPRESS_HDF5_ERRORS(statements) { \
+     H5E_auto_t xxxxx_err_func; \
+     void *xxxxx_err_func_data; \
+     H5Eget_auto(&xxxxx_err_func, &xxxxx_err_func_data); \
+     H5Eset_auto(NULL, NULL); \
+     { statements; } \
+     H5Eset_auto(xxxxx_err_func, xxxxx_err_func_data); \
+}
+
+arrayh5 arrayh5_create_withdata(int rank, const int *dims, double *data)
+{
+     arrayh5 a;
+     int i;
+
+     CHECK(rank >= 0, "non-positive rank");
+     a.rank = rank;
+     
+     CHK_MALLOC(a.dims, int, rank);
+
+     a.N = 1;
+     for (i = 0; i < rank; ++i) {
+	  a.dims[i] = dims[i];
+	  a.N *= dims[i];
+     }
+
+     if (data)
+	  a.data = data;
+     else {
+	  CHK_MALLOC(a.data, double, a.N);
+     }
+     return a;
+}
+
+arrayh5 arrayh5_create(int rank, const int *dims)
+{
+     return arrayh5_create_withdata(rank, dims, NULL);
+}
+
+arrayh5 arrayh5_clone(arrayh5 a)
+{
+     return arrayh5_create(a.rank, a.dims);
+}
+
+void arrayh5_destroy(arrayh5 a)
+{
+     free(a.dims);
+     free(a.data);
+}
+
+int arrayh5_conformant(arrayh5 a, arrayh5 b)
+{
+     int i;
+
+     if (a.rank != b.rank)
+	  return 0;
+     for (i = 0; i < a.rank; ++i)
+	  if (a.dims[i] != b.dims[i])
+	       return 0;
+     return 1;
+}
+
+static void rtranspose(int curdim, int rank, const int *dims,
+		       int curindex, int curindex_t,
+		       const double *data, double *data_t)
+{
+     int prod_before = 1, prod_after = 1;
+     int i;
+     
+     if (rank == 0) {
+	  *data_t = *data;
+	  return;
+     }
+
+     for (i = 0; i < curdim; ++i)
+	  prod_before *= dims[i];
+     for (i = curdim + 1; i < rank; ++i)
+	  prod_after *= dims[i];
+
+     if (curdim == rank - 1) {
+	  for (i = 0; i < dims[curdim]; ++i)
+	       data_t[curindex_t + i * prod_before] = data[curindex + i];
+     }
+     else {
+	  for (i = 0; i < dims[curdim]; ++i)
+	       rtranspose(curdim + 1, rank, dims,
+			  curindex + i * prod_after,
+			  curindex_t + i * prod_before,
+			  data, data_t);
+     }
+}
+
+void arrayh5_transpose(arrayh5 *a)
+{
+     double *data_t;
+     int i;
+
+     CHK_MALLOC(data_t, double, a->N);
+     rtranspose(0, a->rank, a->dims, 0, 0, a->data, data_t);
+     free(a->data);
+     a->data = data_t;
+
+     for (i = 0; i < a->rank - 1 - i; ++i) {
+	  int dummy = a->dims[i];
+	  a->dims[i] = a->dims[a->rank - 1 - i];
+	  a->dims[a->rank - 1 - i] = dummy;
+     }
+}
+
+void arrayh5_getrange(arrayh5 a, double *min, double *max)
+{
+     int i;
+
+     CHECK(a.N > 0, "no elements in array");
+     *min = *max = a.data[0];
+     for (i = 1; i < a.N; ++i) {
+	  if (a.data[i] < *min)
+	       *min = a.data[i];
+	  if (a.data[i] > *max)
+	       *max = a.data[i];
+     }
+}
+
+static herr_t find_dataset(hid_t group_id, const char *name, void *d)
+{
+     char **dname = (char **) d;
+     H5G_stat_t info;
+
+     H5Gget_objinfo(group_id, name, 1, &info);
+     if (info.type == H5G_DATASET) {
+	  CHK_MALLOC(*dname, char, strlen(name) + 1);
+	  strcpy(*dname, name);
+	  return 1;
+     }
+     return 0;
+}
+
+typedef enum { NO_ERROR = 0, OPEN_FAILED, NO_DATA, READ_FAILED, SLICE_FAILED,
+	     INVALID_SLICE, INVALID_RANK, OPEN_DATA_FAILED } arrayh5_err;
+
+const char arrayh5_read_strerror[][100] = {
+     "no error",
+     "error opening HD5 file",
+     "couldn't find data set in HDF5 file",
+     "error reading data from HDF5",
+     "error reading data slice from HDF5",
+     "invalid slice of HDF5 data",
+     "non-positive rank in HDF file",
+     "error opening data set in HDF file",
+};
+
+int arrayh5_read(arrayh5 *a, const char *fname, const char *datapath,
+		 char **dataname,
+		 int nslicedims, const int *slicedim_, const int *islice_,
+		 const int *center_slice)
+{
+     hid_t file_id = -1, data_id = -1, space_id = -1;
+     char *dname = NULL;
+     int err = NO_ERROR;
+     hsize_t i, rank, *dims_copy, *maxdims;
+     int *islice = 0, *slicedim = 0;
+     int *dims = 0;
+
+     CHECK(a, "NULL array passed to arrayh5_read");
+     a->dims = NULL;
+     a->data = NULL;
+
+     file_id = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
+     if (file_id < 0) {
+	  err = OPEN_FAILED;
+	  goto done;
+     }
+ 
+     if (datapath && datapath[0]) {
+	  CHK_MALLOC(dname, char, strlen(datapath) + 1);
+	  strcpy(dname, datapath);
+     }
+     else {
+	  if (H5Giterate(file_id, "/", NULL, find_dataset, &dname) <= 0) {
+	       err = NO_DATA;
+	       goto done;
+	  }
+     }
+
+     data_id = H5Dopen(file_id, dname);
+     if (data_id < 0) {
+	  err = OPEN_DATA_FAILED;
+	  goto done;
+     }
+
+     space_id = H5Dget_space(data_id);
+     rank = H5Sget_simple_extent_ndims(space_id);
+     if (rank <= 0) {
+	  err = INVALID_RANK;
+	  goto done;
+     }
+     
+     CHK_MALLOC(dims, int, rank);
+     CHK_MALLOC(dims_copy, hsize_t, rank);
+     CHK_MALLOC(maxdims, hsize_t, rank);
+
+     H5Sget_simple_extent_dims(space_id, dims_copy, maxdims);
+     for (i = 0; i < rank; ++i)
+	  dims[i] = dims_copy[i];
+
+     free(maxdims);
+     free(dims_copy);
+     
+     for (i = 0; i < nslicedims && slicedim_[i] == NO_SLICE_DIM; ++i)
+	  ;
+
+     if (i == nslicedims) { /* no slices */
+	  *a = arrayh5_create(rank, dims);
+	  
+	  if (H5Dread(data_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL,
+		      H5P_DEFAULT, (void *) a->data) < 0) {
+	       err = READ_FAILED;
+	       goto done;
+	  }
+     }
+     else if (nslicedims > 0) {
+	  int j, rank2 = rank;
+	  hssize_t *start;
+	  hsize_t *count;
+	  hid_t mem_space_id;
+	  herr_t readerr;
+
+	  CHK_MALLOC(slicedim, int, nslicedims);
+	  CHK_MALLOC(islice, int, nslicedims);
+
+	  for (i = j = 0; i < nslicedims; ++i)
+	       if (slicedim_[i] != NO_SLICE_DIM) {
+		    if (slicedim_[i] == LAST_SLICE_DIM)
+			 slicedim[j] = rank - 1;
+		    else
+			 slicedim[j] = slicedim_[i];
+		    if (slicedim[j] < 0 || slicedim[j] >= rank) {
+			 err = INVALID_SLICE;
+			 goto done;
+		    }
+		    islice[j] = islice_[i];
+		    if (center_slice[i])
+			 islice[j] += dims[slicedim[j]] / 2;
+		    if (islice[j] < 0 || islice[j] >= dims[slicedim[j]]) {
+			 err = INVALID_SLICE;
+			 goto done;
+		    }
+		    j++;
+	       }
+	  nslicedims = j;
+	  
+	  CHK_MALLOC(start, hssize_t, rank);
+	  CHK_MALLOC(count, hsize_t, rank);
+	  
+	  for (i = 0; i < rank; ++i) {
+	       count[i] = dims[i];
+	       start[i] = 0;
+	  }
+	  for (i = 0; i < nslicedims; ++i) {
+	       start[slicedim[i]] = islice[i];
+	       count[slicedim[i]] = 1;
+	  }
+	  
+	  H5Sselect_hyperslab(space_id, H5S_SELECT_SET,
+			      start, NULL, count, NULL);
+
+	  for (i = j = 0; i < rank; ++i)
+	       if (count[i] > 1)
+		    dims[j++] = count[i];
+	  rank2 = j;
+
+	  *a = arrayh5_create(rank2, dims);
+	  
+	  mem_space_id = H5Screate_simple(rank, count, NULL);
+	  H5Sselect_all(mem_space_id);
+	  
+	  readerr = H5Dread(data_id, H5T_NATIVE_DOUBLE, 
+			    mem_space_id, space_id, 
+			    H5P_DEFAULT, (void *) a->data);
+	  
+	  H5Sclose(mem_space_id);
+	  free(count);
+	  free(start);
+	  
+	  if (readerr < 0) {
+	       err = SLICE_FAILED;
+	       goto done;
+	  }
+     }
+     else {
+	  err = INVALID_SLICE;
+	  goto done;
+     }
+
+ done:
+     if (err != NO_ERROR)
+	  arrayh5_destroy(*a);
+     free(islice);
+     free(slicedim);
+     free(dims);
+     if (space_id >= 0)
+	  H5Sclose(space_id);
+     if (data_id >= 0)
+	  H5Dclose(data_id);
+     if (dataname)
+	  *dataname = dname;
+     else
+	  free(dname);
+     if (file_id >= 0)
+	  H5Fclose(file_id);
+
+     return err;
+}
+
+static int dataset_exists(hid_t id, const char *name)
+{
+     hid_t data_id;
+     SUPPRESS_HDF5_ERRORS(data_id = H5Dopen(id, name));
+     if (data_id >= 0)
+          H5Dclose(data_id);
+     return (data_id >= 0);
+}
+
+void arrayh5_write(arrayh5 a, char *filename, char *dataname,
+		   short append_data)
+{
+     int i;
+     hid_t file_id, space_id, type_id, data_id;
+     hsize_t *dims_copy;
+
+     if (append_data)
+	  file_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+     else
+	  file_id = H5Fcreate(filename, H5F_ACC_TRUNC,
+			      H5P_DEFAULT, H5P_DEFAULT);
+     CHECK(file_id >= 0, "error opening HDF5 output file");     
+
+     if (dataset_exists(file_id, dataname))
+	  H5Gunlink(file_id, dataname);  /* delete it */
+
+     CHECK(a.rank > 0, "non-positive rank");
+     CHK_MALLOC(dims_copy, hsize_t, a.rank);
+     for (i = 0; i < a.rank; ++i)
+	  dims_copy[i] = a.dims[i];
+     space_id = H5Screate_simple(a.rank, dims_copy, NULL);
+     free(dims_copy);
+
+     type_id = H5T_NATIVE_DOUBLE;
+     data_id = H5Dcreate(file_id, dataname, type_id, space_id, H5P_DEFAULT);
+     H5Sclose(space_id);
+
+     H5Dwrite(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, a.data);
+
+     H5Dclose(data_id);
+     H5Fclose(file_id);
+}
+
+int arrayh5_read_rank(const char *fname, const char *datapath, int *rank)
+{
+     hid_t file_id = -1, data_id = -1, space_id = -1;
+     char *dname = NULL;
+     int err = NO_ERROR;
+
+     file_id = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
+     if (file_id < 0) {
+	  err = OPEN_FAILED;
+	  goto done;
+     }
+ 
+     if (datapath && datapath[0]) {
+	  CHK_MALLOC(dname, char, strlen(datapath) + 1);
+	  strcpy(dname, datapath);
+     }
+     else {
+	  if (H5Giterate(file_id, "/", NULL, find_dataset, &dname) <= 0) {
+	       err = NO_DATA;
+	       goto done;
+	  }
+     }
+
+     data_id = H5Dopen(file_id, dname);
+     if (data_id < 0) {
+	  err = OPEN_DATA_FAILED;
+	  goto done;
+     }
+
+     space_id = H5Dget_space(data_id);
+     *rank = H5Sget_simple_extent_ndims(space_id);
+
+ done:
+     if (space_id >= 0)
+	  H5Sclose(space_id);
+     if (data_id >= 0)
+	  H5Dclose(data_id);
+     free(dname);
+     if (file_id >= 0)
+	  H5Fclose(file_id);
+
+     return err;
+}

Added: packages/h5utils/branches/upstream/current/arrayh5.h
===================================================================
--- packages/h5utils/branches/upstream/current/arrayh5.h	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/arrayh5.h	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ARRAYH5_H
+#define ARRAYH5_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/***********************************************************************/
+
+typedef struct {
+     int rank, *dims, N;
+     double *data;
+} arrayh5;
+
+extern arrayh5 arrayh5_create_withdata(int rank, const int *dims,double *data);
+extern arrayh5 arrayh5_create(int rank, const int *dims);
+extern arrayh5 arrayh5_clone(arrayh5 a);
+extern void arrayh5_transpose(arrayh5 *a);
+extern void arrayh5_destroy(arrayh5 a);
+extern int arrayh5_conformant(arrayh5 a, arrayh5 b);
+extern void arrayh5_getrange(arrayh5 a, double *min, double *max);
+
+extern const char arrayh5_read_strerror[][100];
+extern int arrayh5_read(arrayh5 *a, const char *fname, const char *datapath,
+			char **dataname,
+			int nslicedims,
+			const int *slicedim, const int *islice,
+			const int *center_slice);
+extern void arrayh5_write(arrayh5 a, char *filename, char *dataname,
+			  short append_data);
+
+int arrayh5_read_rank(const char *fname, const char *datapath, int *rank);
+
+#define NO_SLICE_DIM -1
+#define LAST_SLICE_DIM -2
+
+/***********************************************************************/
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* ARRAYH5_H */

Added: packages/h5utils/branches/upstream/current/colormaps/autumn
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/autumn	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/autumn	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# red-yellow color map (based on Matlab colormap)
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/bluered
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/bluered	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/bluered	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,4 @@
+# blue-white-red color map
+0 0 1   1
+1 1 1   0
+1 0 0   1

Added: packages/h5utils/branches/upstream/current/colormaps/bone
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/bone	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/bone	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# grayscale with tinge of blue color map (from Matlab) (blackish to whitish)
+   0.0000000e+00   0.0000000e+00   5.2083333e-03   1
+   1.3888889e-02   1.3888889e-02   2.4305556e-02   1
+   2.7777778e-02   2.7777778e-02   4.3402778e-02   1
+   4.1666667e-02   4.1666667e-02   6.2500000e-02   1
+   5.5555556e-02   5.5555556e-02   8.1597222e-02   1
+   6.9444444e-02   6.9444444e-02   1.0069444e-01   1
+   8.3333333e-02   8.3333333e-02   1.1979167e-01   1
+   9.7222222e-02   9.7222222e-02   1.3888889e-01   1
+   1.1111111e-01   1.1111111e-01   1.5798611e-01   1
+   1.2500000e-01   1.2500000e-01   1.7708333e-01   1
+   1.3888889e-01   1.3888889e-01   1.9618056e-01   1
+   1.5277778e-01   1.5277778e-01   2.1527778e-01   1
+   1.6666667e-01   1.6666667e-01   2.3437500e-01   1
+   1.8055556e-01   1.8055556e-01   2.5347222e-01   1
+   1.9444444e-01   1.9444444e-01   2.7256944e-01   1
+   2.0833333e-01   2.0833333e-01   2.9166667e-01   1
+   2.2222222e-01   2.2222222e-01   3.1076389e-01   1
+   2.3611111e-01   2.3611111e-01   3.2986111e-01   1
+   2.5000000e-01   2.5000000e-01   3.4895833e-01   1
+   2.6388889e-01   2.6388889e-01   3.6805556e-01   1
+   2.7777778e-01   2.7777778e-01   3.8715278e-01   1
+   2.9166667e-01   2.9166667e-01   4.0625000e-01   1
+   3.0555556e-01   3.0555556e-01   4.2534722e-01   1
+   3.1944444e-01   3.1944444e-01   4.4444444e-01   1
+   3.3333333e-01   3.3854167e-01   4.5833333e-01   1
+   3.4722222e-01   3.5763889e-01   4.7222222e-01   1
+   3.6111111e-01   3.7673611e-01   4.8611111e-01   1
+   3.7500000e-01   3.9583333e-01   5.0000000e-01   1
+   3.8888889e-01   4.1493056e-01   5.1388889e-01   1
+   4.0277778e-01   4.3402778e-01   5.2777778e-01   1
+   4.1666667e-01   4.5312500e-01   5.4166667e-01   1
+   4.3055556e-01   4.7222222e-01   5.5555556e-01   1
+   4.4444444e-01   4.9131944e-01   5.6944444e-01   1
+   4.5833333e-01   5.1041667e-01   5.8333333e-01   1
+   4.7222222e-01   5.2951389e-01   5.9722222e-01   1
+   4.8611111e-01   5.4861111e-01   6.1111111e-01   1
+   5.0000000e-01   5.6770833e-01   6.2500000e-01   1
+   5.1388889e-01   5.8680556e-01   6.3888889e-01   1
+   5.2777778e-01   6.0590278e-01   6.5277778e-01   1
+   5.4166667e-01   6.2500000e-01   6.6666667e-01   1
+   5.5555556e-01   6.4409722e-01   6.8055556e-01   1
+   5.6944444e-01   6.6319444e-01   6.9444444e-01   1
+   5.8333333e-01   6.8229167e-01   7.0833333e-01   1
+   5.9722222e-01   7.0138889e-01   7.2222222e-01   1
+   6.1111111e-01   7.2048611e-01   7.3611111e-01   1
+   6.2500000e-01   7.3958333e-01   7.5000000e-01   1
+   6.3888889e-01   7.5868056e-01   7.6388889e-01   1
+   6.5277778e-01   7.7777778e-01   7.7777778e-01   1
+   6.7447917e-01   7.9166667e-01   7.9166667e-01   1
+   6.9618056e-01   8.0555556e-01   8.0555556e-01   1
+   7.1788194e-01   8.1944444e-01   8.1944444e-01   1
+   7.3958333e-01   8.3333333e-01   8.3333333e-01   1
+   7.6128472e-01   8.4722222e-01   8.4722222e-01   1
+   7.8298611e-01   8.6111111e-01   8.6111111e-01   1
+   8.0468750e-01   8.7500000e-01   8.7500000e-01   1
+   8.2638889e-01   8.8888889e-01   8.8888889e-01   1
+   8.4809028e-01   9.0277778e-01   9.0277778e-01   1
+   8.6979167e-01   9.1666667e-01   9.1666667e-01   1
+   8.9149306e-01   9.3055556e-01   9.3055556e-01   1
+   9.1319444e-01   9.4444444e-01   9.4444444e-01   1
+   9.3489583e-01   9.5833333e-01   9.5833333e-01   1
+   9.5659722e-01   9.7222222e-01   9.7222222e-01   1
+   9.7829861e-01   9.8611111e-01   9.8611111e-01   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/colorcube
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/colorcube	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/colorcube	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# enhanced color-cube color map (from Matlab)
+   3.3333333e-01   3.3333333e-01   0.0000000e+00   1
+   3.3333333e-01   6.6666667e-01   0.0000000e+00   1
+   3.3333333e-01   1.0000000e+00   0.0000000e+00   1
+   6.6666667e-01   3.3333333e-01   0.0000000e+00   1
+   6.6666667e-01   6.6666667e-01   0.0000000e+00   1
+   6.6666667e-01   1.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   3.3333333e-01   0.0000000e+00   1
+   1.0000000e+00   6.6666667e-01   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   3.3333333e-01   5.0000000e-01   1
+   0.0000000e+00   6.6666667e-01   5.0000000e-01   1
+   0.0000000e+00   1.0000000e+00   5.0000000e-01   1
+   3.3333333e-01   0.0000000e+00   5.0000000e-01   1
+   3.3333333e-01   3.3333333e-01   5.0000000e-01   1
+   3.3333333e-01   6.6666667e-01   5.0000000e-01   1
+   3.3333333e-01   1.0000000e+00   5.0000000e-01   1
+   6.6666667e-01   0.0000000e+00   5.0000000e-01   1
+   6.6666667e-01   3.3333333e-01   5.0000000e-01   1
+   6.6666667e-01   6.6666667e-01   5.0000000e-01   1
+   6.6666667e-01   1.0000000e+00   5.0000000e-01   1
+   1.0000000e+00   0.0000000e+00   5.0000000e-01   1
+   1.0000000e+00   3.3333333e-01   5.0000000e-01   1
+   1.0000000e+00   6.6666667e-01   5.0000000e-01   1
+   1.0000000e+00   1.0000000e+00   5.0000000e-01   1
+   0.0000000e+00   3.3333333e-01   1.0000000e+00   1
+   0.0000000e+00   6.6666667e-01   1.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   3.3333333e-01   0.0000000e+00   1.0000000e+00   1
+   3.3333333e-01   3.3333333e-01   1.0000000e+00   1
+   3.3333333e-01   6.6666667e-01   1.0000000e+00   1
+   3.3333333e-01   1.0000000e+00   1.0000000e+00   1
+   6.6666667e-01   0.0000000e+00   1.0000000e+00   1
+   6.6666667e-01   3.3333333e-01   1.0000000e+00   1
+   6.6666667e-01   6.6666667e-01   1.0000000e+00   1
+   6.6666667e-01   1.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   3.3333333e-01   1.0000000e+00   1
+   1.0000000e+00   6.6666667e-01   1.0000000e+00   1
+   1.6666667e-01   0.0000000e+00   0.0000000e+00   1
+   3.3333333e-01   0.0000000e+00   0.0000000e+00   1
+   5.0000000e-01   0.0000000e+00   0.0000000e+00   1
+   6.6666667e-01   0.0000000e+00   0.0000000e+00   1
+   8.3333333e-01   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.6666667e-01   0.0000000e+00   1
+   0.0000000e+00   3.3333333e-01   0.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   0.0000000e+00   6.6666667e-01   0.0000000e+00   1
+   0.0000000e+00   8.3333333e-01   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.6666667e-01   1
+   0.0000000e+00   0.0000000e+00   3.3333333e-01   1
+   0.0000000e+00   0.0000000e+00   5.0000000e-01   1
+   0.0000000e+00   0.0000000e+00   6.6666667e-01   1
+   0.0000000e+00   0.0000000e+00   8.3333333e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.4285714e-01   1.4285714e-01   1.4285714e-01   1
+   2.8571429e-01   2.8571429e-01   2.8571429e-01   1
+   4.2857143e-01   4.2857143e-01   4.2857143e-01   1
+   5.7142857e-01   5.7142857e-01   5.7142857e-01   1
+   7.1428571e-01   7.1428571e-01   7.1428571e-01   1
+   8.5714286e-01   8.5714286e-01   8.5714286e-01   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/cool
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/cool	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/cool	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# cyan-magenta color map (based on Matlab colormap)
+   0.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/copper
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/copper	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/copper	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# linear copper-tone color map (from Matlab) (black to copper)
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.9841270e-02   1.2400000e-02   7.8968254e-03   1
+   3.9682540e-02   2.4800000e-02   1.5793651e-02   1
+   5.9523810e-02   3.7200000e-02   2.3690476e-02   1
+   7.9365079e-02   4.9600000e-02   3.1587302e-02   1
+   9.9206349e-02   6.2000000e-02   3.9484127e-02   1
+   1.1904762e-01   7.4400000e-02   4.7380952e-02   1
+   1.3888889e-01   8.6800000e-02   5.5277778e-02   1
+   1.5873016e-01   9.9200000e-02   6.3174603e-02   1
+   1.7857143e-01   1.1160000e-01   7.1071429e-02   1
+   1.9841270e-01   1.2400000e-01   7.8968254e-02   1
+   2.1825397e-01   1.3640000e-01   8.6865079e-02   1
+   2.3809524e-01   1.4880000e-01   9.4761905e-02   1
+   2.5793651e-01   1.6120000e-01   1.0265873e-01   1
+   2.7777778e-01   1.7360000e-01   1.1055556e-01   1
+   2.9761905e-01   1.8600000e-01   1.1845238e-01   1
+   3.1746032e-01   1.9840000e-01   1.2634921e-01   1
+   3.3730159e-01   2.1080000e-01   1.3424603e-01   1
+   3.5714286e-01   2.2320000e-01   1.4214286e-01   1
+   3.7698413e-01   2.3560000e-01   1.5003968e-01   1
+   3.9682540e-01   2.4800000e-01   1.5793651e-01   1
+   4.1666667e-01   2.6040000e-01   1.6583333e-01   1
+   4.3650794e-01   2.7280000e-01   1.7373016e-01   1
+   4.5634921e-01   2.8520000e-01   1.8162698e-01   1
+   4.7619048e-01   2.9760000e-01   1.8952381e-01   1
+   4.9603175e-01   3.1000000e-01   1.9742063e-01   1
+   5.1587302e-01   3.2240000e-01   2.0531746e-01   1
+   5.3571429e-01   3.3480000e-01   2.1321429e-01   1
+   5.5555556e-01   3.4720000e-01   2.2111111e-01   1
+   5.7539683e-01   3.5960000e-01   2.2900794e-01   1
+   5.9523810e-01   3.7200000e-01   2.3690476e-01   1
+   6.1507937e-01   3.8440000e-01   2.4480159e-01   1
+   6.3492063e-01   3.9680000e-01   2.5269841e-01   1
+   6.5476190e-01   4.0920000e-01   2.6059524e-01   1
+   6.7460317e-01   4.2160000e-01   2.6849206e-01   1
+   6.9444444e-01   4.3400000e-01   2.7638889e-01   1
+   7.1428571e-01   4.4640000e-01   2.8428571e-01   1
+   7.3412698e-01   4.5880000e-01   2.9218254e-01   1
+   7.5396825e-01   4.7120000e-01   3.0007937e-01   1
+   7.7380952e-01   4.8360000e-01   3.0797619e-01   1
+   7.9365079e-01   4.9600000e-01   3.1587302e-01   1
+   8.1349206e-01   5.0840000e-01   3.2376984e-01   1
+   8.3333333e-01   5.2080000e-01   3.3166667e-01   1
+   8.5317460e-01   5.3320000e-01   3.3956349e-01   1
+   8.7301587e-01   5.4560000e-01   3.4746032e-01   1
+   8.9285714e-01   5.5800000e-01   3.5535714e-01   1
+   9.1269841e-01   5.7040000e-01   3.6325397e-01   1
+   9.3253968e-01   5.8280000e-01   3.7115079e-01   1
+   9.5238095e-01   5.9520000e-01   3.7904762e-01   1
+   9.7222222e-01   6.0760000e-01   3.8694444e-01   1
+   9.9206349e-01   6.2000000e-01   3.9484127e-01   1
+   1.0000000e+00   6.3240000e-01   4.0273810e-01   1
+   1.0000000e+00   6.4480000e-01   4.1063492e-01   1
+   1.0000000e+00   6.5720000e-01   4.1853175e-01   1
+   1.0000000e+00   6.6960000e-01   4.2642857e-01   1
+   1.0000000e+00   6.8200000e-01   4.3432540e-01   1
+   1.0000000e+00   6.9440000e-01   4.4222222e-01   1
+   1.0000000e+00   7.0680000e-01   4.5011905e-01   1
+   1.0000000e+00   7.1920000e-01   4.5801587e-01   1
+   1.0000000e+00   7.3160000e-01   4.6591270e-01   1
+   1.0000000e+00   7.4400000e-01   4.7380952e-01   1
+   1.0000000e+00   7.5640000e-01   4.8170635e-01   1
+   1.0000000e+00   7.6880000e-01   4.8960317e-01   1
+   1.0000000e+00   7.8120000e-01   4.9750000e-01   1

Added: packages/h5utils/branches/upstream/current/colormaps/dkbluered
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/dkbluered	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/dkbluered	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,33 @@
+# darkblue-blue-white-red-darkred color map, based loosely on "Seismic"
+# color table from Spyglass Transform
+  0.03  0.00  0.20 1
+  0.07  0.00  0.31 1
+  0.10  0.00  0.42 1
+  0.11  0.00  0.53 1
+  0.10  0.00  0.64 1
+  0.09  0.00  0.75 1
+  0.06  0.00  0.86 1
+  0.01  0.00  0.97 1
+  0.08  0.13  1.00 1
+  0.22  0.30  1.00 1
+  0.35  0.46  1.00 1
+  0.48  0.60  1.00 1
+  0.61  0.73  1.00 1
+  0.75  0.83  1.00 1
+  0.88  0.93  1.00 1
+  1.00  1.00  1.00 1
+  1.00  0.93  0.88 1
+  1.00  0.83  0.75 1
+  1.00  0.73  0.61 1
+  1.00  0.60  0.48 1
+  1.00  0.46  0.35 1
+  1.00  0.30  0.22 1
+  1.00  0.13  0.08 1
+  0.97  0.00  0.01 1
+  0.86  0.00  0.06 1
+  0.75  0.00  0.09 1
+  0.64  0.00  0.10 1
+  0.53  0.00  0.11 1
+  0.42  0.00  0.10 1
+  0.31  0.00  0.07 1
+  0.21  0.00  0.03 1

Added: packages/h5utils/branches/upstream/current/colormaps/flag
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/flag	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/flag	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# alternating red, white, blue, and black color map (from Matlab)
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/gray
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/gray	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/gray	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# grayscale color map (white to black)
+1 1 1   0
+0 0 0   1

Added: packages/h5utils/branches/upstream/current/colormaps/green
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/green	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/green	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# green color map (white to green)
+1 1 1   0
+0 1 0   1

Added: packages/h5utils/branches/upstream/current/colormaps/hot
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/hot	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/hot	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# black-red-yellow-white color map (from Matlab)
+   4.1666667e-02   0.0000000e+00   0.0000000e+00   1
+   8.3333333e-02   0.0000000e+00   0.0000000e+00   1
+   1.2500000e-01   0.0000000e+00   0.0000000e+00   1
+   1.6666667e-01   0.0000000e+00   0.0000000e+00   1
+   2.0833333e-01   0.0000000e+00   0.0000000e+00   1
+   2.5000000e-01   0.0000000e+00   0.0000000e+00   1
+   2.9166667e-01   0.0000000e+00   0.0000000e+00   1
+   3.3333333e-01   0.0000000e+00   0.0000000e+00   1
+   3.7500000e-01   0.0000000e+00   0.0000000e+00   1
+   4.1666667e-01   0.0000000e+00   0.0000000e+00   1
+   4.5833333e-01   0.0000000e+00   0.0000000e+00   1
+   5.0000000e-01   0.0000000e+00   0.0000000e+00   1
+   5.4166667e-01   0.0000000e+00   0.0000000e+00   1
+   5.8333333e-01   0.0000000e+00   0.0000000e+00   1
+   6.2500000e-01   0.0000000e+00   0.0000000e+00   1
+   6.6666667e-01   0.0000000e+00   0.0000000e+00   1
+   7.0833333e-01   0.0000000e+00   0.0000000e+00   1
+   7.5000000e-01   0.0000000e+00   0.0000000e+00   1
+   7.9166667e-01   0.0000000e+00   0.0000000e+00   1
+   8.3333333e-01   0.0000000e+00   0.0000000e+00   1
+   8.7500000e-01   0.0000000e+00   0.0000000e+00   1
+   9.1666667e-01   0.0000000e+00   0.0000000e+00   1
+   9.5833333e-01   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   4.1666667e-02   0.0000000e+00   1
+   1.0000000e+00   8.3333333e-02   0.0000000e+00   1
+   1.0000000e+00   1.2500000e-01   0.0000000e+00   1
+   1.0000000e+00   1.6666667e-01   0.0000000e+00   1
+   1.0000000e+00   2.0833333e-01   0.0000000e+00   1
+   1.0000000e+00   2.5000000e-01   0.0000000e+00   1
+   1.0000000e+00   2.9166667e-01   0.0000000e+00   1
+   1.0000000e+00   3.3333333e-01   0.0000000e+00   1
+   1.0000000e+00   3.7500000e-01   0.0000000e+00   1
+   1.0000000e+00   4.1666667e-01   0.0000000e+00   1
+   1.0000000e+00   4.5833333e-01   0.0000000e+00   1
+   1.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   5.4166667e-01   0.0000000e+00   1
+   1.0000000e+00   5.8333333e-01   0.0000000e+00   1
+   1.0000000e+00   6.2500000e-01   0.0000000e+00   1
+   1.0000000e+00   6.6666667e-01   0.0000000e+00   1
+   1.0000000e+00   7.0833333e-01   0.0000000e+00   1
+   1.0000000e+00   7.5000000e-01   0.0000000e+00   1
+   1.0000000e+00   7.9166667e-01   0.0000000e+00   1
+   1.0000000e+00   8.3333333e-01   0.0000000e+00   1
+   1.0000000e+00   8.7500000e-01   0.0000000e+00   1
+   1.0000000e+00   9.1666667e-01   0.0000000e+00   1
+   1.0000000e+00   9.5833333e-01   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   6.2500000e-02   1
+   1.0000000e+00   1.0000000e+00   1.2500000e-01   1
+   1.0000000e+00   1.0000000e+00   1.8750000e-01   1
+   1.0000000e+00   1.0000000e+00   2.5000000e-01   1
+   1.0000000e+00   1.0000000e+00   3.1250000e-01   1
+   1.0000000e+00   1.0000000e+00   3.7500000e-01   1
+   1.0000000e+00   1.0000000e+00   4.3750000e-01   1
+   1.0000000e+00   1.0000000e+00   5.0000000e-01   1
+   1.0000000e+00   1.0000000e+00   5.6250000e-01   1
+   1.0000000e+00   1.0000000e+00   6.2500000e-01   1
+   1.0000000e+00   1.0000000e+00   6.8750000e-01   1
+   1.0000000e+00   1.0000000e+00   7.5000000e-01   1
+   1.0000000e+00   1.0000000e+00   8.1250000e-01   1
+   1.0000000e+00   1.0000000e+00   8.7500000e-01   1
+   1.0000000e+00   1.0000000e+00   9.3750000e-01   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/hsv
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/hsv	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/hsv	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# hue-saturation-value color map (from Matlab) (red-yellow-green-cyan-blue-pink-magenta)
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   9.3750000e-02   0.0000000e+00   1
+   1.0000000e+00   1.8750000e-01   0.0000000e+00   1
+   1.0000000e+00   2.8125000e-01   0.0000000e+00   1
+   1.0000000e+00   3.7500000e-01   0.0000000e+00   1
+   1.0000000e+00   4.6875000e-01   0.0000000e+00   1
+   1.0000000e+00   5.6250000e-01   0.0000000e+00   1
+   1.0000000e+00   6.5625000e-01   0.0000000e+00   1
+   1.0000000e+00   7.5000000e-01   0.0000000e+00   1
+   1.0000000e+00   8.4375000e-01   0.0000000e+00   1
+   1.0000000e+00   9.3750000e-01   0.0000000e+00   1
+   9.6875000e-01   1.0000000e+00   0.0000000e+00   1
+   8.7500000e-01   1.0000000e+00   0.0000000e+00   1
+   7.8125000e-01   1.0000000e+00   0.0000000e+00   1
+   6.8750000e-01   1.0000000e+00   0.0000000e+00   1
+   5.9375000e-01   1.0000000e+00   0.0000000e+00   1
+   5.0000000e-01   1.0000000e+00   0.0000000e+00   1
+   4.0625000e-01   1.0000000e+00   0.0000000e+00   1
+   3.1250000e-01   1.0000000e+00   0.0000000e+00   1
+   2.1875000e-01   1.0000000e+00   0.0000000e+00   1
+   1.2500000e-01   1.0000000e+00   0.0000000e+00   1
+   3.1250000e-02   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   6.2500000e-02   1
+   0.0000000e+00   1.0000000e+00   1.5625000e-01   1
+   0.0000000e+00   1.0000000e+00   2.5000000e-01   1
+   0.0000000e+00   1.0000000e+00   3.4375000e-01   1
+   0.0000000e+00   1.0000000e+00   4.3750000e-01   1
+   0.0000000e+00   1.0000000e+00   5.3125000e-01   1
+   0.0000000e+00   1.0000000e+00   6.2500000e-01   1
+   0.0000000e+00   1.0000000e+00   7.1875000e-01   1
+   0.0000000e+00   1.0000000e+00   8.1250000e-01   1
+   0.0000000e+00   1.0000000e+00   9.0625000e-01   1
+   0.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   9.0625000e-01   1.0000000e+00   1
+   0.0000000e+00   8.1250000e-01   1.0000000e+00   1
+   0.0000000e+00   7.1875000e-01   1.0000000e+00   1
+   0.0000000e+00   6.2500000e-01   1.0000000e+00   1
+   0.0000000e+00   5.3125000e-01   1.0000000e+00   1
+   0.0000000e+00   4.3750000e-01   1.0000000e+00   1
+   0.0000000e+00   3.4375000e-01   1.0000000e+00   1
+   0.0000000e+00   2.5000000e-01   1.0000000e+00   1
+   0.0000000e+00   1.5625000e-01   1.0000000e+00   1
+   0.0000000e+00   6.2500000e-02   1.0000000e+00   1
+   3.1250000e-02   0.0000000e+00   1.0000000e+00   1
+   1.2500000e-01   0.0000000e+00   1.0000000e+00   1
+   2.1875000e-01   0.0000000e+00   1.0000000e+00   1
+   3.1250000e-01   0.0000000e+00   1.0000000e+00   1
+   4.0625000e-01   0.0000000e+00   1.0000000e+00   1
+   5.0000000e-01   0.0000000e+00   1.0000000e+00   1
+   5.9375000e-01   0.0000000e+00   1.0000000e+00   1
+   6.8750000e-01   0.0000000e+00   1.0000000e+00   1
+   7.8125000e-01   0.0000000e+00   1.0000000e+00   1
+   8.7500000e-01   0.0000000e+00   1.0000000e+00   1
+   9.6875000e-01   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   9.3750000e-01   1
+   1.0000000e+00   0.0000000e+00   8.4375000e-01   1
+   1.0000000e+00   0.0000000e+00   7.5000000e-01   1
+   1.0000000e+00   0.0000000e+00   6.5625000e-01   1
+   1.0000000e+00   0.0000000e+00   5.6250000e-01   1
+   1.0000000e+00   0.0000000e+00   4.6875000e-01   1
+   1.0000000e+00   0.0000000e+00   3.7500000e-01   1
+   1.0000000e+00   0.0000000e+00   2.8125000e-01   1
+   1.0000000e+00   0.0000000e+00   1.8750000e-01   1
+   1.0000000e+00   0.0000000e+00   9.3750000e-02   1

Added: packages/h5utils/branches/upstream/current/colormaps/jet
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/jet	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/jet	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,17 @@
+# variant of HSV (from Matlab) (blue-cyan-yellow-red)
+   0.0000000e+00   0.0000000e+00   7.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   2.5000000e-01   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   1.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   1.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   2.5000000e-01   1.0000000e+00   1.0000000e+00   1
+   5.0000000e-01   1.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   1.0000000e+00   5.0000000e-01   1
+   1.0000000e+00   1.0000000e+00   2.5000000e-01   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   7.5000000e-01   0.0000000e+00   1
+   1.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   2.5000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   7.5000000e-01   0.0000000e+00   0.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/lines
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/lines	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/lines	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# Color map of Matlab line colors
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   7.5000000e-01   7.5000000e-01   1
+   7.5000000e-01   0.0000000e+00   7.5000000e-01   1
+   7.5000000e-01   7.5000000e-01   0.0000000e+00   1
+   2.5000000e-01   2.5000000e-01   2.5000000e-01   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/pink
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/pink	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/pink	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,65 @@
+# pastel shades of pink color map (from Matlab) (black-pink-white)
+   1.1785113e-01   0.0000000e+00   0.0000000e+00   1
+   1.9585655e-01   1.0286890e-01   1.0286890e-01   1
+   2.5066050e-01   1.4547859e-01   1.4547859e-01   1
+   2.9546842e-01   1.7817416e-01   1.7817416e-01   1
+   3.3432392e-01   2.0573780e-01   2.0573780e-01   1
+   3.6911162e-01   2.3002185e-01   2.3002185e-01   1
+   4.0089186e-01   2.5197632e-01   2.5197632e-01   1
+   4.3033148e-01   2.7216553e-01   2.7216553e-01   1
+   4.5788217e-01   2.9095719e-01   2.9095719e-01   1
+   4.8386670e-01   3.0860670e-01   3.0860670e-01   1
+   5.0852520e-01   3.2530002e-01   3.2530002e-01   1
+   5.3204209e-01   3.4117754e-01   3.4117754e-01   1
+   5.5456260e-01   3.5634832e-01   3.5634832e-01   1
+   5.7620359e-01   3.7089909e-01   3.7089909e-01   1
+   5.9706070e-01   3.8490018e-01   3.8490018e-01   1
+   6.1721340e-01   3.9840954e-01   3.9840954e-01   1
+   6.3672858e-01   4.1147560e-01   4.1147560e-01   1
+   6.5566316e-01   4.2413934e-01   4.2413934e-01   1
+   6.7406608e-01   4.3643578e-01   4.3643578e-01   1
+   6.9197975e-01   4.4839514e-01   4.4839514e-01   1
+   7.0944124e-01   4.6004371e-01   4.6004371e-01   1
+   7.2648316e-01   4.7140452e-01   4.7140452e-01   1
+   7.4313436e-01   4.8249791e-01   4.8249791e-01   1
+   7.5942055e-01   4.9334191e-01   4.9334191e-01   1
+   7.6635604e-01   5.1754917e-01   5.0395263e-01   1
+   7.7322933e-01   5.4067369e-01   5.1434450e-01   1
+   7.8004206e-01   5.6284895e-01   5.2453053e-01   1
+   7.8679579e-01   5.8418305e-01   5.3452248e-01   1
+   7.9349205e-01   6.0476503e-01   5.4433105e-01   1
+   8.0013226e-01   6.2466922e-01   5.5396598e-01   1
+   8.0671783e-01   6.4395849e-01   5.6343617e-01   1
+   8.1325006e-01   6.6268653e-01   5.7274980e-01   1
+   8.1973024e-01   6.8089965e-01   5.8191437e-01   1
+   8.2615960e-01   6.9863813e-01   5.9093684e-01   1
+   8.3253930e-01   7.1593724e-01   5.9982361e-01   1
+   8.3887049e-01   7.3282811e-01   6.0858062e-01   1
+   8.4515425e-01   7.4933833e-01   6.1721340e-01   1
+   8.5139164e-01   7.6549254e-01   6.2572709e-01   1
+   8.5758366e-01   7.8131283e-01   6.3412649e-01   1
+   8.6373129e-01   7.9681907e-01   6.4241607e-01   1
+   8.6983548e-01   8.1202927e-01   6.5060005e-01   1
+   8.7589712e-01   8.2695975e-01   6.5868235e-01   1
+   8.8191710e-01   8.4162541e-01   6.6666667e-01   1
+   8.8789627e-01   8.5603985e-01   6.7455649e-01   1
+   8.9383544e-01   8.7021557e-01   6.8235509e-01   1
+   8.9973541e-01   8.8416403e-01   6.9006556e-01   1
+   9.0559694e-01   8.9789584e-01   6.9769082e-01   1
+   9.1142078e-01   9.1142078e-01   7.0523365e-01   1
+   9.1720763e-01   9.1720763e-01   7.2716562e-01   1
+   9.2295821e-01   9.2295821e-01   7.4845520e-01   1
+   9.2867317e-01   9.2867317e-01   7.6915572e-01   1
+   9.3435318e-01   9.3435318e-01   7.8931355e-01   1
+   9.3999887e-01   9.3999887e-01   8.0896923e-01   1
+   9.4561086e-01   9.4561086e-01   8.2815854e-01   1
+   9.5118973e-01   9.5118973e-01   8.4691316e-01   1
+   9.5673607e-01   9.5673607e-01   8.6526138e-01   1
+   9.6225045e-01   9.6225045e-01   8.8322851e-01   1
+   9.6773340e-01   9.6773340e-01   9.0083735e-01   1
+   9.7318546e-01   9.7318546e-01   9.1810853e-01   1
+   9.7860715e-01   9.7860715e-01   9.3506076e-01   1
+   9.8399897e-01   9.8399897e-01   9.5171107e-01   1
+   9.8936140e-01   9.8936140e-01   9.6807506e-01   1
+   9.9469492e-01   9.9469492e-01   9.8416699e-01   1
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/prism
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/prism	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/prism	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,17 @@
+# prism color map (from Matlab) (red-yellow-green-blue-purple-<repeat>-green)
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   6.6666667e-01   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   6.6666667e-01   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   0.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/spring
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/spring	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/spring	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,17 @@
+# magenta-yellow color map (from Matlab)
+   1.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   6.6666667e-02   9.3333333e-01   1
+   1.0000000e+00   1.3333333e-01   8.6666667e-01   1
+   1.0000000e+00   2.0000000e-01   8.0000000e-01   1
+   1.0000000e+00   2.6666667e-01   7.3333333e-01   1
+   1.0000000e+00   3.3333333e-01   6.6666667e-01   1
+   1.0000000e+00   4.0000000e-01   6.0000000e-01   1
+   1.0000000e+00   4.6666667e-01   5.3333333e-01   1
+   1.0000000e+00   5.3333333e-01   4.6666667e-01   1
+   1.0000000e+00   6.0000000e-01   4.0000000e-01   1
+   1.0000000e+00   6.6666667e-01   3.3333333e-01   1
+   1.0000000e+00   7.3333333e-01   2.6666667e-01   1
+   1.0000000e+00   8.0000000e-01   2.0000000e-01   1
+   1.0000000e+00   8.6666667e-01   1.3333333e-01   1
+   1.0000000e+00   9.3333333e-01   6.6666667e-02   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1

Added: packages/h5utils/branches/upstream/current/colormaps/summer
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/summer	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/summer	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,17 @@
+# green-yellow color map (from Matlab)
+   0.0000000e+00   5.0000000e-01   4.0000000e-01   1
+   6.6666667e-02   5.3333333e-01   4.0000000e-01   1
+   1.3333333e-01   5.6666667e-01   4.0000000e-01   1
+   2.0000000e-01   6.0000000e-01   4.0000000e-01   1
+   2.6666667e-01   6.3333333e-01   4.0000000e-01   1
+   3.3333333e-01   6.6666667e-01   4.0000000e-01   1
+   4.0000000e-01   7.0000000e-01   4.0000000e-01   1
+   4.6666667e-01   7.3333333e-01   4.0000000e-01   1
+   5.3333333e-01   7.6666667e-01   4.0000000e-01   1
+   6.0000000e-01   8.0000000e-01   4.0000000e-01   1
+   6.6666667e-01   8.3333333e-01   4.0000000e-01   1
+   7.3333333e-01   8.6666667e-01   4.0000000e-01   1
+   8.0000000e-01   9.0000000e-01   4.0000000e-01   1
+   8.6666667e-01   9.3333333e-01   4.0000000e-01   1
+   9.3333333e-01   9.6666667e-01   4.0000000e-01   1
+   1.0000000e+00   1.0000000e+00   4.0000000e-01   1

Added: packages/h5utils/branches/upstream/current/colormaps/vga
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/vga	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/vga	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,17 @@
+# Windows 4-bit colormap (from Matlab)
+   1.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   7.5000000e-01   7.5000000e-01   7.5000000e-01   1
+   1.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   1.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   0.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   1.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   0.0000000e+00   0.0000000e+00   1
+   5.0000000e-01   5.0000000e-01   5.0000000e-01   1
+   5.0000000e-01   0.0000000e+00   0.0000000e+00   1
+   5.0000000e-01   5.0000000e-01   0.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   0.0000000e+00   1
+   0.0000000e+00   5.0000000e-01   5.0000000e-01   1
+   0.0000000e+00   0.0000000e+00   5.0000000e-01   1
+   5.0000000e-01   0.0000000e+00   5.0000000e-01   1

Added: packages/h5utils/branches/upstream/current/colormaps/winter
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/winter	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/winter	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# blue-green color map (based on Matlab colormap)
+   0.0000000e+00   0.0000000e+00   1.0000000e+00   1
+   0.0000000e+00   1.0000000e+00   5.0000000e-01   1

Added: packages/h5utils/branches/upstream/current/colormaps/yarg
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/yarg	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/yarg	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# yarg (backwards gray) color map (transparent black to opaque white)
+0 0 0   0
+1 1 1   1

Added: packages/h5utils/branches/upstream/current/colormaps/yellow
===================================================================
--- packages/h5utils/branches/upstream/current/colormaps/yellow	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/colormaps/yellow	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,3 @@
+# yellow color map (white to yellow)
+1 1 1   0
+1 1 0   1

Added: packages/h5utils/branches/upstream/current/compile
===================================================================
--- packages/h5utils/branches/upstream/current/compile	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/compile	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-02-03.08
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# 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.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: packages/h5utils/branches/upstream/current/compile
___________________________________________________________________
Name: svn:executable
   + 

Added: packages/h5utils/branches/upstream/current/config.h.in
===================================================================
--- packages/h5utils/branches/upstream/current/config.h.in	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/config.h.in	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,93 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* datadir installation prefix */
+#undef DATADIR
+
+/* Define to 1 if you have the <hdf.h> header file. */
+#undef HAVE_HDF_H
+
+/* Define to 1 if you have the <hdf/hdf.h> header file. */
+#undef HAVE_HDF_HDF_H
+
+/* Define if you have htonl. */
+#undef HAVE_HTONL
+
+/* Define if you have htons. */
+#undef HAVE_HTONS
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* 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 <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <vis5d/v5d.h> header file. */
+#undef HAVE_VIS5D_V5D_H
+
+/* [Define], [if], [you], [have], [the], [<vis5d+/v5d.h>], [header], [file.]
+   */
+#undef HAVE_VIS5Dp_V5D_H
+
+/* 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 `float', as computed by sizeof. */
+#undef SIZEOF_FLOAT
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* 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

Added: packages/h5utils/branches/upstream/current/configure
===================================================================
--- packages/h5utils/branches/upstream/current/configure	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/configure	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,7605 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for h5utils 1.10.
+#
+# Report bugs to <stevenj at alum.mit.edu>.
+#
+# Copyright (C) 2003 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.  ##
+## --------------------- ##
+
+# 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
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# 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 -z "`(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
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval 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
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# 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}
+
+# Identity of this package.
+PACKAGE_NAME='h5utils'
+PACKAGE_TARNAME='h5utils'
+PACKAGE_VERSION='1.10'
+PACKAGE_STRING='h5utils 1.10'
+PACKAGE_BUGREPORT='stevenj at alum.mit.edu'
+
+ac_unique_file="h5topng.c"
+# 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"
+
+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 install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT 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 EGREP H5TOPNG_MAN PNG_LIBS H4TOH5 H5TOH4 H4_LIBS MKOCTFILE OCTAVE H5READ OCT_INSTALL_DIR V5D_FILES V5D_INCLUDES datadir_val MORE_H5UTILS MORE_H5UTILS_MANS LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# 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=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# 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
+
+#
+# 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 h5utils 1.10 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+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
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of h5utils 1.10:";;
+   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 build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-hdf4             build hdf4 utils even if h4toh5 and h5toh4 are
+                          present
+  --without-octave        don't compile h5read Octave plugin
+  --with-v5d=<dir>        use Vis5d in <dir> for h5tov5d
+
+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
+
+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 <stevenj at alum.mit.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
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    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
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+h5utils configure 1.10
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 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 h5utils $as_me 1.10, which was
+generated by GNU Autoconf 2.59.  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
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# 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; }
+
+# 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
+
+    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
+
+    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
+
+    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
+
+    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 &&
+  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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.9"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&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.
+
+# 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"
+# OS/2's system install, which has a completely different semantic
+# ./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/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /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
+
+
+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'
+
+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 "$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
+
+# 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
+  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
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  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='h5utils'
+ VERSION='1.10'
+
+
+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"}
+
+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.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+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
+
+
+
+# Checks for programs.
+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
+/* 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 file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $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
+/* 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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+
+# 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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 \
+   '' \
+   '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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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.err 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
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch 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
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' 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
+
+
+
+# Checks for header files.
+
+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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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
+
+
+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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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
+/* 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
+/* 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 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
+
+
+
+echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 sin ();
+int
+main ()
+{
+sin ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_m_sin=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in snprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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 $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+MORE_H5UTILS=""
+MORE_H5UTILS_MANS=""
+
+###########################################################################
+
+if test "${enable_debug}" = "yes"; then
+	CFLAGS="-g"
+fi
+
+if test "$enable_debug" = yes || test "$USE_MAINTAINER_MODE" = yes; then
+	if test $ac_cv_c_compiler_gnu = yes; then
+		CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs" # -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations
+	fi
+fi
+
+###########################################################################
+
+H5TOPNG=yes
+PNG_LIBS=""
+
+echo "$as_me:$LINENO: checking for inflate in -lz" >&5
+echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_inflate+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
+/* 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 inflate ();
+int
+main ()
+{
+inflate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_inflate=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_inflate=no
+fi
+rm -f conftest.err 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_inflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
+if test $ac_cv_lib_z_inflate = yes; then
+  ok=yes
+else
+  ok=no
+fi
+
+if test "$ok" = "yes"; then
+	LIBS="-lz $LIBS"
+
+	echo "$as_me:$LINENO: checking for png_create_write_struct in -lpng" >&5
+echo $ECHO_N "checking for png_create_write_struct in -lpng... $ECHO_C" >&6
+if test "${ac_cv_lib_png_png_create_write_struct+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpng  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 png_create_write_struct ();
+int
+main ()
+{
+png_create_write_struct ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_png_png_create_write_struct=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_png_png_create_write_struct=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_write_struct" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_create_write_struct" >&6
+if test $ac_cv_lib_png_png_create_write_struct = yes; then
+  ok=yes
+else
+  ok=no
+fi
+
+	if test "$ok" = "yes"; then
+		PNG_LIBS="-lpng"
+	else
+		{ echo "$as_me:$LINENO: WARNING: can't find libpng: won't be able to compile h5topng" >&5
+echo "$as_me: WARNING: can't find libpng: won't be able to compile h5topng" >&2;}
+		H5TOPNG=no
+	fi
+else
+	{ echo "$as_me:$LINENO: WARNING: can't find libz: won't be able to compile h5topng" >&5
+echo "$as_me: WARNING: can't find libz: won't be able to compile h5topng" >&2;}
+	H5TOPNG=no
+fi
+
+if test $H5TOPNG = yes; then
+	MORE_H5UTILS="h5topng $MORE_H5UTILS"
+	H5TOPNG_MAN=h5topng.1
+fi
+
+
+
+
+###########################################################################
+
+echo "$as_me:$LINENO: checking for evaluator_get_variables in -lmatheval" >&5
+echo $ECHO_N "checking for evaluator_get_variables in -lmatheval... $ECHO_C" >&6
+if test "${ac_cv_lib_matheval_evaluator_get_variables+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmatheval  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 evaluator_get_variables ();
+int
+main ()
+{
+evaluator_get_variables ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_matheval_evaluator_get_variables=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_matheval_evaluator_get_variables=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_matheval_evaluator_get_variables" >&5
+echo "${ECHO_T}$ac_cv_lib_matheval_evaluator_get_variables" >&6
+if test $ac_cv_lib_matheval_evaluator_get_variables = yes; then
+  H5MATH=yes
+else
+  H5MATH=no
+fi
+
+
+if test $H5MATH = yes; then
+	MORE_H5UTILS="h5math $MORE_H5UTILS"
+	MORE_H5UTILS_MANS="h5math.1 $MORE_H5UTILS_MANS"
+else
+	{ echo "$as_me:$LINENO: WARNING: can't find libmatheval: won't be able to compile h5math" >&5
+echo "$as_me: WARNING: can't find libmatheval: won't be able to compile h5math" >&2;}
+fi
+
+###########################################################################
+
+# Only build h5fromh4 if we are using a version of HDF5 prior to 1.4, and
+# thus don't have the superior h4toh5 utility.  Similarly for h5toh4.
+# Extract the first word of "h4toh5", so it can be a program name with args.
+set dummy h4toh5; 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_H4TOH5+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$H4TOH5"; then
+  ac_cv_prog_H4TOH5="$H4TOH5" # 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_H4TOH5="h4toh5"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+H4TOH5=$ac_cv_prog_H4TOH5
+if test -n "$H4TOH5"; then
+  echo "$as_me:$LINENO: result: $H4TOH5" >&5
+echo "${ECHO_T}$H4TOH5" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "h5toh4", so it can be a program name with args.
+set dummy h5toh4; 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_H5TOH4+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$H5TOH4"; then
+  ac_cv_prog_H5TOH4="$H5TOH4" # 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_H5TOH4="h5toh4"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+H5TOH4=$ac_cv_prog_H5TOH4
+if test -n "$H5TOH4"; then
+  echo "$as_me:$LINENO: result: $H5TOH4" >&5
+echo "${ECHO_T}$H5TOH4" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+# Check whether --with-hdf4 or --without-hdf4 was given.
+if test "${with_hdf4+set}" = set; then
+  withval="$with_hdf4"
+  ok=$withval
+else
+  ok=maybe
+fi;
+if test "x$ok" = xyes; then
+	H4TOH5=""
+	H5TOH4=""
+elif test "x$ok" = xno; then
+	H4TOH5="h4toh5"
+	H5TOH4="h5toh4"
+fi
+
+HDF4=no
+if test "x$H4TOH5" != xh4toh5 -o "x$H5TOH4" != xh5toh4; then
+	echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
+echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
+if test "${ac_cv_lib_jpeg_jpeg_start_compress+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
+/* 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_compress ();
+int
+main ()
+{
+jpeg_start_compress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_compress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_jpeg_jpeg_start_compress=no
+fi
+rm -f conftest.err 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_compress" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
+if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
+  echo "$as_me:$LINENO: checking for DFSDgetdata in -ldf" >&5
+echo $ECHO_N "checking for DFSDgetdata in -ldf... $ECHO_C" >&6
+if test "${ac_cv_lib_df_DFSDgetdata+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldf -ljpeg $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 DFSDgetdata ();
+int
+main ()
+{
+DFSDgetdata ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_df_DFSDgetdata=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_df_DFSDgetdata=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_df_DFSDgetdata" >&5
+echo "${ECHO_T}$ac_cv_lib_df_DFSDgetdata" >&6
+if test $ac_cv_lib_df_DFSDgetdata = yes; then
+  H4_LIBS="-ldf -ljpeg"; HDF4=yes
+else
+  { echo "$as_me:$LINENO: WARNING: can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5" >&5
+echo "$as_me: WARNING: can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5" >&2;}
+fi
+
+else
+  { echo "$as_me:$LINENO: WARNING: can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5" >&5
+echo "$as_me: WARNING: can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5" >&2;}
+fi
+
+
+	if test $HDF4 = yes; then
+		if test "x$H4TOH5" != xh4toh5; then
+		   MORE_H5UTILS="h5fromh4 $MORE_H5UTILS"
+		   MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS"
+		fi
+		if test "x$H5TOH4" != xh5toh4; then
+		   MORE_H5UTILS="h4fromh5 $MORE_H5UTILS"
+		   # MORE_H5UTILS_MANS="h4fromh5.1 $MORE_H5UTILS_MANS"
+		fi
+	fi
+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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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 hdf.h hdf/hdf.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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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:$ac_c_preproc_warn_flag 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 compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&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;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------- ##
+## Report this to stevenj at alum.mit.edu ##
+## ----------------------------------- ##
+_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
+
+fi
+
+done
+
+
+
+
+###########################################################################
+
+echo "$as_me:$LINENO: checking for H5Fopen in -lhdf5" >&5
+echo $ECHO_N "checking for H5Fopen in -lhdf5... $ECHO_C" >&6
+if test "${ac_cv_lib_hdf5_H5Fopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhdf5  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 H5Fopen ();
+int
+main ()
+{
+H5Fopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_hdf5_H5Fopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_hdf5_H5Fopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_hdf5_H5Fopen" >&5
+echo "${ECHO_T}$ac_cv_lib_hdf5_H5Fopen" >&6
+if test $ac_cv_lib_hdf5_H5Fopen = yes; then
+  LIBS="-lhdf5 $LIBS"
+else
+  { { echo "$as_me:$LINENO: error: hdf5 libraries are required for compilation" >&5
+echo "$as_me: error: hdf5 libraries are required for compilation" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+###########################################################################
+
+
+# Check whether --with-octave or --without-octave was given.
+if test "${with_octave+set}" = set; then
+  withval="$with_octave"
+  ok=$withval
+else
+  ok=yes
+fi;
+
+H5READ=""
+OCT_INSTALL_DIR=""
+
+if test "x$ok" = xyes; then
+for ac_prog in mkoctfile
+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_MKOCTFILE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$MKOCTFILE"; then
+  ac_cv_prog_MKOCTFILE="$MKOCTFILE" # 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_MKOCTFILE="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+MKOCTFILE=$ac_cv_prog_MKOCTFILE
+if test -n "$MKOCTFILE"; then
+  echo "$as_me:$LINENO: result: $MKOCTFILE" >&5
+echo "${ECHO_T}$MKOCTFILE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$MKOCTFILE" && break
+done
+test -n "$MKOCTFILE" || MKOCTFILE="echo"
+
+if test "$MKOCTFILE" = "echo"; then
+	{ echo "$as_me:$LINENO: WARNING: can't find mkoctfile: won't be able to compile h5read.oct" >&5
+echo "$as_me: WARNING: can't find mkoctfile: won't be able to compile h5read.oct" >&2;}
+else
+	# try to find installation directory
+	for ac_prog in octave
+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_OCTAVE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$OCTAVE"; then
+  ac_cv_prog_OCTAVE="$OCTAVE" # 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_OCTAVE="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+OCTAVE=$ac_cv_prog_OCTAVE
+if test -n "$OCTAVE"; then
+  echo "$as_me:$LINENO: result: $OCTAVE" >&5
+echo "${ECHO_T}$OCTAVE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$OCTAVE" && break
+done
+test -n "$OCTAVE" || OCTAVE="echo"
+
+	echo "$as_me:$LINENO: checking where octave plugins go" >&5
+echo $ECHO_N "checking where octave plugins go... $ECHO_C" >&6
+	OCT_INSTALL_DIR=`echo "DEFAULT_LOADPATH" | $OCTAVE -q | tr ':' '\n' | grep "site/oct" | head -1`
+	if test -n "$OCT_INSTALL_DIR"; then
+		echo "$as_me:$LINENO: result: $OCT_INSTALL_DIR" >&5
+echo "${ECHO_T}$OCT_INSTALL_DIR" >&6
+		H5READ=h5read.oct
+	else
+		echo "$as_me:$LINENO: result: unknown" >&5
+echo "${ECHO_T}unknown" >&6
+		{ echo "$as_me:$LINENO: WARNING: can't find where to install octave plugins: won't be able to compile h5read.oct" >&5
+echo "$as_me: WARNING: can't find where to install octave plugins: won't be able to compile h5read.oct" >&2;}
+	fi
+fi
+fi
+
+
+
+
+###########################################################################
+
+
+# Check whether --with-v5d or --without-v5d was given.
+if test "${with_v5d+set}" = set; then
+  withval="$with_v5d"
+  ok=$withval
+else
+  ok=yes
+fi;
+H5TOV5D=no
+V5D_FILES=""
+V5D_INCLUDES=""
+if test "$ok" = "yes"; then
+	echo "$as_me:$LINENO: checking for v5dCreate in -lv5d" >&5
+echo $ECHO_N "checking for v5dCreate in -lv5d... $ECHO_C" >&6
+if test "${ac_cv_lib_v5d_v5dCreate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lv5d  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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 v5dCreate ();
+int
+main ()
+{
+v5dCreate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_v5d_v5dCreate=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_v5d_v5dCreate=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_v5d_v5dCreate" >&5
+echo "${ECHO_T}$ac_cv_lib_v5d_v5dCreate" >&6
+if test $ac_cv_lib_v5d_v5dCreate = yes; then
+  V5D_FILES="-lv5d"; H5TOV5D=yes
+fi
+
+
+for ac_header in vis5d/v5d.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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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:$ac_c_preproc_warn_flag 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 compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&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;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------- ##
+## Report this to stevenj at alum.mit.edu ##
+## ----------------------------------- ##
+_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
+
+fi
+
+done
+
+	if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for vis5d+/v5d.h" >&5
+echo $ECHO_N "checking for vis5d+/v5d.h... $ECHO_C" >&6
+if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_vis5dp_v5d_h" >&5
+echo "${ECHO_T}$ac_cv_header_vis5dp_v5d_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking vis5d+/v5d.h usability" >&5
+echo $ECHO_N "checking vis5d+/v5d.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <vis5d+/v5d.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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 vis5d+/v5d.h presence" >&5
+echo $ECHO_N "checking vis5d+/v5d.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <vis5d+/v5d.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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: vis5d+/v5d.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------- ##
+## Report this to stevenj at alum.mit.edu ##
+## ----------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for vis5d+/v5d.h" >&5
+echo $ECHO_N "checking for vis5d+/v5d.h... $ECHO_C" >&6
+if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_vis5dp_v5d_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_vis5dp_v5d_h" >&5
+echo "${ECHO_T}$ac_cv_header_vis5dp_v5d_h" >&6
+
+fi
+if test $ac_cv_header_vis5dp_v5d_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VIS5Dp_V5D_H 1
+_ACEOF
+
+fi
+
+
+elif test "$ok" != "no"; then
+	echo "$as_me:$LINENO: checking for Vis5d object files and headers" >&5
+echo $ECHO_N "checking for Vis5d object files and headers... $ECHO_C" >&6
+	if test -r "$ok/src/v5d.o" -a -r "$ok/src/binio.o" -a -r "$ok/src/v5d.h" -a -r "$ok/src/binio.h"; then
+		V5D_FILES="$ok/src/v5d.o $ok/src/binio.o"
+		V5D_INCLUDES="-I$ok/src"
+	elif test -r "$ok/v5d.o" -a -r "$ok/binio.o" -a -r "$ok/v5d.h" -a -r "$ok/binio.h"; then
+		V5D_FILES="$ok/v5d.o $ok/binio.o"
+		V5D_INCLUDES="-I$ok"
+	fi
+	if test -z "$V5D_FILES"; then
+		echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+		{ { echo "$as_me:$LINENO: error: couldn't read Vis5D object files in $ok" >&5
+echo "$as_me: error: couldn't read Vis5D object files in $ok" >&2;}
+   { (exit 1); exit 1; }; }
+	else
+		echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+	fi
+	H5TOV5D=yes
+fi
+if test $H5TOV5D = yes; then
+	MORE_H5UTILS="h5tov5d $MORE_H5UTILS"
+	MORE_H5UTILS_MANS="h5tov5d.1 $MORE_H5UTILS_MANS"
+fi
+
+
+
+###########################################################################
+
+
+for ac_header in netinet/in.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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_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:$ac_c_preproc_warn_flag 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 compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&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;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------- ##
+## Report this to stevenj at alum.mit.edu ##
+## ----------------------------------- ##
+_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
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for htons" >&5
+echo $ECHO_N "checking for htons... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+int
+main ()
+{
+unsigned short i; htons(i);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+  htons=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HTONS 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+htons=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $htons" >&5
+echo "${ECHO_T}$htons" >&6
+
+echo "$as_me:$LINENO: checking for unsigned long" >&5
+echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
+if test "${ac_cv_type_unsigned_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((unsigned long *) 0)
+  return 0;
+if (sizeof (unsigned long))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_unsigned_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_unsigned_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
+
+echo "$as_me:$LINENO: checking size of unsigned long" >&5
+echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_unsigned_long" = 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
+/* 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 (unsigned long))) >= 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+/* 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 (unsigned long))) <= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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 (unsigned long))) < 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+/* 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 (unsigned long))) >= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err 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
+/* 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 (unsigned long))) <= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long), 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
+/* 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 (unsigned long)); }
+unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (unsigned long))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (unsigned long))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (unsigned long))))
+	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_unsigned_long=`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 (unsigned long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f 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_unsigned_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for float" >&5
+echo $ECHO_N "checking for float... $ECHO_C" >&6
+if test "${ac_cv_type_float+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((float *) 0)
+  return 0;
+if (sizeof (float))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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_float=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_float=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
+echo "${ECHO_T}$ac_cv_type_float" >&6
+
+echo "$as_me:$LINENO: checking size of float" >&5
+echo $ECHO_N "checking size of float... $ECHO_C" >&6
+if test "${ac_cv_sizeof_float+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_float" = 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
+/* 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 (float))) >= 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+/* 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 (float))) <= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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 (float))) < 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+/* 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 (float))) >= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err 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
+/* 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 (float))) <= $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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_float=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (float), 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
+/* 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 (float)); }
+unsigned long ulongval () { return (long) (sizeof (float)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (float))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (float))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (float))))
+	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_float=`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 (float), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (float), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f 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_float=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
+echo "${ECHO_T}$ac_cv_sizeof_float" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_FLOAT $ac_cv_sizeof_float
+_ACEOF
+
+
+
+if test "x$ac_cv_sizeof_unsigned_long" = "x$ac_cv_sizeof_float"; then
+	echo "$as_me:$LINENO: checking for htonl" >&5
+echo $ECHO_N "checking for htonl... $ECHO_C" >&6
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+int
+main ()
+{
+unsigned short i; htonl(i);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+  htonl=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HTONL 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+htonl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+	echo "$as_me:$LINENO: result: $htonl" >&5
+echo "${ECHO_T}$htonl" >&6
+fi
+
+if test "x$htons" != xyes -o "x$htonl" != xyes; then
+	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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err 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
+/* 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>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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (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); }; } &&
+	 { 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.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err 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)
+     ;;
+  *)
+    { { 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
+
+fi
+
+###########################################################################
+
+# Store datadir (e.g. /usr/local/share) in DATADIR #define.
+
+# Requires some hackery to actually get this value...
+save_prefix=$prefix
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+eval datadir_val=$datadir
+prefix=$save_prefix
+
+
+cat >>confdefs.h <<_ACEOF
+#define DATADIR "$datadir_val"
+_ACEOF
+
+
+
+###########################################################################
+
+
+###########################################################################
+
+                    ac_config_files="$ac_config_files Makefile h5topng.1"
+
+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.
+#
+# 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.
+
+_ACEOF
+
+# 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
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# 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
+
+DEFS=-DHAVE_CONFIG_H
+
+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
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+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
+
+: ${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.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# 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
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# 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 -z "`(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:$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
+
+  # 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; }; }
+
+  # 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
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval 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 h5utils $as_me 1.10, which was
+generated by GNU Autoconf 2.59.  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="\\
+h5utils config.status 1.10
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 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
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_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
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+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" ;;
+  "h5topng.1" ) CONFIG_FILES="$CONFIG_FILES h5topng.1" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.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
+
+# 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
+}
+
+# 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
+
+#
+# CONFIG_FILES section.
+#
+
+# 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 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 mkdir_p@,$mkdir_p,;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 AMTAR@,$AMTAR,;t t
+s, at am__tar@,$am__tar,;t t
+s, at am__untar@,$am__untar,;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 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 EGREP@,$EGREP,;t t
+s, at H5TOPNG_MAN@,$H5TOPNG_MAN,;t t
+s, at PNG_LIBS@,$PNG_LIBS,;t t
+s, at H4TOH5@,$H4TOH5,;t t
+s, at H5TOH4@,$H5TOH4,;t t
+s, at H4_LIBS@,$H4_LIBS,;t t
+s, at MKOCTFILE@,$MKOCTFILE,;t t
+s, at OCTAVE@,$OCTAVE,;t t
+s, at H5READ@,$H5READ,;t t
+s, at OCT_INSTALL_DIR@,$OCT_INSTALL_DIR,;t t
+s, at V5D_FILES@,$V5D_FILES,;t t
+s, at V5D_INCLUDES@,$V5D_INCLUDES,;t t
+s, at datadir_val@,$datadir_val,;t t
+s, at MORE_H5UTILS@,$MORE_H5UTILS,;t t
+s, at MORE_H5UTILS_MANS@,$MORE_H5UTILS_MANS,;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
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  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; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 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'`
+  { 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
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    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
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  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 "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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
+


Property changes on: packages/h5utils/branches/upstream/current/configure
___________________________________________________________________
Name: svn:executable
   + 

Added: packages/h5utils/branches/upstream/current/configure.ac
===================================================================
--- packages/h5utils/branches/upstream/current/configure.ac	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/configure.ac	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,229 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(h5utils, 1.10, stevenj at alum.mit.edu)
+AM_INIT_AUTOMAKE(1.6)
+AC_CONFIG_SRCDIR([h5topng.c])
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for header files.
+AC_HEADER_STDC
+
+AC_CHECK_LIB(m, sin)
+AC_CHECK_FUNCS(snprintf)
+
+MORE_H5UTILS=""
+MORE_H5UTILS_MANS=""
+
+###########################################################################
+
+dnl override CFLAGS selection when debugging
+if test "${enable_debug}" = "yes"; then
+	CFLAGS="-g"
+fi
+
+dnl add gcc warnings, in debug/maintainer mode only
+if test "$enable_debug" = yes || test "$USE_MAINTAINER_MODE" = yes; then
+	if test $ac_cv_prog_gcc = yes; then
+		CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs" # -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations 
+	fi
+fi
+
+###########################################################################
+
+H5TOPNG=yes
+PNG_LIBS=""
+
+AC_CHECK_LIB(z, inflate, ok=yes, ok=no)
+if test "$ok" = "yes"; then
+	LIBS="-lz $LIBS"
+
+	AC_CHECK_LIB(png, png_create_write_struct, ok=yes, ok=no)
+	if test "$ok" = "yes"; then
+		PNG_LIBS="-lpng"
+	else
+		AC_MSG_WARN([can't find libpng: won't be able to compile h5topng])
+		H5TOPNG=no
+	fi
+else
+	AC_MSG_WARN([can't find libz: won't be able to compile h5topng])
+	H5TOPNG=no
+fi
+
+if test $H5TOPNG = yes; then
+	MORE_H5UTILS="h5topng $MORE_H5UTILS"
+	H5TOPNG_MAN=h5topng.1
+fi
+
+AC_SUBST(H5TOPNG_MAN)
+AC_SUBST(PNG_LIBS)
+
+###########################################################################
+
+AC_CHECK_LIB(matheval, evaluator_get_variables, H5MATH=yes, H5MATH=no)
+
+if test $H5MATH = yes; then
+	MORE_H5UTILS="h5math $MORE_H5UTILS"
+	MORE_H5UTILS_MANS="h5math.1 $MORE_H5UTILS_MANS"
+else
+	AC_MSG_WARN([can't find libmatheval: won't be able to compile h5math])
+fi
+
+###########################################################################
+
+# Only build h5fromh4 if we are using a version of HDF5 prior to 1.4, and
+# thus don't have the superior h4toh5 utility.  Similarly for h5toh4.
+AC_CHECK_PROG(H4TOH5, h4toh5, h4toh5)
+AC_CHECK_PROG(H5TOH4, h5toh4, h5toh4)
+
+AC_ARG_WITH(hdf4,
+	[AC_HELP_STRING([--with-hdf4], [build hdf4 utils even if h4toh5 and h5toh4 are present])],
+	ok=$withval, ok=maybe)
+if test "x$ok" = xyes; then
+	H4TOH5=""
+	H5TOH4=""
+elif test "x$ok" = xno; then
+	H4TOH5="h4toh5"
+	H5TOH4="h5toh4"
+fi
+
+HDF4=no
+if test "x$H4TOH5" != xh4toh5 -o "x$H5TOH4" != xh5toh4; then
+	AC_CHECK_LIB(jpeg, jpeg_start_compress,
+		[AC_CHECK_LIB(df, DFSDgetdata,
+			[H4_LIBS="-ldf -ljpeg"; HDF4=yes],
+			[AC_MSG_WARN([can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5])], -ljpeg)],
+		[AC_MSG_WARN([can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5])])
+
+	if test $HDF4 = yes; then
+		if test "x$H4TOH5" != xh4toh5; then
+		   MORE_H5UTILS="h5fromh4 $MORE_H5UTILS"
+		   MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS"
+		fi
+		if test "x$H5TOH4" != xh5toh4; then
+		   MORE_H5UTILS="h4fromh5 $MORE_H5UTILS"
+		   # MORE_H5UTILS_MANS="h4fromh5.1 $MORE_H5UTILS_MANS"
+		fi
+	fi
+fi
+AC_CHECK_HEADERS(hdf.h hdf/hdf.h)
+
+AC_SUBST(H4_LIBS)
+
+###########################################################################
+
+AC_CHECK_LIB(hdf5, H5Fopen, [LIBS="-lhdf5 $LIBS"],
+	     [AC_MSG_ERROR([hdf5 libraries are required for compilation])])
+
+###########################################################################
+
+AC_ARG_WITH(octave, [AC_HELP_STRING([--without-octave], [don't compile h5read Octave plugin])], ok=$withval, ok=yes)
+
+H5READ=""
+OCT_INSTALL_DIR=""
+
+if test "x$ok" = xyes; then
+AC_CHECK_PROGS(MKOCTFILE, mkoctfile, echo)
+if test "$MKOCTFILE" = "echo"; then
+	AC_MSG_WARN([can't find mkoctfile: won't be able to compile h5read.oct])
+else
+	# try to find installation directory
+	AC_CHECK_PROGS(OCTAVE, octave, echo)
+	AC_MSG_CHECKING(where octave plugins go)
+	OCT_INSTALL_DIR=`echo "DEFAULT_LOADPATH" | $OCTAVE -q | tr ':' '\n' | grep "site/oct" | head -1`
+	if test -n "$OCT_INSTALL_DIR"; then
+		AC_MSG_RESULT($OCT_INSTALL_DIR)
+		H5READ=h5read.oct
+	else
+		AC_MSG_RESULT(unknown)
+		AC_MSG_WARN([can't find where to install octave plugins: won't be able to compile h5read.oct])
+	fi
+fi
+fi
+
+AC_SUBST(H5READ)
+AC_SUBST(OCT_INSTALL_DIR)
+
+###########################################################################
+
+AC_ARG_WITH(v5d, [AC_HELP_STRING([--with-v5d=<dir>], [use Vis5d in <dir> for h5tov5d])], ok=$withval, ok=yes)
+H5TOV5D=no
+V5D_FILES=""
+V5D_INCLUDES=""
+if test "$ok" = "yes"; then
+	AC_CHECK_LIB(v5d, v5dCreate, V5D_FILES="-lv5d"; H5TOV5D=yes)
+	AC_CHECK_HEADERS(vis5d/v5d.h)
+	AC_CHECK_HEADER(vis5d+/v5d.h, [AC_DEFINE([HAVE_VIS5Dp_V5D_H], 1, [[Define if you have the <vis5d+/v5d.h> header file.]])])
+elif test "$ok" != "no"; then
+	AC_MSG_CHECKING([for Vis5d object files and headers])
+	if test -r "$ok/src/v5d.o" -a -r "$ok/src/binio.o" -a -r "$ok/src/v5d.h" -a -r "$ok/src/binio.h"; then
+		V5D_FILES="$ok/src/v5d.o $ok/src/binio.o"
+		V5D_INCLUDES="-I$ok/src"
+	elif test -r "$ok/v5d.o" -a -r "$ok/binio.o" -a -r "$ok/v5d.h" -a -r "$ok/binio.h"; then
+		V5D_FILES="$ok/v5d.o $ok/binio.o"
+		V5D_INCLUDES="-I$ok"
+	fi
+	if test -z "$V5D_FILES"; then
+		AC_MSG_RESULT([not found])
+		AC_MSG_ERROR([couldn't read Vis5D object files in $ok])
+	else
+		AC_MSG_RESULT([found])
+	fi
+	H5TOV5D=yes
+fi
+if test $H5TOV5D = yes; then
+	MORE_H5UTILS="h5tov5d $MORE_H5UTILS"
+	MORE_H5UTILS_MANS="h5tov5d.1 $MORE_H5UTILS_MANS"
+fi
+AC_SUBST(V5D_FILES)
+AC_SUBST(V5D_INCLUDES)
+
+###########################################################################
+
+AC_CHECK_HEADERS([netinet/in.h])
+
+AC_MSG_CHECKING([for htons])
+AC_TRY_LINK([#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif], [unsigned short i; htons(i);], [htons=yes
+	AC_DEFINE([HAVE_HTONS],1,[Define if you have htons.])], htons=no)
+AC_MSG_RESULT($htons)
+
+AC_CHECK_SIZEOF(unsigned long)
+AC_CHECK_SIZEOF(float)
+
+if test "x$ac_cv_sizeof_unsigned_long" = "x$ac_cv_sizeof_float"; then
+	AC_MSG_CHECKING([for htonl])
+	AC_TRY_LINK([#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif], [unsigned short i; htonl(i);], [htonl=yes
+	     AC_DEFINE([HAVE_HTONL],1,[Define if you have htonl.])], htonl=no)
+	AC_MSG_RESULT($htonl)
+fi
+
+if test "x$htons" != xyes -o "x$htonl" != xyes; then
+	AC_C_BIGENDIAN
+fi
+
+###########################################################################
+
+# Store datadir (e.g. /usr/local/share) in DATADIR #define.
+
+# Requires some hackery to actually get this value...
+save_prefix=$prefix
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+eval datadir_val=$datadir
+prefix=$save_prefix
+
+AC_DEFINE_UNQUOTED(DATADIR, "$datadir_val", [datadir installation prefix])
+AC_SUBST(datadir_val)
+
+###########################################################################
+AC_SUBST(MORE_H5UTILS)
+AC_SUBST(MORE_H5UTILS_MANS)
+###########################################################################
+
+AC_CONFIG_FILES([Makefile h5topng.1])
+AC_OUTPUT

Added: packages/h5utils/branches/upstream/current/copyright.h
===================================================================
--- packages/h5utils/branches/upstream/current/copyright.h	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/copyright.h	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,28 @@
+#ifndef COPYRIGHT_H
+#define COPYRIGHT_H
+
+/* License and copyright string for inclusion in program output: */
+
+#define COPYRIGHT \
+"Copyright (c) 2005 Massachusetts Institute of Technology\n"\
+"\n"\
+"Permission is hereby granted, free of charge, to any person obtaining\n"\
+"a copy of this software and associated documentation files (the\n"\
+"\"Software\"), to deal in the Software without restriction, including\n"\
+"without limitation the rights to use, copy, modify, merge, publish,\n"\
+"distribute, sublicense, and/or sell copies of the Software, and to\n"\
+"permit persons to whom the Software is furnished to do so, subject to\n"\
+"the following conditions:\n"\
+"\n"\
+"The above copyright notice and this permission notice shall be\n"\
+"included in all copies or substantial portions of the Software.\n"\
+"\n"\
+"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"\
+"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n"\
+"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n"\
+"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n"\
+"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n"\
+"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n"\
+"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
+
+#endif

Added: packages/h5utils/branches/upstream/current/depcomp
===================================================================
--- packages/h5utils/branches/upstream/current/depcomp	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/depcomp	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,529 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-02-09.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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.
+
+# 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 Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: packages/h5utils/branches/upstream/current/depcomp
___________________________________________________________________
Name: svn:executable
   + 

Added: packages/h5utils/branches/upstream/current/h4fromh5.c
===================================================================
--- packages/h5utils/branches/upstream/current/h4fromh5.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h4fromh5.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,157 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "arrayh4.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h4fromh5 error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h4fromh5 [options] [<hdf4-files>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "         -T : transposed output\n"
+	     "  -o <file> : output to HDF4 file <file>\n"
+	     "  -d <name> : use dataset <name> in the input file\n"
+	     "              -- you can also specify a dataset via <file>:<name>\n"
+	  );
+}
+
+int main(int argc, char **argv)
+{
+     char *h4_fname = NULL;
+     char *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int ifile;
+     int verbose = 0, transpose = 0;
+
+     while ((c = getopt(argc, argv, "hd:vTo:V")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h4fromh5 " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case 'o':
+		   free(h4_fname);
+		   h4_fname = my_strdup(optarg);
+		   break;
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     if (h4_fname && optind + 1 < argc) {
+	  fprintf(stderr, "h4fromh5: only one .h5 file can be used with -o\n");
+	  return EXIT_FAILURE;
+     }
+
+     for (ifile = optind; ifile < argc; ++ifile) {
+	  char *h5_fname, *dname;
+	  arrayh4 a4;
+	  int i, err;
+	  int32 dims_copy[ARRAYH4_MAX_RANK];
+	  char *cur_h4_fname = h4_fname;
+	  arrayh5 a;
+
+	  h5_fname = split_fname(argv[ifile], &dname);
+	  if (!dname[0])
+               dname = data_name;
+
+	  if (!cur_h4_fname)
+	       cur_h4_fname = replace_suffix(h5_fname, ".h5", ".hdf");
+
+	  if (verbose)
+	       printf("Reading HDF5 input file \"%s\"...\n", h5_fname);
+	  err = arrayh5_read(&a, h5_fname, dname, NULL, 0, 0, 0, 0);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+
+	  if (transpose)
+	       arrayh5_transpose(&a);
+
+	  CHECK(a.rank <= ARRAYH4_MAX_RANK, "HDF5 rank is too big");
+	  for (i = 0; i < a.rank; ++i)
+	       dims_copy[i] = a.dims[i];
+
+	  CHECK(arrayh4_create(&a4, DFNT_FLOAT64, a.rank, dims_copy),
+		"error allocating HDF4 data");
+	  
+	  for (i = 0; i < a.N; ++i)
+	       a4.p.d[i] = a.data[i];
+
+	  if (verbose) {
+	       double a_min, a_max;
+	       arrayh5_getrange(a, &a_min, &a_max);
+	       printf("data ranges from %g to %g.\n", a_min, a_max);
+	  }
+	  
+	  if (verbose) {
+	       int i;
+	       printf("Writing size %d", a.dims[0]);
+	       for (i = 1; i < a.rank; ++i)
+		    printf("x%d", a.dims[i]);
+	       printf(" data to %s\n", cur_h4_fname);
+	  }
+
+	  arrayh5_destroy(a);
+
+	  arrayh4_write(cur_h4_fname, a4);
+	  arrayh4_destroy(a4);
+
+	  if (h4_fname != cur_h4_fname)
+	       free(cur_h4_fname);
+	  free(h5_fname);
+     }
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5fromh4.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5fromh4.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5fromh4.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2005 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5FROMH4 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5fromh4 \- convert HDF4 scientific datasets to an HDF5 file
+.SH SYNOPSIS
+.B h5fromh4
+[\fIOPTION\fR]... [\fIHDF4FILE\fR]...
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5fromh4 takes one or more files in HDF4 format and outputs files in
+HDF5 format containing the datasets from the HDF4 files.  (Currently,
+only a single dataset per HDF4 file is converted.)
+
+HDF4 and HDF5 are free, portable binary formats and supporting libraries
+developed by the National Center for Supercomputing Applications at
+the University of Illinois in Urbana-Champaign.
+
+A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5fromh4
+creates a dataset called "data", but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR with the
+.B -o
+option.  The
+.B -a
+option can be used to append new datasets to an existing HDF5 file.
+If the
+.B -o
+option is used and multiple HDF4 files are specified, all the HDF4
+datasets are output into that HDF5 file with the input filenames
+(minus the ".hdf" suffix) used as the dataset names.
+
+The most basic usage is something like \'h5fromh4 foo.hdf\', which
+will output a file foo.h5 containing the scientific dataset from
+foo.hdf.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5fromh4.
+.TP
+.B -v
+Verbose output.
+.TP
+.B -a
+If the HDF5 output file already exists, append the data as a new
+dataset rather than overwriting the file (the default behavior).  An
+existing dataset of the same name within the file is overwritten,
+however.
+.TP
+\fB\-o\fR \fIfile\fR
+Send HDF5 output to
+.I file
+rather than to the input filename with .hdf replaced with .h5 (the
+default).  If multiple input files were specified, this causes all
+input datasets to be stored in
+.I file
+(rather than in separate files), with the input filenames (minus the .hdf
+suffix) as the dataset names.
+.TP
+\fB\-d\fR \fIname\fR
+Write to dataset
+.I name
+in the output; otherwise, the output dataset is called "data" by default.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR with the
+.B -o
+option.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5fromh4.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5fromh4.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5fromh4.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,174 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "arrayh4.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5fromh4 error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5fromh4 [options] [<hdf4-files>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "  -o <file> : output to HDF5 file <file>\n"
+             "         -a : append to existing hdf5 file\n"
+	     "  -d <name> : use dataset <name> in the output file (default: \"data\")\n"
+	     "              -- you can also specify a dataset via <file>:<name>\n"
+	  );
+}
+
+int main(int argc, char **argv)
+{
+     char *dname, *h5_fname = NULL;
+     char *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int ifile;
+     int verbose = 0;
+     int append = 0;
+
+     while ((c = getopt(argc, argv, "hd:vo:aV")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5fromh4 " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'a':
+		   append = 1;
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case 'o':
+		   free(h5_fname);
+		   h5_fname = split_fname(optarg, &dname);
+		   if (dname[0]) {
+			free(data_name);
+			data_name = dname;
+		   }
+		   break;		   
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     for (ifile = optind; ifile < argc; ++ifile) {
+	  char *h4_fname = argv[ifile];
+	  arrayh4 a4;
+	  int i, dims_copy[ARRAYH4_MAX_RANK];
+	  char *cur_h5_fname = h5_fname;
+	  arrayh5 a;
+
+	  if (!cur_h5_fname)
+	       cur_h5_fname = replace_suffix(h4_fname, ".hdf", ".h5");
+
+	  /* If we specified -o (to concatenate several HDF4 files into
+	     a single HDF5 file) and if there is more than one filename
+	     argument, use the filename (minus ".hdf") as the dataset name. */
+	  if (h5_fname && optind + 1 < argc) {
+	       dname = my_strdup(h4_fname);
+	       /* remove ".hdf" from dataset name: */
+	       if (strlen(dname) >= strlen(".hdf") &&
+		   !strcmp(dname + strlen(dname)-strlen(".hdf"),
+			   ".hdf"))
+		    dname[strlen(dname) - strlen(".hdf")] = 0;
+	  }
+	  else {
+	       dname = data_name;
+	       if (!dname)
+		    dname = my_strdup("data");
+	  }
+	  
+	  if (verbose)
+	       printf("Reading HDF4 input file \"%s\"...\n", h4_fname);
+	  CHECK(arrayh4_read(h4_fname, &a4, 0), "error reading HDF4 file");
+
+	  for (i = 0; i < a4.rank; ++i)
+	       dims_copy[i] = a4.dims[i];
+
+	  a = arrayh5_create(a4.rank, dims_copy);
+	  
+	  if (a4.numtype == DFNT_FLOAT64) {
+	       for (i = 0; i < a4.N; ++i)
+		    a.data[i] = a4.p.d[i];
+	  }
+	  else if (a4.numtype == DFNT_FLOAT32) {
+	       for (i = 0; i < a4.N; ++i)
+		    a.data[i] = a4.p.f[i];
+	  }
+	  else {
+	       CHECK(0, "unknown HDF4 numeric type");
+	  }
+
+	  arrayh4_destroy(a4);
+	  
+	  if (verbose) {
+	       double a_min, a_max;
+	       arrayh5_getrange(a, &a_min, &a_max);
+	       printf("data ranges from %g to %g.\n", a_min, a_max);
+	  }
+	  
+	  if (verbose) {
+	       int i;
+	       printf("Writing size %d", a.dims[0]);
+	       for (i = 1; i < a.rank; ++i)
+		    printf("x%d", a.dims[i]);
+	       printf(" data to %s:%s\n", cur_h5_fname, dname);
+	  }
+
+	  arrayh5_write(a, cur_h5_fname, dname, 
+			append || (h5_fname && ifile > optind));
+	  arrayh5_destroy(a);
+
+	  if (h5_fname != cur_h5_fname)
+	       free(cur_h5_fname);
+	  if (dname != data_name)
+	       free(dname);
+     }
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5fromitxt.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5fromitxt.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5fromitxt.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,291 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ctype.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5fromtxt error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5fromitxt [options] <hdf5-file>\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+             "         -a : append to existing hdf5 file\n"
+	     "   -f <val> : use <val> as missing filler [ default: 0 ]\n"
+	     "  -n <size> : input array dimensions [ default: guessed ]\n"
+	     "  -m <size> : input coordinate minimum [ default: guessed ]\n"
+	     "  -M <size> : input coordinate maximum [ default: guessed ]\n"
+	     "         -T : transpose the data [default: no]\n"
+	     "  -d <name> : use dataset <name> in the output file (default: \"data\")\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n"
+	  );
+}
+
+#define MAX_RANK 10
+
+int get_size_arg(int size[MAX_RANK], const char *arg)
+{
+     int pos = 0;
+     int rank = 0;
+     while (isdigit(arg[pos])) {
+	  CHECK(rank < MAX_RANK,
+		"Rank too big in -n argument!\n");
+	  size[rank] = 0;
+	  while (isdigit(arg[pos])) {
+	       size[rank] = size[rank]*10 + arg[pos]-'0';
+	       ++pos;
+	  }
+	  ++rank;
+	  if (arg[pos] == 'x' || arg[pos] == 'X' || arg[pos] == '*')
+	       ++pos;
+     }
+     CHECK(rank > 0 && !arg[pos], "Invalid <size> argument; should be e.g. 23x34 or 10x10x10\n");
+     return rank;
+}
+
+int main(int argc, char **argv)
+{
+     arrayh5 a;
+     char *dname, *h5_fname;
+     char *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     double *data;
+     int idata = 0;
+     int rank = -1, dims[MAX_RANK], N = 1, nrows = 0;
+     int cmin_rank = -1, cmax_rank = -1, coord_min[MAX_RANK], coord_max[MAX_RANK];
+     double fill_val = 0;
+     int ncols = -1, cur_ncols = 0;
+     int read_newline = 0;
+     int verbose = 0;
+     int transpose = 0;
+     int append = 0;
+     int i, j;
+
+     while ((c = getopt(argc, argv, "hn:d:vTaVf:m:M:")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5fromtxt " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'a':
+		   append = 1;
+		   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'f':
+		   fill_val = atof(optarg);
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case 'n':
+		   rank = get_size_arg(dims, optarg);
+		   for (i = 0, N = 1; i < rank; ++i)
+			N *= dims[i];
+		   break;
+	      case 'm':
+		   cmin_rank = get_size_arg(coord_min, optarg);
+		   break;
+	      case 'M':
+		   cmax_rank = get_size_arg(coord_max, optarg);
+		   break;
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind + 1 != argc) {  /* should be exactly 1 parameter left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     h5_fname = split_fname(argv[optind], &dname);
+     if (!dname[0])
+	  dname = data_name;
+     if (!dname)
+	  dname = my_strdup("data");
+
+     data = (double *) malloc(sizeof(double) * N);
+     CHECK(data, "out of memory");
+
+     while (!feof(stdin)) {
+	  read_newline = 0;
+
+	  /* eat leading spaces */
+	  while (isspace(c = getc(stdin)));
+	  ungetc(c, stdin);
+	  if (c == EOF)
+	       break;
+
+	  /* increase the size of the data array, if necessary */
+	  if (idata >= N) {
+	       CHECK(rank < 0, "more inputs in file than specified by -n");
+	       N *= 2;
+	       data = (double *) realloc(data, sizeof(double) * N);
+	       CHECK(data, "out of memory");
+	  }
+
+	  CHECK(scanf("%lg", &data[idata++]) == 1,
+		"error reading numeric input");
+
+	  ++cur_ncols;
+	  
+	  /* eat characters until the next number: */
+	  do { 
+	       c = getc(stdin);
+	       if (c == '\n')
+		    read_newline = 1;
+	  } while (!(isdigit(c) || c == '.' || c == '-' || c == '+'
+		     || c == EOF));
+	  ungetc(c, stdin);
+
+	  if (read_newline) {
+	       ++nrows;
+	       CHECK(ncols < 0 || cur_ncols == ncols,
+		     "the number of input columns is not constant.");
+	       ncols = cur_ncols;
+	       cur_ncols = 0;
+	  }
+     }
+
+     if (!read_newline) { /* don't require a newline on the last line */
+	  ++nrows;
+	  CHECK(ncols < 0 || cur_ncols == ncols,
+		"the number of input columns is not constant.");
+     }
+
+     CHECK(idata > 0, "no inputs read");
+     CHECK(ncols > 1, "need at least one coordinate column");
+
+     if (verbose)
+	  printf("Read %d numbers in %d rows with rank-%d coordinates.\n", 
+		 idata, nrows, ncols - 1);
+
+     CHECK(ncols - 1 <= MAX_RANK, "rank is too large");
+
+     if (cmin_rank < 0) {
+	  cmin_rank = ncols - 1;
+	  CHECK(cmin_rank == ncols - 1, "coordinate minima have wrong rank");
+	  for (j = 0; j < ncols - 1; ++j) {
+	       coord_min[j] = floor(data[j]);
+	  }
+	  for (i = 1; i < nrows; ++i)
+	       for (j = 0; j < ncols - 1; ++j) {
+		    int ij = i * ncols + j;
+		    if (data[ij] < coord_min[j])
+			 coord_min[j] = floor(data[ij]);
+	       }
+     }
+     if (cmax_rank < 0) {
+	  cmax_rank = ncols - 1;
+	  CHECK(cmax_rank == ncols - 1, "coordinate maxima have wrong rank");
+	  for (j = 0; j < ncols - 1; ++j) {
+	       coord_max[j] = ceil(data[j]);
+	  }
+	  for (i = 1; i < nrows; ++i)
+	       for (j = 0; j < ncols - 1; ++j) {
+		    int ij = i * ncols + j;
+		    if (data[ij] > coord_max[j])
+			 coord_max[j] = ceil(data[ij]);
+	       }
+     }
+
+     if (verbose) {
+	  printf("Coordinates range from (%d", coord_min[0]);
+	  for (j = 1; j < ncols - 1; ++j)
+	       printf(",%d", coord_min[j]);
+	  printf(") to (%d", coord_max[0]);
+	  for (j = 1; j < ncols - 1; ++j)
+	       printf(",%d", coord_max[j]);
+	  printf(")\n");
+     }
+
+     if (rank < 0) {
+	  rank = ncols - 1;
+	  for (i = 0; i < rank; ++i)
+	       dims[i] = coord_max[i] - coord_min[i] + 1;
+     }
+     CHECK(rank == ncols - 1, "number of coordinates does not match rank");
+
+     a = arrayh5_create(rank, dims);
+     for (i = 0; i < a.N; ++i)
+	  a.data[i] = fill_val;
+
+     for (i = 0; i < nrows; ++i) {
+	  int idx = 0;
+	  for (j = 0; j < rank; ++j) {
+	       int id = data[i * ncols + j] + 0.5;
+	       if (id < coord_min[j] || id > coord_max[j] ||
+		   id - coord_min[j] >= dims[j]) {
+		    idx = -1;
+		    break;
+	       }
+	       idx = idx * dims[j] + id - coord_min[j];
+	  }
+	  if (idx >= 0 && idx < a.N)
+	       a.data[idx] = data[i * ncols + ncols - 1];
+     }
+
+     if (transpose)
+	  arrayh5_transpose(&a);
+
+     if (verbose) {
+	  double a_min, a_max;
+	  arrayh5_getrange(a, &a_min, &a_max);
+	  printf("data ranges from %g to %g.\n", a_min, a_max);
+     }
+
+     if (verbose) {
+	  printf("Writing size %d", a.dims[0]);
+	  for (i = 1; i < a.rank; ++i)
+	       printf("x%d", a.dims[i]);
+	  printf(" data to %s:%s\n", h5_fname, dname);
+     }
+
+     arrayh5_write(a, h5_fname, dname, append);
+     arrayh5_destroy(a);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5fromtxt.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5fromtxt.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5fromtxt.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2005 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5FROMTXT 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5fromtxt \- convert text input to an HDF5 file
+.SH SYNOPSIS
+.B h5fromtxt
+[\fIOPTION\fR]... [\fIHDF5FILE\fR]
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5fromtxt takes a series of numbers from standard input and outputs a
+multi-dimensional numeric dataset in an HDF5 file.
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5fromtxt
+creates a dataset called "data", but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.  The
+.B -a
+option can be used to append new datasets to an existing HDF5 file.
+
+All characters besides the numbers (and associated decimal points,
+etcetera) in the input are ignored.  By default, the data is assumed
+to be a two-dimensional MxN dataset where M is the number of rows
+(delimited by newlines) and N is the number of columns.  In this case,
+it is an error for the number of columns to vary between rows.  If M
+or N is 1 then the data is written as a one-dimensional dataset.
+
+Alternatively, you can specify the dimensions of the data explicitly
+via the
+.B -n
+.I size
+option, where
+.I size
+is e.g. "2x2x2".  In this case, newlines are ignored and the data is
+taken as an array of the given size stored in row-major ("C") order
+(where the last index varies most quickly as you step through the
+data).  e.g. a 2x2x2 array would be have the elements listed in the
+order: (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0),
+(1,1,1).
+
+A simple example is:
+.IP "" 4
+h5fromtxt foo.h5 <<EOF
+.br
+1 2 3 4
+.br
+5 6 7 8
+.br
+EOF
+.PP
+which reads in a 2x4 space-delimited array from standard input.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5fromtxt.
+.TP
+.B -v
+Verbose output.
+.TP
+.B -a
+If the HDF5 output file already exists, append the data as a new
+dataset rather than overwriting the file (the default behavior).  An
+existing dataset of the same name within the file is overwritten,
+however.
+.TP
+\fB\-n\fR \fIsize\fR
+Instead of trying to infer the dimensions of the array from the rows
+and columns of the input, treat the data as a sequence of numbers in
+row-major order forming an array of dimensions \fIsize\fR.  \fIsize\fR
+is of the form MxNxLx... (with M, N, L being numbers) and may be of
+any dimensionality.
+.TP
+.B -T
+Transpose the input when it is written, reversing the dimensions.
+.TP
+\fB\-d\fR \fIname\fR
+Write to dataset
+.I name
+in the output; otherwise, the output dataset is called "data" by default.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5fromtxt.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5fromtxt.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5fromtxt.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,230 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5fromtxt error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5fromtxt [options] <hdf5-file>\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+             "         -a : append to existing hdf5 file\n"
+	     "  -n <size> : input row-major array dimensions [ default: guessed ]\n"
+	     "         -T : transpose the data [default: no]\n"
+	     "  -d <name> : use dataset <name> in the output file (default: \"data\")\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n"
+	  );
+}
+
+#define MAX_RANK 10
+
+int main(int argc, char **argv)
+{
+     arrayh5 a;
+     char *dname, *h5_fname;
+     char *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     double *data;
+     int idata = 0;
+     int rank = -1, dims[MAX_RANK], N = 1, nrows = 0;
+     int ncols = -1, cur_ncols = 0;
+     int read_newline = 0;
+     int verbose = 0;
+     int transpose = 0;
+     int append = 0;
+
+     while ((c = getopt(argc, argv, "hn:d:vTaV")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5fromtxt " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'a':
+		   append = 1;
+		   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case 'n':
+	      {
+		   int pos = 0;
+		   rank = 0;
+		   N = 1;
+		   while (isdigit(optarg[pos])) {
+			CHECK(rank < MAX_RANK,
+			      "Rank too big in -n argument!\n");
+			dims[rank] = 0;
+			while (isdigit(optarg[pos])) {
+			     dims[rank] = dims[rank]*10 + optarg[pos]-'0';
+			     ++pos;
+			}
+			N *= dims[rank];
+			++rank;
+			if (optarg[pos] == 'x' || optarg[pos] == 'X'
+			    || optarg[pos] == '*')
+			     ++pos;
+		   }
+		   CHECK(rank > 0 && !optarg[pos], "Invalid -n argument; should be e.g. 23x34 or 10x10x10\n");
+		   break;
+	      }
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind + 1 != argc) {  /* should be exactly 1 parameter left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     h5_fname = split_fname(argv[optind], &dname);
+     if (!dname[0])
+	  dname = data_name;
+     if (!dname)
+	  dname = my_strdup("data");
+
+     data = (double *) malloc(sizeof(double) * N);
+     CHECK(data, "out of memory");
+
+     while (!feof(stdin)) {
+	  read_newline = 0;
+
+	  /* eat leading spaces */
+	  while (isspace(c = getc(stdin)));
+	  ungetc(c, stdin);
+	  if (c == EOF)
+	       break;
+
+	  /* increase the size of the data array, if necessary */
+	  if (idata >= N) {
+	       CHECK(rank < 0, "more inputs in file than specified by -n");
+	       N *= 2;
+	       data = (double *) realloc(data, sizeof(double) * N);
+	       CHECK(data, "out of memory");
+	  }
+
+	  CHECK(scanf("%lg", &data[idata++]) == 1,
+		"error reading numeric input");
+
+	  ++cur_ncols;
+	  
+	  /* eat characters until the next number: */
+	  do { 
+	       c = getc(stdin);
+	       if (c == '\n')
+		    read_newline = 1;
+	  } while (!(isdigit(c) || c == '.' || c == '-' || c == '+'
+		     || c == EOF));
+	  ungetc(c, stdin);
+
+	  if (read_newline) {
+	       ++nrows;
+	       if (rank < 0) {  /* we're trying to guess the input dims */
+		    CHECK(ncols < 0 || cur_ncols == ncols,
+			  "the number of input columns is not constant.");
+	       }
+	       ncols = cur_ncols;
+	       cur_ncols = 0;
+	  }
+     }
+
+     if (!read_newline) { /* don't require a newline on the last line */
+	  ++nrows;
+	  if (rank < 0) {  /* we're trying to guess the input dims */
+	       CHECK(ncols < 0 || cur_ncols == ncols,
+		     "the number of input columns is not constant.");
+	  }
+     }
+
+     CHECK(idata > 0, "no inputs read");
+
+     if (verbose)
+	  printf("Read %d numbers in %d rows.\n", idata, nrows);
+
+     if (rank < 0) {
+	  N = idata;
+	  CHECK(N % nrows == 0,
+		"each row must have an equal number of columns");
+	  if (nrows == 1 || nrows == N) {
+	       rank = 1;
+	       dims[0] = N;
+	  }
+	  else {
+	       rank = 2;
+	       dims[0] = nrows;
+	       dims[1] = N / nrows;
+	  }
+     }
+     else {
+	  CHECK(idata == N, "number of inputs does not match -n");
+     }
+
+     a = arrayh5_create_withdata(rank, dims, data);
+
+     if (transpose)
+	  arrayh5_transpose(&a);
+
+     if (verbose) {
+	  double a_min, a_max;
+	  arrayh5_getrange(a, &a_min, &a_max);
+	  printf("data ranges from %g to %g.\n", a_min, a_max);
+     }
+
+     if (verbose) {
+	  int i;
+	  printf("Writing size %d", a.dims[0]);
+	  for (i = 1; i < a.rank; ++i)
+	       printf("x%d", a.dims[i]);
+	  printf(" data to %s:%s\n", h5_fname, dname);
+     }
+
+     arrayh5_write(a, h5_fname, dname, append);
+     arrayh5_destroy(a);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5math.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5math.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5math.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,175 @@
+.\" Copyright (c) 2005 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5MATH 1 "May 23, 2005" "h5utils" "h5utils"
+.SH NAME
+h5math \- combine/create HDF5 files with math expressions
+.SH SYNOPSIS
+.B h5math
+[\fIOPTION\fR]... \fIOUTPUT-HDF5FILE\fR [\fIINPUT-HDF5FILES\fR...]
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5math takes any number of HDF5 files as input, along with a mathematical
+expression, and combines them to produce a new HDF5 file.
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5math
+creates a dataset called "h5math", but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.  The
+.B -a
+option can be used to append new datasets to an existing HDF5 file.
+The same syntax is used to specify the dataset used in the input
+file(s); by default, the first dataset (alphabetically) is used.
+
+A simple example of h5math's usage is:
+.IP "" 4
+h5math -e "d1 + 2*d2" out.h5 foo.h5 bar.h5:blah
+.PP
+which produces a new file, out.h5, by adding the first dataset in
+foo.h5 with twice the "blah" dataset in bar.h5.  In the expression
+(specified by \fB-e\fR), the first input dataset (from left to right)
+is referred to as \fId1\fR, the second as \fId2\fR, and so on.
+
+In addition to input datasets, you can also use the x/y/z coordinates
+of each point in the expression, referenced by "x" "y" and "z"
+variables (for the first three dimensions) as well as a "t" variable
+that refers to the last dimension.  By default, these are integers starting at 0 at the corner of the dataset, but the
+.B -0
+option will change the x/y/z origin to the center of the dataset (t is
+unaffected), and the
+.B -r
+.I res
+option will specify the "resolution", dividing the x/y/z coordinates
+by \fIres\fR.
+
+All of the input datasets must have the same dimensions, which are
+also the dimensions of the output.  If there are no input files, and
+you are defining the output purely by a mathematical formula, you can
+specify the dimensions of the output explicitly via the
+.B -n
+.I size
+option, where
+.I size
+is e.g. "2x2x2".
+
+Sometimes, however, you want to use only a smaller-dimensional "slice"
+of multi-dimensional data.  To do this, you specify coordinates in one
+(or more) slice dimension(s), via the
+.B -xyzt
+options.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5math.
+.TP
+.B -v
+Verbose output.
+.TP
+.B -a
+If the HDF5 output file already exists, append the data as a new
+dataset rather than overwriting the file (the default behavior).  An
+existing dataset of the same name within the file is overwritten,
+however.
+.TP
+\fB\-e\fR \fIexpression\fR
+Specify the mathematical expression that is used to construct the
+output (generally in " quotes to group the expression as one item in
+the shell), in terms of the variables for the input datasets and
+the coordinates as described above.
+
+Expressions use a C-like infix notation, with most standard operators
+and mathematical functions (+, sin, etc.) being supported.  This
+functionality is provided (and its features determined) by GNU libmatheval.
+.TP
+\fB\-f\fR \fIfilename\fR
+Name of a text file to read the expression from, if no
+.B -e
+expression is specified.  Defaults to stdin.
+.TP
+\fB\-x\fR \fIix\fR, \fB\-y\fR \fIiy\fR, \fB\-z\fR \fIiz\fR, \fB\-t\fR \fIit\fR
+This tells
+.I h5math
+to use a particular slice of a multi-dimensional dataset.  e.g.
+.B -x
+uses the subset (with one less dimension) at an x index of
+.I ix
+(where the indices run from zero to one less than the maximum index in
+that direction).  Here, x/y/z correspond to the first/second/third
+dimensions of the HDF5 dataset. The \fB\-t\fR option specifies a slice
+in the last dimension, whichever that might be.  See also the
+.B -0
+option to shift the origin of the x/y/z slice coordinates to the
+dataset center.
+.TP
+.B -0
+Shift the origin of the x/y/z slice coordinates to the dataset center,
+so that e.g. -0 -x 0 (or more compactly -0x0) returns the central x
+plane of the dataset instead of the edge x plane.  (\fB\-t\fR
+coordinates are not affected.)
+
+This also shifts the origin of the x/y/z variables in the expression so
+that 0 is the center of the dataset.
+.TP
+\fB\-r\fR \fIres\fR
+Use a resolution
+.I res
+for x/y/z (but not t) variables in the expression, so that the data
+"grid" coordinates are divided by \fIres\fR.  The default \fIres\fR is 1.
+
+For example, if the x dimension has 21 grid steps, setting a \fIres\fR
+of 20 will mean that x variables in the expression run from 0.0 to
+1.0 (or -0.5 to 0.5 if \fB\-0\fR is specified), instead of 0 to 20.
+
+.B -r
+does not affect the coordinates used for slices, which are always integers.
+.TP
+\fB\-n\fR \fIsize\fR
+The output dataset must be the same size as the input datasets.  If
+there are no input datasets (if you are defining the output purely by
+a formula), then you must specify the output size manually with this
+option: \fIsize\fR is of the form MxNxLx... (with M, N, L being
+integers) and may be of any dimensionality.
+.TP
+\fB\-d\fR \fIname\fR
+Write to dataset
+.I name
+in the output; otherwise, the output dataset is called "data" by default.
+Also use dataset
+.I name
+in the input; otherwise, the first input dataset (alphabetically) in a
+file is used.  Alternatively, use the syntax \fIHDF5FILE:DATASET\fR
+(which overrides the
+.B -d
+option).
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5math.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5math.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5math.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,327 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#include <matheval.h>
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5math error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+const char default_data_name[] = "h5math";
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5math [options] <output-filename> [<filenames>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "         -a : append to existing hdf5 file\n"
+	     "  -n <size> : output array dimensions [ default: from input ]\n"
+	     "  -f <file> : read expression to evaluate from file [ default: stdin ]\n"
+	     "  -e <expr> : evaluate <expr> to output\n"
+	     "    -x <ix> : take x=<ix> slice of data\n"
+	     "    -y <iy> : take y=<iy> slice of data\n"
+	     "    -z <iz> : take z=<iz> slice of data\n"
+	     "    -t <it> : take t=<it> slice of data's last dimension\n"
+	     "         -0 : use dataset center as origin for -x/-y/-z\n"
+	     "     -r <r> : use resolution <r> for xyz coordinate units in expression\n"
+	     "  -d <name> : use dataset <name> in the input/output files\n"
+	     "              [ default: first dataset/%s ]\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n",
+	     default_data_name
+	  );
+}
+
+#define MAX_RANK 10
+
+int main(int argc, char **argv)
+{
+     arrayh5 *a, ao;
+     int i, n;
+     int rank = -1, dims[MAX_RANK];
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int slicedim[4] = {NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM};
+     int islice[4], center_slice[4] = {0,0,0,0};
+     int verbose = 0;
+     int append = 0;
+     char *expr_string = 0, *expr_filename = 0;
+     char *data_name = 0;
+     char *out_fname, *out_dname;
+     char **eval_vars;
+     int eval_nvars;
+     char **vars;
+     double *vals;
+     void *evaluator;
+     double res = 1.0;
+     int nx, ny, nz, nt, nr, ix, iy, iz, it, ir;
+     double cx, cy, cz;
+
+     while ((c = getopt(argc, argv, "hVvan:f:e:x:y:z:t:0d:r:")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5totxt " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'a':
+		   append = 1;
+		   break;
+	      case 'n':
+	      {
+		   int pos = 0;
+		   rank = 0;
+		   while (isdigit(optarg[pos])) {
+			CHECK(rank < MAX_RANK,
+			      "Rank too big in -n argument!\n");
+			dims[rank] = 0;
+			while (isdigit(optarg[pos])) {
+			     dims[rank] = dims[rank]*10 + optarg[pos]-'0';
+			     ++pos;
+			}
+			++rank;
+			if (optarg[pos] == 'x' || optarg[pos] == 'X'
+			    || optarg[pos] == '*')
+			     ++pos;
+		   }
+		   CHECK(rank > 0 && !optarg[pos], "Invalid -n argument; should be e.g. 23x34 or 10x10x10\n");
+		   break;
+	      }
+	      case 'f':
+		   free(expr_filename);
+		   expr_filename = my_strdup(optarg);
+		   break;
+	      case 'e':
+		   free(expr_string);
+		   expr_string = my_strdup(optarg);
+		   break;
+	      case 'x':
+		   islice[0] = atoi(optarg);
+		   slicedim[0] = 0;
+		   break;
+	      case 'y':
+		   islice[1] = atoi(optarg);
+		   slicedim[1] = 1;
+		   break;
+	      case 'z':
+		   islice[2] = atoi(optarg);
+		   slicedim[2] = 2;
+		   break;
+	      case 't':
+		   islice[3] = atoi(optarg);
+		   slicedim[3] = LAST_SLICE_DIM;
+		   break;
+              case '0':
+                   center_slice[0] = center_slice[1] = center_slice[2] = 1;
+                   break;
+	      case 'r':
+		   res = atof(optarg);
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     out_fname = split_fname(argv[optind], &out_dname);
+     if (!out_dname[0]) {
+	  if (data_name)
+	       out_dname = data_name;
+	  else
+	       out_dname = (char *) default_data_name;
+     }
+     optind++;
+
+     n = argc - optind;
+     a = (arrayh5 *) malloc(sizeof(arrayh5) * n);
+     CHECK(a, "out of memory");
+
+     for (i = 0; i < n; ++i) {
+	  int err;
+	  char *fname, *dname;
+
+          fname = split_fname(argv[i + optind], &dname);
+          if (!dname[0])
+               dname = data_name;
+
+	  err = arrayh5_read(&a[i], fname, dname, NULL,
+                             4, slicedim, islice, center_slice);
+          CHECK(!err, arrayh5_read_strerror[err]);
+
+	  CHECK(!i || arrayh5_conformant(a[i], a[i-1]),
+		"all input arrays must have the same dimensions");
+
+	  if (verbose)
+	       printf("read variable d%d: dataset \"%s\" in file \"%s\"\n",
+		      i + 1, dname ? dname : "<first>", fname);
+	  
+	  free(fname);
+     }
+
+     if (rank >= 0) {
+	  ao = arrayh5_create(rank, dims);
+	  CHECK(!n || arrayh5_conformant(ao, a[0]),
+		"-n dimensions must be same as those of input arrays");
+     }
+     else if (n)
+	  ao = arrayh5_clone(a[0]);
+     else
+	  CHECK(0, "output size must be specified with -n if no input arrays");
+
+     if (verbose) {
+	  printf("rank-%d array dimensions: ", ao.rank);
+	  if (!ao.rank) printf("1\n");
+	  for (i = 0; i < ao.rank; ++i)
+	       printf("%s%d", i ? "x" : "", ao.dims[i]);
+	  printf("\n");
+     }
+
+     nx = ao.rank >= 1 ? ao.dims[0] : 1;
+     ny = ao.rank >= 2 ? ao.dims[1] : 1;
+     nz = ao.rank >= 3 ? ao.dims[2] : 1;
+     nt = ao.rank >= 4 ? ao.dims[3] : 1;
+     for (nr = 1, i = 4; i < ao.rank; ++i)
+	  nr *= ao.dims[i];
+     cx = center_slice[0] ? (nx - 1) * 0.5 : 0.0;
+     cy = center_slice[1] ? (ny - 1) * 0.5 : 0.0;
+     cz = center_slice[2] ? (nz - 1) * 0.5 : 0.0;
+
+     vars = (char **) malloc(sizeof(char *) * (n + 4));
+     CHECK(vars, "out of memory");
+     vals = (double *) malloc(sizeof(double) * (n + 4));
+     CHECK(vals, "out of memory");
+     for (i = 0; i < n; ++i) {
+	  vars[i] = my_strdup("dxxxxxxxxxxxx");
+#ifdef HAVE_SNPRINTF
+	  snprintf(vars[i], 14, "d%d", i + 1);
+#else
+	  sprintf(vars[i], "d%d", i + 1);
+#endif
+	  vals[i] = 0.0;
+     }
+     vars[n+0] = strdup("x"); vals[n+0] = 0.0;
+     vars[n+1] = strdup("y"); vals[n+1] = 0.0;
+     vars[n+2] = strdup("z"); vals[n+2] = 0.0;
+     vars[n+3] = strdup("t"); vals[n+3] = 0.0;
+     
+     if (!expr_string) {
+	  char buf[1024] = "";
+	  int len;
+	  FILE *f = expr_filename ? fopen(expr_filename, "r") : stdin;
+	  CHECK(f, "unable to open expression file");
+
+	  if (verbose && f == stdin)
+	       printf("Enter expression to write to %s:\n", out_fname);
+	  
+	  fgets(buf, 1024, f);
+	  expr_string = my_strdup(buf);
+	  len = strlen(buf) + 1;
+	  while (fgets(buf, 1024, f)) {
+	       len += strlen(buf);
+	       expr_string = (char *) realloc(expr_string, len);
+	       strcat(expr_string, buf);
+	  }
+	  for (ix = 0; ix < len; ++ix)
+	       if (expr_string[ix] == '\n')
+		    expr_string[ix] = ' '; /* matheval chokes on newlines */
+
+	  if (expr_filename) fclose(f);
+     }
+
+     CHECK(evaluator = evaluator_create(expr_string),
+	   "error parsing symbolic expression");
+
+     evaluator_get_variables(evaluator, &eval_vars, &eval_nvars);
+     for (ix = 0; ix < eval_nvars; ++ix) {
+	  for (iy = 0; iy < n + 4 && strcmp(eval_vars[ix], vars[iy]); ++iy)
+	       ;
+	  if (iy == n + 4) {
+	       fprintf(stderr, "h5math error: unrecognized variable \"%s\"\n",
+		       eval_vars[ix]);
+	       exit(EXIT_FAILURE);
+	  }
+     }
+     
+     if (verbose) {
+	  char *buf = evaluator_get_string(evaluator);
+	  printf("Evaluating expression: %s\n", buf);
+     }
+
+     for (ix = 0; ix < nx; ++ix)
+     for (iy = 0; iy < ny; ++iy)
+     for (iz = 0; iz < nz; ++iz)
+     for (it = 0; it < nt; ++it)
+     for (ir = 0; ir < nr; ++ir) {
+	  int idx = ir + nr * (it + nt * (iz + nz * (iy + ny * ix)));
+	  for (i = 0; i < n; ++i)
+	       vals[i] = a[i].data[idx];
+	  vals[n+0] = (ix - cx) / res;
+	  vals[n+1] = (iy - cy) / res;
+	  vals[n+2] = (iz - cz) / res;
+	  vals[n+3] = ao.rank >= 4 ? it : 
+	       (ao.rank >= 3 ? iz : (ao.rank >= 2 ? iy : ix));
+	  ao.data[idx] = evaluator_evaluate(evaluator, n+4, vars, vals);
+     }
+
+     if (verbose)
+	  printf("Writing data to \"%s\" in \"%s\"...\n", 
+		 out_dname ? out_dname : "<first>", out_fname);
+     arrayh5_write(ao, out_fname, out_dname, append);
+
+     free(vals);
+     for (i = 0; i < n+4; ++i) free(vars[i]);
+     free(vars);
+     arrayh5_destroy(ao);
+     for (i = 0; i < n; ++i) arrayh5_destroy(a[i]);
+     free(a);
+     free(out_fname);
+     free(expr_filename);
+     free(expr_string);
+     free(data_name);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5read.cc
===================================================================
--- packages/h5utils/branches/upstream/current/h5read.cc	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5read.cc	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,96 @@
+/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include <octave/oct.h>
+
+#include "arrayh5.h"
+
+DEFUN_DLD(h5read, args, , 
+"h5read(filename [, slicedim, islice, dataname])\n"
+"Read a 1d or 2d array slice from an HDF5 file.\n\n"
+"slicedim and islice are optional parameters indicating a \"slice\" of a\n"
+"multidimensional dataset, where slicedim is \"x\", \"y\", or \"z\", and\n"
+"islice is the index in that dimension.  The default is slicedim=\"z\" and\n"
+"islice=0, meaning the xy plane at z index 0 is read.\n\n"
+"The optional parameter dataname indicates the name of the dataset to read\n"
+"within the HDF5 file.  The default is to read the first dataset.\n"
+)
+{
+     std::string fname, dataname;
+     octave_value retval;
+     arrayh5 a;
+     int readerr;
+     int slicedim = 2, islice = 0, center_slice = 0;
+     
+     if (args.length() < 1 || args.length() > 4 || !args(0).is_string()
+	 || (args.length() >= 2 && !args(1).is_string())
+	 || (args.length() >= 3 && !args(2).is_real_scalar())
+	 || (args.length() >= 4 && !args(3).is_string())) {
+	  print_usage("h5read");
+	  return retval;
+     }
+     
+     fname = args(0).string_value();
+     if (args.length() >= 2)
+	  slicedim = tolower(*(args(1).string_value().c_str())) - 'x';
+     if (args.length() >= 3)
+	  islice = (int) (args(2).double_value() + 0.5);
+     
+     readerr = arrayh5_read(&a, fname.c_str(),
+			    args.length() >= 4 ? 
+			    args(3).string_value().c_str() : NULL, 
+			    NULL, 1, &slicedim, &islice, &center_slice);
+     if (readerr) {
+	  fprintf(stderr, "error in h5read: %s\n",
+		  arrayh5_read_strerror[readerr]);
+	  return retval;
+     }
+
+     if (a.rank >= 2) {
+	  Matrix m(a.dims[0], a.dims[1]);
+
+	  for (int i = 0; i < a.dims[0]; ++i)
+	       for (int j = 0; j < a.dims[1]; ++j)
+		    m(i,j) = a.data[i*a.dims[1] + j];
+
+	  retval = m;
+     }
+     else if (a.rank == 1) {
+	  ColumnVector v(a.dims[0]);
+
+	  for (int i = 0; i < a.dims[0]; ++i)
+	       v(i) = a.data[i];
+
+	  retval = v;
+     }
+     else {
+	  retval = a.data[0];  /* scalar (rank = 0) */
+     }
+     
+     arrayh5_destroy(a);
+     
+     return retval;
+}

Added: packages/h5utils/branches/upstream/current/h5topng.1.in
===================================================================
--- packages/h5utils/branches/upstream/current/h5topng.1.in	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5topng.1.in	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,255 @@
+.\" Copyright (c) 2004 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5TOPNG 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5topng \- generate PNG images from 2d slices of HDF5 files
+.SH SYNOPSIS
+.B h5topng
+[\fIOPTION\fR]... [\fIHDF5FILE\fR]...
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5topng is a utility to generate images in PNG (Portable Network Graphics)
+format from two-dimensional slices of datasets in HDF5 files.  It is
+designed for quick-and-dirty visualization of scientific data, and for
+batch processing thereof via shell scripts.
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5topng
+takes the first dataset, but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.
+
+For a three- or four-dimensional dataset you must specify coordinates
+in one or two slice dimensions, respectively, to get a two-dimensional
+slice, via the
+.B -xyzt
+options.  Yet more options control things like the colormap and
+magnification.  Still, the most basic usage is something like
+\'h5topng foo.h5\', which will output a file foo.png containing an
+image from the two-dimensional data in foo.h5.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5topng.
+.TP
+.B -v
+Verbose output.  This output includes the minimum and maximum values
+encountered in the data, which is useful to know for the
+.B -mM
+options.
+.TP
+\fB\-o\fR \fIfile\fR
+Send PNG output to
+.I file
+rather than to the filename with .h5 replaced with .png (the default).
+.TP
+\fB\-x\fR \fIix\fR, \fB\-y\fR \fIiy\fR, \fB\-z\fR \fIiz\fR, \fB\-t\fR \fIit\fR
+This tells
+.I h5topng
+to use a particular slice of a multi-dimensional dataset.  e.g.
+.B -x
+causes a yz plane (of a 3d dataset) to be used, at an x index of
+.I ix
+(where the indices run from zero to one less than the maximum index in
+that direction).  Here, x/y/z correspond to the first/second/third
+dimensions of the HDF5 dataset. The \fB\-t\fR option specifies a slice
+in the last dimension, whichever that might be.  See also the
+.B -0
+option to shift the origin of the x/y/z slice coordinates to the
+dataset center.
+
+Instead of specifying a single index as an argument to these options,
+you can also specify a range of indices in a Matlab-like notation:
+\fIstart\fR:\fIstep\fR:\fIend\fR or \fIstart\fR:\fIend\fR
+(\fIstep\fR defaults to 1).  This loops over that slice index, from
+\fIstart\fR to \fIend\fR in steps of \fIstep\fR, producing a
+sequence of output PNG files (with the slice index appended to the
+filename, before the ".png").
+.TP
+.B -0
+Shift the origin of the x/y/z slice coordinates to the dataset center,
+so that e.g. -0 -x 0 (or more compactly -0x0) returns the central x
+plane of the dataset instead of the edge x plane.  (\fB\-t\fR
+coordinates are not affected.)
+.TP
+\fB\-X\fR \fIscalex\fR, \fB\-Y\fR \fIscaley\fR, \fB\-S\fR \fIscale\fR
+Scale the x and y dimensions of the image by
+.I scalex
+and
+.I scaley
+respectively.  The
+.B -S
+option scales both x and y.  The default is to use scale factors of 1.0;
+i.e. the image has the same dimensions (in pixels) as the data.  Linear
+interpolation is used to fill in the pixels when the scale factors are
+not 1.0.
+.TP
+\fB\-s\fR \fIskewangle\fR
+Skew the image by
+.I skewangle
+(in degrees) to the left or right.  The result is a parallelogram, with
+the leftover space in the (square) image filled with either black or white
+pixels, depending upon the color map.
+.TP
+.B -T
+Transpose the data (interchange the image axes).  By default,
+the first (x) coordinate of the data corresponds to the columns,
+and the second (y) coordinate corresponds to the rows; transposition
+reverses this convention.
+.TP
+.B -c \fIcolormap\fR
+Use a color map 
+.I colormap
+rather than the default
+.B gray
+color map (a grayscale ramp from white to black).
+.I colormap
+is normally the name of one of the color maps provided with 
+.I h5topng
+(in the @datadir_val@/h5utils/colormaps directory), or can instead be
+the name of a color-map file.
+
+Three useful included color maps are
+.B hot
+(black-red-yellow-white, useful for intensity data),
+.B bluered
+(blue-white-red, useful for signed data), and
+.B hsv
+(a multi-color "rainbow").  If you use the
+.B bluered
+color map for signed data, you may also want to use the
+.B -Z
+option so that the center of the color scale (white) corresponds to
+zero.
+
+A color-map file is a sequence of whitespace-separated R G B A
+quadruples, where each value is in the range 0.0 to 1.0 and indicates
+the fraction of red/green/blue/alpha.  (An alpha of 0 is transparent
+and of 1 is opaque; this is only used for the \fB\-a\fR option,
+below.)  The colors in the color map are linearly interpolated as
+necessary to provide a continuous color ramp.
+.TP
+.B -r
+Reverse the ordering of the color map.  You can also accomplish this
+by putting a "-" before the colormap name in the 
+.B -c
+or
+.B -a
+option.
+.TP
+.B -Z
+Center the color scale on the value zero in the data.
+.TP
+\fB\-m\fR \fImin\fR, \fB\-M\fR \fImax\fR
+Normally, the bottom and top of the color map correspond to the
+minimum and maximum values in the data.  Using these options, you
+can make the bottom and top of the color map correspond to
+.I min
+and
+.I max
+instead.  Data values below or above this range will be treated as if
+they were
+.I min
+or
+.I max
+respectively.  See also the
+.B -Z
+and
+.B -R
+options.
+.TP
+.B -R
+When multiple files are specified, set the bottom and top of the color
+maps according to the minimum and maximum over all the data.  This is
+useful to process many files using a consistent color scale, since
+otherwise the scale is set for each file individually.
+.TP
+\fB\-C\fR \fIfile\fR, \fB\-b\fR \fIval\fR
+Superimpose contour outlines from the first dataset in the
+.I file
+HDF5 file on all of the output images.  (If the contour dataset does
+not have the same dimensions as the output data, it is peridically
+"tiled" over the output.)  You can use the syntax
+.I file:dataset
+to specify a particular dataset within the file.  The contour outlines
+are around a value of
+.I val
+(defaults to middle of value range in \fIfile\fR).
+.TP
+\fB\-A\fR \fIfile\fR, \fB\-a\fR \fIcolormap\fR:\fIopacity\fR
+Translucently overlay the data from the first dataset in the
+.I file
+HDF5 file, which should have the same dimensions as the input
+dataset, on all of the output images, using the colormap
+.I colormap
+with opacity (from 0 for completely transparent to 1 for completely opaque)
+.I opacity
+multiplied by the opacity (alpha) values in the colormap.  (If the
+overlay dataset does not have the same dimensions as the output data,
+it is peridically "tiled" over the output.)  You can use the syntax
+.I file:dataset
+to specify a particular dataset within the file.
+
+Some predefined colormaps that work particularly well for this feature
+are 
+.B yellow
+(transparent white to opaque yellow) 
+.B gray
+(transparent white to opaque black),
+.B yarg
+(transparent black to opaque white), 
+.B green
+(transparent white to opaque green), and
+.B bluered
+(opaque blue to transparent white to opaque red).  You can prepend "-"
+to the colormap name to reverse the colormap order.  (See also
+\fB\-c\fR, above.)  The default for \fB\-a\fR is yellow:0.3 (yellow
+colormap multiplied by 30% opacity).
+.TP
+\fB\-d\fR \fIname\fR
+Use dataset
+.I name
+from the input files; otherwise, the first dataset from each file is used.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR, which allows you
+to specify a different dataset for each file.
+You can use the
+.I h5ls
+command (included with hdf5) to find the names of datasets within a file.
+.TP
+.B -8
+Use 8-bit (indexed) color for the PNG output, instead of 24-bit (direct)
+color (the default).  (This shrinks the image size slightly, with some
+degradation in quality.)  Not supported in conjunction with the \fB\-A\fR
+(translucent overlay) option.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2004 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5topng.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5topng.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5topng.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,597 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ctype.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "writepng.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5topng error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+#define CMAP_DEFAULT "gray"
+#define OVERLAY_CMAP_DEFAULT "yellow"
+#define OVERLAY_OPACITY_DEFAULT 0.2
+#define CMAP_DIR DATADIR "/" PACKAGE_NAME "/colormaps/"
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5topng [options] [<filenames>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "  -o <file> : output to <file> (first input file only)\n"
+	     "    -x <ix> : take x=<ix> slice of data (or <min>:<inc>:<max>)\n"
+	     "    -y <iy> : take y=<iy> slice of data\n"
+	     "    -z <iz> : take z=<iz> slice of data\n"
+	     "    -t <it> : take t=<it> slice of data's last dimension\n"
+	     "         -0 : use dataset center as origin for -x/-y/-z\n"
+	     "    -X <sx> : scale width by <sx> [ default: 1.0 ]\n"
+	     "    -Y <sy> : scale height by <sy> [ default: 1.0 ]\n"
+	     "     -S <s> : equivalent to -X <s> -Y <s>\n"
+	     "  -s <skew> : skew axes by <skew> degrees [ default: 0 ]\n"
+	     "         -T : transpose the data [default: no]\n"
+	     "  -c <cmap> : use colormap <cmap> [default: " CMAP_DEFAULT "]\n"
+	     "              (see " CMAP_DIR " for other colormaps)\n"
+	     "         -r : reverse color map [default: no]\n"
+	     "         -Z : center color scale at zero [default: no]\n"
+	     "   -m <min> : set bottom of color scale to data value <min>\n"
+	     "   -M <max> : set top of color scale to data value <max>\n"
+	     "         -R : use uniform colormap range for all files\n"
+	     "  -C <file> : superimpose contour outlines from <file>\n"
+	     "   -b <val> : contours around values != <val> [default: 1.0]\n"
+	     "  -A <file> : overlay data from <file>, as specified by -y\n"
+"  -a <c>:<o>: overlay colormap <c>, opacity <o> (0-1) [default: %s:%g]\n"
+"         -8 : use an 8-bit color table, instead of 24-bit direct color\n"
+	     "  -d <name> : use dataset <name> in the input files (default: first dataset)\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n",
+	  OVERLAY_CMAP_DEFAULT, OVERLAY_OPACITY_DEFAULT);
+}
+
+rgba_t gray_colors[2] = { {1,1,1,0}, {0,0,0,1} };
+colormap_t gray_cmap = { 2, gray_colors };
+
+rgba_t yellow_colors[2] = { {1,1,1,0}, {1,1,0,1} };
+colormap_t yellow_cmap = {2, yellow_colors};
+
+static colormap_t load_colormap(FILE *f, int verbose)
+{
+     colormap_t cmap = {0, NULL};
+     int nalloc = 0;
+     float r,g,b,a;
+     int c;
+     
+     /* read initial comment lines, and echo if verbose */
+     do {
+	  while (isspace(c = fgetc(f)));
+	  if (c == '#' || c == '%') {
+	       while (isspace(c = fgetc(f)) && c != '\n' && c != EOF);
+	       if (c != EOF) ungetc(c, f);
+	       while ('\n' != (c = fgetc(f)) && c != EOF)
+		    if (verbose) 
+			 putchar(c);
+	       if (verbose)
+		    putchar('\n');
+	  }
+     } while (c == '\n');
+     if (c != EOF) ungetc(c, f);
+
+     while (4 == fscanf(f, "%g %g %g %g", &r, &g, &b, &a)) {
+	  if (cmap.n >= nalloc) {
+	       nalloc = (1 + nalloc) * 2;
+	       cmap.rgba = realloc(cmap.rgba, nalloc * sizeof(rgba_t));
+	       CHECK(cmap.rgba, "out of memory");
+	  }
+	  cmap.rgba[cmap.n].r = r;
+	  cmap.rgba[cmap.n].g = g;
+	  cmap.rgba[cmap.n].b = b;
+	  cmap.rgba[cmap.n].a = a;
+	  cmap.n++;
+     }
+     cmap.rgba = realloc(cmap.rgba, cmap.n * sizeof(rgba_t));
+     CHECK(cmap.n >= 1, "invalid colormap file");
+     if (verbose)
+	  printf("%d color entries read from colormap file.\n", cmap.n);
+     return cmap;
+}
+
+colormap_t copy_colormap(const colormap_t c0)
+{
+     colormap_t c;
+     int i;
+     c.n = c0.n;
+     c.rgba = (rgba_t *) malloc(c.n * sizeof(rgba_t));
+     CHECK(c.rgba, "out of memory");
+     for (i = 0; i < c.n; ++i)
+	  c.rgba[i] = c0.rgba[i];
+     return c;
+}
+
+colormap_t get_cmap(const char *colormap, int invert, double scale_alpha,
+		    int verbose)
+{
+     int i;
+     colormap_t cmap;
+     FILE *cmap_f = NULL;
+     char *cmap_fname = (char *) malloc(sizeof(char) *
+					(strlen(CMAP_DIR) 
+					 + strlen(colormap) + 1));
+     CHECK(cmap_fname, "out of memory");
+     if (colormap[0] == '-') {
+	  invert = 1;
+	  colormap++;
+     }
+     strcpy(cmap_fname, CMAP_DIR); strcat(cmap_fname, colormap);
+     if (colormap[0] == '.' || colormap[0] == '/'
+	 || !(cmap_f = fopen(cmap_fname, "r"))) {
+	  free(cmap_fname);
+	  cmap_fname = my_strdup(colormap);
+	  if (!(cmap_f = fopen(cmap_fname, "r"))) {
+	       if (!strcmp(colormap, "gray"))
+		    cmap = gray_cmap;
+	       if (!strcmp(colormap, "yellow"))
+		    cmap = yellow_cmap;
+	       else {
+		    fprintf(stderr, "Could not find colormap \"%s\"\n",
+			    colormap);
+		    exit(EXIT_FAILURE);
+	       }
+	  }
+     }
+     if (cmap.rgba == gray_colors) {
+	  if (verbose)
+	       printf("Using built-in gray colormap%s.\n",
+		      invert ? " (inverted)" : "");
+	  cmap = copy_colormap(cmap);
+     }
+     else if (cmap.rgba == yellow_colors) {
+	  if (verbose)
+	       printf("Using built-in yellow colormap%s.\n",
+		      invert ? " (inverted)" : "");
+	  cmap = copy_colormap(cmap);
+     }
+     else {
+	  if (verbose)
+	       printf("Using colormap \"%s\" in file \"%s\"%s.\n",
+		      colormap, cmap_fname, invert ? " (inverted)" : "");
+	  cmap = load_colormap(cmap_f, verbose);
+	  fclose(cmap_f);
+     }
+     free(cmap_fname);
+     if (invert)
+	  for (i = 0; i < cmap.n - 1 - i; ++i) {
+	       rgba_t rgba = cmap.rgba[i];
+	       cmap.rgba[i] = cmap.rgba[cmap.n - 1 - i];
+	       cmap.rgba[cmap.n - 1 - i] = rgba;
+	  }
+     if (verbose) printf("Scaling opacity by %g\n", scale_alpha);
+     for (i = 0; i < cmap.n; ++i)
+	  cmap.rgba[i].a *= scale_alpha;
+     return cmap;
+}
+
+static int get_islice(const char *s, int *min, int *max, int *step)
+{
+     int num_read = sscanf(s, "%d:%d:%d", min, step, max);
+     if (num_read == 1) {
+	  *max = *min;
+	  *step = 1;
+     }
+     else if (num_read == 2) {
+	  *max = *step;
+	  *step = 1;
+     }
+     CHECK(num_read, "invalid slice argument");
+     return num_read;
+}
+
+static int iabs(int x) { return x < 0 ? -x : x; }
+static int imax(int x, int y) { return x > y ? x : y; }
+static int ilog10(int x) {
+     int lg = 0, prod = 1;
+     while (prod < x) {
+	  ++lg;
+	  prod *= 10;
+     }
+     return lg - 1;
+}
+
+int main(int argc, char **argv)
+{
+     arrayh5 a, contour_data, overlay_data;
+     char *png_fname = NULL, *contour_fname = NULL, *data_name = NULL;
+     char *overlay_fname = NULL;
+     REAL mask_thresh = 0;
+     int mask_thresh_set = 0;
+     double min = 0, max = 0, allmin = 0, allmax = 0;
+     int min_set = 0, max_set = 0, collect_range = 0;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int slicedim[4] = {NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM};
+     int islice[4], center_slice[4] = {0,0,0,0};
+     int islice_min[4] = {0,0,0,0}, islice_max[4] = {0,0,0,0}, islice_step[4] = {1,1,1,1};
+     int err;
+     int nx, ny;
+     char *colormap = NULL, *overlay_colormap = NULL;
+     int overlay_invert = 0;
+     colormap_t cmap = { 0, NULL };
+     colormap_t overlay_cmap = { 0, NULL };
+     double overlay_opacity = OVERLAY_OPACITY_DEFAULT;
+     int verbose = 0;
+     int transpose = 0;
+     int zero_center = 0;
+     double scalex = 1.0, scaley = 1.0;
+     int invert = 0;
+     double skew = 0.0;
+     int eight_bit = 0;
+     int ifile, num_processed;
+     int data_rank, slicedim3;
+
+     colormap = my_strdup(CMAP_DEFAULT);
+     overlay_colormap = my_strdup(OVERLAY_CMAP_DEFAULT);
+
+     while ((c = getopt(argc, argv, "ho:x:y:z:t:0c:m:M:RC:b:d:vX:Y:S:TrZs:Va:A:8")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5topng " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'r':
+		   invert = 1;
+		   break;
+	      case '8':
+		   eight_bit = 1;
+		   break;
+	      case 'Z':
+		   zero_center = 1;
+		   break;
+	      case 'R':
+		   collect_range = 1;
+		   break;
+	      case 'o':
+		   free(png_fname);
+		   png_fname = my_strdup(optarg);
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case 'C':
+		   free(contour_fname);
+		   contour_fname = my_strdup(optarg);
+		   break;
+	      case 'A':
+		   free(overlay_fname);
+		   overlay_fname = my_strdup(optarg);
+		   break;
+	      case 'x':
+		   get_islice(optarg, &islice_min[0], &islice_max[0],
+			      &islice_step[0]);
+		   slicedim[0] = 0;
+		   break;
+	      case 'y':
+		   get_islice(optarg, &islice_min[1], &islice_max[1],
+			      &islice_step[1]);
+		   slicedim[1] = 1;
+		   break;
+	      case 'z':
+		   get_islice(optarg, &islice_min[2], &islice_max[2],
+			      &islice_step[2]);
+		   slicedim[2] = 2;
+		   break;
+	      case 't':
+		   get_islice(optarg, &islice_min[3], &islice_max[3],
+			      &islice_step[3]);
+		   slicedim[3] = LAST_SLICE_DIM;
+		   break;
+              case '0':
+                   center_slice[0] = center_slice[1] = center_slice[2] = 1;
+                   break;
+	      case 'c':
+		   free(colormap);
+		   colormap = my_strdup(optarg);
+		   break;
+	      case 'a':
+		   free(overlay_colormap);
+		   overlay_colormap = my_strdup(optarg);
+		   if (strchr(optarg, ':')) {
+			*(strchr(overlay_colormap, ':')) = 0;
+			sscanf(strchr(optarg, ':')+1, "%lg", &overlay_opacity);
+			CHECK(overlay_opacity >= 0 && overlay_opacity <= 1,
+			      "invalid opacity in -a: must be from 0 to 1");
+		   }
+		   break;
+	      case 'm':
+		   min = atof(optarg);
+		   min_set = 1;
+		   break;
+	      case 'M':
+		   max = atof(optarg);
+		   max_set = 1;
+		   break;
+	      case 'b':
+		   mask_thresh = atof(optarg);
+		   mask_thresh_set = 1;
+		   break;
+	      case 'X':
+		   scalex = atof(optarg);
+		   break;
+	      case 'Y':
+		   scaley = atof(optarg);
+		   break;
+	      case 'S':
+		   scalex = scaley = atof(optarg);
+		   break;
+	      case 's':
+		   skew = atof(optarg) * 3.14159265358979323846 / 180.0;
+		   break;
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+
+     CHECK(!overlay_fname || !eight_bit,
+	   "-8 option is not currently supported with -A");
+
+     cmap = get_cmap(colormap, invert, 1.0, verbose);
+     if (overlay_fname)
+	  overlay_cmap = get_cmap(overlay_colormap, overlay_invert,
+				  overlay_opacity, verbose);
+
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+     
+     contour_data.data = overlay_data.data = NULL;
+
+     slicedim3 = slicedim[3];
+     {
+          char *dname, *h5_fname;
+          h5_fname = split_fname(argv[optind], &dname);
+          if (!dname[0])
+               dname = data_name;
+	  err = arrayh5_read_rank(h5_fname, dname, &data_rank);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  free(h5_fname);
+	  if (verbose)
+	       printf("data rank = %d\n", data_rank);
+     }
+
+ process_files:     
+
+     num_processed = 0;
+
+     for (islice[0] = islice_min[0]; islice[0] <= islice_max[0];
+	  islice[0] += islice_step[0])
+     for (islice[1] = islice_min[1]; islice[1] <= islice_max[1];
+	  islice[1] += islice_step[1])
+     for (islice[2] = islice_min[2]; islice[2] <= islice_max[2];
+	  islice[2] += islice_step[2])
+     for (islice[3] = islice_min[3]; islice[3] <= islice_max[3];
+	  islice[3] += islice_step[3]) {
+
+     int onx = 1, ony = 1;
+     int cnx = 1, cny = 1;
+
+     if (contour_fname && !collect_range) {
+	  int rank;
+	  char *fname, *dname;
+
+	  fname = split_fname(contour_fname, &dname);
+	  if (!dname[0])
+	       dname = NULL;
+
+	  if (verbose)
+	       printf("reading contour data from \"%s\".\n", fname);
+
+	  err = arrayh5_read_rank(fname, dname, &rank);
+          CHECK(!err, arrayh5_read_strerror[err]);
+	  if (slicedim3 == LAST_SLICE_DIM && data_rank > rank)
+	       slicedim[3] = NO_SLICE_DIM;
+
+	  err = arrayh5_read(&contour_data, fname, dname, NULL,
+			     4, slicedim, islice, center_slice);
+	  slicedim[3] = slicedim3;
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  CHECK(contour_data.rank == 1 || contour_data.rank == 2,
+	       "contour slice must be one or two dimensional");
+	  
+	  cnx = contour_data.dims[0];
+	  cny = contour_data.rank >= 2 ? contour_data.dims[1] : 1;
+	  
+	  if (!mask_thresh_set) {
+               double c_min, c_max;
+               arrayh5_getrange(contour_data, &c_min, &c_max);
+	       mask_thresh = (c_min + c_max) * 0.5;
+	  }
+
+	  free(fname);
+     }
+
+     if (overlay_fname && !collect_range) {
+	  int rank;
+	  char *fname, *dname;
+
+	  fname = split_fname(overlay_fname, &dname);
+	  if (!dname[0])
+	       dname = NULL;
+
+	  if (verbose)
+	       printf("reading overlay data from \"%s\".\n", fname);
+
+	  err = arrayh5_read_rank(fname, dname, &rank);
+          CHECK(!err, arrayh5_read_strerror[err]);
+	  if (slicedim3 == LAST_SLICE_DIM && data_rank > rank)
+	       slicedim[3] = NO_SLICE_DIM;
+
+	  err = arrayh5_read(&overlay_data, fname, dname, NULL,
+			     4, slicedim, islice, center_slice);
+	  slicedim[3] = slicedim3;
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  CHECK(overlay_data.rank == 1 || overlay_data.rank == 2,
+	       "overlay slice must be one or two dimensional");
+	  
+	  onx = overlay_data.dims[0];
+	  ony = overlay_data.rank >= 2 ? overlay_data.dims[1] : 1;
+
+	  free(fname);
+     }
+
+     if (verbose)
+	  printf("------\n");
+     for (ifile = optind; ifile < argc; ++ifile) {
+          char *dname, *h5_fname;
+          h5_fname = split_fname(argv[ifile], &dname);
+          if (!dname[0])
+               dname = data_name;
+
+          if (verbose) {
+               int i;
+               printf("reading from \"%s\"", h5_fname);
+               for (i = 0; i < 4; ++i)
+                    if (slicedim[i] != NO_SLICE_DIM)
+                         printf(", slice at %d in %c dimension", islice[i],
+                                slicedim[i] == LAST_SLICE_DIM ? 't'
+                                : slicedim[i] + 'x');
+               printf(".\n");
+          }
+
+	  err = arrayh5_read(&a, h5_fname, dname, NULL,
+			     4, slicedim, islice, center_slice);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  CHECK(a.rank >= 1, "data must have at least one dimension");
+	  CHECK(a.rank <= 2, "data can have at most two dimensions (try specifying a slice)");
+	  
+	  if (!png_fname) {
+	       char dimname[] = "xyzt", suff[1024] = "";
+	       int dim;
+	       for (dim = 0; dim < 4; ++dim)
+		    if (islice_max[dim] >= islice_min[dim]+islice_step[dim]) {
+			 char s[128];
+			 sprintf(s, ".%c%0*d", dimname[dim], 
+				 1 + ilog10(imax(iabs(islice_min[dim]),
+						 iabs(islice_max[dim]))),
+				 islice[dim]);
+			 strcat(suff, s);
+		    }
+	       strcat(suff, ".png");
+	       png_fname = replace_suffix(h5_fname, ".h5", suff);
+	  }
+	  
+	  {
+	       double a_min, a_max;
+	       arrayh5_getrange(a, &a_min, &a_max);
+	       if (verbose)
+		    printf("data ranges from %g to %g.\n", a_min, a_max);
+	       if (!min_set)
+		    min = a_min;
+	       if (!max_set)
+		    max = a_max;
+	       if (!num_processed || a_min < allmin)
+		    allmin = a_min;
+	       if (!num_processed || a_max > allmax)
+		    allmax = a_max;
+	       if (min > max) {
+		    a_min = min;
+		    min = max;
+		    max = a_min;
+	       }
+	       if (zero_center) {
+		    if (!max_set || min_set || max <= 0)
+			 max = fabs(max) > fabs(min) ? fabs(max) : fabs(min);
+		    min = -max;
+	       }
+	  }
+	  
+	  if (!collect_range) {
+	       nx = a.dims[0];
+	       ny = a.rank < 2 ? 1 : a.dims[1];
+	       
+	       if (verbose)
+		    printf("writing \"%s\" from %dx%d input data.\n",
+			   png_fname, nx, ny);
+	       
+	       writepng(png_fname, nx, ny, !transpose, skew,
+			scaley, scalex, a.data, 
+			contour_fname ? contour_data.data : NULL, mask_thresh,
+			cnx, cny,
+			overlay_fname ? overlay_data.data : NULL,overlay_cmap, 
+			onx, ony,
+			min, max, cmap, eight_bit);
+	  }
+	  arrayh5_destroy(a);
+	  free(png_fname); png_fname = NULL;
+	  free(h5_fname);
+	  ++num_processed;
+     }
+
+     if (contour_data.data)
+	  arrayh5_destroy(contour_data);
+     if (overlay_data.data)
+	  arrayh5_destroy(overlay_data);
+     contour_data.data = overlay_data.data = NULL;
+
+     } /* islice loop */
+
+     if (verbose && num_processed)
+	  printf("all data range from %g to %g.\n", allmin, allmax);
+     if (collect_range) {
+	  if (!min_set)
+	       min = allmin;
+	  if (!max_set)
+	       max = allmax;
+	  min_set = max_set = 1;
+	  collect_range = 0;
+	  goto process_files;
+     }
+
+     free(contour_fname);
+     free(overlay_fname);
+     free(data_name);
+
+     if (cmap.rgba != gray_colors)
+	  free(cmap.rgba);
+     free(colormap);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5totxt.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5totxt.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5totxt.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2005 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5TOTXT 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5totxt \- generate comma-delimited text from 2d slices of HDF5 files
+.SH SYNOPSIS
+.B h5totxt
+[\fIOPTION\fR]... [\fIHDF5FILE\fR]...
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5totxt is a utility to generate comma-delimited text (and similar
+formats) from one-, two-, or more-dimensional slices of numeric
+datasets in HDF5 files.  This way, the data can easily be imported
+into spreadsheets and similar programs for analysis and visualization.
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5totxt
+takes the first dataset, but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.
+
+By default, the entire dataset is dumped to the output.  in row-major
+order.  For 3d datasets, this corresponds to a sequence of yz slices,
+in order of increasing x, separated by blank lines.  If
+.B -T
+is specified, outputs in the transposed (column-major) order instead
+
+Often, however, you want only a one- or two-dimensional slice of
+multi-dimensional data.  To do this, you specify coordinates in one or
+more slice dimensions, via the
+.B -xyzt
+options.
+
+The most basic usage is something like \'h5totxt foo.h5\', which will
+output comma-delimited text to stdout from the data in foo.h5.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5totxt.
+.TP
+.B -v
+Verbose output.
+.TP
+\fB\-o\fR \fIfile\fR
+Send text output to
+.I file
+rather than to stdout (the default).
+.TP
+\fB\-s\fR \fIsep\fR
+Use the string
+.I sep
+to separate columns of the output rather than a comma (the default).
+.TP
+\fB\-x\fR \fIix\fR, \fB\-y\fR \fIiy\fR, \fB\-z\fR \fIiz\fR, \fB\-t\fR \fIit\fR
+This tells
+.I h5totxt
+to use a particular slice of a multi-dimensional dataset.  e.g.
+.B -x
+causes a yz plane (of a 3d dataset) to be used, at an x index of
+.I ix
+(where the indices run from zero to one less than the maximum index in
+that direction).  Here, x/y/z correspond to the first/second/third
+dimensions of the HDF5 dataset. The \fB\-t\fR option specifies a slice
+in the last dimension, whichever that might be.  See also the
+.B -0
+option to shift the origin of the x/y/z slice coordinates to the
+dataset center.
+.TP
+.B -0
+Shift the origin of the x/y/z slice coordinates to the dataset center,
+so that e.g. -0 -x 0 (or more compactly -0x0) returns the central x
+plane of the dataset instead of the edge x plane.  (\fB\-t\fR
+coordinates are not affected.)
+.TP
+.B -T
+Transpose the data (interchange the dimension ordering).  By default, no
+transposition is done.
+.TP
+\fB\-.\fR \fInumdigits\fR
+Output
+.I numdigits
+digits after the decimal point (defaults to 16).
+.TP
+\fB\-d\fR \fIname\fR
+Use dataset
+.I name
+from the input files; otherwise, the first dataset from each file is used.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR, which allows you
+to specify a different dataset for each file.
+You can use the
+.I h5ls
+command (included with hdf5) to find the names of datasets within a file.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5totxt.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5totxt.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5totxt.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,235 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5totxt error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5totxt [options] [<filenames>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "   -s <sep> : use <sep> to separate columns [ default: \",\" ]\n"
+	     "  -o <file> : output to <file> (first input file only)\n"
+	     "    -x <ix> : take x=<ix> slice of data\n"
+	     "    -y <iy> : take y=<iy> slice of data\n"
+	     "    -z <iz> : take z=<iz> slice of data\n"
+	     "    -t <it> : take t=<it> slice of data's last dimension\n"
+	     "         -0 : use dataset center as origin for -x/-y/-z\n"
+	     "         -T : transpose the data [default: no]\n"
+	     "     -. <n> : output <n> decimal places [ default: 16 ]\n"
+	     "  -d <name> : use dataset <name> in the input files (default: first dataset)\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n"
+	  );
+}
+
+int main(int argc, char **argv)
+{
+     arrayh5 a;
+     char *txt_fname = NULL, *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int slicedim[4] = {NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM};
+     int islice[4], center_slice[4] = {0,0,0,0};
+     int err;
+     int nx, ny, nz;
+     int dec = 16;
+     int verbose = 0;
+     int transpose = 0;
+     char *sep;
+     int ifile;
+
+     sep = my_strdup(",");
+
+     while ((c = getopt(argc, argv, "ho:x:y:z:t:0ad:vTs:.:V")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5totxt " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+              case '0':
+                   center_slice[0] = center_slice[1] = center_slice[2] = 1;
+                   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'o':
+		   free(txt_fname);
+                   txt_fname = my_strdup(optarg);
+                   break;
+	      case 's':
+		   free(sep);
+		   sep = my_strdup(optarg);
+		   break;
+	      case 'd':
+		   free(data_name);
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      case '.':
+		   dec = atoi(optarg);
+		   break;
+	      case 'x':
+		   islice[0] = atoi(optarg);
+		   slicedim[0] = 0;
+		   break;
+	      case 'y':
+		   islice[1] = atoi(optarg);
+		   slicedim[1] = 1;
+		   break;
+	      case 'z':
+		   islice[2] = atoi(optarg);
+		   slicedim[2] = 2;
+		   break;
+	      case 't':
+		   islice[3] = atoi(optarg);
+		   slicedim[3] = LAST_SLICE_DIM;
+		   break;
+	      case 'a':
+		   slicedim[0] = slicedim[1] = slicedim[2] = slicedim[3]
+			= NO_SLICE_DIM;
+		   break;
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     for (ifile = optind; ifile < argc; ++ifile) {
+	  char *dname, *h5_fname;
+	  h5_fname = split_fname(argv[ifile], &dname);
+	  if (!dname[0])
+	       dname = data_name;
+
+	  if (verbose) {
+	       int i;
+	       printf("reading from \"%s\"", h5_fname);
+	       for (i = 0; i < 4; ++i)
+		    if (slicedim[i] != NO_SLICE_DIM)
+			 printf(", slice at %d in %c dimension", islice[i], 
+				slicedim[i] == LAST_SLICE_DIM ? 't' 
+				: slicedim[i] + 'x');
+	       printf(".\n");
+	  }
+	  
+	  err = arrayh5_read(&a, h5_fname, dname, NULL,
+			     4, slicedim, islice, center_slice);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+
+	  if (transpose)
+	       arrayh5_transpose(&a);
+
+	  {
+	       double a_min, a_max;
+	       arrayh5_getrange(a, &a_min, &a_max);
+	       if (verbose)
+		    printf("data ranges from %.*g to %.*g.\n",
+			   dec, a_min, dec, a_max);
+	  }
+	  
+	  nx = a.rank < 1 ? 1 : a.dims[0];
+	  ny = a.rank < 2 ? 1 : a.dims[1];
+	  nz = a.rank < 3 ? 1 : a.dims[2];
+	  
+	  if (verbose && a.rank <= 3)
+	       printf("writing %s from %dx%dx%d input data.\n",
+		      txt_fname ? txt_fname : "to stdout", nx, ny, nz);
+
+	  {
+	       FILE *f;
+	       int i, j, k;
+
+	       if (txt_fname) {
+		    f = fopen(txt_fname, "w");
+		    CHECK(f, "error creating file");
+	       }
+	       else
+		    f = stdout;
+	       
+	       if (a.rank < 3)
+		    for (i = 0; i < nx; ++i) {
+			 if (ny > 0)
+			      fprintf(f, "%.*g", dec, a.data[i*ny + 0]);
+			 for (j = 1; j < ny; ++j)
+			      fprintf(f, "%s%.*g", sep, dec, a.data[i*ny + j]);
+			 fprintf(f, "\n");
+		    }
+	       else if (a.rank == 3)
+		    for (i = 0; i < nx; ++i) {
+			 if (i > 0)
+			      fprintf(f, "\n");
+			 for (j = 0; j < ny; ++j) {
+			      int ij = nz * (ny * i + j);
+			      if (nz > 0)
+				   fprintf(f, "%.*g", dec, a.data[ij + 0]);
+			      for (k = 1; k < nz; ++k)
+				   fprintf(f, "%s%.*g",
+					   sep, dec, a.data[ij + k]);
+			      fprintf(f, "\n");
+			 }
+		    }
+	       else {
+		    if (a.N > 0)
+			 fprintf(f, "%.*g", dec, a.data[0]);
+		    for (i = 0; i < a.N; ++i) {
+			 fprintf(f, "%s%.*g", sep, dec, a.data[i]);
+		    }
+		    fprintf(f, "\n");
+	       }
+
+	       if (txt_fname)
+		    fclose(f);
+	  }
+
+	  arrayh5_destroy(a);
+	  if (txt_fname)
+	       free(txt_fname);
+	  txt_fname = NULL;
+	  free(h5_fname);
+     }
+     free(sep);
+     free(data_name);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5tov5d.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5tov5d.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5tov5d.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,137 @@
+.\" Copyright (c) 2005 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5TOV5D 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5tov5d \- convert datasets in HDF5 files to Vis5d format
+.SH SYNOPSIS
+.B h5tov5d
+[\fIOPTION\fR]... [\fIHDF5FILE\fR]...
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5tov5d is a program to generate Vis5d data files from
+multidimensional datasets in HDF5 files.  Vis5d is a free volumetric
+visualization program capable of displaying 3, 4, or even 5
+dimensional datasets (using time for the 4th dimension and different
+variables for the 5th dimension).
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple data sets; by default,
+.I h5tov5d
+takes the first dataset, but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.
+
+1d/2d/3d datasets are converted into 3d Vis5d datasets. 4d datasets
+are converted into a time series of 3d datasets, with the first
+dimension marking the time.  5d datasets are converted into several
+variables of time series of 3d datasets, with the first dimension as
+the variable index and the second dimension as the time.  Often,
+however, you want only a three-dimensional "slice" of four (or more)
+dimensional data.  To do this, you specify coordinates in one (or
+more) slice dimension(s), via the
+.B -xyzt
+options.
+
+A typical invocation is of the form
+\'h5tov5d foo.h5\', which will output a Vis5d data file foo.v5d
+from the data in foo.h5.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5tov5d.
+.TP
+.B -v
+Verbose output.
+.TP
+.B -T
+Transpose the output dimensions (reverse their order).
+.TP
+\fB\-o\fR \fIfile\fR
+Save the datasets from all of the input files to a single Vis5d
+.I file
+with each dataset being expressed as a separate Vis5d variable.  In
+this way, you can use Vis5d to superimpose and compare the plots from
+the different datasets.  The first two dimensions (or three, for 4d
+datasets) must be the same for all of the input datasets.
+
+Otherwise, the default behavior is to save each dataset to a separate
+Vis5d file, with the .h5 suffix of the input filename replaced by .v5d
+in the output filename.
+.TP
+\fB\-1\fR, \fB\-2\fR, \fB\-4\fR
+Use 1 (the default), 2, or 4 bytes to store each data point in the
+output file.  Fewer bytes will cause Vis5d to be faster (as well as
+requiring less storage and memory), but will decrease the resolution
+in the values.
+.B -1
+will break up the data values into one of 256 possible values (on a
+linear scale from the minimum to the maximum value in your data),
+.B -2
+will allow 65536 possible values, and
+.B -4
+will use 4-byte floating-point numbers for an "exact" representation.
+In most circumstances,
+.B -1
+is more than adequate for data visualization purposes.
+.TP
+\fB\-x\fR \fIix\fR, \fB\-y\fR \fIiy\fR, \fB\-z\fR \fIiz\fR, \fB\-t\fR \fIit\fR
+This tells
+.I h5tov5d
+to use a particular slice of a multi-dimensional dataset.  e.g.
+.B -x
+uses the subset (with one less dimension) at an x index of
+.I ix
+(where the indices run from zero to one less than the maximum index in
+that direction).  Here, x/y/z correspond to the first/second/third
+dimensions of the HDF5 dataset. The \fB\-t\fR option specifies a slice
+in the last dimension, whichever that might be.  See also the
+.B -0
+option to shift the origin of the x/y/z slice coordinates to the
+dataset center.
+.TP
+.B -0
+Shift the origin of the x/y/z slice coordinates to the dataset center,
+so that e.g. -0 -x 0 (or more compactly -0x0) returns the central x
+plane of the dataset instead of the edge x plane.  (\fB\-t\fR
+coordinates are not affected.)
+.TP
+\fB\-d\fR \fIname\fR
+Use dataset
+.I name
+from the input files; otherwise, the first dataset from each file is used.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR, which allows you
+to specify a different dataset for each file.
+You can use the
+.I h5ls
+command (included with hdf5) to find the names of datasets within a file.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5tov5d.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5tov5d.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5tov5d.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,381 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * [ IMPORTANT: Note that the following is DIFFERENT from the license
+ *   for the rest of the h5utils package. ]
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include "config.h"
+#include "arrayh5.h"
+#include "h5utils.h"
+
+/* Vis5d header files: */
+#if defined(HAVE_VIS5Dp_V5D_H)
+#  include <vis5d+/v5d.h>
+#elif defined(HAVE_VIS5D_V5D_H)
+#  include <vis5d/v5d.h>
+#else
+#  include <v5d.h>
+#endif
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5tov5d error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5tov5d [options] [<filenames>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "         -T : transposed output dimensions\n"
+	     "    -x <ix> : take x=<ix> slice of data\n"
+	     "    -y <iy> : take y=<iy> slice of data\n"
+	     "    -z <iz> : take z=<iz> slice of data\n"
+	     "    -t <it> : take t=<it> slice of data's last dimension\n"
+	     "         -0 : use dataset center as origin for -x/-y/-z\n"
+	     "  -o <file> : output datasets from all input files to <file>\n"
+"   -1,-2,-4 : number of bytes per data point to use in output (default: 1)\n"
+	     "              (fewer bytes is faster, but has less resolution)\n"
+	     "  -d <name> : use dataset <name> in the input files (default: first dataset)\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n"
+	  );
+}
+
+/* The following routine was adapted from convert/foo2_to_v5d.c from
+   Vis5D 4.2, which is Copyright (C) 1990-1997 Bill Hibbard, Johan
+   Kellum, Brian Paul, Dave Santek, and Andre Battaiola, and is
+   distributed under the GNU General Public License. */
+void output_v5d(char *v5d_fname, char *data_label,
+		int nslicedim, const int *slicedim,
+		const int *islice, const int *center_slice,
+		int store_bytes, int transpose,
+		char **h5_fnames, int num_h5, int join)
+{
+     char *data_name;
+     char *fname;
+     arrayh5 a;
+     int it, iv, firstdim, ifile;
+     float *g = 0;
+
+     /** Parameters to v5dCreate: */
+     int NumTimes;                      /* number of time steps */
+     int NumVars;                       /* number of variables */
+     int Nr, Nc, Nl[MAXVARS];           /* size of 3-D grids */
+     char VarName[MAXVARS][10];         /* names of variables */
+     int TimeStamp[MAXTIMES];           /* real times for each time step */
+     int DateStamp[MAXTIMES];           /* real dates for each time step */
+     int CompressMode;                  /* number of bytes per grid */
+     int Projection;                    /* a projection number */
+     float ProjArgs[100];               /* the projection parameters */
+     int Vertical;                      /* a vertical coord system number */
+     float VertArgs[MAXLEVELS];         /* the vertical coord sys parameters */
+
+     if (num_h5 <= 0)
+	  return;
+
+     for (ifile = 0; ifile < num_h5; ++ifile) {
+	  int err;
+	  fname = split_fname(h5_fnames[ifile], &data_name);
+	  if (!data_name[0]) data_name = data_label;
+	  err = arrayh5_read(&a, fname, data_name, NULL, 
+			     nslicedim, slicedim, islice, center_slice);
+	  free(fname);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  CHECK(a.rank >= 1, "data must have at least one dimension");
+	  CHECK(a.rank <= 5, "data cannot have more than 5 dimensions");
+
+
+	  /* if the data is 4 dimensional, express that by using
+	     different times and/or variables */
+	  NumTimes = a.rank < 4 ? 1 : a.dims[a.rank - 1];
+	  CHECK(NumTimes <= MAXTIMES, "too many time steps");
+	  firstdim = a.rank <= 4 ? 0 : a.rank - 4;
+
+	  /* If the data is 5 dimensional, express that by using different
+	     variables.  Alternatively, if we are joining, the different
+	     variables are the different files; in that case, the data
+	     cannot be 5d. */
+	  NumVars = a.rank < 5 ? 1 : a.dims[0];
+	  if (join) {
+	       CHECK(NumVars == 1, "cannot join 5d datasets");
+	       NumVars = num_h5;
+	  }
+	  CHECK(NumVars <= MAXVARS, "too many vars");
+
+	  if (!transpose) {
+	       /* we will need to transpose the data, since HDF5 gives
+		  us the data in row-major order, while Vis5D expects
+		  it in column-major order (we could avoid physically
+		  transposing the data by passing Vis5d transposed
+		  dimensions, but that seems ugly). */
+	       Nr = firstdim >= a.rank ? 1 : a.dims[firstdim];
+	       Nc = firstdim+1 >= a.rank ? 1 : a.dims[firstdim+1];
+	       Nl[0] = firstdim+2 >= a.rank ? 1 : a.dims[firstdim+2];
+	  }
+	  else {
+	       Nr = firstdim+2 >= a.rank ? 1 : a.dims[firstdim+2];
+	       Nc = firstdim+1 >= a.rank ? 1 : a.dims[firstdim+1];
+	       Nl[0] = firstdim >= a.rank ? 1 : a.dims[firstdim];
+	  }
+
+	  if (!v5d_fname) {
+	       fname = split_fname(h5_fnames[ifile], &data_name);
+	       v5d_fname = replace_suffix(fname, ".h5", ".v5d");
+	       free(fname);
+	  }
+
+	  if (join && ifile == 0) {
+	       arrayh5_destroy(a); /* destroy while we check other datasets */
+
+	       /* loop to assign VarName[] and Nl[] arrays: */
+	       for (iv = 0; iv < NumVars; ++iv) {
+		    char *name;
+		    int numTimes, nr, nc, fdim;
+
+		    fname = split_fname(h5_fnames[iv], &data_name);
+		    name =  replace_suffix(fname, ".h5", 
+					   data_name[0] ? data_name - 1 : "");
+		    if (!data_name[0]) data_name = data_label;
+
+		    for (it = 0; it < 9 && name[it]; ++it)
+			 VarName[iv][it] = name[it];
+		    VarName[iv][it] = 0;
+		    free(name);
+
+		    /* we don't really have to read the whole array;
+		       if we called HDF5 routines directly, we could just
+		       get the dimensions...oh well */
+		    err = arrayh5_read(&a, fname, data_name, NULL, 
+				       nslicedim, slicedim,
+				       islice, center_slice);
+		    CHECK(!err, arrayh5_read_strerror[err]);
+		    free(fname);
+		    
+		    numTimes = a.rank < 4 ? 1 : a.dims[a.rank - 1];
+		    fdim = a.rank <= 4 ? 0 : a.rank - 4;
+		    if (!transpose) {
+			 nr = fdim >= a.rank ? 1 : a.dims[fdim];
+			 nc = fdim+1 >= a.rank ? 1 : a.dims[fdim+1];
+			 Nl[iv] = fdim+2 >= a.rank ? 1 : a.dims[fdim+2];
+		    }
+		    else {
+			 nr = fdim+2 >= a.rank ? 1 : a.dims[fdim+2];
+			 nc = fdim+1 >= a.rank ? 1 : a.dims[fdim+1];
+			 Nl[iv] = fdim >= a.rank ? 1 : a.dims[fdim];
+		    }
+		    CHECK(numTimes == NumTimes && nr == Nr && nc == Nc, 
+			  "datasets to be joined must have same dimensions");
+
+		    arrayh5_destroy(a);
+	       }
+
+	       /* read first array back in */
+	       fname = split_fname(h5_fnames[ifile], &data_name);
+	       if (!data_name[0]) data_name = data_label;
+	       err = arrayh5_read(&a, fname, data_name, NULL,
+				  nslicedim, slicedim, islice, center_slice);
+	       CHECK(!err, arrayh5_read_strerror[err]);
+	       free(fname);
+	  }
+	  else if (!join) {
+	       if (data_label) {
+		    for (it = 0; it < 9 && data_label[it]; ++it)
+			 VarName[0][it] = data_label[it];
+		    VarName[0][it] = 0;
+	       }
+	       else {  /* use file name, minus ".v5d" suffix, for var name */
+		    int suff = strlen(v5d_fname) - 4;
+		    if (suff < 0 || strcmp(v5d_fname + suff, ".v5d"))
+			 suff += 4;  /* no ".v5d"; suff = end of string */
+		    
+		    for (it = 0; it < 9 && it < suff; ++it)
+			 VarName[0][it] = v5d_fname[it];
+		    VarName[0][it] = 0;
+	       }
+
+	       for (iv = 1; iv < NumVars; ++iv) {
+		    Nl[iv] = Nl[0];  /* all variables have the same dims */
+		    if (iv <= 999999999) /* paranoia: ensure sprintf is safe */
+			 sprintf(VarName[iv], "%d", iv);
+		    else
+			 strcpy(VarName[iv], "Infinity");
+	       }
+	  }
+
+	  for (it = 0; it < NumTimes; ++it) {
+	       TimeStamp[it] = it;
+	       DateStamp[it] = 0; /* don't bother to make up a real date */
+	  }
+
+	  CompressMode = store_bytes;
+	  CHECK(CompressMode == 1 || CompressMode == 2 || CompressMode == 4,
+		"can only store v5d data as 1, 2, or 4 bytes!");
+	  
+	  Projection = 0;  /* linear, rectangular, generic units */
+	  ProjArgs[0] = ProjArgs[1] = 0; /* origin of row/col coord system */
+	  ProjArgs[2] = ProjArgs[3] = 1; /* coord increment between rows/cols*/
+
+	  Vertical = 0;  /* equally spaced levels in generic units */
+	  VertArgs[0] = 0.0;  /* position of bottom level */
+	  VertArgs[1] = 1.0;  /* spacing between levels */
+
+	  /* use v5dCreate call to create the v5d file and write the header */
+	  if (!join || ifile == 0) {
+	       CHECK(v5dCreate(v5d_fname, NumTimes, NumVars, Nr, Nc, Nl,
+			       VarName, TimeStamp, DateStamp, CompressMode,
+			       Projection, ProjArgs, Vertical, VertArgs),
+		     "couldn't create v5d file");
+	  }
+	  
+	  /* may call v5dSetLowLev() or v5dSetUnits() here; see Vis5d README */
+
+	  /* allocate array for copying transpose of data: */
+	  g = (float *) malloc(sizeof(float) * Nr * Nc * Nl[0]);
+	  CHECK(g, "out of memory!");
+
+	  for (iv = join ? ifile : 0; iv < (join ? ifile + 1 : NumVars); ++iv)
+	       for (it = 0; it < NumTimes; ++it) {
+		    double *d = a.data + it +
+			 (join ? 0 : iv) * NumTimes * Nr * Nc * Nl[0];
+
+		    if (!transpose) {
+			 int ir, ic, il;
+			 for (ir = 0; ir < Nr; ++ir)
+			      for (ic = 0; ic < Nc; ++ic)
+				   for (il = 0; il < Nl[0]; ++il)
+					g[ir + Nr * (ic + Nc * il)] =
+					     d[(il + Nl[0] * (ic + Nc * ir))
+					       * NumTimes];
+		    }
+		    else {
+			 int id;
+			 for (id = 0; id < Nr * Nc * Nl[0]; ++id)
+			      g[id] = d[id * NumTimes];
+		    }
+		    CHECK(v5dWrite(it + 1, iv + 1, g),
+			  "error writing v5d output"); 
+	       }
+	  
+	  free(g);
+	  
+	  if (!join || ifile == num_h5 - 1)
+	       v5dClose();
+
+	  arrayh5_destroy(a);
+	  if (v5d_fname)
+	       free(v5d_fname);
+	  v5d_fname = NULL;
+     }
+}
+
+int main(int argc, char **argv)
+{
+     char *v5d_fname = NULL, *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     int c;
+     int verbose = 0, transpose = 0;
+     int slicedim[4] = {NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM};
+     int islice[4], center_slice[4] = {0,0,0,0};
+     int store_bytes = 1;
+
+     while ((c = getopt(argc, argv, "ho:d:vTV124x:y:z:t:0")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5tov5d " PACKAGE_VERSION " by Steven G. Johnson\n" 
+       "Copyright (c) 2005 Massachusetts Institute of Technology\n"
+       "\n"
+       "This program is free software; you can redistribute it and/or modify\n"
+       "it under the terms of the GNU General Public License as published by\n"
+       "the Free Software Foundation; either version 2 of the License, or\n"
+       "(at your option) any later version.\n"
+       "\n"
+       "This program is distributed in the hope that it will be useful,\n"
+       "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+       "GNU General Public License for more details.\n"
+			);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'T':
+		   transpose = 1;
+		   break;
+	      case 'x':
+		   islice[0] = atoi(optarg);
+		   slicedim[0] = 0;
+		   break;
+	      case 'y':
+		   islice[1] = atoi(optarg);
+		   slicedim[1] = 1;
+		   break;
+	      case 'z':
+		   islice[2] = atoi(optarg);
+		   slicedim[2] = 2;
+		   break;
+	      case 't':
+		   islice[3] = atoi(optarg);
+		   slicedim[3] = LAST_SLICE_DIM;
+		   break;
+              case '0':
+                   center_slice[0] = center_slice[1] = center_slice[2] = 1;
+                   break;
+	      case '1':
+		   store_bytes = 1;
+		   break;
+	      case '2':
+		   store_bytes = 2;
+		   break;
+	      case '4':
+		   store_bytes = 4;
+		   break;
+	      case 'o':
+		   v5d_fname = my_strdup(optarg);
+		   break;
+	      case 'd':
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     output_v5d(v5d_fname, data_name, 
+		4, slicedim, islice, center_slice,
+		store_bytes, transpose,
+		argv + optind, argc - optind, v5d_fname != NULL);
+
+     if (data_name)
+	  free(data_name);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5tovtk.1
===================================================================
--- packages/h5utils/branches/upstream/current/h5tovtk.1	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5tovtk.1	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,184 @@
+.\" Copyright (c) 2002 Massachusetts Institute of Technology
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.TH H5TOVTK 1 "March 9, 2002" "h5utils" "h5utils"
+.SH NAME
+h5tovtk \- convert datasets in HDF5 files to VTK format
+.SH SYNOPSIS
+.B h5tovtk
+[\fIOPTION\fR]... [\fIHDF5FILE\fR]...
+.SH DESCRIPTION
+.PP
+." Add any additional description here
+h5tovtk is a program to generate VTK data files from multidimensional
+datasets in HDF5 files.  VTK, the Visualization ToolKit, is an
+open-source, freely available software system for 3D computer
+graphics, image processing, and visualization.  VTK itself is a
+programming library, but it is also the basis for a number of end-user
+graphical visualization programs.
+
+HDF5 is a free, portable binary format and supporting library developed
+by the National Center for Supercomputing Applications at the University
+of Illinois in Urbana-Champaign.  A single
+.I h5
+file can contain multiple datasets; by default,
+.I h5tovtk
+takes the first dataset, but this can be changed via the
+.B -d
+option, or by using the syntax \fIHDF5FILE:DATASET\fR.
+
+1d/2d/3d datasets are converted into 3d VTK \"structured points\"
+datasets.  Normally, a single scalar VTK dataset is output, but
+vectors and fields can be output via the
+.B -o
+option below.
+
+A typical invocation is of the form
+\'h5tovtk foo.h5\', which will output a VTK data file foo.vtk
+from the data in foo.h5.
+.SH OPTIONS
+.TP
+.B -h
+Display help on the command-line options and usage.
+.TP
+.B -V
+Print the version number and copyright info for h5tovtk.
+.TP
+.B -v
+Verbose output.
+.TP
+\fB\-o\fR \fIfile\fR
+Save all the input datasets to a single VTK \fIfile\fR.  If there is
+only one dataset, it is output to a VTK scalar dataset; if there are
+three datasets, they are output as a VTK vector dataset; all other
+numbers of datasets are combined into a VTK field dataset.
+
+Otherwise, the default behavior is to save each dataset to a separate
+VTK file, with the .h5 suffix of the input filename replaced by .vtk
+in the output filename.
+
+Only three-dimensional datasets may be written to the VTK file.  If
+you have a four (or more) dimensional data set, then you must take a
+three-dimensional "slice" of the multi-dimensional data.  To do this,
+you specify coordinates in one (or more) slice dimension(s), via the
+.B -xyzt
+options.
+.SH OPTIONS
+.TP
+\fB\-1\fR, \fB\-2\fR, \fB\-4\fR
+Use 1 , 2, or 4 bytes to store each data point in the
+output file.  Fewer bytes require less storage and memory,
+but will decrease the resolution in the values.
+.B -1
+will break up the data values into one of 256 possible values (on a
+linear scale from the minimum to the maximum value in your data),
+.B -2
+will allow 65536 possible values, and
+.B -4
+(the default) will use 4-byte floating-point numbers for an "exact"
+representation.
+.TP
+.B -a
+Output in ASCII format; otherwise, VTK's more compact, but less
+readable and somewhat less portable binary format is used.
+.TP
+.B -n
+For binary output (see
+.B -a
+above), by default the data is written in bigendian byte order, which
+is normally the order that VTK expects.  However, some external tools
+and a few VTK classes use the native byte ordering instead (which may
+not be bigendian), and the
+.B -n
+option causes
+.I h5tovtk
+to output binary data in the native ordering.
+.TP
+\fB\-m\fR \fImin\fR, \fB\-M\fR \fImax\fR
+When
+.B -1
+or
+.B -2
+are used, the input data are converted to a linear integer scale.
+Normally, the bottom and top of this scale correspond to the
+minimum and maximum values in the data.  Using the
+.B -m
+and
+.B -M
+options, you
+can make the bottom and top of the scale correspond to
+.I min
+and
+.I max
+instead, respectively.  Data values below or above this range will be
+treated as if they were
+.I min
+or
+.I max
+respectively.  See also the
+.B -Z
+option.
+.TP
+.B -Z
+For
+.B -1
+or
+.B -2
+output, center the linear integer scale on the value zero in the data.
+.TP
+.B -r
+Invert the output values (map the minimum to the maximum and vice versa).
+.TP
+\fB\-x\fR \fIix\fR, \fB\-y\fR \fIiy\fR, \fB\-z\fR \fIiz\fR, \fB\-t\fR \fIit\fR
+This tells
+.I h5tovtk
+to use a particular slice of a multi-dimensional dataset.  e.g.
+.B -x
+uses the subset (with one less dimension) at an x index of
+.I ix
+(where the indices run from zero to one less than the maximum index in
+that direction).  Here, x/y/z correspond to the first/second/third
+dimensions of the HDF5 dataset. The \fB\-t\fR option specifies a slice
+in the last dimension, whichever that might be.  See also the
+.B -0
+option to shift the origin of the x/y/z slice coordinates to the
+dataset center.
+.TP
+.B -0
+Shift the origin of the x/y/z slice coordinates to the dataset center,
+so that e.g. -0 -x 0 (or more compactly -0x0) returns the central x
+plane of the dataset instead of the edge x plane.  (\fB\-t\fR
+coordinates are not affected.)
+.TP
+\fB\-d\fR \fIname\fR
+Use dataset
+.I name
+from the input files; otherwise, the first dataset from each file is used.
+Alternatively, use the syntax \fIHDF5FILE:DATASET\fR, which allows you
+to specify a different dataset for each file.
+You can use the
+.I h5ls
+command (included with hdf5) to find the names of datasets within a file.
+.SH BUGS
+Send bug reports to S. G. Johnson, stevenj at alum.mit.edu.
+.SH AUTHORS
+Written by Steven G. Johnson.  Copyright (c) 2005 by the Massachusetts
+Institute of Technology.

Added: packages/h5utils/branches/upstream/current/h5tovtk.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5tovtk.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5tovtk.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,392 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ctype.h>
+
+#include <unistd.h>
+
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>
+#endif
+
+#include "config.h"
+#include "arrayh5.h"
+#include "copyright.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5tovtk error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+void usage(FILE *f)
+{
+     fprintf(f, "Usage: h5tovtk [options] [<filenames>]\n"
+	     "Options:\n"
+	     "         -h : this help message\n"
+             "         -V : print version number and copyright\n"
+	     "         -v : verbose output\n"
+	     "  -o <file> : output datasets from all input files to <file>;\n"
+	     "              combines 3 datasets to a vector, and 2 or 4+ to a field\n"
+	     "         -4 : 4-byte floating-point binary output (default)\n"
+	     "         -a : ASCII floating-point output\n"
+	     "         -1 : 1-byte (0-255) binary output\n"
+	     "         -2 : 2-byte (0-65535) binary output\n"
+	     "         -n : don't convert binary output to bigendian\n"
+	     "   -m <min> : set bottom of scale for 1/2 byte encoding\n"
+	     "   -M <max> : set top of scale for 1/2 byte encoding\n"
+	     "         -Z : center scale at zero for 1/2 byte encoding\n"
+	     "         -r : invert scale & data values\n"
+	     "    -x <ix> : take x=<ix> slice of data\n"
+	     "    -y <iy> : take y=<iy> slice of data\n"
+	     "    -z <iz> : take z=<iz> slice of data\n"
+	     "    -t <it> : take t=<it> slice of data's last dimension\n"
+	     "         -0 : use dataset center as origin for -x/-y/-z\n"
+	     "  -d <name> : use dataset <name> in the input files (default: first dataset)\n"
+	     "              -- you can also specify a dataset via <filename>:<name>\n"
+	  );
+}
+
+static void whitespace_to_underscores(char *s)
+{
+     while (*s) {
+	  if (isspace(*s))
+	       *s = '-';
+	  ++s;
+     }
+}
+
+static const char vtk_datatype[][20] = { 
+     "float", "unsigned_char", "unsigned_short", "none", "float"
+};
+
+static void write_vtk_header(FILE *f, int is_binary,
+			     int nx, int ny, int nz,
+			     double ox, double oy, double oz,
+			     double sx, double sy, double sz)
+{
+     fprintf(f, 
+	     "# vtk DataFile Version 2.0\n"
+	     "Generated by h5tovtk.\n"
+	     "%s\n"
+	     "DATASET STRUCTURED_POINTS\n"
+	     "DIMENSIONS %d %d %d\n"
+	     "ORIGIN %g %g %g\n"
+	     "SPACING %g %g %g\n",
+	     is_binary ? "BINARY" : "ASCII",
+	     nz, ny, nx,
+	     oz, oy, ox, sz, sy, sx);
+}
+
+static void write_vtk_value(FILE *f, double v, int store_bytes, int fix_bytes,
+			    double min, double max, int invert)
+{
+     if (invert)
+	  v = max - (v - min);
+     switch (store_bytes) {
+	 case 0:
+	      fprintf(f, "%g ", v);
+	      break;
+	 case 1:
+	 {
+	      unsigned char c;
+	      c = floor((v - min) * 255.0 / (max - min) + 0.5);
+	      fwrite(&c, 1, 1, f);
+	      break;
+	 }
+	 case 2:
+	 {
+	      unsigned short i;
+	      i = floor((v - min) * 65535.0 / (max - min) + 0.5);
+	      if (fix_bytes) {
+#if defined(HAVE_HTONS)
+		   i = htons(i);
+#elif ! defined(WORDS_BIGENDIAN)
+		   unsigned char swap, *bytes;
+		   bytes = (unsigned char *) &i;
+		   swap = bytes[0]; bytes[0] = bytes[1]; bytes[1] = swap;
+#endif
+	      }
+	      fwrite(&i, 2, 1, f);
+	      break;
+	 }
+	 case 4:
+	 {
+	      float fv = v;
+	      if (fix_bytes) {
+#if defined(HAVE_HTONL) && (SIZEOF_FLOAT == SIZEOF_UNSIGNED_LONG)
+		   unsigned long *i = (unsigned long *) &fv;
+		   *i = htonl(*i);
+#elif ! defined(WORDS_BIGENDIAN)
+		   unsigned char swap, *bytes;
+		   bytes = (unsigned char *) &fv;
+		   swap = bytes[0]; bytes[0] = bytes[3]; bytes[3] = swap;
+		   swap = bytes[1]; bytes[1] = bytes[2]; bytes[2] = swap;
+#endif
+	      }
+	      fwrite(&fv, 4, 1, f);
+	      break;
+	 }
+     }
+}
+
+int main(int argc, char **argv)
+{
+     arrayh5 *a = NULL;
+     char *vtk_fname = NULL, *data_name = NULL;
+     extern char *optarg;
+     extern int optind;
+     double ox = 0, oy = 0, oz = 0, sx = 1, sy = 1, sz = 1;
+     int c, ifile;
+     int zero_center = 0;
+     int invert = 0;
+     double min = 0, max = 0;
+     int min_set = 0, max_set = 0;
+     int verbose = 0, combine = 0;
+     int slicedim[4] = {NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM,NO_SLICE_DIM};
+     int islice[4], center_slice[4] = {0,0,0,0};
+     int nx = 0, ny = 0, nz = 0, na;
+     int store_bytes = 4, fix_byte_order = 1;
+
+     while ((c = getopt(argc, argv, "ho:d:vV124mMZranx:y:z:t:0")) != -1)
+	  switch (c) {
+	      case 'h':
+		   usage(stdout);
+		   return EXIT_SUCCESS;
+	      case 'V':
+		   printf("h5tovtk " PACKAGE_VERSION " by Steven G. Johnson\n" 
+			  COPYRIGHT);
+		   return EXIT_SUCCESS;
+	      case 'v':
+		   verbose = 1;
+		   break;
+	      case 'x':
+		   islice[0] = atoi(optarg);
+		   slicedim[0] = 0;
+		   break;
+	      case 'y':
+		   islice[1] = atoi(optarg);
+		   slicedim[1] = 1;
+		   break;
+	      case 'z':
+		   islice[2] = atoi(optarg);
+		   slicedim[2] = 2;
+		   break;
+	      case 't':
+		   islice[3] = atoi(optarg);
+		   slicedim[3] = LAST_SLICE_DIM;
+		   break;
+              case '0':
+                   center_slice[0] = center_slice[1] = center_slice[2] = 1;
+                   break;
+	      case 'n':
+		   fix_byte_order = 0;
+		   break;
+	      case 'a':
+		   store_bytes = 0; /* ascii */
+		   break;
+	      case '1':
+		   store_bytes = 1;
+		   break;
+	      case '2':
+		   store_bytes = 2;
+		   break;
+	      case '4':
+		   store_bytes = 4;
+		   break;
+	      case 'm':
+		   min = atof(optarg);
+		   min_set = 1;
+		   break;
+	      case 'M':
+		   max = atof(optarg);
+		   max_set = 1;
+		   break;
+	      case 'Z':
+		   zero_center = 1;
+		   break;
+	      case 'r':
+		   invert = 1;
+		   break;
+	      case 'o':
+		   vtk_fname = my_strdup(optarg);
+		   combine = 1;
+		   break;
+	      case 'd':
+		   data_name = my_strdup(optarg);
+		   break;		   
+	      default:
+		   fprintf(stderr, "Invalid argument -%c\n", c);
+		   usage(stderr);
+		   return EXIT_FAILURE;
+	  }
+     if (optind == argc) {  /* no parameters left */
+	  usage(stderr);
+	  return EXIT_FAILURE;
+     }
+
+     CHECK(store_bytes != 4 || sizeof(float) == 4, 
+	   "'float' is wrong size for -4");
+     CHECK(store_bytes != 2 || sizeof(unsigned short) == 4, 
+	   "'short' is wrong size for -2");
+     
+     a = (arrayh5*) malloc(sizeof(arrayh5) * (na = argc - optind));
+     CHECK(a, "out of memory");
+
+     combine = combine && (na > 1);
+
+     for (ifile = optind; ifile < argc; ++ifile) {
+          char *dname, *found_dname, *h5_fname;
+	  int err, ia = ifile - optind;
+          h5_fname = split_fname(argv[ifile], &dname);
+          if (!dname[0])
+               dname = data_name;
+
+	  err = arrayh5_read(&a[ia], h5_fname, dname, &found_dname,
+			     4, slicedim, islice, center_slice);
+	  CHECK(!err, arrayh5_read_strerror[err]);
+	  CHECK(a[ia].rank >= 1, "data must have at least one dimension");
+	  CHECK(a[ia].rank <= 3, "data can have at most 3 dimensions (try taking a slice");
+	  
+	  CHECK(!combine || !ia || arrayh5_conformant(a[ia], a[0]),
+		"all arrays must be conformant to combine them");
+	  
+	  if (!vtk_fname)
+	       vtk_fname = replace_suffix(h5_fname, ".h5", ".vtk");
+
+	  {
+	       double a_min, a_max;
+	       arrayh5_getrange(a[ia], &a_min, &a_max);
+	       if (verbose)
+		    printf("data in %s ranges from %g to %g.\n", 
+			   h5_fname, a_min, a_max);
+	       if (!min_set)
+		    min = (!combine || !ia || a_min < min) ? a_min : min;
+	       if (!max_set)
+		    max = (!combine || !ia || a_max > max) ? a_max : max;
+	       if (min > max) {
+		    invert = !invert;
+		    a_min = min;
+		    min = max;
+		    max = a_min;
+	       }
+	       if (zero_center) {
+		    max = fabs(max) > fabs(min) ? fabs(max) : fabs(min);
+		    min = -max;
+	       }
+	  }
+	  
+	  nx = a[ia].dims[0];
+	  ny = a[ia].rank < 2 ? 1 : a[ia].dims[1];
+	  nz = a[ia].rank < 3 ? 1 : a[ia].dims[2];
+	  
+	  if (!combine) {
+	       FILE *f;
+	       int i, N = nx * ny * nz;
+
+	       if (verbose)
+		    printf("writing \"%s\" from %dx%dx%d input data.\n",
+			   vtk_fname, nx, ny, nz);
+	       
+	       if (strcmp(vtk_fname, "-")) {
+		    f = fopen(vtk_fname, "w");
+		    CHECK(f, "error creating file");
+	       }
+	       else
+		    f = stdout;
+
+	       write_vtk_header(f, store_bytes, 
+				nx, ny, nz, ox, oy, oz, sx, sy, sz);
+	       whitespace_to_underscores(found_dname);
+	       fprintf(f, "POINT_DATA %d\n"
+		       "SCALARS %s %s 1\n"
+		       "LOOKUP_TABLE default\n",
+		       N, found_dname, vtk_datatype[store_bytes]);
+	       
+	       for (i = 0; i < N; ++i)
+		    write_vtk_value(f, a[ia].data[i], store_bytes,
+				    fix_byte_order, min, max, invert);
+	  
+	       if (f != stdout)
+		    fclose(f);
+	       arrayh5_destroy(a[ia]);
+	       free(vtk_fname); vtk_fname = NULL;
+	  }
+	  free(found_dname);
+	  free(h5_fname);
+     }
+
+     if (combine) {
+	  FILE *f;
+	  int i, N = nx * ny * nz;
+
+	  if (verbose)
+	       printf("writing \"%s\" from %dx%dx%d input data.\n",
+		      vtk_fname, nx, ny, nz);
+	  
+	  if (strcmp(vtk_fname, "-")) {
+	       f = fopen(vtk_fname, "w");
+	       CHECK(f, "error creating file");
+	  }
+	  else
+	       f = stdout;
+	  
+	  write_vtk_header(f, store_bytes, 
+			   nx, ny, nz, ox, oy, oz, sx, sy, sz);
+	  fprintf(f, "POINT_DATA %d\n", N);
+	  switch (na) {
+	      case 1:
+		   fprintf(f, "SCALARS scalars %s 1\nLOOKUP_TABLE default\n", 
+			   vtk_datatype[store_bytes]);
+		   break;
+	      case 3:
+		   fprintf(f, "VECTORS vectors %s\n", 
+			   vtk_datatype[store_bytes]);
+		   break;
+	      default:
+		   fprintf(f, "FIELD fields 1\narray %d %d %s\n", 
+			   na, N, vtk_datatype[store_bytes]);
+	  }
+	  
+	  for (i = 0; i < N; ++i) {
+	       int ia;
+	       for (ia = 0; ia < na; ++ia)
+		    write_vtk_value(f, a[ia].data[i], store_bytes, 
+				    fix_byte_order, min, max, invert);
+	  }
+	  if (f != stdout)
+	       fclose(f);
+	  {
+	       int ia;
+	       for (ia = 0; ia < na; ++ia)
+		    arrayh5_destroy(a[ia]);
+	  }
+     }
+
+     free(a);
+
+     if (data_name)
+	  free(data_name);
+
+     return EXIT_SUCCESS;
+}

Added: packages/h5utils/branches/upstream/current/h5utils.c
===================================================================
--- packages/h5utils/branches/upstream/current/h5utils.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5utils.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,87 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "config.h"
+#include "h5utils.h"
+
+#define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "h5utils error: %s\n", msg); exit(EXIT_FAILURE); } }
+
+char *my_strdup(const char *s)
+{
+     char *sd = (char *) malloc(sizeof(char) * (strlen(s) + 1));
+     CHECK(sd, "out of memory");
+     strcpy(sd, s);
+     return sd;
+}
+
+char *replace_suffix(const char *s, const char *old_suff, const char *new_suff)
+{
+     char *new_s;
+     int s_len, old_suff_len, new_suff_len;
+
+     s_len = strlen(s);
+     old_suff_len = strlen(old_suff);
+     new_suff_len = strlen(new_suff);
+
+     new_s = (char*) malloc(sizeof(char) * (s_len + new_suff_len + 1));
+     CHECK(new_s, "out of memory");
+
+     strcpy(new_s, s);
+     if (s_len >= old_suff_len && !strcmp(new_s + s_len - old_suff_len,
+                                          old_suff))
+          new_s[s_len - old_suff_len] = 0;  /* delete old suffix */
+     strcat(new_s, new_suff);
+     return new_s;
+}
+
+/* given an fname of the form <filename>:<data_name>, return a pointer
+   to a newly-allocated string containing <filename>, and point data_name
+   to the position of <data_name> in fname.  The user must free() the
+   <filename> string. */
+char *split_fname(char *fname, char **data_name)
+{
+     int fname_len;
+     char *colon, *filename;
+
+     fname_len = strlen(fname);
+     colon = strchr(fname, ':');
+     if (colon) {
+          int colon_len = strlen(colon);
+          filename = (char*) malloc(sizeof(char) * (fname_len-colon_len+1));
+          CHECK(filename, "out of memory");
+          strncpy(filename, fname, fname_len-colon_len+1);
+	  filename[fname_len-colon_len] = 0;
+          *data_name = colon + 1;
+     }
+     else { /* treat as if ":" were at the end of fname */
+          filename = (char*) malloc(sizeof(char) * (fname_len + 1));
+          CHECK(filename, "out of memory");
+          strcpy(filename, fname);
+          *data_name = fname + fname_len;
+     }
+     return filename;
+}
+

Added: packages/h5utils/branches/upstream/current/h5utils.h
===================================================================
--- packages/h5utils/branches/upstream/current/h5utils.h	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/h5utils.h	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,31 @@
+/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef H5UTILS_H
+#define H5UTILS_H
+
+extern char *my_strdup(const char *s);
+extern char *replace_suffix(const char *s,
+			    const char *old_suff, const char *new_suff);
+extern char *split_fname(char *fname, char **data_name);
+
+#endif /* H5UTILS_H */

Added: packages/h5utils/branches/upstream/current/install-sh
===================================================================
--- packages/h5utils/branches/upstream/current/install-sh	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/install-sh	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# 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.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# 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}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # 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 $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: packages/h5utils/branches/upstream/current/install-sh
___________________________________________________________________
Name: svn:executable
   + 

Added: packages/h5utils/branches/upstream/current/missing
===================================================================
--- packages/h5utils/branches/upstream/current/missing	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/missing	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,357 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-02-08.22
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# 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.
+
+# 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: packages/h5utils/branches/upstream/current/missing
___________________________________________________________________
Name: svn:executable
   + 

Added: packages/h5utils/branches/upstream/current/writepng.c
===================================================================
--- packages/h5utils/branches/upstream/current/writepng.c	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/writepng.c	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,496 @@
+/* Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+#include <png.h>
+
+#include "writepng.h"
+
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+
+#define PIN(min, x, max) MIN(MAX(min, x), max)
+
+/* convert a value val in [0,1] to a color from the colormap */
+static void cmap_lookup(REAL val, colormap_t cmap,
+			float *r, float *g, float *b, float *a)
+{
+     double w;
+     int i = val * (cmap.n - 1);
+     if (i > cmap.n - 2) i = cmap.n - 2;
+     if (i < 0) i = 0;
+     w = val * (cmap.n - 1) - i;
+     *r = cmap.rgba[i].r * (1 - w) + cmap.rgba[i+1].r * w;
+     *g = cmap.rgba[i].g * (1 - w) + cmap.rgba[i+1].g * w;
+     *b = cmap.rgba[i].b * (1 - w) + cmap.rgba[i+1].b * w;
+     *a = cmap.rgba[i].a * (1 - w) + cmap.rgba[i+1].a * w;
+}
+
+static void convert_row(int png_width, int data_width,
+			REAL scaley, REAL offsety,
+			REAL *datarow, REAL *datarow2, REAL weightrow,
+			int stride, REAL *maskrow, REAL *maskrow2,
+			REAL mask_thresh, REAL *mask_prev, int init_mask_prev,
+			png_byte mask_byte,
+			int mny, int mstride,
+			int overlay, REAL *olayrow, REAL *olayrow2, 
+			colormap_t olay_cmap, REAL olaymin, REAL olaymax,
+			int ony, int ostride,
+			colormap_t cmap,
+			REAL minrange, REAL maxrange, REAL scale,
+			png_byte * row_pointer, int eight_bit)
+{
+     int i;
+
+     for (i = 0; i < png_width; ++i) {
+	  REAL y = i * scaley + offsety;
+	  int n = PIN(0, (int) (y + 0.5), data_width-1);
+	  double delta = y - n;
+	  REAL val, maskval = 0.0, olayval = olaymin;
+
+	  if (n < 0 || n > data_width) {
+	       if (eight_bit)
+		    row_pointer[i] = 255;
+	       else
+		    row_pointer[3*i]
+			 = row_pointer[3*i + 1]
+			 = row_pointer[3*i + 2] = mask_byte;
+	       continue;
+	  }
+	  
+	  if (delta == 0.0) {
+	       val = (datarow[n * stride] * weightrow +
+		      datarow2[n * stride] * (1 - weightrow));
+	       if (maskrow != NULL) {
+		    maskval = (maskrow[(n%mny) * mstride] * weightrow +
+			       maskrow2[(n%mny) * mstride] * (1 - weightrow));
+	       }
+	       if (overlay)
+		    olayval = (olayrow[(n%ony) * ostride] * weightrow +
+			       olayrow2[(n%ony) * ostride] * (1 - weightrow));
+	  }
+	  else {
+	       int n2 = PIN(0, n + (delta < 0.0 ? -1 : 1), data_width-1);
+	       REAL absdelta = fabs(delta);
+	       val = 
+		    (datarow[n * stride] * (1 - absdelta) +
+		     datarow[n2 * stride] * absdelta) * weightrow +
+		    (datarow2[n * stride] * (1 - absdelta) +
+		     datarow2[n2 * stride] * absdelta) * 
+		    (1 - weightrow);
+	       if (overlay)
+		    olayval = 
+			 (olayrow[(n%ony) * ostride] * (1 - absdelta) +
+			  olayrow[(n2%ony) * ostride] * absdelta) * weightrow +
+			 (olayrow2[(n%ony) * ostride] * (1 - absdelta) +
+			  olayrow2[(n2%ony) * ostride] * absdelta) * 
+		    (1 - weightrow);
+	       if (maskrow != NULL) {
+		    maskval = 
+			 (maskrow[(n%mny) * mstride] * (1 - absdelta) +
+			  maskrow[(n2%mny) * mstride] * absdelta) * weightrow +
+			 (maskrow2[(n%mny) * mstride] * (1 - absdelta) +
+			  maskrow2[(n2%mny) * mstride] * absdelta) * 
+			 (1 - weightrow);
+	       }
+	  }
+
+	  if (maskrow != NULL) {
+	       REAL maskmin, maskmax;
+	       if (init_mask_prev)
+		    maskmin = maskmax = maskval;
+	       else {
+		    maskmin = MIN(MIN(maskval, i ? mask_prev[i-1] : maskval), 
+				  mask_prev[i]);
+		    maskmax = MAX(MAX(maskval, i ? mask_prev[i-1] : maskval), 
+				  mask_prev[i]);
+	       }
+	       mask_prev[i] = maskval;
+	       if (maskmin <= mask_thresh && maskmax >= mask_thresh) {
+		    if (eight_bit)
+			 row_pointer[i] = 255;
+		    else
+			 row_pointer[3*i]
+			      = row_pointer[3*i + 1]
+			      = row_pointer[3*i + 2] = mask_byte;
+		    continue;
+	       }
+	  }	 
+	  
+	  if (val > maxrange)
+	       val = maxrange;
+	  else if (val < minrange)
+	       val = minrange;
+	  
+	  if (eight_bit) 
+	       row_pointer[i] = (val - minrange) * scale;
+	  else if (overlay) {
+	       float r, g, b, a, ro, go, bo, ao;
+	       cmap_lookup((val - minrange) / (maxrange - minrange),
+			   cmap, &r, &g, &b, &a);
+	       cmap_lookup((olayval - olaymin) / (olaymax - olaymin),
+			   olay_cmap, &ro, &go, &bo, &ao);
+	       r = r * (1 - ao) + ro * ao;
+	       g = g * (1 - ao) + go * ao;
+	       b = b * (1 - ao) + bo * ao;
+	       row_pointer[3*i    ] = r * 255 + 0.5;
+	       row_pointer[3*i + 1] = g * 255 + 0.5;
+	       row_pointer[3*i + 2] = b * 255 + 0.5;
+	  }
+	  else {
+	       float r, g, b, a;
+	       cmap_lookup((val - minrange) / (maxrange - minrange),
+			   cmap, &r, &g, &b, &a);
+	       row_pointer[3*i    ] = r * 255 + 0.5;
+	       row_pointer[3*i + 1] = g * 255 + 0.5;
+	       row_pointer[3*i + 2] = b * 255 + 0.5;
+	  }
+     }
+}
+
+static void init_palette(png_colorp palette, colormap_t colormap,
+			 png_byte mask_byte)
+{
+     int i;
+
+     for (i = 0; i < 255; ++i) {
+	  int j = i * 1.0/254 * (colormap.n - 1);
+	  int j2 = (j == colormap.n - 1) ? j : j + 1;
+	  REAL dj = i * 1.0/254 * (colormap.n - 1) - j;
+	  float r,g,b;
+	  r = colormap.rgba[j].r * (1-dj) + colormap.rgba[j2].r * dj;
+	  g = colormap.rgba[j].g * (1-dj) + colormap.rgba[j2].g * dj;
+	  b = colormap.rgba[j].b * (1-dj) + colormap.rgba[j2].b * dj;
+	  palette[i].red = r * 255 + 0.5;
+	  palette[i].green = g * 255 + 0.5;
+	  palette[i].blue = b * 255 + 0.5;
+     }
+
+     /* set mask color: */
+     palette[255].green = palette[255].blue = palette[255].red = mask_byte; 
+}
+
+#define USE_ALPHA 0
+
+#if USE_ALPHA
+static void init_alpha(png_structp png_ptr, png_infop info_ptr,
+		       colormap_t colormap)
+{
+     int i;
+     png_bytep trans;
+
+     for (i = 0; i < colormap.n; ++i)
+	  if ((int) (colormap.rgba[i].a * 255 + 0.5) < 255)
+	       break;
+     if (i >= colormap.n)
+	  return; /* all colors are opaque */
+
+     trans = (png_bytep) malloc(sizeof(png_byte) * 256);
+     for (i = 0; i < 255; ++i) {
+          int j = i * 1.0/254 * (colormap.n - 1);
+          int j2 = (j == colormap.n - 1) ? j : j + 1;
+          REAL dj = i * 1.0/254 * (colormap.n - 1) - j;
+          float a = colormap.rgba[j].a * (1-dj) + colormap.rgba[j2].a * dj;
+	  trans[i] = a * 255 + 0.5;
+     }
+     trans[255] = 255; /* mask is always opaque */
+
+     png_set_tRNS(png_ptr, info_ptr, trans, 256, 0);
+}
+#endif
+
+void writepng(char *filename,
+	      int nx, int ny, int transpose, 
+	      REAL skew, REAL scalex, REAL scaley,
+	      REAL * data,
+	      REAL *mask, REAL mask_thresh,
+	      int mnx, int mny,
+	      REAL *overlay, colormap_t overlay_cmap,
+	      int onx, int ony,
+	      REAL minrange, REAL maxrange,
+	      colormap_t colormap, int eight_bit)
+{
+     FILE *fp;
+     png_structp png_ptr;
+     png_infop info_ptr;
+     int height, width;
+     double skewsin = sin(skew), skewcos = cos(skew);
+     REAL minoverlay = 0, maxoverlay = 0;
+     png_byte mask_byte;
+
+     /* we must use direct color for translucent overlays */
+     if (overlay)
+	  eight_bit = 0;
+
+     /* compute png size from scaled (and possibly transposed) data size,
+      * and reverse the meaning of the scale factors; now they are what we 
+      * multiply png coordinates by to get data coordinates: */
+
+     if (transpose) {
+	  height = MAX(1, ny * scalex * skewcos);
+	  width = MAX(1, nx * scaley * (1.0 + fabs(skewsin)));
+	  scalex = height==1 ? 0 : (1.0 * (ny-1)) / (height-1);
+	  scaley = width==1 ? 0 : ((1.0 + fabs(skewsin)) * (nx-1)) / (width-1);
+     } else {
+	  height = MAX(1, nx * scalex * skewcos);
+	  width = MAX(1, ny * scaley * (1.0 + fabs(skewsin)));
+	  scalex = height==1 ? 0 : (1.0 * (nx-1)) / (height-1);
+	  scaley = width==1 ? 0 : ((1.0 + fabs(skewsin)) * (ny-1)) / (width-1);
+     }
+
+     if (overlay) {
+	  int i;
+	  minoverlay = maxoverlay = overlay[0];
+	  for (i = 1; i < onx * ony; ++i) {
+	       if (minoverlay > overlay[i])
+		    minoverlay = overlay[i];
+	       if (maxoverlay < overlay[i])
+		    maxoverlay = overlay[i];
+	  }
+     }
+
+     /* determine mask color by middle of colormap (FIXME: use
+	median color of the data or some such thing instead?) */
+     {
+	  float r,g,b,a;
+	  cmap_lookup(0.5, colormap, &r, &g, &b, &a);
+	  if ((r + g + b) / 3.0 > 0.5)
+	       mask_byte = 0; /* black */
+	  else
+	       mask_byte = 255; /* white */
+     }
+
+     fp = fopen(filename, "wb");
+     if (fp == NULL) {
+	  perror("Error creating file to write PNG in");
+	  return;
+     }
+     /* Create and initialize the png_struct with the desired error
+      * handler * functions.  If you want to use the default stderr and
+      * longjump method, * you can supply NULL for the last three
+      * parameters.  We also check that * the library version is
+      * compatible with the one used at compile time, * in case we are
+      * using dynamically linked libraries.  REQUIRED. */
+     png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL,NULL);
+
+     if (png_ptr == NULL) {
+	  fclose(fp);
+	  return;
+     }
+     /* Allocate/initialize the image information data.  REQUIRED */
+     info_ptr = png_create_info_struct(png_ptr);
+     if (info_ptr == NULL) {
+	  fclose(fp);
+	  png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+	  return;
+     }
+     /* Set error handling.  REQUIRED if you aren't supplying your own *
+      * error hadnling functions in the png_create_write_struct() call. */
+     if (setjmp(png_ptr->jmpbuf)) {
+	  /* If we get here, we had a problem reading the file */
+	  fclose(fp);
+	  png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+	  return;
+     }
+     /* set up the output control if you are using standard C streams */
+     png_init_io(png_ptr, fp);
+
+     /* Set the image information here.  Width and height are up to
+       2^31, bit_depth is one of 1, 2, 4, 8, or 16, but valid values
+       also depend on the color_type selected. color_type is one of
+       PNG_COLOR_TYPE_GRAY, PNG_COLOR_TYPE_GRAY_ALPHA,
+       PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, or
+       PNG_COLOR_TYPE_RGB_ALPHA.  interlace is either
+       PNG_INTERLACE_NONE or PNG_INTERLACE_ADAM7, and the
+       compression_type and filter_type MUST currently be
+       PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED */
+
+     if (!eight_bit)
+	  png_set_IHDR(png_ptr, info_ptr, width, height, 8 /* bit_depth */ ,
+		       PNG_COLOR_TYPE_RGB,
+		       PNG_INTERLACE_NONE,
+		       PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+     else {
+	  png_colorp palette;
+
+	  png_set_IHDR(png_ptr, info_ptr, width, height, 8 /* bit_depth */ ,
+		       PNG_COLOR_TYPE_PALETTE,
+		       PNG_INTERLACE_NONE,
+		       PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+	  /* initialize alpha channel (if any) via png_set_tRNS */
+#if USE_ALPHA
+	  init_alpha(png_ptr, info_ptr, colormap);
+#endif
+	  palette = (png_colorp) png_malloc(png_ptr, 256 * sizeof(png_color));
+
+	  /* set the palette if there is one.  REQUIRED for indexed-color
+	   * images */
+	  init_palette(palette, colormap, mask_byte);
+	  png_set_PLTE(png_ptr, info_ptr, palette, 256);
+     }
+
+     /* Write the file header information.  REQUIRED */
+     png_write_info(png_ptr, info_ptr);
+
+     /* Write out data, one row at a time: */
+     {
+	  REAL scale, *mask_prev = NULL;
+	  png_byte *row_pointer;
+	  int row;
+	  int data_height = transpose ? ny : nx;
+	  int data_width = transpose ? nx : ny;
+
+	  if (maxrange > minrange)
+	       scale = 254.0 / (maxrange - minrange);
+	  else
+	       scale = 0.0;
+
+	  row_pointer = (png_byte *) malloc(width * sizeof(png_byte) *
+					    (eight_bit ? 1 : 3));
+	  if (row_pointer == NULL) {
+	       fclose(fp);
+	       return;
+	  }
+	  if (mask) {
+	       mask_prev = (REAL *) malloc(width * sizeof(REAL));
+	       if (mask_prev == NULL) {
+		    free(row_pointer);
+		    fclose(fp);
+		    return;
+	       }
+	  }
+	  for (row = 0; row < height; ++row) {
+	       REAL x = row * scalex;
+	       int n = PIN(0,(int) (x + 0.5), data_height-1);
+	       double delta = x - n;
+	       int n2 = PIN(0,n + (delta>0.0 ? 1 : -1), data_height-1);
+	       int n3 = PIN(0,n + 1, data_height-1);
+	       REAL offset;
+
+	       if (skewsin < 0.0)
+		    offset = x*skewsin;
+	       else
+		    offset = (x - (height-1)*scalex) * skewsin;
+	       if (transpose)
+		    convert_row(width, data_width, scaley, offset,
+				data + n, data + n2, 1 - fabs(delta),
+				data_height, 
+				mask ? mask + (n%mny) : NULL,
+				mask ? mask + (n3%mny) : NULL,
+				mask_thresh, mask_prev, row == 0,
+				mask_byte, mnx, mny,
+				overlay != 0,
+				overlay + (n%ony), overlay + (n2%ony),
+				overlay_cmap, minoverlay, maxoverlay, onx, ony,
+				colormap, minrange, maxrange, scale,
+				row_pointer, eight_bit);
+	       else
+		    convert_row(width, data_width, scaley, offset,
+				data + n * data_width, data + n2 * data_width,
+				1 - fabs(delta),
+				1, 
+				mask ? mask + (n%mnx) * mny : NULL,
+				mask ? mask + (n3%mnx) * mny : NULL,
+				mask_thresh, mask_prev, row == 0,
+				mask_byte, mny, 1,
+				overlay != 0,
+				overlay + (n%onx) * ony,
+				overlay + (n2%onx) * ony,
+				overlay_cmap, minoverlay, maxoverlay, ony, 1,
+				colormap, minrange, maxrange, scale,
+				row_pointer, eight_bit);
+	       png_write_rows(png_ptr, &row_pointer, 1);
+	  }
+
+	  free(row_pointer);
+	  free(mask_prev);
+     }
+
+     /* It is REQUIRED to call this to finish writing the rest of the file */
+     png_write_end(png_ptr, info_ptr);
+
+     /* if you malloced the palette, free it here */
+     free(info_ptr->palette);
+
+     /* if you allocated any text comments, free them here */
+
+     /* clean up after the write, and free any memory allocated */
+     png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+
+     /* close the file */
+     fclose(fp);
+
+     /* that's it */
+}
+
+/* In the following code, we use a heuristic algorithm to compute
+ * the range.  The range is set to [-r, r], where r is computed
+ * as follows:
+ * 
+ * 1) for each new data set, compute
+ * r' = sqrt(2.0 * (average of non-zero data[i]^2))
+ * 
+ * 2) r = max(r', r of previous data set)
+ */
+
+#define WHITE_EPSILON 0.003921568627	/* 1 / 255 */
+
+void writepng_autorange(char *filename,
+			int nx, int ny, int transpose, 
+			REAL skew, REAL scalex,REAL scaley,
+			REAL * data,
+			REAL *mask, REAL mask_thresh,
+			REAL *overlay, colormap_t overlay_cmap,
+			colormap_t colormap, int eight_bit)
+{
+     static REAL range = 0.0;
+     REAL sum = 0, newrange, max = -1.0;
+     int i, count = 0;
+
+     sum = 0;
+     for (i = 0; i < nx * ny; ++i) {
+	  REAL absval = fabs(data[i]);
+
+	  if (absval >= WHITE_EPSILON * range) {
+	       sum += absval * absval;
+	       ++count;
+	  }
+	  if (absval > max)
+	       max = absval;
+     }
+
+     if (count) {
+	  newrange = 5 * sqrt(sum / count);
+	  if (newrange > max)
+	       newrange = max;
+	  if (newrange > range)
+	       range = newrange;
+     }
+     writepng(filename, nx, ny, transpose, skew, scalex, scaley,
+	      data, mask, mask_thresh, nx,ny, overlay, overlay_cmap, nx,ny,
+	      -range, range, colormap, eight_bit);
+}

Added: packages/h5utils/branches/upstream/current/writepng.h
===================================================================
--- packages/h5utils/branches/upstream/current/writepng.h	                        (rev 0)
+++ packages/h5utils/branches/upstream/current/writepng.h	2007-05-14 18:39:27 UTC (rev 823)
@@ -0,0 +1,70 @@
+/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef WRITEPNG_H
+#define WRITEPNG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/***********************************************************************/
+
+#ifdef SINGLE_PRECISION
+typedef float REAL;
+#else
+typedef double REAL;
+#endif
+
+typedef struct {
+     float r, g, b, a;
+} rgba_t;
+
+typedef struct {
+     int n;
+     rgba_t *rgba;
+} colormap_t;
+
+void writepng(char *filename,
+	      int nx, int ny, int transpose,
+	      REAL skew, REAL scalex, REAL scaley,
+	      REAL *data, REAL *mask, REAL mask_thresh,
+	      int mnx, int mny,
+	      REAL *overlay, colormap_t overlay_cmap,
+	      int onx, int ony,
+	      REAL minrange, REAL maxrange,
+	      colormap_t colormap, int eight_bit);
+
+void writepng_autorange(char *filename,
+			int nx, int ny, int transpose,
+			REAL skew, REAL scalex, REAL scaley,
+			REAL *data, REAL *mask, REAL mask_thresh,
+			REAL *overlay, colormap_t overlay_cmap,
+			colormap_t colormap, int eight_bit);
+
+/***********************************************************************/
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* WRITEPNG_H */




More information about the Pkg-grass-devel mailing list