h5utils-1.12.1/0002777000175400001440000000000011220456001010167 500000000000000h5utils-1.12.1/copyright.h0000644000175400001440000000245711214540670012303 00000000000000#ifndef COPYRIGHT_H #define COPYRIGHT_H /* License and copyright string for inclusion in program output: */ #define COPYRIGHT \ "Copyright (c) 1999-2009 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 h5utils-1.12.1/arrayh4.c0000644000175400001440000001425711214540612011635 00000000000000/* Copyright (c) 1999-2009 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 #include #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; } h5utils-1.12.1/arrayh5.h0000644000175400001440000000453411214541145011642 00000000000000/* Copyright (c) 1999-2009 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 */ h5utils-1.12.1/colormaps/0002777000175400001440000000000011220456001012166 500000000000000h5utils-1.12.1/colormaps/vga0000644000175400001440000000156710604507351012623 00000000000000# 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 h5utils-1.12.1/colormaps/winter0000644000175400001440000000023410604507625013350 00000000000000# 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 h5utils-1.12.1/colormaps/spring0000644000175400001440000000157110604507353013345 00000000000000# 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 h5utils-1.12.1/colormaps/lines0000644000175400001440000000654210604507356013163 00000000000000# 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 h5utils-1.12.1/colormaps/flag0000644000175400001440000000660210604507363012755 00000000000000# 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 h5utils-1.12.1/colormaps/hot0000644000175400001440000000656110604507361012640 00000000000000# 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 h5utils-1.12.1/colormaps/pink0000644000175400001440000000660310604507355013007 00000000000000# 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 h5utils-1.12.1/colormaps/cool0000644000175400001440000000023610604507623012774 00000000000000# 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 h5utils-1.12.1/colormaps/bluered0000644000175400001440000000007110604507510013452 00000000000000# blue-white-red color map 0 0 1 1 1 1 1 0 1 0 0 1 h5utils-1.12.1/colormaps/jet0000644000175400001440000000160610604507357012630 00000000000000# 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 h5utils-1.12.1/colormaps/bone0000644000175400001440000000661510604507367012777 00000000000000# 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 h5utils-1.12.1/colormaps/colorcube0000644000175400001440000000655610604507366014034 00000000000000# 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 h5utils-1.12.1/colormaps/copper0000644000175400001440000000657710604507364013350 00000000000000# 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 h5utils-1.12.1/colormaps/green0000644000175400001440000000006710053504720013133 00000000000000# green color map (white to green) 1 1 1 0 0 1 0 1 h5utils-1.12.1/colormaps/gray0000644000175400001440000000007310604507507013002 00000000000000# grayscale color map (white to black) 1 1 1 0 0 0 0 1 h5utils-1.12.1/colormaps/dkbluered0000644000175400001440000000137110604507630014000 00000000000000# 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 h5utils-1.12.1/colormaps/hsv0000644000175400001440000000663110604507360012643 00000000000000# 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 h5utils-1.12.1/colormaps/autumn0000644000175400001440000000023410604507624013350 00000000000000# 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 h5utils-1.12.1/colormaps/prism0000644000175400001440000000163610604507354013200 00000000000000# prism color map (from Matlab) (red-yellow-green-blue-purple--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 h5utils-1.12.1/colormaps/yellow0000644000175400001440000000007110053504720013341 00000000000000# yellow color map (white to yellow) 1 1 1 0 1 1 0 1 h5utils-1.12.1/colormaps/yarg0000644000175400001440000000013210053504720012766 00000000000000# yarg (backwards gray) color map (transparent black to opaque white) 0 0 0 0 1 1 1 1 h5utils-1.12.1/colormaps/summer0000644000175400001440000000156710604507352013357 00000000000000# 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 h5utils-1.12.1/h5totxt.c0000644000175400001440000001505411214540612011676 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #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] []\n" "Options:\n" " -h : this help message\n" " -V : print version number and copyright\n" " -v : verbose output\n" " -s : use to separate columns [ default: \",\" ]\n" " -o : output to (first input file only)\n" " -x : take x= slice of data\n" " -y : take y= slice of data\n" " -z : take z= slice of data\n" " -t : take t= 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" " -. : output decimal places [ default: 16 ]\n" " -d : use dataset in the input files (default: first dataset)\n" " -- you can also specify a dataset via :\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; } h5utils-1.12.1/h5fromh4.10000644000175400001440000000671011214540746011640 00000000000000.\" Copyright (c) 1999-2009 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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology. h5utils-1.12.1/h5read.cc0000644000175400001440000000631610604507474011606 00000000000000/* 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 #include #include #include #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, ¢er_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; } h5utils-1.12.1/aclocal.m40000644000175400001440000011222111220455667011761 00000000000000# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # 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, 2006, 2008 # 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 9 # 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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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, 2006, 2009 # 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 10 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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, 2006, 2008, 2009 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 16 # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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 if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi 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, 2008 # 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 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 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, 2009 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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, 2006 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 for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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_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], [m4_foreach_w([_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, 2008 # 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 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # 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 /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 h5utils-1.12.1/configure.ac0000644000175400001440000001665711220455665012425 00000000000000# Process this file with autoconf to produce a configure script. AC_INIT(h5utils, 1.12.1, stevenj@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 AM_PROG_CC_C_O # 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\$(EXEEXT) $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\$(EXEEXT) $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\$(EXEEXT) $MORE_H5UTILS" MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS" fi if test "x$H5TOH4" != xh5toh4; then MORE_H5UTILS="h4fromh5\$(EXEEXT) $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_CHECK_PROGS(OCTAVE_CONFIG, octave-config, echo) AC_MSG_CHECKING(where octave plugins go) OCT_INSTALL_DIR=`octave-config --oct-site-dir 2> /dev/null | grep '/'` if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`octave-config --print OCTFILEDIR 2> /dev/null | grep '/'` fi if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`echo "path" | $OCTAVE -q 2> /dev/null | grep "/oct/" | head -1` fi if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`echo "DEFAULT_LOADPATH" | $OCTAVE -q 2> /dev/null | tr ':' '\n' | grep "site/oct" | head -1` fi 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=], [use Vis5d in 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 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\$(EXEEXT) $MORE_H5UTILS" MORE_H5UTILS_MANS="h5tov5d.1 $MORE_H5UTILS_MANS" fi AC_SUBST(V5D_FILES) AC_SUBST(V5D_INCLUDES) ########################################################################### AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h inttypes.h]) AC_CHECK_TYPES([uint16_t, uint32_t]) AC_MSG_CHECKING([for htons]) AC_TRY_LINK([#if defined(HAVE_ARPA_INET_H) #include #elif defined(HAVE_NETINET_IN_H) #include #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(float) AC_MSG_CHECKING([for htonl]) AC_TRY_LINK([#if defined(HAVE_ARPA_INET_H) #include #elif defined(HAVE_NETINET_IN_H) #include #endif], [unsigned long i; htonl(i);], [htonl=yes AC_DEFINE([HAVE_HTONL],1,[Define if you have htonl.])], htonl=no) AC_MSG_RESULT($htonl) 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 eval datadir_val=$datadir_val 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 h5utils-1.12.1/h5utils.c0000644000175400001440000000613011214540612011647 00000000000000/* Copyright (c) 1999-2009 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 #include #include #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 :, return a pointer to a newly-allocated string containing , and point data_name to the position of in fname. The user must free() the 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; } h5utils-1.12.1/ChangeLog0000644000175400001440000006443111220456001011663 00000000000000Wed Jun 24 13:01:40 EDT 2009 stevenj@alum.mit.edu * date for 1.12.1 release M ./NEWS -1 +1 Wed Jun 24 13:00:51 EDT 2009 stevenj@alum.mit.edu * use octave-config to detect installation path for Octave plugins M ./NEWS +5 M ./configure.ac -2 +9 Fri Jun 12 17:42:21 EDT 2009 stevenj@alum.mit.edu tagged h5utils-1.12 Fri Jun 12 17:34:08 EDT 2009 stevenj@alum.mit.edu * Fixed installation of h5read.oct for Octave 3.x. M ./NEWS +2 M ./configure.ac -1 +4 Fri Jun 12 17:13:55 EDT 2009 stevenj@alum.mit.edu * flip vertical axis in writepng, corresponding better to user expectations M ./NEWS -1 +6 M ./configure.ac -1 +1 M ./writepng.c -3 +3 Fri Jun 12 17:05:47 EDT 2009 stevenj@alum.mit.edu * mkdist.sh is no longer needed R ./mkdist.sh Fri Jun 12 17:04:59 EDT 2009 stevenj@alum.mit.edu * copyright year bump M ./COPYING -2 +1 M ./arrayh4.c -1 +1 M ./arrayh4.h -1 +1 M ./arrayh5.h -1 +1 M ./copyright.h -1 +1 M ./h4fromh5.1 -1 +1 M ./h4fromh5.c -1 +1 M ./h5fromh4.1 -1 +1 M ./h5fromh4.c -1 +1 M ./h5fromitxt.c -1 +1 M ./h5fromtxt.1 -1 +1 M ./h5fromtxt.c -1 +1 M ./h5math.1 -1 +1 M ./h5math.c -1 +1 M ./h5topng.c -1 +1 M ./h5totxt.1 -1 +1 M ./h5totxt.c -1 +1 M ./h5tov5d.1 -1 +1 M ./h5tov5d.c -2 +2 M ./h5tovtk.c -1 +1 M ./h5utils.c -1 +1 M ./h5utils.h -1 +1 M ./writepng.c -1 +1 M ./writepng.h -1 +1 Fri Jun 12 17:03:57 EDT 2009 stevenj@alum.mit.edu * fixed h5tovtk -2, more portable handling of integer types M ./NEWS +4 M ./configure.ac -11 +13 M ./h5tovtk.c -7 +30 Mon Apr 28 15:55:11 EDT 2008 stevenj@alum.mit.edu tagged 1.11.1 Mon Apr 28 15:53:59 EDT 2008 stevenj@alum.mit.edu * copyright bump M ./arrayh5.c -1 +1 M ./copyright.h -1 +1 M ./h5tovtk.c -1 +1 Mon Apr 28 15:48:22 EDT 2008 stevenj@alum.mit.edu * bug fix: autoconf 2.60 makes $datadir refer to $datarootdir which refers to $prefix, so we have to call "eval" twice (similar to AC_DEFINE_DIR macro in autoconf macro archive) M ./NEWS +5 M ./configure.ac -1 +2 Thu Apr 24 15:48:29 EDT 2008 stevenj@alum.mit.edu tagged 1.11 Thu Apr 24 15:41:32 EDT 2008 stevenj@alum.mit.edu * added darcs-dist target A ./ChangeLog M ./Makefile.am +9 Thu Apr 24 15:39:38 EDT 2008 stevenj@alum.mit.edu * version bump, rm autoconf warning M ./NEWS +7 M ./configure.ac -1 +2 Thu Apr 24 15:34:39 EDT 2008 stevenj@alum.mit.edu * compatibility with HDF5 1.8 M ./arrayh5.c +3 Tue Apr 3 13:53:51 EDT 2007 stevenj@alum.mit.edu * fix typo M ./h5tovtk.1 -1 Tue Apr 3 13:52:13 EDT 2007 stevenj@alum.mit.edu * h5tovtk should write out dimensions in correct order, not the reverse, according to VTK's column-major convention; thanks to Andreas Wilde for the suggestion and a preliminary patch M ./h5tovtk.c -7 +13 Tue Apr 3 13:35:02 EDT 2007 stevenj@alum.mit.edu * darcs updates R ./ChangeLog R ./install-sh M ./mkdist.sh -9 +1 Wed Sep 20 11:46:47 EDT 2006 stevenj * version bump M ./NEWS +5 M ./configure.ac -1 +1 Wed Sep 20 11:41:03 EDT 2006 stevenj * add EXEEXT for Cygwin builds M ./configure.ac -5 +5 Fri Oct 21 19:53:29 EDT 2005 stevenj * whoops M ./Makefile.am -1 +1 Fri Oct 21 19:53:00 EDT 2005 stevenj * pass .c file to mkoctfile since it may need special compilation flags pass .c file to mkoctfile since it may need special compilation flags (e.g. -fPIC) M ./Makefile.am -1 +1 Fri Sep 2 17:39:01 EDT 2005 stevenj * version bump M ./COPYING -1 +2 M ./NEWS +8 M ./arrayh4.c -1 +1 M ./arrayh5.c -1 +1 M ./configure.ac -1 +1 M ./copyright.h -1 +1 M ./h4fromh5.c -1 +1 M ./h5fromh4.1 -2 +2 M ./h5fromh4.c -1 +1 M ./h5fromitxt.c -1 +1 M ./h5fromtxt.1 -2 +2 M ./h5fromtxt.c -1 +1 M ./h5math.1 -3 +3 M ./h5math.c -1 +1 M ./h5topng.c -1 +1 M ./h5totxt.1 -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.1 -2 +2 M ./h5tov5d.c -2 +2 M ./h5tovtk.1 -1 +1 M ./h5tovtk.c -1 +1 M ./h5utils.c -1 +1 M ./writepng.c -1 +1 Fri Sep 2 15:23:48 EDT 2005 stevenj * added h4fromh5.1, and added -T option to h4fromh5 A ./h4fromh5.1 M ./h4fromh5.c -2 +9 Fri Jul 15 13:37:56 EDT 2005 stevenj * added h4fromh5 (no man page yet) M ./Makefile.am -1 +4 M ./autogen.sh -1 +1 M ./configure.ac -11 +20 A ./h4fromh5.c Fri Jul 15 12:33:34 EDT 2005 stevenj * added autogen.sh A ./autogen.sh M ./install-sh -52 +50 Fri Jun 17 13:42:38 EDT 2005 stevenj * improve contrast by making dark-light transitions more gradual M ./colormaps/dkbluered -7 +31 Thu Jun 16 15:35:02 EDT 2005 stevenj * added dkbluered colormap, slightly simplified winter colormap M ./Makefile.am -1 +1 A ./colormaps/dkbluered M ./colormaps/winter -15 +1 Mon Aug 16 16:28:40 EDT 2004 stevenj * simplified M ./colormaps/autumn -15 +1 M ./colormaps/cool -15 +1 Thu Aug 5 00:53:49 EDT 2004 stevenj * version bump M ./NEWS +5 M ./configure.ac -1 +1 Tue Aug 3 13:08:30 EDT 2004 stevenj * don't mix declarations with code (thanks to Maarten van Reeuwijk for the bug report) M ./h5topng.c -1 +2 Mon Jul 12 21:11:30 EDT 2004 stevenj tagged h5utils-1-9 Mon Jul 12 21:11:30 EDT 2004 stevenj * updated NEWS for 1.9 M ./NEWS -1 +8 Mon Jul 12 21:04:45 EDT 2004 stevenj * update for latest libmatheval M ./configure.ac -1 +1 M ./h5math.c -8 +16 Sat Jun 5 11:30:54 EDT 2004 stevenj * support Matlab-like notation for slices, tiling overlay/contour to cover data M ./arrayh5.c +44 M ./arrayh5.h +2 M ./h5topng.1.in -4 +14 M ./h5topng.c -34 +125 M ./writepng.c -32 +37 M ./writepng.h +2 Mon May 24 00:51:58 EDT 2004 stevenj * version bump M ./NEWS +6 M ./configure.ac -1 +1 Mon May 24 00:49:42 EDT 2004 stevenj * added h5math man page etc. A ./h5math.1 M ./h5math.c -4 +4 Mon May 24 00:32:20 EDT 2004 stevenj * whoops M ./h5tov5d.1 -1 +1 Sun May 23 23:32:54 EDT 2004 stevenj * wrapping M ./h5math.c -1 +2 Sun May 23 23:11:34 EDT 2004 stevenj * fixed copyright dates in man pages M ./h5fromh4.1 -2 +2 M ./h5fromtxt.1 -2 +2 M ./h5topng.1.in -2 +2 M ./h5totxt.1 -2 +2 M ./h5tov5d.1 -2 +2 M ./h5tovtk.1 -1 +1 Sun May 23 22:14:49 EDT 2004 stevenj * whoops M ./h5math.c -2 +4 Sun May 23 22:10:36 EDT 2004 stevenj * make "t" variable the same as the last dimension, consistent with slice convention M ./h5math.c -3 +3 Sun May 23 22:05:31 EDT 2004 stevenj * added h5math utility (still needs man page) M ./Makefile.am -2 +5 M ./configure.ac -1 +13 A ./h5math.c Sun May 23 20:21:52 EDT 2004 stevenj * use my_strdup everywhere, get rid of some compiler warnings M ./h5fromh4.c -12 +4 M ./h5fromitxt.c -14 +8 M ./h5fromtxt.c -10 +4 M ./h5topng.c -8 M ./h5totxt.c -15 +4 M ./h5tov5d.c -8 +2 M ./h5tovtk.c -8 +2 M ./h5utils.c +11 M ./h5utils.h +1 Sat May 22 13:37:54 EDT 2004 stevenj tagged h5utils-1-8 Sat May 22 13:37:54 EDT 2004 stevenj * vpath build M ./Makefile.am -1 +1 Sat May 22 13:23:35 EDT 2004 stevenj * fixed some formatting problems M ./h5topng.1.in -9 +16 Sat May 22 13:19:22 EDT 2004 stevenj * make sure EXTRA_MANS is distributed M ./Makefile.am -2 +2 Sat May 22 12:58:44 EDT 2004 stevenj * planned release date M ./NEWS -1 +1 Fri May 21 20:55:40 EDT 2004 stevenj * whoops, missing '0' M ./h5tovtk.c +3 Fri May 21 20:51:40 EDT 2004 stevenj * note more digits M ./NEWS -1 +2 Fri May 21 20:50:14 EDT 2004 stevenj * whoops, screwed up slices M ./arrayh5.c -23 +7 M ./h5totxt.c -2 +1 Fri May 21 20:34:35 EDT 2004 stevenj * don't know release date yet M ./NEWS -1 +1 Fri May 21 20:32:49 EDT 2004 stevenj * new version M ./NEWS +24 M ./configure.ac -1 +1 Fri May 21 20:25:18 EDT 2004 stevenj * mkdist script A ./mkdist.sh Fri May 21 20:24:48 EDT 2004 stevenj * generate automatically M ./ChangeLog -256 +1 Fri May 21 20:23:41 EDT 2004 stevenj * add latest colormaps M ./Makefile.am -4 +5 Fri May 21 20:19:06 EDT 2004 stevenj * check for -8 with -A M ./h5topng.c +3 Fri May 21 20:17:57 EDT 2004 stevenj * default to 24-bit output, -8 for old behavior M ./h5topng.1.in -1 +7 M ./h5topng.c -5 +11 M ./writepng.c -29 +50 M ./writepng.h -2 +2 Fri May 21 19:50:52 EDT 2004 stevenj * updated man pages M ./h5topng.1.in -21 +54 M ./h5totxt.1 -28 +30 M ./h5tov5d.1 -1 +27 M ./h5tovtk.1 +29 Fri May 21 18:59:28 EDT 2004 stevenj * added translucent overlay option M ./arrayh4.c -1 +1 M ./arrayh5.c -2 +2 M ./colormaps/bluered -1 +1 M ./colormaps/gray -1 +1 A ./colormaps/green A ./colormaps/yarg A ./colormaps/yellow M ./copyright.h -1 +1 M ./h5fromh4.c -1 +1 M ./h5fromitxt.c -1 +1 M ./h5fromtxt.c -1 +1 M ./h5topng.c -64 +154 M ./h5totxt.c -1 +1 M ./h5tov5d.c -2 +2 M ./h5tovtk.c -1 +1 M ./h5utils.c -1 +1 M ./writepng.c -21 +101 M ./writepng.h -2 +4 Fri May 21 16:12:05 EDT 2004 stevenj * make nx = cols by default in h5topng M ./h5topng.c -1 +1 Fri May 21 16:10:58 EDT 2004 stevenj * INSTALL is supplied by automake --add-missing R ./INSTALL Fri May 21 16:10:23 EDT 2004 stevenj * support multiple slice dimensions M ./INSTALL -23 +26 M ./Makefile.am -1 +2 M ./arrayh5.c -65 +103 M ./arrayh5.h -1 +6 M ./configure.ac -2 +17 M ./h5fromitxt.c -2 +1 M ./h5read.cc -2 +2 M ./h5topng.c -18 +32 M ./h5totxt.c -36 +35 M ./h5tov5d.c -14 +50 M ./h5tovtk.c -4 +29 M ./install-sh -178 +252 Mon Mar 1 21:28:44 EST 2004 stevenj * added h5fromitxt M ./Makefile.am -1 +2 A ./h5fromitxt.c Mon Jul 15 13:27:27 EDT 2002 stevenj tagged h5utils-1-7-2 Mon Jul 15 13:27:27 EDT 2002 stevenj * C++ fix for g++ 3.x, from Josselin Mouette M ./h5read.cc -1 +1 Fri Jun 14 19:48:39 EDT 2002 stevenj * follow gd lib in initializing alpha before palette (don't know if it matters) M ./writepng.c -5 +4 Fri Jun 14 19:48:07 EDT 2002 stevenj * don't use colormap dir for ./ or / M ./h5topng.c -1 +2 Wed May 29 23:37:54 EDT 2002 stevenj * added -a and -. flags M ./h5totxt.1 +13 M ./h5totxt.c -18 +60 Sat Mar 16 17:46:44 EST 2002 stevenj * added 1.7.1 notes M ./NEWS +5 Sat Mar 16 17:15:16 EST 2002 stevenj * fixed h5fromh4 and make dist M ./Makefile.am -7 +9 M ./configure.ac -2 +2 Sat Mar 16 16:58:28 EST 2002 stevenj tagged h5utils-1-7-1 Sat Mar 16 16:58:28 EST 2002 stevenj * fixed array overrun causing floating-point exceptions on Alpha (thanks to Marin Soljacic for the bug report) M ./writepng.c -5 +7 Thu Mar 14 03:06:28 EST 2002 stevenj * use automake A ./Makefile.am R ./Makefile.in A ./configure.ac R ./configure.in M ./h5fromh4.c -1 +1 M ./h5fromtxt.c -1 +1 M ./h5topng.c -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.c -1 +1 M ./h5tovtk.c -1 +1 Wed Mar 13 18:48:05 EST 2002 stevenj * use mandir M ./Makefile.in -18 +19 Sun Mar 10 19:47:30 EST 2002 stevenj * added URL M ./README +1 Sat Mar 9 16:48:15 EST 2002 stevenj tagged h5utils-1-7 Sat Mar 9 16:48:15 EST 2002 stevenj * print warning for -c M ./h5topng.c -2 +3 Sat Mar 9 16:35:59 EST 2002 stevenj * whoops M ./Makefile.in -1 +1 Sat Mar 9 16:29:19 EST 2002 stevenj * updated dates M ./NEWS -1 +1 M ./h5fromh4.1 -1 +1 M ./h5fromtxt.1 -1 +1 M ./h5topng.1.in -1 +1 M ./h5totxt.1 -1 +1 M ./h5tov5d.1 -1 +1 M ./h5tovtk.1 -1 +1 Sat Mar 9 15:13:29 EST 2002 stevenj * made more GNU-ly correct A ./INSTALL A ./README R ./README-h5utils.html Sat Mar 9 15:09:26 EST 2002 stevenj * added AUTHORS file to be GNU-ly correct A ./AUTHORS Tue Mar 5 02:23:55 EST 2002 stevenj * eliminated code duplication M ./Makefile.in -9 +9 M ./h5fromh4.c -43 +3 M ./h5fromtxt.c -28 +1 M ./h5topng.c -42 +3 M ./h5totxt.c -28 +1 M ./h5tov5d.c -48 +1 M ./h5tovtk.c -62 +4 A ./h5utils.c A ./h5utils.h Tue Mar 5 02:06:31 EST 2002 stevenj * finally fixed garbage pixels bug in h5topng M ./NEWS +3 M ./writepng.c -10 +9 Tue Mar 5 01:36:21 EST 2002 stevenj * added -0 option M ./NEWS +3 M ./arrayh5.c -51 +55 M ./arrayh5.h -1 +2 M ./h5read.cc -1 +1 M ./h5topng.1.in -1 +8 M ./h5topng.c -4 +9 M ./h5totxt.1 -1 +8 M ./h5totxt.c -3 +8 M ./h5tov5d.c -3 +3 M ./h5tovtk.c -1 +1 Tue Mar 5 00:03:20 EST 2002 stevenj * added -R option M ./NEWS +3 M ./h5topng.1.in -1 +9 M ./h5topng.c -16 +40 Mon Mar 4 23:25:15 EST 2002 stevenj * added alpha channel support to color maps M ./colormaps/autumn -16 +16 M ./colormaps/bluered -3 +3 M ./colormaps/bone -64 +64 M ./colormaps/colorcube -64 +64 M ./colormaps/cool -16 +16 M ./colormaps/copper -64 +64 M ./colormaps/flag -64 +64 M ./colormaps/gray -2 +2 M ./colormaps/hot -64 +64 M ./colormaps/hsv -64 +64 M ./colormaps/jet -16 +16 M ./colormaps/lines -64 +64 M ./colormaps/pink -64 +64 M ./colormaps/prism -16 +16 M ./colormaps/spring -16 +16 M ./colormaps/summer -16 +16 M ./colormaps/vga -16 +16 M ./colormaps/winter -16 +16 M ./h5topng.1.in -3 +4 M ./h5topng.c -12 +13 M ./writepng.c -4 +31 M ./writepng.h -3 +3 Mon Mar 4 22:22:11 EST 2002 stevenj * better error message for -c (catches common mistake) M ./h5topng.c -4 +7 Mon Mar 4 22:21:45 EST 2002 stevenj * slight improvements M ./h5topng.1.in -8 +7 Mon Mar 4 20:31:24 EST 2002 stevenj * have built-in gray colormap fallback M ./h5topng.c -9 +24 Sun Mar 3 23:48:26 EST 2002 stevenj * minor improvements; noted hsv M ./h5topng.1.in -8 +11 Sun Mar 3 23:33:46 EST 2002 stevenj * whoops R ./h5topng.1 Sun Mar 3 23:32:56 EST 2002 stevenj * linewrapped A ./h5topng.1 M ./h5topng.1.in -2 +6 Sun Mar 3 23:32:16 EST 2002 stevenj * updated for 1.7 M ./NEWS +15 Sun Mar 3 23:22:43 EST 2002 stevenj * added A ./ChangeLog Sun Mar 3 23:21:28 EST 2002 stevenj * 2002 copyright year update M ./COPYING -1 +1 M ./README-h5utils.html -1 +1 M ./arrayh4.c -1 +1 M ./arrayh4.h -1 +1 M ./arrayh5.c -1 +1 M ./arrayh5.h -1 +1 M ./copyright.h -1 +1 M ./h5fromh4.1 -2 +2 M ./h5fromh4.c -1 +1 M ./h5fromtxt.1 -2 +2 M ./h5fromtxt.c -1 +1 M ./h5read.cc -1 +1 M ./h5topng.1.in -2 +2 M ./h5topng.c -1 +1 M ./h5totxt.1 -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.1 -2 +2 M ./h5tov5d.c -2 +2 M ./writepng.c -1 +1 M ./writepng.h -1 +1 Sun Mar 3 23:17:58 EST 2002 stevenj * fixed h5tovtk man page M ./h5tovtk.1 -16 +68 M ./h5tovtk.c -6 +6 Fri Mar 1 02:28:33 EST 2002 stevenj * noted location of colormap files M ./h5topng.c +1 Fri Mar 1 02:10:52 EST 2002 stevenj * added variable colormap support M ./Makefile.in -2 +13 M ./configure.in -1 +14 R ./h5topng.1 A ./h5topng.1.in M ./h5topng.c -5 +83 M ./writepng.c -16 +13 M ./writepng.h -3 +7 Fri Mar 1 02:10:26 EST 2002 stevenj * synced with latest arrayh5 M ./h5read.cc -1 +1 Fri Mar 1 01:11:37 EST 2002 stevenj * added some color map files A ./colormaps/ A ./colormaps/autumn A ./colormaps/bluered A ./colormaps/bone A ./colormaps/colorcube A ./colormaps/cool A ./colormaps/copper A ./colormaps/flag A ./colormaps/gray A ./colormaps/hot A ./colormaps/hsv A ./colormaps/jet A ./colormaps/lines A ./colormaps/pink A ./colormaps/prism A ./colormaps/spring A ./colormaps/summer A ./colormaps/vga A ./colormaps/winter Sat Jan 5 15:15:11 EST 2002 stevenj * added preliminary h5tovtk M ./Makefile.in -2 +16 M ./arrayh5.c -1 +5 M ./arrayh5.h -1 +1 M ./configure.in -1 +28 M ./h5topng.c -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.c -3 +3 A ./h5tovtk.1 A ./h5tovtk.c Mon Oct 15 20:47:15 EDT 2001 stevenj * Use CPPFLAGS and LDFLAGS when calling mkoctfile! Thanks to Max Colice Use CPPFLAGS and LDFLAGS when calling mkoctfile! Thanks to Max Colice for the bug report. M ./Makefile.in -2 +2 Tue Oct 2 01:09:50 EDT 2001 stevenj * whoops, fixed datatype in -T mode M ./h5tov5d.c -10 +8 Sat Sep 22 19:21:04 EDT 2001 stevenj * slight bug fix in -T (?) M ./h5tov5d.c -3 +10 Sat Sep 22 18:54:36 EDT 2001 stevenj * added -T option to h5tov5d M ./NEWS +2 M ./h5tov5d.1 +3 M ./h5tov5d.c -26 +46 Sun Mar 18 01:32:07 EST 2001 stevenj * whoops, fixed problem when --without-h5tov5d and --without-h5fromh4 are used. Thanks to Nikola Ivanov Nikolov for the fix. M ./Makefile.in -2 +1 Wed Feb 14 13:48:01 EST 2001 stevenj * minor fix M ./h5fromtxt.1 -1 +1 Wed Jan 17 00:05:12 EST 2001 stevenj tagged h5utils-1-6 Wed Jan 17 00:05:12 EST 2001 stevenj * Don't build h5fromh4 if h4toh5 is present. Bumped version and copyright year. M ./COPYING -1 +1 M ./NEWS +6 M ./README-h5utils.html -1 +1 M ./arrayh4.c -1 +1 M ./arrayh4.h -1 +1 M ./arrayh5.c -1 +1 M ./arrayh5.h -1 +1 M ./configure.in -8 +21 M ./copyright.h -1 +1 M ./h5fromh4.1 -2 +2 M ./h5fromh4.c -1 +1 M ./h5fromtxt.1 -2 +2 M ./h5fromtxt.c -1 +1 M ./h5read.cc -1 +1 M ./h5topng.1 -2 +2 M ./h5topng.c -1 +1 M ./h5totxt.1 -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.1 -2 +2 M ./h5tov5d.c -2 +2 M ./writepng.c -1 +1 M ./writepng.h -1 +1 Sat Dec 9 02:01:59 EST 2000 stevenj * 'make dist' should call autoheader M ./Makefile.in -1 +1 Sat Dec 9 02:00:21 EST 2000 stevenj * bumped version number M ./NEWS +7 M ./configure.in -1 +1 Sat Dec 9 01:58:37 EST 2000 stevenj * Support disabling Octave plugin manually, in case of C++ craziness. Support disabling Octave plugin manually, in case of C++ craziness. Support Vis5d+ header file locations. Support Debian HDF header file locations. Use autoheader. M ./Makefile.in -1 +1 M ./arrayh4.h -1 +5 R ./config.h.in M ./configure.in -3 +15 M ./h5tov5d.c -1 +3 Fri Jul 28 07:58:39 EDT 2000 stevenj * fixed bug in contour plotting M ./writepng.c -7 +11 Sun Jul 9 22:39:52 EDT 2000 stevenj * updated M ./NEWS -1 +1 Sun Jul 9 00:43:19 EDT 2000 stevenj * Note that HDF4 libraries are required for h5fromh4. M ./README-h5utils.html +3 Sun Jul 9 00:41:45 EDT 2000 stevenj * documented h5fromh4 M ./README-h5utils.html +8 Tue May 30 02:14:21 EDT 2000 stevenj * Added -S option to h5topng as a shortcut for -X -Y . M ./NEWS +2 M ./h5topng.1 -2 +4 M ./h5topng.c -1 +5 Mon May 29 15:00:00 EDT 2000 stevenj * bumped version M ./NEWS -1 +5 M ./configure.in -1 +1 Mon May 29 14:56:38 EDT 2000 stevenj * slight fixes M ./h5fromh4.1 -5 +7 Mon May 29 14:52:33 EDT 2000 stevenj * added h5fromh4 man page A ./h5fromh4.1 Mon May 29 04:51:07 EDT 2000 stevenj * added h5fromh4 M ./Makefile.in -2 +17 A ./arrayh4.c A ./arrayh4.h M ./configure.in +10 A ./h5fromh4.c Mon May 29 04:37:47 EDT 2000 stevenj * got rid of spurious "sep" variable M ./h5fromtxt.c -6 Sun May 28 19:13:08 EDT 2000 stevenj tagged h5utils-1-4 Sun May 28 19:13:08 EDT 2000 stevenj * added h5fromtxt M ./Makefile.in -2 +16 M ./NEWS +4 M ./README-h5utils.html +11 M ./arrayh5.c -16 +125 M ./arrayh5.h +4 M ./configure.in -1 +1 A ./h5fromtxt.1 A ./h5fromtxt.c M ./h5topng.c -1 +1 M ./h5totxt.c -1 +1 M ./h5tov5d.c -1 +1 Mon Jan 31 22:14:43 EST 2000 stevenj tagged h5utils-1-3-4 Mon Jan 31 22:14:43 EST 2000 stevenj * slight correction M ./h5topng.1 -1 +1 Mon Jan 31 22:05:30 EST 2000 stevenj * fix so it works without -C! M ./h5topng.c -1 +2 Mon Jan 31 22:02:17 EST 2000 stevenj * bumped version M ./NEWS +6 M ./configure.in -1 +1 Mon Jan 31 21:59:32 EST 2000 stevenj * improved crude contour feature M ./h5topng.1 -2 +2 M ./h5topng.c -9 +11 M ./writepng.c -41 +45 M ./writepng.h -5 +2 Mon Jan 31 20:43:28 EST 2000 stevenj * Fixed display bug; thanks to Christoph Becher for the correction. M ./h5topng.1 -2 +5 Sun Jan 30 14:13:13 EST 2000 stevenj * credited 1.3.3 bug report M ./NEWS +1 Sun Jan 30 14:06:09 EST 2000 stevenj tagged h5utils-1-3-3 Sun Jan 30 14:06:09 EST 2000 stevenj * bumped version M ./configure.in -1 +1 Sun Jan 30 14:04:32 EST 2000 stevenj * got rid of compiler warning M ./NEWS +4 M ./arrayh5.c -2 +2 Sun Jan 30 14:04:07 EST 2000 stevenj * bug fix (uninitialized var) M ./writepng.c -2 +1 Fri Jan 28 21:26:20 EST 2000 stevenj tagged h5utils-1-3-2 Fri Jan 28 21:26:20 EST 2000 stevenj * added -Z option M ./NEWS +2 M ./h5topng.1 -1 +5 M ./h5topng.c -1 +11 Fri Jan 28 18:03:46 EST 2000 stevenj * fixed typo M ./h5topng.c -1 +1 Fri Jan 28 18:01:28 EST 2000 stevenj * now support h5topng -C filename:dataset M ./NEWS +4 M ./configure.in -1 +1 M ./h5topng.1 -2 +4 M ./h5topng.c -2 +9 Thu Jan 27 19:54:35 EST 2000 stevenj tagged h5utils-1-3-1 Thu Jan 27 19:54:35 EST 2000 stevenj * bumped version M ./NEWS +5 M ./configure.in -1 +1 Thu Jan 27 19:34:54 EST 2000 stevenj * fixed bug in joining hdf5 files M ./h5tov5d.c -1 +1 Thu Jan 27 15:44:19 EST 2000 stevenj * fixed handling of -d option so that it doesn't get overriden if only fixed handling of -d option so that it doesn't get overriden if only a single file specifies a dataset via fname:dataset. M ./h5topng.c -3 +7 M ./h5totxt.c -3 +6 Fri Jan 21 14:12:29 EST 2000 stevenj tagged h5utils-1-3 Fri Jan 21 14:12:29 EST 2000 stevenj * documented changes M ./NEWS +6 M ./README-h5utils.html +6 Thu Jan 20 22:44:13 EST 2000 stevenj * detect -lv5d library M ./Makefile.in -1 +1 M ./config.h.in +3 M ./configure.in -2 +5 M ./h5tov5d.c -5 +6 Thu Jan 20 22:36:57 EST 2000 stevenj * added filename:dataset syntax M ./arrayh5.c -1 M ./arrayh5.h +1 M ./configure.in -1 +1 M ./h5topng.1 -1 +3 M ./h5topng.c -6 +41 M ./h5totxt.1 -1 +3 M ./h5totxt.c -8 +43 M ./h5tov5d.1 -1 +3 M ./h5tov5d.c -7 +53 Thu Jan 20 20:35:10 EST 2000 stevenj tagged h5utils-1-2-3 Thu Jan 20 20:35:10 EST 2000 stevenj * bumped version M ./NEWS +4 M ./configure.in -1 +1 Thu Jan 20 20:33:39 EST 2000 stevenj * fixed help message M ./h5totxt.c -1 +1 Wed Jan 12 22:52:25 EST 2000 stevenj * use CPPFLAGS when compiling M ./Makefile.in -1 +2 M ./NEWS +6 M ./configure.in -1 +1 Sat Jan 1 12:47:34 EST 2000 stevenj * h5tov5d -o now joins; bumped copyright year M ./COPYING -1 +1 M ./NEWS +4 M ./README-h5utils.html -1 +1 M ./arrayh5.c -1 +1 M ./arrayh5.h -1 +1 M ./configure.in -1 +1 M ./copyright.h -1 +1 M ./h5read.cc -1 +1 M ./h5topng.1 -2 +2 M ./h5topng.c -1 +1 M ./h5totxt.1 -2 +2 M ./h5totxt.c -1 +1 M ./h5tov5d.1 -6 +12 M ./h5tov5d.c -117 +166 M ./writepng.c -1 +1 M ./writepng.h -1 +1 Fri Dec 31 21:43:44 EST 1999 stevenj tagged h5utils-1-2 Fri Dec 31 21:43:44 EST 1999 stevenj * noted changes M ./NEWS +8 Fri Dec 31 21:41:01 EST 1999 stevenj * bumped version M ./configure.in -1 +1 Fri Dec 31 21:20:43 EST 1999 stevenj * noted man page M ./README-h5utils.html +3 Fri Dec 31 21:17:38 EST 1999 stevenj * updated license M ./README-h5utils.html +22 Fri Dec 31 21:05:29 EST 1999 stevenj * added h5tov5d M ./COPYING -21 +373 M ./Makefile.in -6 +32 M ./README-h5utils.html -2 +31 M ./configure.in +27 A ./copyright.h M ./h5topng.c -23 +1 M ./h5totxt.c -23 +1 A ./h5tov5d.1 A ./h5tov5d.c Fri Dec 31 16:58:12 EST 1999 stevenj * some cleanup M ./configure.in -2 +9 Fri Dec 31 16:55:39 EST 1999 stevenj * Better documentation of (revised) installation. M ./README-h5utils.html -6 +9 Fri Dec 31 16:46:31 EST 1999 stevenj * install h5read.oct in right place M ./Makefile.in -4 +13 M ./configure.in +18 Fri Dec 31 16:01:41 EST 1999 stevenj * fixed install/uninstall rules so that they ignore things that aren't built M ./Makefile.in -6 +27 Mon Dec 6 17:49:46 EST 1999 stevenj * small fixes M ./README-h5utils.html -4 +5 Mon Dec 6 17:40:56 EST 1999 stevenj * added h5totxt M ./Makefile.in -7 +14 A ./NEWS M ./README-h5utils.html +8 M ./configure.in -1 +1 A ./h5totxt.1 A ./h5totxt.c Mon Nov 22 00:02:13 EST 1999 stevenj tagged h5utils-1-0 Mon Nov 22 00:02:13 EST 1999 stevenj * don't strip (-s) man page!! M ./Makefile.in -1 +1 Sun Nov 21 23:50:36 EST 1999 stevenj * changed README to HTML R ./README A ./README-h5utils.html Sun Nov 21 23:01:59 EST 1999 stevenj * added man page M ./Makefile.in +2 M ./README -1 +2 A ./h5topng.1 Sun Nov 21 21:41:52 EST 1999 stevenj * got rid of garbage file R ./.png Sun Nov 21 21:39:48 EST 1999 stevenj * made sure 'make clean' gets rid of h5read.o M ./Makefile.in -1 +1 Sun Nov 21 21:39:04 EST 1999 stevenj * various fixes M ./config.h.in +2 M ./configure.in -1 +1 M ./h5topng.c -4 +39 Sun Nov 21 21:27:45 EST 1999 stevenj * comment-ized license M ./COPYING -19 +21 Sun Nov 21 21:26:49 EST 1999 stevenj * added copyright notices M ./arrayh5.c +22 M ./arrayh5.h +22 M ./h5read.cc +22 M ./h5topng.c +22 M ./writepng.c +22 M ./writepng.h -1 +36 Sun Nov 21 21:22:47 EST 1999 stevenj * fixed clean targets M ./Makefile.in -1 +4 Sun Nov 21 21:20:16 EST 1999 stevenj * added MIT license A ./COPYING Sun Nov 21 21:19:54 EST 1999 stevenj * autoconfiscated R ./Makefile A ./Makefile.in A ./config.h.in A ./configure.in A ./install-sh Sun Nov 21 20:49:08 EST 1999 stevenj * deleted extraneous files R ./.indent.pro R ./README.writepng Sun Nov 21 20:48:36 EST 1999 stevenj * added README A ./README Sun Nov 21 20:24:59 EST 1999 stevenj * Initial revision A ./.indent.pro A ./.png A ./Makefile A ./README.writepng A ./arrayh5.c A ./arrayh5.h A ./h5read.cc A ./h5topng.c A ./writepng.c A ./writepng.h h5utils-1.12.1/arrayh5.c0000644000175400001440000002554511214540612011640 00000000000000/* Copyright (c) 1999-2008 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 #include /* don't use new HDF5 1.8 API (which isn't even fully documented yet, grrr) */ #define H5_USE_16_API 1 #include #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; } h5utils-1.12.1/h5fromitxt.c0000644000175400001440000002023711214540612012367 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #include #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] \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 : use as missing filler [ default: 0 ]\n" " -n : input array dimensions [ default: guessed ]\n" " -m : input coordinate minimum [ default: guessed ]\n" " -M : input coordinate maximum [ default: guessed ]\n" " -T : transpose the data [default: no]\n" " -d : use dataset in the output file (default: \"data\")\n" " -- you can also specify a dataset via :\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 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; } h5utils-1.12.1/config.h.in0000644000175400001440000000556511220455673012155 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* datadir installation prefix */ #undef DATADIR /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_HDF_H /* Define to 1 if you have the 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 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 header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the 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 header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint16_t'. */ #undef HAVE_UINT16_T /* Define to 1 if the system has the type `uint32_t'. */ #undef HAVE_UINT32_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VIS5D_V5D_H /* [Define], [if], [you], [have], [the], [], [header], [file.] */ #undef HAVE_VIS5Dp_V5D_H /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `float', as computed by sizeof. */ #undef SIZEOF_FLOAT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif h5utils-1.12.1/INSTALL0000644000175400001440000002713611204551150011146 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. 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 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. Running `configure' might take a while. 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. 6. Often, you can also type `make uninstall' to remove the installed files again. 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=c99 CFLAGS=-g 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 can use 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 `..'. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', 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 pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files 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. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common 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 option `--target=TYPE' 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). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--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. `--prefix=DIR' Use DIR as the installation prefix. *Note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. h5utils-1.12.1/h5topng.c0000644000175400001440000004320711214540612011644 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #include #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] []\n" "Options:\n" " -h : this help message\n" " -V : print version number and copyright\n" " -v : verbose output\n" " -o : output to (first input file only)\n" " -x : take x= slice of data (or ::)\n" " -y : take y= slice of data\n" " -z : take z= slice of data\n" " -t : take t= slice of data's last dimension\n" " -0 : use dataset center as origin for -x/-y/-z\n" " -X : scale width by [ default: 1.0 ]\n" " -Y : scale height by [ default: 1.0 ]\n" " -S : equivalent to -X -Y \n" " -s : skew axes by degrees [ default: 0 ]\n" " -T : transpose the data [default: no]\n" " -c : use colormap [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 : set bottom of color scale to data value \n" " -M : set top of color scale to data value \n" " -R : use uniform colormap range for all files\n" " -C : superimpose contour outlines from \n" " -b : contours around values != [default: 1.0]\n" " -A : overlay data from , as specified by -y\n" " -a :: overlay colormap , opacity (0-1) [default: %s:%g]\n" " -8 : use an 8-bit color table, instead of 24-bit direct color\n" " -d : use dataset in the input files (default: first dataset)\n" " -- you can also specify a dataset via :\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; } h5utils-1.12.1/COPYING0000644000175400001440000004650311214540441011151 00000000000000############################################################################# The h5utils package is Copyright (c) 1999-2009 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. Copyright (C) 19yy 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. , 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. h5utils-1.12.1/h5fromh4.c0000644000175400001440000001176311214540612011716 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #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] []\n" "Options:\n" " -h : this help message\n" " -V : print version number and copyright\n" " -v : verbose output\n" " -o : output to HDF5 file \n" " -a : append to existing hdf5 file\n" " -d : use dataset in the output file (default: \"data\")\n" " -- you can also specify a dataset via :\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; } h5utils-1.12.1/h5totxt.10000644000175400001440000001075211214540746011624 00000000000000.\" Copyright (c) 1999-2009 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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology. h5utils-1.12.1/install-sh0000755000175400001440000003253711204551150012122 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false 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: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -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. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; 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 if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? 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 "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $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 $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 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. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: h5utils-1.12.1/README0000644000175400001440000000303110604507442010771 00000000000000 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@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. h5utils-1.12.1/writepng.h0000644000175400001440000000432511214541102012115 00000000000000/* Copyright (c) 1999-2009 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 */ h5utils-1.12.1/NEWS0000644000175400001440000001427511220455757010632 00000000000000h5utils 1.12.1 (6/24/09) * Use octave-config, if available, to detect octave-plugin installation path (thanks to Debian bug report #516453 for suggestion). h5utils 1.12 (6/12/09) * The vertical axis in h5topng is now reversed to correspond to what most people seem to expect: increasing coordinates correspond to "up" and "right" in the image, rather than "down" and "right" in the image as in previous versions. * Fixed failure in h5tovtk -2; thanks to Karen Lee for the bug report. * Fixed installation of h5read.oct for Octave 3.x. h5utils 1.11.1 (4/28/08) * Fixed failure to find colormap files in h5topng 1.11 (due to changes in autoconf 2.60); thanks to bug report from Jiangjun Zheng. h5utils 1.11 (4/24/08) * h5tovtk no longer reverses the dimensions; thanks to Andreas Wilde for the suggestion. * Fix compilation failure with HDF5 1.8. h5utils 1.10.1 (9/20/06) * Fixed build problem on Cygwin due to missing ".exe" extension. Thanks to Ken Hill for the bug report. 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 . 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 option to h5topng as a shortcut for -X -Y . 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 : instead of just 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. h5utils-1.12.1/Makefile.in0000644000175400001440000010767311220455667012205 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = h5topng.1 CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(octdir)" 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.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f 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) 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) $(nodist_man_MANS) 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@ 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@ GREP = @GREP@ H4TOH5 = @H4TOH5@ H4_LIBS = @H4_LIBS@ H5READ = @H5READ@ H5TOH4 = @H5TOH4@ H5TOPNG_MAN = @H5TOPNG_MAN@ INSTALL = @INSTALL@ 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@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKOCTFILE = @MKOCTFILE@ MORE_H5UTILS = @MORE_H5UTILS@ MORE_H5UTILS_MANS = @MORE_H5UTILS_MANS@ OBJEXT = @OBJEXT@ OCTAVE = @OCTAVE@ OCTAVE_CONFIG = @OCTAVE_CONFIG@ 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@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ builddir = @builddir@ datadir = @datadir@ datadir_val = @datadir_val@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) 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) ($(am__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)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files 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_OBJECTS) $(h4fromh5_LDADD) $(LIBS) h5fromh4$(EXEEXT): $(h5fromh4_OBJECTS) $(h5fromh4_DEPENDENCIES) @rm -f h5fromh4$(EXEEXT) $(LINK) $(h5fromh4_OBJECTS) $(h5fromh4_LDADD) $(LIBS) h5fromitxt$(EXEEXT): $(h5fromitxt_OBJECTS) $(h5fromitxt_DEPENDENCIES) @rm -f h5fromitxt$(EXEEXT) $(LINK) $(h5fromitxt_OBJECTS) $(h5fromitxt_LDADD) $(LIBS) h5fromtxt$(EXEEXT): $(h5fromtxt_OBJECTS) $(h5fromtxt_DEPENDENCIES) @rm -f h5fromtxt$(EXEEXT) $(LINK) $(h5fromtxt_OBJECTS) $(h5fromtxt_LDADD) $(LIBS) h5math$(EXEEXT): $(h5math_OBJECTS) $(h5math_DEPENDENCIES) @rm -f h5math$(EXEEXT) $(LINK) $(h5math_OBJECTS) $(h5math_LDADD) $(LIBS) h5topng$(EXEEXT): $(h5topng_OBJECTS) $(h5topng_DEPENDENCIES) @rm -f h5topng$(EXEEXT) $(LINK) $(h5topng_OBJECTS) $(h5topng_LDADD) $(LIBS) h5totxt$(EXEEXT): $(h5totxt_OBJECTS) $(h5totxt_DEPENDENCIES) @rm -f h5totxt$(EXEEXT) $(LINK) $(h5totxt_OBJECTS) $(h5totxt_LDADD) $(LIBS) h5tov5d$(EXEEXT): $(h5tov5d_OBJECTS) $(h5tov5d_DEPENDENCIES) @rm -f h5tov5d$(EXEEXT) $(LINK) $(h5tov5d_OBJECTS) $(h5tov5d_LDADD) $(LIBS) h5tovtk$(EXEEXT): $(h5tovtk_OBJECTS) $(h5tovtk_DEPENDENCIES) @rm -f h5tovtk$(EXEEXT) $(LINK) $(h5tovtk_OBJECTS) $(h5tovtk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrayh4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrayh5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h4fromh5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5fromh4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5fromitxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5fromtxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5math.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5topng.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5totxt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tov5d-arrayh5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tov5d-h5tov5d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tov5d-h5utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tovtk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writepng.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` h5tov5d-h5tov5d.o: h5tov5d.c @am__fastdepCC_TRUE@ $(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 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-h5tov5d.Tpo $(DEPDIR)/h5tov5d-h5tov5d.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='h5tov5d.c' object='h5tov5d-h5tov5d.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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 @am__fastdepCC_TRUE@ $(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` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-h5tov5d.Tpo $(DEPDIR)/h5tov5d-h5tov5d.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='h5tov5d.c' object='h5tov5d-h5tov5d.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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 @am__fastdepCC_TRUE@ $(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 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-arrayh5.Tpo $(DEPDIR)/h5tov5d-arrayh5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='arrayh5.c' object='h5tov5d-arrayh5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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 @am__fastdepCC_TRUE@ $(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` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-arrayh5.Tpo $(DEPDIR)/h5tov5d-arrayh5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='arrayh5.c' object='h5tov5d-arrayh5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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 @am__fastdepCC_TRUE@ $(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 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-h5utils.Tpo $(DEPDIR)/h5tov5d-h5utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='h5utils.c' object='h5tov5d-h5utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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 @am__fastdepCC_TRUE@ $(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` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/h5tov5d-h5utils.Tpo $(DEPDIR)/h5tov5d-h5utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='h5utils.c' object='h5tov5d-h5utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @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` install-man1: $(dist_man_MANS) $(nodist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS) $(nodist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS) $(nodist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-nobase_dist_pkgdataDATA: $(nobase_dist_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(nobase_dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(pkgdatadir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(pkgdatadir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(pkgdatadir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files install-octDATA: $(oct_DATA) @$(NORMAL_INSTALL) test -z "$(octdir)" || $(MKDIR_P) "$(DESTDIR)$(octdir)" @list='$(oct_DATA)'; test -n "$(octdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(octdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(octdir)" || exit $$?; \ done uninstall-octDATA: @$(NORMAL_UNINSTALL) @list='$(oct_DATA)'; test -n "$(octdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(octdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(octdir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || 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 $(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-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(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.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-man install-nobase_dist_pkgdataDATA \ install-octDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-man \ uninstall-nobase_dist_pkgdataDATA uninstall-octDATA uninstall-man: uninstall-man1 .MAKE: all install-am install-strip .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-lzma dist-shar \ dist-tarZ dist-xz 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-nobase_dist_pkgdataDATA install-octDATA \ install-pdf install-pdf-am install-ps install-ps-am \ 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-man uninstall-man1 uninstall-nobase_dist_pkgdataDATA \ uninstall-octDATA h5read.oct: h5read.cc arrayh5.h arrayh5.o mkoctfile $(DEFS) $(CPPFLAGS) $(srcdir)/h5read.cc $(srcdir)/arrayh5.c $(LDFLAGS) $(LIBS) clean-hook: rm -f h5read.oct # Somewhat hackish. The "right" way to do this is by a dist-hook target, # but then darcs check will fail because it doesn't run in the darcs # repository. darcs-dist: distdir darcs changes --summary > $(distdir)/ChangeLog tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # 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: h5utils-1.12.1/configure0000755000175400001440000073165411220455670012043 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for h5utils 1.12.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= 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=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 7<&0 &1 # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='h5utils' PACKAGE_TARNAME='h5utils' PACKAGE_VERSION='1.12.1' PACKAGE_STRING='h5utils 1.12.1' PACKAGE_BUGREPORT='stevenj@alum.mit.edu' ac_unique_file="h5topng.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS MORE_H5UTILS_MANS MORE_H5UTILS datadir_val V5D_INCLUDES V5D_FILES OCT_INSTALL_DIR H5READ OCTAVE_CONFIG OCTAVE MKOCTFILE H4_LIBS H5TOH4 H4TOH5 PNG_LIBS H5TOPNG_MAN EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking with_hdf4 with_octave with_v5d ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) { $as_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 && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 $as_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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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.12.1 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/h5utils] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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.12.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --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= use Vis5d in for h5tov5d Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory 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 . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF h5utils configure 1.12.1 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 fi cat >config.log <<_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.12.1, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_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_arg'" ;; 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 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, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r 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 -f -r conftest* 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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_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 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_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.11' 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 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # 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". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi 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.12.1' 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"} # 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" { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-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 { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_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. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_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.out.dSYM 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. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_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 # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&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' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_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 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=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 #include #include #include /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac 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 this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-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= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 if test "x$CC" != xcc; then { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" 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 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&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 $as_echo_n "(cached) " >&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 to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_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 nonexistent 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_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 { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$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 to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_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 nonexistent 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_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 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&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 #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core 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 _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 _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 #include #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)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if test "${ac_cv_lib_m_sin+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sin=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sin=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi for ac_func in snprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 declares $ac_func. For example, HP-UX 11i 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 to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_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="" { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if test "${ac_cv_lib_z_inflate+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inflate (); int main () { return inflate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_z_inflate=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflate=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = x""yes; then ok=yes else ok=no fi if test "$ok" = "yes"; then LIBS="-lz $LIBS" { $as_echo "$as_me:$LINENO: checking for png_create_write_struct in -lpng" >&5 $as_echo_n "checking for png_create_write_struct in -lpng... " >&6; } if test "${ac_cv_lib_png_png_create_write_struct+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char png_create_write_struct (); int main () { return png_create_write_struct (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_png_png_create_write_struct=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_png_png_create_write_struct=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_write_struct" >&5 $as_echo "$ac_cv_lib_png_png_create_write_struct" >&6; } if test "x$ac_cv_lib_png_png_create_write_struct" = x""yes; then ok=yes else ok=no fi if test "$ok" = "yes"; then PNG_LIBS="-lpng" else { $as_echo "$as_me:$LINENO: WARNING: can't find libpng: won't be able to compile h5topng" >&5 $as_echo "$as_me: WARNING: can't find libpng: won't be able to compile h5topng" >&2;} H5TOPNG=no fi else { $as_echo "$as_me:$LINENO: WARNING: can't find libz: won't be able to compile h5topng" >&5 $as_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\$(EXEEXT) $MORE_H5UTILS" H5TOPNG_MAN=h5topng.1 fi ########################################################################### { $as_echo "$as_me:$LINENO: checking for evaluator_get_variables in -lmatheval" >&5 $as_echo_n "checking for evaluator_get_variables in -lmatheval... " >&6; } if test "${ac_cv_lib_matheval_evaluator_get_variables+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char evaluator_get_variables (); int main () { return evaluator_get_variables (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_matheval_evaluator_get_variables=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_matheval_evaluator_get_variables=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_matheval_evaluator_get_variables" >&5 $as_echo "$ac_cv_lib_matheval_evaluator_get_variables" >&6; } if test "x$ac_cv_lib_matheval_evaluator_get_variables" = x""yes; then H5MATH=yes else H5MATH=no fi if test $H5MATH = yes; then MORE_H5UTILS="h5math\$(EXEEXT) $MORE_H5UTILS" MORE_H5UTILS_MANS="h5math.1 $MORE_H5UTILS_MANS" else { $as_echo "$as_me:$LINENO: WARNING: can't find libmatheval: won't be able to compile h5math" >&5 $as_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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_H4TOH5+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_H4TOH5="h4toh5" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi H4TOH5=$ac_cv_prog_H4TOH5 if test -n "$H4TOH5"; then { $as_echo "$as_me:$LINENO: result: $H4TOH5" >&5 $as_echo "$H4TOH5" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "h5toh4", so it can be a program name with args. set dummy h5toh4; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_H5TOH4+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_H5TOH4="h5toh4" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi H5TOH4=$ac_cv_prog_H5TOH4 if test -n "$H5TOH4"; then { $as_echo "$as_me:$LINENO: result: $H5TOH4" >&5 $as_echo "$H5TOH4" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-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 { $as_echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_start_compress (); int main () { return jpeg_start_compress (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_jpeg_jpeg_start_compress=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_start_compress=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then { $as_echo "$as_me:$LINENO: checking for DFSDgetdata in -ldf" >&5 $as_echo_n "checking for DFSDgetdata in -ldf... " >&6; } if test "${ac_cv_lib_df_DFSDgetdata+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char DFSDgetdata (); int main () { return DFSDgetdata (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_df_DFSDgetdata=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_df_DFSDgetdata=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_df_DFSDgetdata" >&5 $as_echo "$ac_cv_lib_df_DFSDgetdata" >&6; } if test "x$ac_cv_lib_df_DFSDgetdata" = x""yes; then H4_LIBS="-ldf -ljpeg"; HDF4=yes else { $as_echo "$as_me:$LINENO: WARNING: can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5" >&5 $as_echo "$as_me: WARNING: can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5" >&2;} fi else { $as_echo "$as_me:$LINENO: WARNING: can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5" >&5 $as_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\$(EXEEXT) $MORE_H5UTILS" MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS" fi if test "x$H5TOH4" != xh5toh4; then MORE_H5UTILS="h4fromh5\$(EXEEXT) $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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in hdf.h hdf/hdf.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to stevenj@alum.mit.edu ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ########################################################################### { $as_echo "$as_me:$LINENO: checking for H5Fopen in -lhdf5" >&5 $as_echo_n "checking for H5Fopen in -lhdf5... " >&6; } if test "${ac_cv_lib_hdf5_H5Fopen+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char H5Fopen (); int main () { return H5Fopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_hdf5_H5Fopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_hdf5_H5Fopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hdf5_H5Fopen" >&5 $as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; } if test "x$ac_cv_lib_hdf5_H5Fopen" = x""yes; then LIBS="-lhdf5 $LIBS" else { { $as_echo "$as_me:$LINENO: error: hdf5 libraries are required for compilation" >&5 $as_echo "$as_me: error: hdf5 libraries are required for compilation" >&2;} { (exit 1); exit 1; }; } fi ########################################################################### # Check whether --with-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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MKOCTFILE+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MKOCTFILE="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MKOCTFILE=$ac_cv_prog_MKOCTFILE if test -n "$MKOCTFILE"; then { $as_echo "$as_me:$LINENO: result: $MKOCTFILE" >&5 $as_echo "$MKOCTFILE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MKOCTFILE" && break done test -n "$MKOCTFILE" || MKOCTFILE="echo" if test "$MKOCTFILE" = "echo"; then { $as_echo "$as_me:$LINENO: WARNING: can't find mkoctfile: won't be able to compile h5read.oct" >&5 $as_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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OCTAVE+set}" = set; then $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCTAVE="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCTAVE=$ac_cv_prog_OCTAVE if test -n "$OCTAVE"; then { $as_echo "$as_me:$LINENO: result: $OCTAVE" >&5 $as_echo "$OCTAVE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OCTAVE" && break done test -n "$OCTAVE" || OCTAVE="echo" for ac_prog in octave-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OCTAVE_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OCTAVE_CONFIG"; then ac_cv_prog_OCTAVE_CONFIG="$OCTAVE_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OCTAVE_CONFIG="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OCTAVE_CONFIG=$ac_cv_prog_OCTAVE_CONFIG if test -n "$OCTAVE_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $OCTAVE_CONFIG" >&5 $as_echo "$OCTAVE_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OCTAVE_CONFIG" && break done test -n "$OCTAVE_CONFIG" || OCTAVE_CONFIG="echo" { $as_echo "$as_me:$LINENO: checking where octave plugins go" >&5 $as_echo_n "checking where octave plugins go... " >&6; } OCT_INSTALL_DIR=`octave-config --oct-site-dir 2> /dev/null | grep '/'` if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`octave-config --print OCTFILEDIR 2> /dev/null | grep '/'` fi if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`echo "path" | $OCTAVE -q 2> /dev/null | grep "/oct/" | head -1` fi if test -z "$OCT_INSTALL_DIR"; then OCT_INSTALL_DIR=`echo "DEFAULT_LOADPATH" | $OCTAVE -q 2> /dev/null | tr ':' '\n' | grep "site/oct" | head -1` fi if test -n "$OCT_INSTALL_DIR"; then { $as_echo "$as_me:$LINENO: result: $OCT_INSTALL_DIR" >&5 $as_echo "$OCT_INSTALL_DIR" >&6; } H5READ=h5read.oct else { $as_echo "$as_me:$LINENO: result: unknown" >&5 $as_echo "unknown" >&6; } { $as_echo "$as_me:$LINENO: WARNING: can't find where to install octave plugins: won't be able to compile h5read.oct" >&5 $as_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 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 { $as_echo "$as_me:$LINENO: checking for v5dCreate in -lv5d" >&5 $as_echo_n "checking for v5dCreate in -lv5d... " >&6; } if test "${ac_cv_lib_v5d_v5dCreate+set}" = set; then $as_echo_n "(cached) " >&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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char v5dCreate (); int main () { return v5dCreate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_v5d_v5dCreate=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_v5d_v5dCreate=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_v5d_v5dCreate" >&5 $as_echo "$ac_cv_lib_v5d_v5dCreate" >&6; } if test "x$ac_cv_lib_v5d_v5dCreate" = x""yes; then V5D_FILES="-lv5d"; H5TOV5D=yes fi for ac_header in vis5d/v5d.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to stevenj@alum.mit.edu ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for vis5d+/v5d.h" >&5 $as_echo_n "checking for vis5d+/v5d.h... " >&6; } if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_vis5dp_v5d_h" >&5 $as_echo "$ac_cv_header_vis5dp_v5d_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking vis5d+/v5d.h usability" >&5 $as_echo_n "checking vis5d+/v5d.h usability... " >&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 _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking vis5d+/v5d.h presence" >&5 $as_echo_n "checking vis5d+/v5d.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: vis5d+/v5d.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: vis5d+/v5d.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to stevenj@alum.mit.edu ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for vis5d+/v5d.h" >&5 $as_echo_n "checking for vis5d+/v5d.h... " >&6; } if test "${ac_cv_header_vis5dp_v5d_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_vis5dp_v5d_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_vis5dp_v5d_h" >&5 $as_echo "$ac_cv_header_vis5dp_v5d_h" >&6; } fi if test "x$ac_cv_header_vis5dp_v5d_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_VIS5Dp_V5D_H 1 _ACEOF fi elif test "$ok" != "no"; then { $as_echo "$as_me:$LINENO: checking for Vis5d object files and headers" >&5 $as_echo_n "checking for Vis5d object files and headers... " >&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 { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } { { $as_echo "$as_me:$LINENO: error: couldn't read Vis5D object files in $ok" >&5 $as_echo "$as_me: error: couldn't read Vis5D object files in $ok" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } fi H5TOV5D=yes fi if test $H5TOV5D = yes; then MORE_H5UTILS="h5tov5d\$(EXEEXT) $MORE_H5UTILS" MORE_H5UTILS_MANS="h5tov5d.1 $MORE_H5UTILS_MANS" fi ########################################################################### for ac_header in arpa/inet.h netinet/in.h stdint.h inttypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&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 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to stevenj@alum.mit.edu ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 $as_echo_n "checking for uint16_t... " >&6; } if test "${ac_cv_type_uint16_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint16_t=no 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 (sizeof (uint16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then 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 (sizeof ((uint16_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint16_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 $as_echo "$ac_cv_type_uint16_t" >&6; } if test "x$ac_cv_type_uint16_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINT16_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 $as_echo_n "checking for uint32_t... " >&6; } if test "${ac_cv_type_uint32_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint32_t=no 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 (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then 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 (sizeof ((uint32_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 $as_echo "$ac_cv_type_uint32_t" >&6; } if test "x$ac_cv_type_uint32_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINT32_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for htons" >&5 $as_echo_n "checking for htons... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARPA_INET_H) #include #elif defined(HAVE_NETINET_IN_H) #include #endif int main () { unsigned short i; htons(i); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then htons=yes cat >>confdefs.h <<\_ACEOF #define HAVE_HTONS 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 htons=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $htons" >&5 $as_echo "$htons" >&6; } # The cast to long int 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. { $as_echo "$as_me:$LINENO: checking size of float" >&5 $as_echo_n "checking size of float... " >&6; } if test "${ac_cv_sizeof_float+set}" = set; then $as_echo_n "(cached) " >&6 else 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 int) (sizeof (float))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_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 int) (sizeof (float))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 int) (sizeof (float))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core 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 int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_float=$ac_lo;; '') if test "$ac_cv_type_float" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } else ac_cv_sizeof_float=0 fi ;; esac 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 static long int longval () { return (long int) (sizeof (float)); } static unsigned long int ulongval () { return (long int) (sizeof (float)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (float))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (float)))) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (float)))) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_float=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_float" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } else ac_cv_sizeof_float=0 fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 $as_echo "$ac_cv_sizeof_float" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_FLOAT $ac_cv_sizeof_float _ACEOF { $as_echo "$as_me:$LINENO: checking for htonl" >&5 $as_echo_n "checking for htonl... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARPA_INET_H) #include #elif defined(HAVE_NETINET_IN_H) #include #endif int main () { unsigned long i; htonl(i); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then htonl=yes cat >>confdefs.h <<\_ACEOF #define HAVE_HTONL 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 htonl=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $htonl" >&5 $as_echo "$htonl" >&6; } if test "x$htons" != xyes -o "x$htonl" != xyes; then { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # 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 #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core 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. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_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 eval datadir_val=$datadir_val 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' 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_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $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 || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by h5utils $as_me 1.12.1, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ h5utils config.status 1.12.1 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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 ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_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" ac_need_defaults=false ;; 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "h5topng.1") CONFIG_FILES="$CONFIG_FILES h5topng.1" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # 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 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # 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. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_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=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # 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 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi h5utils-1.12.1/h5math.10000644000175400001440000001524511214540746011375 00000000000000.\" Copyright (c) 1999-2009 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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology. h5utils-1.12.1/h5utils.h0000644000175400001440000000257011214541122011655 00000000000000/* Copyright (c) 1999-2009 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 */ h5utils-1.12.1/h4fromh5.c0000644000175400001440000001065511214540612011715 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #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] []\n" "Options:\n" " -h : this help message\n" " -V : print version number and copyright\n" " -v : verbose output\n" " -T : transposed output\n" " -o : output to HDF4 file \n" " -d : use dataset in the input file\n" " -- you can also specify a dataset via :\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; } h5utils-1.12.1/writepng.c0000644000175400001440000003704611214540612012123 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #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 = height-1; row >= 0; --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 == height-1, 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 == height-1, 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); } h5utils-1.12.1/h5fromtxt.c0000644000175400001440000001430511214540612012215 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #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] \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 : input row-major array dimensions [ default: guessed ]\n" " -T : transpose the data [default: no]\n" " -d : use dataset in the output file (default: \"data\")\n" " -- you can also specify a dataset via :\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; } h5utils-1.12.1/h5tovtk.10000644000175400001440000001432411214540746011610 00000000000000.\" 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. .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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology. h5utils-1.12.1/h5tovtk.c0000644000175400001440000002701511214540651011666 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #include #include "config.h" #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #if defined(HAVE_ARPA_INET_H) # include #elif defined(HAVE_NETINET_IN_H) # include #endif #include "arrayh5.h" #include "copyright.h" #include "h5utils.h" #ifdef HAVE_UINT16_T typedef uint16_t my_uint16_t; #else typedef unsigned short my_uint16_t; #endif #ifdef HAVE_UINT32_T typedef uint32_t my_uint32_t; #else typedef unsigned long my_uint32_t; #endif #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] []\n" "Options:\n" " -h : this help message\n" " -V : print version number and copyright\n" " -v : verbose output\n" " -o : output datasets from all input files to ;\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 : set bottom of scale for 1/2 byte encoding\n" " -M : 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 : take x= slice of data\n" " -y : take y= slice of data\n" " -z : take z= slice of data\n" " -t : take t= slice of data's last dimension\n" " -0 : use dataset center as origin for -x/-y/-z\n" " -d : use dataset in the input files (default: first dataset)\n" " -- you can also specify a dataset via :\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", nx, ny, nz, ox, oy, oz, sx, sy, sz); } 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: { my_uint16_t 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 == 4) my_uint32_t *i = (my_uint32_t *) &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 != 4 || sizeof(my_uint32_t) == 4, "missing 4-byte integer type for -4"); CHECK(store_bytes != 2 || sizeof(my_uint16_t) == 2, "missing 2-byte integer type 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 ix, iy, iz, 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 (iz = 0; iz < nz; ++iz) for (iy = 0; iy < ny; ++iy) for (ix = 0; ix < nx; ++ix) { int i = (ix*ny + iy)*nz + iz; 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 ix, iy, iz, 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 (iz = 0; iz < nz; ++iz) for (iy = 0; iy < ny; ++iy) for (ix = 0; ix < nx; ++ix) { int ia, i = (ix*ny + iy)*nz + iz; 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; } h5utils-1.12.1/h5tov5d.10000644000175400001440000001245711214540746011507 00000000000000.\" Copyright (c) 1999-2009 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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology. h5utils-1.12.1/h5topng.1.in0000644000175400001440000002213710604507612012173 00000000000000.\" 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@alum.mit.edu. .SH AUTHORS Written by Steven G. Johnson. Copyright (c) 2004 by the Massachusetts Institute of Technology. h5utils-1.12.1/arrayh4.h0000644000175400001440000000357511214541155011646 00000000000000/* Copyright (c) 1999-2009 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 #elif defined(HAVE_HDF_HDF_H) # include #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 h5utils-1.12.1/depcomp0000755000175400001440000004426711204551150011476 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see . # 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 . 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 . 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 cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" 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. 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 tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. 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 tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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 mechanism 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 $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 "X$1" != 'X--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 "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi 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. -arch) eat=yes ;; -*|$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 "X$1" != 'X--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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [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. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # 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 ;; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: h5utils-1.12.1/missing0000755000175400001440000002623311204551150011511 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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, see . # 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=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # 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' autom4te touch the output file, or create a stub one 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] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." 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 # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # 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). This is about non-GNU programs, so use $1 not # $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 $program 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: h5utils-1.12.1/h5math.c0000644000175400001440000002325411214540612011446 00000000000000/* Copyright (c) 1999-2009 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 #include #include #include #include #include "config.h" #include "arrayh5.h" #include "copyright.h" #include "h5utils.h" #include #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] []\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 : output array dimensions [ default: from input ]\n" " -f : read expression to evaluate from file [ default: stdin ]\n" " -e : evaluate to output\n" " -x : take x= slice of data\n" " -y : take y= slice of data\n" " -z : take z= slice of data\n" " -t : take t= slice of data's last dimension\n" " -0 : use dataset center as origin for -x/-y/-z\n" " -r : use resolution for xyz coordinate units in expression\n" " -d : use dataset in the input/output files\n" " [ default: first dataset/%s ]\n" " -- you can also specify a dataset via :\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 : "", 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 : "", 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; } h5utils-1.12.1/Makefile.am0000644000175400001440000000401011004161136012132 00000000000000COLORMAPS = 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 $(srcdir)/arrayh5.c $(LDFLAGS) $(LIBS) clean-hook: rm -f h5read.oct nobase_dist_pkgdata_DATA = $(COLORMAPS) # Somewhat hackish. The "right" way to do this is by a dist-hook target, # but then darcs check will fail because it doesn't run in the darcs # repository. darcs-dist: distdir darcs changes --summary > $(distdir)/ChangeLog tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) h5utils-1.12.1/compile0000755000175400001440000000717311204551150011472 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # 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, see . # 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 or send patches to # . 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 . 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 's|^.*[\\/]||; s|^[a-zA-Z]:||; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: h5utils-1.12.1/AUTHORS0000644000175400001440000000010107442465766011176 00000000000000h5utils was written by Steven G. Johnson (stevenj@alum.mit.edu). h5utils-1.12.1/h5fromtxt.10000644000175400001440000001006211214540746012137 00000000000000.\" Copyright (c) 1999-2009 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 < #include #include #include #include "config.h" #include "arrayh5.h" #include "h5utils.h" /* Vis5d header files: */ #if defined(HAVE_VIS5Dp_V5D_H) # include #elif defined(HAVE_VIS5D_V5D_H) # include #else # include #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] []\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 : take x= slice of data\n" " -y : take y= slice of data\n" " -z : take z= slice of data\n" " -t : take t= slice of data's last dimension\n" " -0 : use dataset center as origin for -x/-y/-z\n" " -o : output datasets from all input files to \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 : use dataset in the input files (default: first dataset)\n" " -- you can also specify a dataset via :\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) 1999-2009 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; }