fitscut-1.4.4/0000777000133100002000000000000010521742373010172 500000000000000fitscut-1.4.4/TODO0000644000133100002000000000006610041563617010577 00000000000000Things to do * Fix leaks * Clean up verbose messages fitscut-1.4.4/fitscut.spec.in0000644000133100002000000000132710050247022013037 00000000000000Summary: A tool for making cutouts and color images from FITS files Name: fitscut Version: @VERSION@ Release: 1 License: GPL Group: Applications/Multimedia Source: fitscut-%{version}.tar.gz Buildroot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: libjpeg-devel, libpng-devel, cfitsio-devel %description %prep %setup -q %build %configure make \ CC=%{__cc} \ CFLAGS="$RPM_OPT_FLAGS" %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT make mkdir -p $RPM_BUILD_ROOT%{_bindir} %makeinstall %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/* %changelog * Tue May 11 2004 William Jon McCann - Initial version fitscut-1.4.4/README0000644000133100002000000000271510047724062010771 00000000000000General Information =================== fitscut is designed to extract cutouts from FITS image format files. FITS, PNG, and JPEG output types are supported. When multiple input files are specified and the output type is PNG or JPEG the resulting image is an RGB color image. Information on the FITS file format is available from http://fits.gsfc.nasa.gov/. Dependencies ============ In order to build fitscut you will need: CFITSIO library LIBPNG JPEG library And optionally: WCS Subroutine library Supported Platforms =================== fitscut has been tested and is known to work on: RedHat Linux 8, 9 RedHat Enterprise Linux 3 Fedora Core 1 Solaris 8, 9 Installation ============ Please see the INSTALL file. This usually consists of: % gzip -cd fitscut-1.4.0.tar.gz | tar xvf - # unpack the sources % cd fitscut-1.4.0 # change to the directory % ./configure # run the 'configure' script % make # build fitscut [ Become root if necessary ] % make install # install fitscut Contact ======= Please send all comments and bug reports by electronic mail to: William Jon McCann fitscut-1.4.4/wcs_align.c0000644000133100002000000002761610041563617012233 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Functions for remapping an image based on WCS info * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: wcs_align.c,v 1.7 2004/04/21 21:28:47 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include "fitscut.h" #include #include "wcs_align.h" #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif void wcs_initialize_channel (FitsCutImage *Image, int k) { double xpix, ypix; xpix = Image->x0[k] + Image->ncols[k] / 2.0; ypix = Image->y0[k] + Image->nrows[k] / 2.0; if (Image->header[k] != NULL) { struct WorldCoor *wcs; wcs = wcsinit (Image->header[k]); if (iswcs (wcs)) { /* struct WorldCoor *wcs_new; double cra, cdec; */ Image->wcs[k] = wcs; #if 0 if (verbose) wcscent (wcs); pix2wcs (wcs, xpix, ypix, &cra, &cdec); fitscut_message (2,"\tNew center [%f,%f] -> %f %f\n", xpix, ypix, cra, cdec); /*wcsshift (wcs,cra,cdec,"FK5");*/ wcs_new = wcskinit (Image->ncols[k], Image->nrows[k], wcs->ctype[0],wcs->ctype[1], xpix, ypix, cra, cdec, wcs->cd, wcs->cdelt[0], wcs->cdelt[1], wcs->rot, wcs->equinox, wcs->radecsys); if (verbose) wcscent (wcs_new); wcsfree (wcs); Image->wcs[k] = wcs_new; #endif } } } void wcs_initialize (FitsCutImage *Image) { int k; for (k = 0; k < Image->channels; k++) wcs_initialize_channel (Image, k); } void wcs_align_first_channel (FitsCutImage *Image, int k) { if (Image->wcs[0] == NULL) return; if (iswcs(Image->wcs[0]) == 0) return; wcs_remap_channel (Image, Image->wcs[0], k); } void wcs_align_first (FitsCutImage *Image) { int k; if (Image->wcs[0] == NULL) return; if (iswcs (Image->wcs[0]) == 0) return; for (k = 1; k < Image->channels; k++) { fitscut_message (2, "\t\tremapping channel %d\n", k); wcs_remap_channel (Image, Image->wcs[0], k); } } int wcs_remap_channel (FitsCutImage *Image, struct WorldCoor *wcs_out, int channel) { struct WorldCoor *wcs_in; int wpin, hpin; int offscl; int iin, iout, jin, jout; int iout1, iout2, jout1, jout2; double xout, yout, xin, yin, xpos, ypos, dpixi; double xmin, xmax, ymin, ymax; int nbytes; int bitpix,bitpix_out; int ncols_in, nrows_in; int ncols_out, nrows_out; char *image_out, *image; image = (char *) Image->data[channel]; wcs_in = Image->wcs[channel]; bitpix = -32; bitpix_out = -32; ncols_in = Image->ncols[channel]; nrows_in = Image->nrows[channel]; /* Allocate space for output image */ ncols_out = Image->ncols[channel]; nrows_out = Image->nrows[channel]; fitscut_message (3, "\t\tCreating temp image [%d,%d]\n", ncols_out, nrows_out); nbytes = ncols_out * nrows_out * sizeof (float); image_out = (char *) malloc (nbytes); memset (image_out, 0, nbytes); /* Set input WCS output coordinate system to output coordinate system*/ wcs_in->sysout = wcs_out->syswcs; strcpy (wcs_in->radecout, wcs_out->radecsys); wpin = wcs_in->nxpix; hpin = wcs_in->nypix; /* Set output WCS output coordinate system to input coordinate system*/ wcs_out->sysout = wcs_in->syswcs; /* Find limiting edges of input image in output image */ pix2wcs (wcs_in, 1.0, 1.0, &xpos, &ypos); wcs2pix (wcs_out, xpos, ypos, &xout, &yout, &offscl); xmin = xout; xmax = xout; ymin = yout; ymax = yout; pix2wcs (wcs_in, 1.0, (double)hpin, &xpos, &ypos); wcs2pix (wcs_out, xpos, ypos, &xout, &yout, &offscl); if (xout < xmin) xmin = xout; if (xout > xmax) xmax = xout; if (yout < ymin) ymin = yout; if (yout > ymax) ymax = yout; pix2wcs (wcs_in, (double)wpin, 1.0, &xpos, &ypos); wcs2pix (wcs_out, xpos, ypos, &xout, &yout, &offscl); if (xout < xmin) xmin = xout; if (xout > xmax) xmax = xout; if (yout < ymin) ymin = yout; if (yout > ymax) ymax = yout; pix2wcs (wcs_in, (double)wpin, (double)hpin, &xpos, &ypos); wcs2pix (wcs_out, xpos, ypos, &xout, &yout, &offscl); if (xout < xmin) xmin = xout; if (xout > xmax) xmax = xout; if (yout < ymin) ymin = yout; if (yout > ymax) ymax = yout; iout1 = (int) (ymin + 0.5); if (iout1 < 1) iout1 = 1; iout2 = (int) (ymax + 0.5); if (iout2 > nrows_out) iout2 = nrows_out; jout1 = (int) (xmin + 0.5); if (jout1 < 1) jout1 = 1; jout2 = (int) (xmax + 0.5); if (jout2 > ncols_out) jout2 = ncols_out; fitscut_message (3, "REMAP: Output x: %d-%d, y: %d-%d\n", jout1, jout2, iout1, iout2); /* Loop through vertical pixels (output image lines) */ for (iout = iout1; iout <= iout2; iout++) { yout = (double) iout; /* Loop through horizontal pixels (output image columns) */ for (jout = jout1; jout <= jout2; jout++) { xout = (double) jout; /* Get WCS coordinates of this pixel in output image */ pix2wcs (wcs_out, xout, yout, &xpos, &ypos); /* Get image coordinates of this subpixel in input image */ wcs2pix (wcs_in, xpos, ypos, &xin, &yin, &offscl); if (!offscl) { iin = (int) (yin + 0.5); jin = (int) (xin + 0.5); /* Read pixel from input */ dpixi = getpix (image, bitpix, ncols_in, nrows_in, 0.0, 1.0, jin, iin); /* Write pixel to output */ addpix (image_out, bitpix_out, ncols_out, nrows_out, 0.0, 1.0, jout, iout, dpixi); } } } free (Image->data[channel]); Image->data[channel] = (float *) image_out; return (0); } /* GETPIX -- Get pixel from 2D image of any numeric type */ double getpix (char *image, /* Image array as 1-D vector */ int bitpix, /* FITS bits per pixel */ /* 16 = short, -16 = unsigned short, 32 = int */ /* -32 = float, -64 = double */ int w, /* Image width in pixels */ int h, /* Image height in pixels */ double bzero, /* Zero point for pixel scaling */ double bscale, /* Scale factor for pixel scaling */ int x, /* Zero-based horizontal pixel number */ int y) /* Zero-based vertical pixel number */ { short *im2; int *im4; unsigned short *imu; float *imr; double *imd; double dpix; /* Return 0 if coordinates are not inside image */ if (x < 0 || x >= w) return (0.0); if (y < 0 || y >= h) return (0.0); /* Extract pixel from appropriate type of array */ switch (bitpix) { case 8: dpix = (double) image[(y*w) + x]; break; case 16: im2 = (short *)image; dpix = (double) im2[(y*w) + x]; break; case 32: im4 = (int *)image; dpix = (double) im4[(y*w) + x]; break; case -16: imu = (unsigned short *)image; dpix = (double) imu[(y*w) + x]; break; case -32: imr = (float *)image; dpix = (double) imr[(y*w) + x]; break; case -64: imd = (double *)image; dpix = imd[(y*w) + x]; break; default: dpix = 0.0; } return (bzero + (bscale * dpix)); } /* ADDPIX -- Add pixel value into 2D image of any numeric type */ void addpix (char *image, int bitpix, /* Number of bits per pixel */ /* 16 = short, -16 = unsigned short, 32 = int */ /* -32 = float, -64 = double */ int w, /* Image width in pixels */ int h, /* Image height in pixels */ double bzero, /* Zero point for pixel scaling */ double bscale, /* Scale factor for pixel scaling */ int x, /* Zero-based horizontal pixel number */ int y, /* Zero-based vertical pixel number */ double dpix) /* Value to add to pixel */ { short *im2; int *im4; unsigned short *imu; float *imr; double *imd; int ipix; /* Return if coordinates are not inside image */ if (x < 0 || x >= w) return; if (y < 0 || y >= h) return; dpix = (dpix - bzero) / bscale; ipix = (y * w) + x; switch (bitpix) { case 8: if (dpix < 0) image[ipix] = image[ipix] + (char) (dpix - 0.5); else image[ipix] = image[ipix] + (char) (dpix + 0.5); break; case 16: im2 = (short *)image; if (dpix < 0) im2[ipix] = im2[ipix] + (short) (dpix - 0.5); else im2[ipix] = im2[ipix] + (short) (dpix + 0.5); break; case 32: im4 = (int *)image; if (dpix < 0) im4[ipix] = im4[ipix] + (int) (dpix - 0.5); else im4[ipix] = im4[ipix] + (int) (dpix + 0.5); break; case -16: imu = (unsigned short *)image; if (dpix > 0) imu[ipix] = imu[ipix] + (unsigned short) (dpix + 0.5); break; case -32: imr = (float *)image; imr[ipix] = imr[ipix] + (float) dpix; break; case -64: imd = (double *)image; imd[ipix] = imd[ipix] + dpix; break; } return; } fitscut-1.4.4/install-sh0000744000133100002000000001124407371627464012126 00000000000000#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" tranformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 fitscut-1.4.4/Makefile.in0000644000133100002000000005443710521741723012166 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = fitscut$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/fitscut.spec.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS THANKS TODO depcomp install-sh \ missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = fitscut.spec am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__fitscut_SOURCES_DIST = colormap.c draw.c extract.c file_check.c \ fitscut.c getopt1.c getopt.c histogram.c image_scale.c \ output_fits.c output_jpg.c output_png.c resize.c util.c \ colormap.h draw.h extract.h file_check.h fitscut.h getopt.h \ histogram.h image_scale.h output_fits.h output_jpg.h \ output_png.h resize.h util.h tailor.h revision.h wcs_align.c \ wcs_align.h @HAVE_LIBWCS_TRUE@am__objects_1 = wcs_align.$(OBJEXT) am_fitscut_OBJECTS = colormap.$(OBJEXT) draw.$(OBJEXT) \ extract.$(OBJEXT) file_check.$(OBJEXT) fitscut.$(OBJEXT) \ getopt1.$(OBJEXT) getopt.$(OBJEXT) histogram.$(OBJEXT) \ image_scale.$(OBJEXT) output_fits.$(OBJEXT) \ output_jpg.$(OBJEXT) output_png.$(OBJEXT) resize.$(OBJEXT) \ util.$(OBJEXT) $(am__objects_1) fitscut_OBJECTS = $(am_fitscut_OBJECTS) am__DEPENDENCIES_1 = @HAVE_LIBWCS_TRUE@fitscut_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(fitscut_SOURCES) DIST_SOURCES = $(am__fitscut_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_CFITSIO_FITSIO_H_FALSE = @HAVE_CFITSIO_FITSIO_H_FALSE@ HAVE_CFITSIO_FITSIO_H_TRUE = @HAVE_CFITSIO_FITSIO_H_TRUE@ HAVE_FITSIO_H_FALSE = @HAVE_FITSIO_H_FALSE@ HAVE_FITSIO_H_TRUE = @HAVE_FITSIO_H_TRUE@ HAVE_LIBWCS_FALSE = @HAVE_LIBWCS_FALSE@ HAVE_LIBWCS_TRUE = @HAVE_LIBWCS_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCS_LIBS = @WCS_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @HAVE_LIBWCS_TRUE@wcs_SOURCES = wcs_align.c wcs_align.h @HAVE_LIBWCS_TRUE@fitscut_LDADD = $(WCS_LIBS) fitscut_SOURCES = \ colormap.c \ draw.c \ extract.c \ file_check.c \ fitscut.c \ getopt1.c \ getopt.c \ histogram.c \ image_scale.c \ output_fits.c \ output_jpg.c \ output_png.c \ resize.c \ util.c \ colormap.h \ draw.h \ extract.h \ file_check.h \ fitscut.h \ getopt.h \ histogram.h \ image_scale.h \ output_fits.h \ output_jpg.h \ output_png.h \ resize.h \ util.h \ tailor.h \ revision.h \ $(wcs_SOURCES) EXTRA_DIST = \ AUTHORS \ ChangeLog \ COPYING \ INSTALL \ NEWS \ README \ THANKS \ TODO \ fitscut.spec.in \ fitscut.spec \ test.fits all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 fitscut.spec: $(top_builddir)/config.status $(srcdir)/fitscut.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fitscut$(EXEEXT): $(fitscut_OBJECTS) $(fitscut_DEPENDENCIES) @rm -f fitscut$(EXEEXT) $(LINK) $(fitscut_LDFLAGS) $(fitscut_OBJECTS) $(fitscut_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colormap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/draw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitscut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_scale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_fits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_jpg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_png.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcs_align.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am test: check check: fitscut ./fitscut -vv --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.fits @LANG=""; export LANG; if test "-s _test.fits"; then \ if test `wc -c < _test.fits` -eq 17280; then \ echo fitscut FITS test OK; \ else \ echo FAILED fitscut FITS test: wrong size; \ fi; \ else \ echo FAILED fitscut FITS test: no output; \ fi rm -f _test.fits ./fitscut -vv --png --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if test "-s _test.fits"; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG test OK; \ else \ echo FAILED fitscut PNG test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG test: no output; \ fi rm -f _test.png ./fitscut -vv --png --log-scale --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG log test OK; \ else \ echo FAILED fitscut PNG log test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG log test: no output; \ fi rm -f _test.png ./fitscut -vv --png --sqrt-scale --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG sqrt test OK; \ else \ echo FAILED fitscut PNG sqrt test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG sqrt test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG autoscale test OK; \ else \ echo FAILED fitscut PNG autoscale test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG autoscale test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --all --zoom=2.0 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG zoom test OK; \ else \ echo FAILED fitscut PNG zoom test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG zoom test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --all --asinh-scale $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG asinh test OK; \ else \ echo FAILED fitscut PNG asinh test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG asinh test: no output; \ fi rm -f _test.png # 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: fitscut-1.4.4/util.h0000644000133100002000000000205010041552726011227 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * util.h -- declarations for util.c * Copyright (C) 2003 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: util.h,v 1.2 2004/04/21 20:13:10 mccannwj Exp $ */ float *interpolate_points (long,float *,float *,long); long parse_coordinates (char *, float **, float **); char *strlwr (char *); fitscut-1.4.4/configure.in0000644000133100002000000000732210521732656012426 00000000000000dnl $Id: configure.in,v 1.10 2006/10/31 20:44:30 mccannwj Exp $ dnl Process this file with autoconf to produce a configure script. AC_DEFUN([COMPILE_WARNINGS],[ if test -z "$1" ; then default_compile_warnings=yes else default_compile_warnings="$1" fi AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.],, [enable_compile_warnings="$default_compile_warnings"]) warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT($has_option) if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) ;; esac CFLAGS="$realsave_CFLAGS" AC_MSG_CHECKING(what warning flags to pass to the C compiler) AC_MSG_RESULT($warning_flags) AC_ARG_ENABLE(iso-c, [ --enable-iso-c Try to warn if code is not ISO C ],, enable_iso_c=no) AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCFLAGS) WARN_CFLAGS="$warning_flags $complCFLAGS" AC_SUBST(WARN_CFLAGS) ]) AC_INIT(fitscut.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(fitscut,1.4.4) dnl Checks for programs. AC_PROG_CC AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_CPP dnl Checks for header files. AC_STDC_HEADERS AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(stdlib.h,) AC_CHECK_HEADERS(png.h,,AC_MSG_ERROR([png.h is required to build fitscut])) AC_CHECK_HEADERS(jpeglib.h,,AC_MSG_ERROR([jpeglib.h is required to build fitscut])) AC_CHECK_HEADERS(cfitsio/fitsio.h, have_cfitsio_fitsio_h=yes, have_cfitsio_fitsio_h=no) AC_CHECK_HEADERS(fitsio.h, have_fitsio_h=yes, have_fitsio_h=no) AM_CONDITIONAL(HAVE_CFITSIO_FITSIO_H, test "x$have_cfitsio_fitsio_h" = "xyes") AM_CONDITIONAL(HAVE_FITSIO_H, test "x$have_cfitsio_fitsio_h" = "xyes") if test "x$have_cfitsio_fitsio_h" != "xyes" -a "x$have_fitsio_h" != "xyes"; then AC_MSG_ERROR([fitsio.h is required to build fitscut]) fi dnl Checks for libraries. AC_CHECK_LIB(m, sin) AC_CHECK_LIB(socket, connect) AC_CHECK_LIB(nsl, main) AC_CHECK_LIB(png, png_read_info) AC_CHECK_LIB(jpeg, jpeg_destroy_decompress) AC_CHECK_LIB(cfitsio, ffvers) AC_CHECK_LIB(wcs, wcsinit, have_libwcs=yes, have_libwcs=no) AM_CONDITIONAL(HAVE_LIBWCS, test "x$have_libwcs" = "xyes") if test "x$have_libwcs" = "xyes"; then AC_DEFINE([HAVE_LIBWCS], 1, [Defined when libwcs is detected]) WCS_LIBS="-lwcs" AC_SUBST(WCS_LIBS) fi COMPILE_WARNINGS(yes) CFLAGS="$CFLAGS $WARN_CFLAGS" AC_SUBST(CFLAGS) dnl Checks for library functions. AC_TYPE_SIGNAL AC_OUTPUT(Makefile) AC_OUTPUT(fitscut.spec) fitscut-1.4.4/Makefile.am0000644000133100002000000000640510420725613012143 00000000000000bin_PROGRAMS = fitscut if HAVE_LIBWCS wcs_SOURCES = wcs_align.c wcs_align.h fitscut_LDADD = $(WCS_LIBS) endif fitscut_SOURCES = \ colormap.c \ draw.c \ extract.c \ file_check.c \ fitscut.c \ getopt1.c \ getopt.c \ histogram.c \ image_scale.c \ output_fits.c \ output_jpg.c \ output_png.c \ resize.c \ util.c \ colormap.h \ draw.h \ extract.h \ file_check.h \ fitscut.h \ getopt.h \ histogram.h \ image_scale.h \ output_fits.h \ output_jpg.h \ output_png.h \ resize.h \ util.h \ tailor.h \ revision.h \ $(wcs_SOURCES) EXTRA_DIST = \ AUTHORS \ ChangeLog \ COPYING \ INSTALL \ NEWS \ README \ THANKS \ TODO \ fitscut.spec.in \ fitscut.spec \ test.fits test: check check: fitscut ./fitscut -vv --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.fits @LANG=""; export LANG; if test "-s _test.fits"; then \ if test `wc -c < _test.fits` -eq 17280; then \ echo fitscut FITS test OK; \ else \ echo FAILED fitscut FITS test: wrong size; \ fi; \ else \ echo FAILED fitscut FITS test: no output; \ fi rm -f _test.fits ./fitscut -vv --png --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if test "-s _test.fits"; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG test OK; \ else \ echo FAILED fitscut PNG test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG test: no output; \ fi rm -f _test.png ./fitscut -vv --png --log-scale --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG log test OK; \ else \ echo FAILED fitscut PNG log test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG log test: no output; \ fi rm -f _test.png ./fitscut -vv --png --sqrt-scale --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG sqrt test OK; \ else \ echo FAILED fitscut PNG sqrt test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG sqrt test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --x0=1 --y0=1 --columns=50 --rows=60 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG autoscale test OK; \ else \ echo FAILED fitscut PNG autoscale test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG autoscale test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --all --zoom=2.0 $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG zoom test OK; \ else \ echo FAILED fitscut PNG zoom test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG zoom test: no output; \ fi rm -f _test.png ./fitscut -vv --png --autoscale=98 --all --asinh-scale $(top_srcdir)/test.fits > _test.png @LANG=""; export LANG; if [ -s "_test.png" ]; then \ if [ -f "_test.png" ]; then \ echo fitscut PNG asinh test OK; \ else \ echo FAILED fitscut PNG asinh test: wrong size; \ fi; \ else \ echo FAILED fitscut PNG asinh test: no output; \ fi rm -f _test.png fitscut-1.4.4/util.c0000644000133100002000000001044510041552726011231 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Utility functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: util.c,v 1.4 2004/04/21 20:13:10 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #include "fitscut.h" #include "util.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif float * interpolate_points (long nresult, float *px, float *py, long npoints) { long i, j; long last_index, next_index; float *list; float m, x, y; /* x and y are normalized to unity */ list = (float *) malloc (sizeof (float) * nresult); last_index = 0; for (i = 0; i < npoints-1; i++) { next_index = ceil (nresult * px[i+1]); m = (py[i + 1] - py[i]) / (px[i + 1] - px[i]); for (j = last_index; j < next_index; j++) { /* point slope formula */ x = j / (float) nresult; y = m * (x - px[i]) + py[i]; list[j] = y; } last_index = next_index; } return list; } long parse_coordinates (char *str, float **x, float **y) { int count,i; char *sptr; char *tmpstr; float tx,ty; float *xp; float *yp; count = 0; for (i = 0; i < strlen (str); i++) { if (str[i] == ',') count++; } xp = (float *)malloc (sizeof (float) * count); yp = (float *)malloc (sizeof (float) * count); tmpstr = strdup(str); for (i = 0; i < count; i++) { if (i == 0) sptr = strtok (tmpstr, ")"); else sptr = strtok (NULL, ")"); sscanf (sptr, "(%f,%f", &tx, &ty); xp[i] = tx; yp[i] = ty; } *x = xp; *y = yp; free (tmpstr); return (count); } #if 0 void byte_swap_vector (void *p, int n, int size) { char *a, *b, c; switch (size) { case 2: for (a = (char*)p ; n > 0; n--, a += 1) { b = a + 1; c = *a; *a++ = *b; *b = c; } break; case 4: for (a = (char*)p ; n > 0; n--, a += 2) { b = a + 3; c = *a; *a++ = *b; *b-- = c; c = *a; *a++ = *b; *b = c; } break; case 8: for (a = (char*)p ; n > 0; n--, a += 4) { b = a + 7; c = *a; *a++ = *b; *b-- = c; c = *a; *a++ = *b; *b-- = c; c = *a; *a++ = *b; *b-- = c; c = *a; *a++ = *b; *b = c; } break; default: break; } } #endif /* * Put string s in lower case, return s. */ char * strlwr (char *s) { char *t; for (t = s; *t; t++) *t = tolow(*t); return s; } fitscut-1.4.4/getopt.c0000644000133100002000000005105110041552726011554 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* NOTE!!! AIX requires this to be the first thing in the file. Do not put ANYTHING before it! */ #if !defined (__GNUC__) && defined (_AIX) #pragma alloca #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not __GNUC__ */ #if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) #include #else #ifndef _AIX char *alloca (); #endif #endif /* alloca.h */ #endif /* not __GNUC__ */ #if !__STDC__ && !defined(const) && IN_GCC #define const #endif /* This tells Alpha OSF/1 not to define a getopt prototype in . */ #ifndef _NO_PROTO #define _NO_PROTO #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #undef alloca /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include #else /* Not GNU C library. */ #define __alloca alloca #endif /* GNU C library. */ #ifdef HAVE_STRING_H #include #else #include #endif /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a long-named option. Because this is not POSIX.2 compliant, it is being phased out. */ /* #define GETOPT_COMPAT */ /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = 0; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* XXX 1003.2 says this must be 1 before any call. */ int optind = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return EOF with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ #include #define my_index strchr #define my_bcopy(src, dst, n) memcpy ((dst), (src), (n)) #else /* Avoid depending on library functions or files whose names are inconsistent. */ char *getenv (); static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } static void my_bcopy (from, to, size) const char *from; char *to; int size; { int i; for (i = 0; i < size; i++) to[i] = from[i]; } #endif /* GNU C library. */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (argv) char **argv; { int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); char **temp = (char **) __alloca (nonopts_size); /* Interchange the two blocks of data in ARGV. */ my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size); my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt], (optind - last_nonopt) * sizeof (char *)); my_bcopy ((char *) temp, (char *) &argv[first_nonopt + optind - last_nonopt], nonopts_size); /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns `EOF'. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int option_index; optarg = 0; /* Initialize the internal data when the first call is made. Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ if (optind == 0) { first_nonopt = last_nonopt = optind = 1; nextchar = NULL; /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (getenv ("POSIXLY_CORRECT") != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; } if (nextchar == NULL || *nextchar == '\0') { if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Now skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && (argv[optind][0] != '-' || argv[optind][1] == '\0') #ifdef GETOPT_COMPAT && (longopts == NULL || argv[optind][0] != '+' || argv[optind][1] == '\0') #endif /* GETOPT_COMPAT */ ) optind++; last_nonopt = optind; } /* Special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return EOF; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if ((argv[optind][0] != '-' || argv[optind][1] == '\0') #ifdef GETOPT_COMPAT && (longopts == NULL || argv[optind][0] != '+' || argv[optind][1] == '\0') #endif /* GETOPT_COMPAT */ ) { if (ordering == REQUIRE_ORDER) return EOF; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Start decoding its characters. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } if (longopts != NULL && ((argv[optind][0] == '-' && (argv[optind][1] == '-' || long_only)) #ifdef GETOPT_COMPAT || argv[optind][0] == '+' #endif /* GETOPT_COMPAT */ )) { const struct option *p; char *s = nextchar; int exact = 0; int ambig = 0; const struct option *pfound = NULL; int indfound; while (*s && *s != '=') s++; /* Test all options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, s - nextchar)) { if (s - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, "%s: option `%s' is ambiguous\n", argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*s) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = s + 1; else { if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, "%s: option `--%s' doesn't allow an argument\n", argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, "%s: option `%c%s' doesn't allow an argument\n", argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, "%s: option `%s' requires an argument\n", argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' #ifdef GETOPT_COMPAT || argv[optind][0] == '+' #endif /* GETOPT_COMPAT */ || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, "%s: unrecognized option `--%s'\n", argv[0], nextchar); else /* +option or -option */ fprintf (stderr, "%s: unrecognized option `%c%s'\n", argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; return '?'; } } /* Look at and handle the next option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { #if 0 if (c < 040 || c >= 0177) fprintf (stderr, "%s: unrecognized option, character code 0%o\n", argv[0], c); else fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c); #else /* 1003.2 specifies the format of this message. */ fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); #endif } optopt = c; return '?'; } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = 0; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { #if 0 fprintf (stderr, "%s: option `-%c' requires an argument\n", argv[0], c); #else /* 1003.2 specifies the format of this message. */ fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], c); #endif } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == EOF) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ fitscut-1.4.4/aclocal.m40000644000133100002000000007546210521741722011761 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /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 fitscut-1.4.4/extract.c0000644000133100002000000002364010050247022011715 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Cutout extraction functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: extract.c,v 1.20 2004/05/11 22:05:06 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "getopt.h" #include #include #include #ifdef HAVE_STRING_H #include #else #include #endif #ifdef HAVE_CFITSIO_FITSIO_H #include #else #include #endif #include "fitscut.h" #include "extract.h" #include "resize.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #define LARGEST_BLOCK 60 #endif void extract_fits (FitsCutImage *Image) { fitsfile *fptr; /* pointer to the FITS file; defined in fitsio.h */ int status; long fpixel[2]; long lpixel[2]; long inc[2]; float *arrayptr; float *arrayptr2; int datatype, anynull; int nullval = 0; int rows_used = 0; int cols_used = 0; int xoffset = 0; int yoffset = 0; unsigned char first_channel = TRUE; int naxis; long naxes[2]; long x1, y1, x0, y0; int k, i, j; int num_keys, more_keys; char *header; float zoom_factor; int resize_width = 0; int resize_height = 0; for (k = 0; k < Image->channels; k++) { status = 0; fitscut_message (1, "\tExamining FITS channel %d...\n", k); /* reset data pointer */ Image->data[k] = NULL; if (Image->input_filename[k] == NULL) continue; if (fits_open_file (&fptr, Image->input_filename[k], READONLY, &status)) printerror (status); /* check that cutout is within image dimensions */ if (fits_get_img_dim (fptr, &naxis, &status)) printerror (status); if (fits_get_img_size (fptr, 2, naxes, &status)) printerror (status); if (Image->ncols[k] == MAGIC_SIZE_ALL_NUMBER) { Image->ncols[k] = naxes[0]; Image->x0[k] = 0; } if (Image->nrows[k] == MAGIC_SIZE_ALL_NUMBER) { Image->nrows[k] = naxes[1]; Image->y0[k] = 0; } x0 = Image->x0[k]; y0 = Image->y0[k]; /* CFITSIO starts indexing at 1 */ x0 += 1; y0 += 1; x1 = x0 + Image->ncols[k]-1; y1 = y0 + Image->nrows[k]-1; fpixel[0] = MAX (1,x0); fpixel[1] = MAX (1,y0); inc[0] = 1; inc[1] = 1; lpixel[0] = MIN (naxes[0],x1); lpixel[1] = MIN (naxes[1],y1); if (fits_get_img_type (fptr, &datatype, &status)) printerror (status); Image->input_datatype[k] = datatype; rows_used = lpixel[1] - fpixel[1] + 1; cols_used = lpixel[0] - fpixel[0] + 1; fitscut_message (1, "\tAllocating space for %d x %d array\n", cols_used, rows_used); arrayptr = cutout_alloc (cols_used, rows_used, sizeof (float)); if (fits_get_hdrspace (fptr, &num_keys, &more_keys, &status)) printerror (status); fitscut_message (3, "\t\theader has %d keys with space for %d more\n", num_keys, more_keys); /* let cfitsio extract the entire header as a string */ if (fits_get_image_wcs_keys (fptr, &header, &status)) printerror (status); Image->header_cards[k] = num_keys; Image->header[k] = header; fitscut_message (1, "\tExtracting %s[%ld:%ld,%ld:%ld]...\n", Image->input_filename[k], fpixel[0], lpixel[0], fpixel[1], lpixel[1]); if (fits_read_subset (fptr, TFLOAT, fpixel, lpixel, inc, &nullval, arrayptr, &anynull, &status)) printerror (status); if (fits_close_file (fptr, &status)) printerror (status); if ((cols_used != Image->ncols[k]) || (rows_used != Image->nrows[k])) { /* place the subset read from the fits file into an array * of size ncols x nrows */ fitscut_message (1, "\tallocating space for %ld x %ld array\n", Image->ncols[k], Image->nrows[k]); arrayptr2 = cutout_alloc (Image->ncols[k], Image->nrows[k], sizeof (float)); xoffset = (fpixel[0] == x0) ? 0 : (fpixel[0] - x0); yoffset = (fpixel[1] == y0) ? 0 : (fpixel[1] - y0); fitscut_message (2, "\tplacing subarray into array using offsets x=%d y=%d\n", xoffset, yoffset); for (i = 0; i < cols_used; i++) { for (j = 0; j < rows_used; j++) { *(arrayptr2 + (i + xoffset) + (j + yoffset) * Image->ncols[k]) = *(arrayptr + i + j * cols_used); fitscut_message (3, "\tplacing [%d,%d]=%f into [%d,%d]\n", i, j, *(arrayptr + i + j * cols_used), i + xoffset, j + xoffset); } } Image->data[k] = arrayptr2; free (arrayptr); } else { Image->data[k] = arrayptr; } if (Image->output_zoom != 0) { if (first_channel) { if (Image->output_zoom > 0) { zoom_factor = Image->output_zoom; } else { zoom_factor = 1.0; } fitscut_message (2, "Calculated zoom factor of %f from %f\n", zoom_factor, Image->output_zoom); resize_height = zoom_factor * Image->nrows[k]; resize_width = zoom_factor * Image->ncols[k]; fitscut_message (2, "Calculated zoom size of x=%d y=%d\n", resize_width, resize_height); } fitscut_message (2, "\tresizing channel to x=%d y=%d\n", resize_width, resize_height); resize_image_channel (Image, k, resize_width, resize_height); } first_channel = FALSE; } } /* * Allocate memory for cutout */ float * cutout_alloc (unsigned int nx, unsigned int ny, unsigned int size) { unsigned int nelem; float *ptr; nelem = nx * ny; ptr = (float *) calloc (nelem,size); if (ptr == NULL) { fitscut_message (0, "Unable to allocate memory for %d x %d image\n", nx, ny); do_exit (1); } return ptr; } /* * Print out cfitsio error messages and exit program */ void printerror (int status) { if (status) { fits_report_error (stderr, status); /* print error report */ do_exit (status); /* terminate the program, returning error status */ } } double fits_get_exposure_time (char *header, int num_cards) { int status = 0; char keyname[FLEN_KEYWORD]; int i,namelen; char card[FLEN_CARD+1]; char value_string[FLEN_VALUE]; char comment[FLEN_COMMENT]; double value = -1.0; if (header != NULL) { keyname[0] = '\0'; for (i = 0; i < num_cards; i++) { strncpy (card, header + i * (FLEN_CARD - 1), FLEN_CARD - 1); fits_get_keyname (card, keyname, &namelen, &status); if (strequ (keyname, "EXPTIME")) { fits_parse_value (card, value_string, comment, &status); value = strtod (value_string, (char **)NULL); fitscut_message (2, "Found EXPTIME='%s' converted to %f\n", value_string, value); return value; } } } return value; } fitscut-1.4.4/getopt.h0000644000133100002000000001047407371627375011604 00000000000000/* Declarations for getopt. Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if __STDC__ #if defined(__GNU_LIBRARY__) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* not __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* not __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ fitscut-1.4.4/file_check.h0000644000133100002000000000167410041552725012340 00000000000000/* declarations for file_check.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: file_check.h,v 1.2 2004/04/21 20:13:09 mccannwj Exp $ */ int check_output_file (char *, char *); int check_input_file (char *); int make_output_name (char *, char *); fitscut-1.4.4/file_check.c0000644000133100002000000002030510101551250012310 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * File and filename check functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: file_check.c,v 1.4 2004/07/27 22:09:44 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #ifdef HAVE_STRING_H #include #else #include #endif #ifdef HAVE_UNISTD_H # include #endif #include "fitscut.h" #include "tailor.h" #include "file_check.h" #include "util.h" extern char *progname; extern int foreground; char fits_suffix[MAX_SUFFIX+1]; /* default suffix */ int suffix_len; /* strlen(fits_suffix) */ struct stat istat; /* status for input file */ /* * Use lstat if available, except for -c or -f. Use stat otherwise. * This allows links when not removing the original file. */ static int do_stat (char *name, struct stat *sbuf) { errno = 0; #if (defined(S_IFLNK) || defined (S_ISLNK)) && !defined(NO_SYMLINK) if (!to_stdout && !force) { return lstat (name, sbuf); } #endif return stat (name, sbuf); } static int get_istat (char *iname, struct stat *sbuf) { /* If input file exists, return OK. */ if (do_stat (iname, sbuf) == 0) return OK; if (errno != ENOENT) { perror (iname); exit_code = ERROR; return ERROR; } perror (iname); exit_code = ERROR; return ERROR; } /* * Generate ofname. Return OK, or WARNING if file must be skipped. * Sets save_orig_name to true if the file name has been truncated. */ int make_output_name (char *ofname, char *oname) { sprintf (ofname, "%s", oname); return OK; } /* * Return true if the two stat structures correspond to the same file. */ static int same_file (struct stat *stat1, struct stat *stat2) { return stat1->st_ino == stat2->st_ino && stat1->st_dev == stat2->st_dev #ifdef NO_ST_INO /* Can't rely on st_ino and st_dev, use other fields: */ && stat1->st_mode == stat2->st_mode && stat1->st_uid == stat2->st_uid && stat1->st_gid == stat2->st_gid && stat1->st_size == stat2->st_size && stat1->st_atime == stat2->st_atime && stat1->st_mtime == stat2->st_mtime && stat1->st_ctime == stat2->st_ctime #endif ; } /* * Return true if a file name is ambiguous because the operating system * truncates file names. */ static int name_too_long (char *name, struct stat *statb) { int s = strlen (name); char c = name[s-1]; struct stat tstat; /* stat for truncated name */ int res; tstat = *statb; /* Just in case OS does not fill all fields */ name[s-1] = '\0'; res = stat (name, &tstat) == 0 && same_file (statb, &tstat); name[s-1] = c; return res; } static void shorten_name (char *name) { fprintf (stderr, "%s: error: output file name too long: %s\n", progname, name); do_exit (ERROR); } /* * Check if ofname is not ambiguous * because the operating system truncates names. Otherwise, generate * a new ofname and save the original name in the compressed file. * If the compressed file already exists, ask for confirmation. * The check for name truncation is made dynamically, because different * file systems on the same OS might use different truncation rules (on SVR4 * s5 truncates to 14 chars and ufs does not truncate). * This function returns -1 if the file must be skipped, and * updates save_orig_name if necessary. * IN assertions: save_orig_name is already set if ofname has been * already truncated because of NO_MULTIPLE_DOTS. The input file has * already been open and istat is set. */ int check_output_file (char *ofname, char *ifname) { struct stat ostat; /* stat for ofname */ #ifdef ENAMETOOLONG /* Check for strictly conforming Posix systems (which return ENAMETOOLONG * instead of silently truncating filenames). */ errno = 0; while (stat (ofname, &ostat) != 0) { if (errno != ENAMETOOLONG) return 0; /* ofname does not exist */ shorten_name (ofname); } #else if (stat (ofname, &ostat) != 0) { return 0; } #endif /* Check for name truncation on existing file. Do this even on systems * defining ENAMETOOLONG, because on most systems the strict Posix * behavior is disabled by default (silent name truncation allowed). */ if (name_too_long (ofname, &ostat)) { shorten_name (ofname); if (stat (ofname, &ostat) != 0) return 0; } /* Check that the input and output files are different (could be * the same by name truncation or links). */ if (same_file (&istat, &ostat)) { if (strequ (ifname, ofname)) { fprintf (stderr, "%s: %s: cannot convert onto itself\n", progname, ifname ); } else { fprintf (stderr, "%s: %s and %s are the same file\n", progname, ifname, ofname); } exit_code = ERROR; return ERROR; } /* Ask permission to overwrite the existing file */ if (!force) { char response[80]; strcpy (response,"n"); fprintf (stderr, "%s: %s already exists;", progname, ofname); if (foreground && isatty (fileno (stdin))) { fprintf (stderr, " do you wish to overwrite (y or n)? "); fflush (stderr); (void)fgets (response, sizeof (response)-1, stdin); } if (tolow (*response) != 'y') { fprintf (stderr, "\tnot overwritten\n"); if (exit_code == OK) exit_code = WARNING; return ERROR; } } (void) chmod (ofname, 0777); if (unlink (ofname)) { fprintf (stderr, "%s: ", progname); perror (ofname); exit_code = ERROR; return ERROR; } return OK; } int check_input_file (char *iname) { /* Check if the input file is present, set globals ifname and istat: */ if (get_istat (iname, &istat) != OK) return ERROR; /* If the input name is that of a directory ignore: */ if (S_ISDIR (istat.st_mode)) { WARN ((stderr, "%s: %s is a directory -- ignored\n", progname, iname)); return WARNING; } if (!S_ISREG (istat.st_mode) && !S_ISLNK (istat.st_mode)) { WARN ((stderr, "%s: %s is not a directory, symbolic link, or regular file - ignored\n", progname, iname)); return WARNING; } if (istat.st_nlink > 1 && !to_stdout && !force) { WARN ((stderr, "%s: %s has %d other link%c\n", progname, iname, (int)istat.st_nlink - 1, istat.st_nlink > 2 ? 's' : ' ')); return WARNING; } return OK; } fitscut-1.4.4/missing0000755000133100002000000002540610455117014011506 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # 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-end: "$" # End: fitscut-1.4.4/output_fits.c0000644000133100002000000001523710050247022012633 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * FITS output functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: output_fits.c,v 1.11 2004/05/11 22:05:06 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #ifdef HAVE_CFITSIO_FITSIO_H #include #else #include #endif #include "fitscut.h" #include "output_fits.h" #include "extract.h" #include "revision.h" static int fitscut_write_primary (fitsfile *fptr, float **dataptr, int bitpix, int nrows, int ncols, int channels) { int status; long fpixel[3]; long naxis; long nelements; long naxes[3]; long tablerow, nfits, narray, ii, k; fpixel[0] = 1; fpixel[1] = 1; fpixel[2] = 1; naxis = (channels == 1) ? 2 : 3; naxes[0] = ncols; naxes[1] = nrows; naxes[2] = channels; nelements = naxes[0] * naxes[1] * naxes[2]; /* number of pixels to write */ status = 0; /* Create the primary array image */ if (fits_create_img (fptr, bitpix, naxis, naxes, &status)) printerror (status); /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow = 1; nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ for (k = 0; k < channels; k++) { if (dataptr[k] == NULL) continue; /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < nrows; ii++) { if (fits_write_col (fptr, TFLOAT, 2, tablerow, nfits, ncols, dataptr[k] + narray, &status) > 0) return (status); nfits += naxes[0]; narray += ncols; } narray = 0; } return (status); } static int fitscut_create_fits (char *ofname, fitsfile **fptrptr) { int status = 0; if (strlen (ofname) <= 0) { fitscut_error ("output filename is null."); } if (fits_create_file (fptrptr, ofname, &status)) /* create new file */ printerror (status); /* call printerror if error occurs */ return (status); } static int fitscut_write_header (fitsfile *fptr, char *header, int num_cards) { int status = 0; char keyname[FLEN_KEYWORD]; int i, namelen; char card[FLEN_CARD+1]; /* Write a keyword; must pass the ADDRESS of the value */ if (header != NULL) { keyname[0] = '\0'; fits_write_date (fptr, &status); for (i = 0; i < num_cards; i++) { strncpy (card, header + i * (FLEN_CARD - 1), FLEN_CARD - 1); fits_get_keyname (card, keyname, &namelen, &status); /*fprintf(stderr," keyname: %s \n",keyname);*/ if ( (!strequ (keyname,"SIMPLE")) && (!strequ (keyname,"BITPIX")) && (!strequ (keyname,"NAXIS")) && (!strequ (keyname,"NAXIS1")) && (!strequ (keyname,"NAXIS2")) && (!strequ (keyname,"NAXIS3")) && (!strequ (keyname,"EXTEND")) && (!strequ (keyname,"HISTORY")) && (!strequ (keyname,"COMMENT")) && (!strequ (keyname,"")) && (!strequ (keyname,"DATE")) ) fits_write_record (fptr, card, &status); } } return (status); } static int fitscut_close_fits (fitsfile *fptr) { int status = 0; if (fits_close_file (fptr, &status)) printerror (status); return (status); } void write_to_fits(FitsCutImage *Image) { fitsfile *fptr; int bitpix; int status = 0; char history[64]; fitscut_message (1, "\tCreating FITS...\n"); fitscut_create_fits (Image->output_filename, &fptr); fitscut_message (2, "\tWriting primary...\n"); if (Image->output_scale == SCALE_LINEAR) { /* use the input bitpix */ /* have to pick one, so pick first one */ bitpix = Image->input_datatype[0]; } else { bitpix = FLOAT_IMG; } fitscut_write_primary (fptr, Image->data, bitpix, Image->nrows[0], Image->ncols[0], Image->channels); /* write header */ /* for now I'm not going to try to merge the headers * just use the first one */ fitscut_write_header (fptr, Image->header[0], Image->header_cards[0]); sprintf (history, "Created by fitscut %s (William Jon McCann)", VERSION); fits_write_history (fptr, history, &status); fitscut_message (1, "\tClosing file...\n"); fitscut_close_fits (fptr); } fitscut-1.4.4/depcomp0000755000133100002000000003710010455117014011456 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by 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 case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -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, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: fitscut-1.4.4/wcs_align.h0000644000133100002000000000233310041552726012224 00000000000000/* declarations for wcs_align.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: wcs_align.h,v 1.4 2004/04/21 20:13:10 mccannwj Exp $ */ void wcs_initialize_channel (FitsCutImage *, int); void wcs_align_first_channel (FitsCutImage *, int); void wcs_initialize (FitsCutImage *); void wcs_align_first (FitsCutImage *); int wcs_remap_channel (FitsCutImage *, struct WorldCoor *, int); double getpix (char *, int, int, int, double, double, int, int); void addpix (char *, int, int, int, double, double, int, int, double); fitscut-1.4.4/image_scale.c0000644000133100002000000003672210044515274012513 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Image scaling functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: image_scale.c,v 1.21 2004/04/30 18:28:12 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif #include "fitscut.h" #include "image_scale.h" #include "histogram.h" #include "extract.h" void autoscale_channel (FitsCutImage *Image, int k) { float *hist; /* Histogram */ int num_bins = NBINS; int ll, hh, count; long npix, cutoff_low, cutoff_high; double amin, amax; float *arrayp; float half; npix = Image->ncols[k] * Image->nrows[k]; fitscut_message (1, "Autoscaling channel %d by histogram %.4f%% - %.4f%%\n", k, Image->autoscale_percent_low[k], Image->autoscale_percent_high[k]); if (Image->data[k] == NULL) return; arrayp = Image->data[k]; amin = Image->data_min[k]; amax = Image->data_max[k]; /* get histogram */ hist = compute_histogram (arrayp, num_bins, amin, amax, Image->nrows[k], Image->ncols[k]); /* calculate cutoff */ half = (Image->autoscale_percent_low[k] == Image->autoscale_percent_high[k]) ? 0.5 : 1.0; cutoff_low = (npix * Image->autoscale_percent_low[k] / 100.0) * half; cutoff_high = (npix * (100.0 - Image->autoscale_percent_high[k]) / 100.0) * half; for (ll = 0, count = 0; ll < num_bins; ll++) { count += hist[ll]; if (count > cutoff_low) break; } for (hh = num_bins - 1, count = 0; hh >= 0; hh--) { count += hist[hh]; if (count > cutoff_high) break; } Image->autoscale_min[k] = (amax-amin) / num_bins * ll + amin; Image->autoscale_max[k] = (amax-amin) / num_bins * hh + amin; fitscut_message (3, "\t\tautoscale min: %f max: %f ll: %d hh: %d\n", Image->autoscale_min[k], Image->autoscale_max[k], ll, hh); free (hist); } void autoscale_image (FitsCutImage *Image) { int k; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; autoscale_channel (Image, k); } Image->autoscale_performed = TRUE; } void histeq_image (FitsCutImage *Image) { float *hist; unsigned char *lut; unsigned char temp; float *linep; long y, x, ind; float *src, *dest; float binsize; int num_bins = NBINS; int k; long nrows, ncols; double dmin, dmax; float *arrayp; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; dmin = Image->data_min[k]; dmax = Image->data_max[k]; nrows = Image->nrows[k]; ncols = Image->ncols[k]; fitscut_message (1, "Scaling channel %d (histeq)\n", k); /* This code is based on GIMP equalize */ hist = compute_histogram (arrayp, num_bins, dmin, dmax, nrows, ncols); binsize = (dmax - dmin) / (num_bins - 1); /* Build equalization LUT */ lut = eq_histogram (hist, num_bins, ncols, nrows); /* Substitute */ linep = arrayp; for (y = 0; y < nrows; y++) { src = linep; dest = linep; for (x = 0; x < ncols; x++) { ind = ceil (((*src) - dmin) / binsize); temp = lut[ind]; *dest = temp; src++; dest++; } linep += ncols; } free (hist); free (lut); /* reset the data min/max values */ Image->data_min[k] = 0; Image->data_max[k] = 255; } } double compute_hist_mode (FitsCutImage *Image, int k) { float *hist; float *arrayp; int num_bins = NBINS; double amin, amax; int i, max_bin = 0; float depth; if (Image->data[k] == NULL) return 0.0; arrayp = Image->data[k]; amin = Image->data_min[k]; amax = Image->data_max[k]; /* get histogram */ hist = compute_histogram (arrayp, num_bins, amin, amax, Image->nrows[k], Image->ncols[k]); for (i = 0, depth = 0; i < num_bins; i++) { if (hist[i] > depth) { depth = hist[i]; max_bin = i; } } return (amax - amin) / num_bins * max_bin + amin; } void log_image (FitsCutImage *Image) { long i; float t; float threshold; float user_threshold; double maxval, minval; double user_maxval, user_minval; double linear_shift; int k; float *arrayp; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; maxval = Image->data_max[k]; minval = Image->data_min[k]; user_maxval = (Image->user_max_set == 1) ? Image->user_max[k] : maxval; user_minval = (Image->user_min_set == 1) ? Image->user_min[k] : minval; threshold = (float) maxval / 10000.0; user_threshold = (float) user_maxval / 10000.0; fitscut_message (1, "Scaling channel %d (log) min: %f max: %f\n", k, minval, maxval); linear_shift = -1 * minval + 1; for (i=0; i < Image->nrows[k] * Image->ncols[k]; i++) { /* MAX is a macro we have to be careful */ /* shift the data value to be greater than unity */ t = arrayp[i] + linear_shift; /*arrayp[i] = log10( MAX(threshold,t) );*/ arrayp[i] = log10 (t); } Image->data_max[k] = log10 (maxval + linear_shift); Image->data_min[k] = 0; /* log10(1) */ Image->user_max[k] = log10 (user_maxval + linear_shift); Image->user_min[k] = log10 (user_minval + linear_shift); } } void sqrt_image (FitsCutImage *Image) { long i; float t,tm; float threshold; double maxval, minval; double user_maxval, user_minval; int k; float *arrayp; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; maxval = Image->data_max[k]; minval = Image->data_min[k]; user_maxval = (Image->user_max_set == 1) ? Image->user_max[k] : maxval; user_minval = (Image->user_min_set == 1) ? Image->user_min[k] : minval; threshold = 0.0; fitscut_message (1, "Scaling channel %d (sqrt) min: %f max: %f\n", k, minval, maxval); for (i = 0; i < Image->nrows[k] * Image->ncols[k]; i++) { /* MAX is a macro we have to be careful */ t = arrayp[i] - user_minval; arrayp[i] = sqrt (MAX (0,t) ); } tm = maxval; Image->data_max[k] = sqrt (tm - user_minval); Image->data_min[k] = 0.0; Image->user_max[k] = sqrt (user_maxval - user_minval); Image->user_min[k] = 0.0; } } void asinh_image (FitsCutImage *Image) { long i; float t; double minval; double user_maxval, user_minval; int k; float *arrayp; float nonlinearity = 3.0; double weight; double *vals; double sum, maxval, maxval_scaled; vals = (double *) calloc (Image->channels, sizeof (double)); if (!Image->autoscale_performed && !(Image->user_max_set && Image->user_min_set)) autoscale_image (Image); fitscut_message (1, "Scaling image (asinh)...\n"); for (i = 0; i < Image->nrows[0] * Image->ncols[0]; i++) { maxval = 0.0; sum = 0.0; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; minval = 0.0; user_maxval = (Image->user_max_set) ? Image->user_max[k] : Image->autoscale_max[k]; user_minval = (Image->user_min_set) ? Image->user_min[k] : Image->autoscale_min[k]; arrayp = Image->data[k]; t = (arrayp[i] - minval) / (user_maxval - user_minval); vals[k] = t; sum += t; if (t > maxval) maxval = t; } weight = asinh (sum * nonlinearity) / (nonlinearity * sum); for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; arrayp[i] = vals[k] * weight; maxval_scaled = maxval * weight; if (maxval_scaled > 1) arrayp[i] /= maxval_scaled; } } for (k = 0; k < Image->channels; k++) { /* FIXME: these are bogus */ Image->data_max[k] = 1.0; Image->data_min[k] = 0; /*Image->autoscale_min[k];*/ Image->user_max[k] = 1.0; Image->user_min[k] = 0; /*Image->autoscale_min[k];*/ } free (vals); } void scan_min_max (FitsCutImage *Image) { long i; float fmaxval = FLT_MAX; float val; int k; double dmin, dmax; float *arrayp; fitscut_message (2, "Scanning file for scaling parameters...\n"); for (k = 0; k < Image->channels; k++) { dmax = -fmaxval; dmin = fmaxval; if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; fitscut_message (2, "Scanning channel %d...", k); for (i = 0; i < Image->nrows[k] * Image->ncols[k]; i++) { val = arrayp[i]; if (val > dmax) dmax = val; if (val < dmin) dmin = val; } Image->data_min[k] = dmin; Image->data_max[k] = dmax; fitscut_message (2, " min: %f max: %f\n", Image->data_min[k], Image->data_max[k]); } } void mult_image (FitsCutImage *Image) { long i; double user_scale_value; double maxval, minval; double user_maxval, user_minval; int k; float *arrayp; float max_max,min_min,max_usermax,min_usermin; max_max = -FLT_MAX; min_min = FLT_MAX; max_usermax = -FLT_MAX; min_usermin = FLT_MAX; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; arrayp = Image->data[k]; maxval = Image->data_max[k]; minval = Image->data_min[k]; user_scale_value = Image->user_scale_factor[k]; user_maxval = (Image->user_max_set == 1) ? Image->user_max[k] : maxval; user_minval = (Image->user_min_set == 1) ? Image->user_min[k] : minval; fitscut_message (1, "\tscaling channel %d by factor %f, min: %f max: %f\n", k, user_scale_value, minval, maxval); for (i=0; i < Image->nrows[k] * Image->ncols[k]; i++) { /* MAX is a macro we have to be careful */ arrayp[i] *= user_scale_value; } Image->data_max[k] = maxval * user_scale_value; Image->data_min[k] = minval * user_scale_value; Image->user_max[k] = user_maxval * user_scale_value; Image->user_min[k] = user_minval * user_scale_value; /* keep track of the overall maximum and minimum */ max_max = MAX (max_max, Image->data_max[k]); min_min = MIN (min_min, Image->data_min[k]); max_usermax = MAX (max_usermax, Image->user_max[k]); min_usermin = MIN (min_usermin, Image->user_min[k]); } /* apply the outer boundary of the min/max pairs to each channel * so that we don't take out the scaling when we scale to a byte */ fitscut_message (1, "using data min: %f max: %f\n", min_min, max_max); fitscut_message (1, "using user min: %f max: %f\n", min_usermin, max_usermax); for (k = 0; k < Image->channels; k++) { Image->data_max[k] = max_max; Image->data_min[k] = min_min; Image->user_max[k] = max_usermax; Image->user_min[k] = min_usermin; } } void rate_image (FitsCutImage *Image) { int k; double exptime; double factor = 1.0; for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; /* get the exposure time and populate the user_scale_factor field */ exptime = fits_get_exposure_time (Image->header[k], Image->header_cards[0]); if (exptime > 0) { factor = 1.0 / exptime; Image->user_scale_factor[k] = factor; } else { fitscut_message (1, "Warning: EXPTIME not found, using 1.0\n"); Image->user_scale_factor[k] = 1.0; } } mult_image (Image); } fitscut-1.4.4/NEWS0000644000133100002000000000144210521741301010574 00000000000000fitscut 1.4.4 ============= * Fix for libpng ABI change fitscut 1.4.3 ============= * Work-around a GCC compiler bug. fitscut 1.4.2 ============= * Fix error checking of input files. * Allow specifying symbolic links as input files. fitscut 1.4.1 ============= This version only includes changes to the packaging and build system. * include .spec file for generating RPMSs * look for fitsio.h with cfitsio prefix and without. fitscut 1.4.0 ============= This is the first version to be released with a GPL license. New features include: * asinh scaling * autoscale-{min,max} options * ability to explicitly request linear scaling * GPL license * Improved --help text * Improved verbose messages fitscut-1.4.4/tailor.h0000644000133100002000000001545107371630236011562 00000000000000/* tailor.h -- target dependent definitions */ /* $Id: tailor.h,v 1.1 2001/11/06 00:36:46 mccannwj Exp $ */ #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif #if defined(__OS2__) && !defined(OS2) # define OS2 #endif #if defined(OS2) && defined(MSDOS) /* MS C under OS/2 */ # undef MSDOS #endif #ifdef MSDOS # ifdef __GNUC__ /* DJGPP version 1.09+ on MS-DOS. * The DJGPP 1.09 stat() function must be upgraded before gzip will * fully work. * No need for DIRENT, since defines POSIX_SOURCE which * implies DIRENT. */ # define near # else # define MAXSEG_64K # ifdef __TURBOC__ # define NO_OFF_T # ifdef __BORLANDC__ # define DIRENT # else # define NO_UTIME # endif # else /* MSC */ # define HAVE_SYS_UTIME_H # define NO_UTIME_H # endif # endif # define PATH_SEP2 '\\' # define PATH_SEP3 ':' # define MAX_PATH_LEN 128 # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define FITS_SUFFIX "fit" # define NO_CHOWN # define PROTO # define STDC_HEADERS # define NO_SIZE_CHECK # define casemap(c) tolow(c) /* Force file names to lower case */ # include # define OS_CODE 0x00 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) #else # define near #endif #ifdef OS2 # define PATH_SEP2 '\\' # define PATH_SEP3 ':' # define MAX_PATH_LEN 260 # ifdef OS2FAT # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define FITS_SUFFIX "fit" # define casemap(c) tolow(c) # endif # define NO_CHOWN # define PROTO # define STDC_HEADERS # include # define OS_CODE 0x06 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) # ifdef _MSC_VER # define HAVE_SYS_UTIME_H # define NO_UTIME_H # define MAXSEG_64K # undef near # define near _near # endif # ifdef __EMX__ # define HAVE_SYS_UTIME_H # define NO_UTIME_H # define DIRENT # define EXPAND(argc,argv) \ {_response(&argc, &argv); _wildcard(&argc, &argv);} # endif # ifdef __BORLANDC__ # define DIRENT # endif # ifdef __ZTC__ # define NO_DIR # define NO_UTIME_H # include # define EXPAND(argc,argv) \ {response_expand(&argc, &argv);} # endif #endif #ifdef WIN32 /* Windows NT */ # define HAVE_SYS_UTIME_H # define NO_UTIME_H # define PATH_SEP2 '\\' # define PATH_SEP3 ':' # define MAX_PATH_LEN 260 # define NO_CHOWN # define PROTO # define STDC_HEADERS # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) # include # include # ifdef NTFAT # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define FITS_SUFFIX "fit" # define casemap(c) tolow(c) /* Force file names to lower case */ # endif # define OS_CODE 0x0b #endif #ifdef MSDOS # ifdef __TURBOC__ # include # define DYN_ALLOC /* Turbo C 2.0 does not accept static allocations of large arrays */ void * fcalloc (unsigned items, unsigned size); void fcfree (void *ptr); # else /* MSC */ # include # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize)) # define fcfree(ptr) hfree(ptr) # endif #else # ifdef MAXSEG_64K # define fcalloc(items,size) calloc((items),(size)) # else # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size)) # endif # define fcfree(ptr) free(ptr) #endif #if defined(VAXC) || defined(VMS) # define PATH_SEP ']' # define PATH_SEP2 ':' # define SUFFIX_SEP ';' # define NO_MULTIPLE_DOTS # define FITS_SUFFIX "-fits" # define RECORD_IO 1 # define casemap(c) tolow(c) # define OS_CODE 0x02 # define STDC_HEADERS # define NO_UTIME # define EXPAND(argc,argv) vms_expand_args(&argc,&argv); # include # define unlink delete # ifdef VAXC # define NO_FCNTL_H # include # endif #endif #ifdef AMIGA # define PATH_SEP2 ':' # define STDC_HEADERS # define OS_CODE 0x01 # ifdef __GNUC__ # define DIRENT # define HAVE_UNISTD_H # else /* SASC */ # define NO_STDIN_FSTAT # define SYSDIR # define NO_SYMLINK # define NO_CHOWN # define NO_FCNTL_H # include /* for read() and write() */ # define direct dirent extern void _expand_args(int *argc, char ***argv); # define EXPAND(argc,argv) _expand_args(&argc,&argv); # undef O_BINARY /* disable useless --ascii option */ # endif #endif #if defined(ATARI) || defined(atarist) # ifndef STDC_HEADERS # define STDC_HEADERS # define HAVE_UNISTD_H # define DIRENT # endif # define OS_CODE 0x05 # ifdef TOSFS # define PATH_SEP2 '\\' # define PATH_SEP3 ':' # define MAX_PATH_LEN 128 # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define FITS_SUFFIX "fit" # define NO_CHOWN # define casemap(c) tolow(c) /* Force file names to lower case */ # define NO_SYMLINK # endif #endif #ifdef MACOS # define PATH_SEP ':' # define DYN_ALLOC # define PROTO # define NO_STDIN_FSTAT # define NO_CHOWN # define NO_UTIME # define chmod(file, mode) (0) # define OPEN(name, flags, mode) open(name, flags) # define OS_CODE 0x07 # ifdef MPW # define isatty(fd) ((fd) <= 2) # endif #endif #ifdef __50SERIES /* Prime/PRIMOS */ # define PATH_SEP '>' # define STDC_HEADERS # define NO_MEMORY_H # define NO_UTIME_H # define NO_UTIME # define NO_CHOWN # define NO_STDIN_FSTAT # define NO_SIZE_CHECK # define NO_SYMLINK # define RECORD_IO 1 # define casemap(c) tolow(c) /* Force file names to lower case */ # define put_char(c) put_byte((c) & 0x7F) # define get_char(c) ascii2pascii(get_byte()) # define OS_CODE 0x0F /* temporary, subject to change */ # ifdef SIGTERM # undef SIGTERM /* We don't want a signal handler for SIGTERM */ # endif #endif #if defined(pyr) && !defined(NOMEMCPY) /* Pyramid */ # define NOMEMCPY /* problem with overlapping copies */ #endif #ifdef TOPS20 # define OS_CODE 0x0a #endif #ifndef unix # define NO_ST_INO /* don't rely on inode numbers */ #endif /* Common defaults */ #ifndef OS_CODE # define OS_CODE 0x03 /* assume Unix */ #endif #ifndef PATH_SEP # define PATH_SEP '/' #endif #ifndef casemap # define casemap(c) (c) #endif #ifndef FITS_SUFFIX # define FITS_SUFFIX ".fits" #endif #ifdef MAX_EXT_CHARS # define MAX_SUFFIX MAX_EXT_CHARS #else # define MAX_SUFFIX 30 #endif #ifndef MAKE_LEGAL_NAME # ifdef NO_MULTIPLE_DOTS # define MAKE_LEGAL_NAME(name) make_simple_name(name) # else # define MAKE_LEGAL_NAME(name) # endif #endif #ifndef MIN_PART # define MIN_PART 3 /* keep at least MIN_PART chars between dots in a file name. */ #endif #ifndef EXPAND # define EXPAND(argc,argv) #endif #ifndef RECORD_IO # define RECORD_IO 0 #endif #ifndef SET_BINARY_MODE # define SET_BINARY_MODE(fd) #endif #ifndef OPEN # define OPEN(name, flags, mode) open(name, flags, mode) #endif #ifndef get_char # define get_char() get_byte() #endif #ifndef put_char # define put_char(c) put_byte(c) #endif fitscut-1.4.4/extract.h0000644000133100002000000000176210044300046011722 00000000000000/* declarations for extract.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: extract.h,v 1.6 2004/04/29 22:22:30 mccannwj Exp $ */ void extract_fits (FitsCutImage *); void printerror (int); double fits_get_exposure_time (char *, int); float *cutout_alloc (unsigned int, unsigned int, unsigned int); fitscut-1.4.4/resize.c0000644000133100002000000002115010420724611011543 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Image resizing functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: resize.c,v 1.10 2006/04/17 14:43:21 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #ifdef HAVE_STRING_H #include #else #include #endif #ifdef HAVE_CFITSIO_FITSIO_H #include #else #include #endif #include "fitscut.h" #include "resize.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif void resize_image_channel (FitsCutImage *srcImagePtr, int k, int width, int height) { FitsCutImage destImage; float xfactor, yfactor; xfactor = width / srcImagePtr->ncols[k]; yfactor = height / srcImagePtr->nrows[k]; destImage.ncols[k] = width; destImage.nrows[k] = height; destImage.x0[k] = srcImagePtr->x0[k] * xfactor; destImage.y0[k] = srcImagePtr->y0[k] * yfactor; destImage.data[k] = (float *) malloc (width * height * sizeof (float)); if (xfactor > 1) { resize_image_sample_enlarge (srcImagePtr, &destImage, k); } else { resize_image_sample_reduce (srcImagePtr, &destImage, k); } free (srcImagePtr->data[k]); srcImagePtr->data[k] = destImage.data[k]; destImage.data[k] = NULL; srcImagePtr->ncols[k] = width; srcImagePtr->nrows[k] = height; srcImagePtr->x0[k] = destImage.x0[k]; srcImagePtr->y0[k] = destImage.y0[k]; } void resize_image_sample_reduce (FitsCutImage *srcImagePtr, FitsCutImage *destImagePtr, int k) { int *x_dest_offsets; int *y_dest_offsets; int *line_weights; float *src; float *dest; double tmpval; int width, height, orig_width, orig_height; int last_dest_y; int row_bytes; int x, y; char bytes; orig_width = srcImagePtr->ncols[k]; orig_height = srcImagePtr->nrows[k]; width = destImagePtr->ncols[k]; height = destImagePtr->nrows[k]; fitscut_message (2, "\tresizing channel to x=%d y=%d from x=%d y=%d\n", width, height, orig_width, orig_height); bytes = sizeof (float); /* the data pointers... */ x_dest_offsets = (int *) malloc (orig_width * sizeof (int)); y_dest_offsets = (int *) malloc (orig_height * sizeof (int)); src = (float *) calloc (orig_width * bytes, 1); dest = (float *) calloc (width * bytes, 1); line_weights = (int *) calloc (width * sizeof (int), 1); /* pre-calc the scale tables */ for (x = 0; x < orig_width; x++) { double fl; tmpval = (x * width) / (float)orig_width; fl = floor (tmpval); x_dest_offsets [x] = (int)fl; } for (y = 0; y < orig_height; y++) { double fl; tmpval = (y * height) / (float)orig_height; fl = floor (tmpval); y_dest_offsets [y] = (int)fl; } /* do the scaling */ last_dest_y = 0; row_bytes = orig_width; for (y = 0; y < orig_height; y++) { if (last_dest_y != y_dest_offsets[y]) { /* only write row when y changes lines reached */ for (x = 0; x < width ; x++) { dest[x] /= (float)line_weights[x]; } image_set_row (destImagePtr, k, 0, last_dest_y, width, dest); memset (dest, 0, width * bytes); memset (line_weights, 0, width * bytes); } image_get_row (srcImagePtr, k, 0, y, orig_width, src, 1); for (x = 0; x < row_bytes ; x++) { dest[x_dest_offsets[x]] += src[x]; line_weights[x_dest_offsets[x]]++; } last_dest_y = y_dest_offsets[y]; } /* only write row when y changes lines reached */ for (x = 0; x < width ; x++) dest[x] /= (float)line_weights[x]; image_set_row (destImagePtr, k, 0, last_dest_y, width, dest); free (x_dest_offsets); free (y_dest_offsets); free (src); free (dest); } void resize_image_sample_enlarge (FitsCutImage *srcImagePtr, FitsCutImage *destImagePtr, int k) { int *x_src_offsets; int *y_src_offsets; float *src; float *dest; int width, height, orig_width, orig_height; int last_src_y; int row_bytes; int x, y; char bytes; orig_width = srcImagePtr->ncols[k]; orig_height = srcImagePtr->nrows[k]; width = destImagePtr->ncols[k]; height = destImagePtr->nrows[k]; fitscut_message (2, "\tresizing channel to x=%d y=%d from x=%d y=%d\n", width, height, orig_width, orig_height); bytes = sizeof (float); /* the data pointers... */ x_src_offsets = (int *) malloc (width * bytes); y_src_offsets = (int *) malloc (height * bytes); src = (float *) calloc (orig_width * bytes, 1); dest = (float *) calloc (width * bytes, 1); /* pre-calc the scale tables */ for (x = 0; x < width; x++) x_src_offsets [x] = (x * orig_width + orig_width / 2) / width; for (y = 0; y < height; y++) y_src_offsets [y] = (y * orig_height + orig_height / 2) / height; /* do the scaling */ row_bytes = width; last_src_y = -1; for (y = 0; y < height; y++) { /* if the source of this line was the same as the source * of the last line, there's no point in re-rescaling. */ if (y_src_offsets[y] != last_src_y) { image_get_row (srcImagePtr, k, 0, y_src_offsets[y], orig_width, src, 1); for (x = 0; x < row_bytes ; x++) dest[x] = src[x_src_offsets[x]]; last_src_y = y_src_offsets[y]; } image_set_row (destImagePtr, k, 0, y, width, dest); } free (x_src_offsets); free (y_src_offsets); free (src); free (dest); } void image_get_row (FitsCutImage *PR, int k, int x, int y, int w, float *data, int subsample) { float *linep; float *row; int end; int npixels; int bytespp; end = x + w; npixels = w; bytespp = sizeof (float); row = PR->data[k] + y * PR->ncols[k]; while (x < end) { if (subsample == 1) { /* optimize for the common case */ linep = row + x; memcpy (data, linep, bytespp * npixels); data += npixels; x += npixels; } } } void image_set_row (FitsCutImage *PR, int k, int x, int y, int w, float *data) { float *linep; float *row; int end; int npixels; int bytespp; end = x + w; npixels = w; bytespp = sizeof (float); row = PR->data[k] + y * PR->ncols[k]; while (x < end) { linep = row + x; memcpy (linep, data, bytespp * npixels); data += npixels; x += npixels; } } fitscut-1.4.4/fitscut.spec0000644000133100002000000000132310521741730012436 00000000000000Summary: A tool for making cutouts and color images from FITS files Name: fitscut Version: 1.4.4 Release: 1 License: GPL Group: Applications/Multimedia Source: fitscut-%{version}.tar.gz Buildroot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: libjpeg-devel, libpng-devel, cfitsio-devel %description %prep %setup -q %build %configure make \ CC=%{__cc} \ CFLAGS="$RPM_OPT_FLAGS" %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT make mkdir -p $RPM_BUILD_ROOT%{_bindir} %makeinstall %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/* %changelog * Tue May 11 2004 William Jon McCann - Initial version fitscut-1.4.4/configure0000744000133100002000000075050110521741724012022 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="fitscut.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S CPP EGREP HAVE_CFITSIO_FITSIO_H_TRUE HAVE_CFITSIO_FITSIO_H_FALSE HAVE_FITSIO_H_TRUE HAVE_FITSIO_H_FALSE HAVE_LIBWCS_TRUE HAVE_LIBWCS_FALSE WCS_LIBS WARN_CFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-compile-warnings=no/minimum/yes/maximum/error Turn on compiler warnings. --enable-iso-c Try to warn if code is not ISO C 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 CPPFLAGS C/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. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=fitscut VERSION=1.4.4 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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 -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _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 #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h sys/time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in png.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: png.h is required to build fitscut" >&5 echo "$as_me: error: png.h is required to build fitscut" >&2;} { (exit 1); exit 1; }; } fi done for ac_header in jpeglib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: jpeglib.h is required to build fitscut" >&5 echo "$as_me: error: jpeglib.h is required to build fitscut" >&2;} { (exit 1); exit 1; }; } fi done for ac_header in cfitsio/fitsio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_cfitsio_fitsio_h=yes else have_cfitsio_fitsio_h=no fi done for ac_header in fitsio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_fitsio_h=yes else have_fitsio_h=no fi done if test "x$have_cfitsio_fitsio_h" = "xyes"; then HAVE_CFITSIO_FITSIO_H_TRUE= HAVE_CFITSIO_FITSIO_H_FALSE='#' else HAVE_CFITSIO_FITSIO_H_TRUE='#' HAVE_CFITSIO_FITSIO_H_FALSE= fi if test "x$have_cfitsio_fitsio_h" = "xyes"; then HAVE_FITSIO_H_TRUE= HAVE_FITSIO_H_FALSE='#' else HAVE_FITSIO_H_TRUE='#' HAVE_FITSIO_H_FALSE= fi if test "x$have_cfitsio_fitsio_h" != "xyes" -a "x$have_fitsio_h" != "xyes"; then { { echo "$as_me:$LINENO: error: fitsio.h is required to build fitscut" >&5 echo "$as_me: error: fitsio.h is required to build fitscut" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for sin in -lm" >&5 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sin (); int main () { sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sin=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 echo "${ECHO_T}$ac_cv_lib_m_sin" >&6 if test $ac_cv_lib_m_sin = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi echo "$as_me:$LINENO: checking for main in -lnsl" >&5 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6 if test $ac_cv_lib_nsl_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi echo "$as_me:$LINENO: checking for png_read_info in -lpng" >&5 echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6 if test "${ac_cv_lib_png_png_read_info+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpng $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char png_read_info (); int main () { png_read_info (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_png_png_read_info=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_png_png_read_info=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_info" >&5 echo "${ECHO_T}$ac_cv_lib_png_png_read_info" >&6 if test $ac_cv_lib_png_png_read_info = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPNG 1 _ACEOF LIBS="-lpng $LIBS" fi echo "$as_me:$LINENO: checking for jpeg_destroy_decompress in -ljpeg" >&5 echo $ECHO_N "checking for jpeg_destroy_decompress in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_destroy_decompress+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_destroy_decompress (); int main () { jpeg_destroy_decompress (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_destroy_decompress=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_destroy_decompress=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6 if test $ac_cv_lib_jpeg_jpeg_destroy_decompress = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJPEG 1 _ACEOF LIBS="-ljpeg $LIBS" fi echo "$as_me:$LINENO: checking for ffvers in -lcfitsio" >&5 echo $ECHO_N "checking for ffvers in -lcfitsio... $ECHO_C" >&6 if test "${ac_cv_lib_cfitsio_ffvers+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfitsio $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ffvers (); int main () { ffvers (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cfitsio_ffvers=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cfitsio_ffvers=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cfitsio_ffvers" >&5 echo "${ECHO_T}$ac_cv_lib_cfitsio_ffvers" >&6 if test $ac_cv_lib_cfitsio_ffvers = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCFITSIO 1 _ACEOF LIBS="-lcfitsio $LIBS" fi echo "$as_me:$LINENO: checking for wcsinit in -lwcs" >&5 echo $ECHO_N "checking for wcsinit in -lwcs... $ECHO_C" >&6 if test "${ac_cv_lib_wcs_wcsinit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwcs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char wcsinit (); int main () { wcsinit (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_wcs_wcsinit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_wcs_wcsinit=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_wcs_wcsinit" >&5 echo "${ECHO_T}$ac_cv_lib_wcs_wcsinit" >&6 if test $ac_cv_lib_wcs_wcsinit = yes; then have_libwcs=yes else have_libwcs=no fi if test "x$have_libwcs" = "xyes"; then HAVE_LIBWCS_TRUE= HAVE_LIBWCS_FALSE='#' else HAVE_LIBWCS_TRUE='#' HAVE_LIBWCS_FALSE= fi if test "x$have_libwcs" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBWCS 1 _ACEOF WCS_LIBS="-lwcs" fi if test -z "yes" ; then default_compile_warnings=yes else default_compile_warnings="yes" fi # Check whether --enable-compile-warnings or --disable-compile-warnings was given. if test "${enable_compile_warnings+set}" = set; then enableval="$enable_compile_warnings" else enable_compile_warnings="$default_compile_warnings" fi; warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" echo "$as_me:$LINENO: checking whether gcc understands $option" >&5 echo $ECHO_N "checking whether gcc understands $option... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then has_option=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 has_option=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $has_option" >&5 echo "${ECHO_T}$has_option" >&6 if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) { { echo "$as_me:$LINENO: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&5 echo "$as_me: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&2;} { (exit 1); exit 1; }; } ;; esac CFLAGS="$realsave_CFLAGS" echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $warning_flags" >&5 echo "${ECHO_T}$warning_flags" >&6 # Check whether --enable-iso-c or --disable-iso-c was given. if test "${enable_iso_c+set}" = set; then enableval="$enable_iso_c" else enable_iso_c=no fi; echo "$as_me:$LINENO: checking what language compliance flags to pass to the C compiler" >&5 echo $ECHO_N "checking what language compliance flags to pass to the C compiler... $ECHO_C" >&6 complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ \ -ansi\ \ *) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *\ \ -pedantic\ \ *) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi echo "$as_me:$LINENO: result: $complCFLAGS" >&5 echo "${ECHO_T}$complCFLAGS" >&6 WARN_CFLAGS="$warning_flags $complCFLAGS" CFLAGS="$CFLAGS $WARN_CFLAGS" echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CFITSIO_FITSIO_H_TRUE}" && test -z "${HAVE_CFITSIO_FITSIO_H_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_CFITSIO_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_CFITSIO_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_FITSIO_H_TRUE}" && test -z "${HAVE_FITSIO_H_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBWCS_TRUE}" && test -z "${HAVE_LIBWCS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBWCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LIBWCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@LN_S@,$LN_S,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@HAVE_CFITSIO_FITSIO_H_TRUE@,$HAVE_CFITSIO_FITSIO_H_TRUE,;t t s,@HAVE_CFITSIO_FITSIO_H_FALSE@,$HAVE_CFITSIO_FITSIO_H_FALSE,;t t s,@HAVE_FITSIO_H_TRUE@,$HAVE_FITSIO_H_TRUE,;t t s,@HAVE_FITSIO_H_FALSE@,$HAVE_FITSIO_H_FALSE,;t t s,@HAVE_LIBWCS_TRUE@,$HAVE_LIBWCS_TRUE,;t t s,@HAVE_LIBWCS_FALSE@,$HAVE_LIBWCS_FALSE,;t t s,@WCS_LIBS@,$WCS_LIBS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi ac_config_files="$ac_config_files fitscut.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CFITSIO_FITSIO_H_TRUE}" && test -z "${HAVE_CFITSIO_FITSIO_H_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_CFITSIO_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_CFITSIO_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_FITSIO_H_TRUE}" && test -z "${HAVE_FITSIO_H_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_FITSIO_H\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBWCS_TRUE}" && test -z "${HAVE_LIBWCS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBWCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LIBWCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fitscut.spec" ) CONFIG_FILES="$CONFIG_FILES fitscut.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@LN_S@,$LN_S,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@HAVE_CFITSIO_FITSIO_H_TRUE@,$HAVE_CFITSIO_FITSIO_H_TRUE,;t t s,@HAVE_CFITSIO_FITSIO_H_FALSE@,$HAVE_CFITSIO_FITSIO_H_FALSE,;t t s,@HAVE_FITSIO_H_TRUE@,$HAVE_FITSIO_H_TRUE,;t t s,@HAVE_FITSIO_H_FALSE@,$HAVE_FITSIO_H_FALSE,;t t s,@HAVE_LIBWCS_TRUE@,$HAVE_LIBWCS_TRUE,;t t s,@HAVE_LIBWCS_FALSE@,$HAVE_LIBWCS_FALSE,;t t s,@WCS_LIBS@,$WCS_LIBS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi fitscut-1.4.4/image_scale.h0000644000133100002000000000237410044515274012514 00000000000000/* declarations for image_scale.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: image_scale.h,v 1.9 2004/04/30 18:28:12 mccannwj Exp $ */ void autoscale_channel (FitsCutImage *, int); void autoscale_image (FitsCutImage *); void histeq_image (FitsCutImage *); void log_image (FitsCutImage *); void sqrt_image (FitsCutImage *); void asinh_image (FitsCutImage *); void scan_min_max (FitsCutImage *); void mult_image (FitsCutImage *); void rate_image (FitsCutImage *); double compute_hist_mode (FitsCutImage *Image, int k); fitscut-1.4.4/resize.h0000644000133100002000000000223510041552726011560 00000000000000/* declarations for resize.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: resize.h,v 1.3 2004/04/21 20:13:10 mccannwj Exp $ */ void resize_image_channel (FitsCutImage *, int, int, int); void resize_image_sample_enlarge (FitsCutImage *, FitsCutImage *, int); void resize_image_sample_reduce (FitsCutImage *, FitsCutImage *, int); void image_get_row (FitsCutImage *, int, int, int, int, float*, int); void image_set_row (FitsCutImage *, int, int, int, int, float*); fitscut-1.4.4/fitscut.h0000644000133100002000000001145510044300046011731 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * fitscut.h -- declarations for fitscut * Copyright (C) 1999 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: fitscut.h,v 1.26 2004/04/29 22:22:30 mccannwj Exp $ */ #include #if defined(__STDC__) || defined(PROTO) # define OF(args) args #else # define OF(args) () #endif #ifndef RETSIGTYPE # define RETSIGTYPE void #endif #define strequ(s1, s2) (strcmp((s1),(s2)) == 0) typedef RETSIGTYPE (*sig_type) OF((int)); #ifndef SET_BINARY_MODE # define SET_BINARY_MODE(fd) #endif #ifndef O_BINARY # define O_BINARY 0 /* creation mode for open() */ #endif #if !defined(S_ISDIR) && defined(S_IFDIR) # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if !defined(S_ISREG) && defined(S_IFREG) # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #ifndef MAX_PATH_LEN # define MAX_PATH_LEN 1024 /* max pathname length */ #endif /* Separator for file name parts (see shorten_name()) */ #ifdef NO_MULTIPLE_DOTS # define PART_SEP "-" #else # define PART_SEP "." #endif #define BYTE unsigned char #define WORD unsigned short int #define LWORD unsigned long #define SPACE 32 #define DEL 127 #define ICSIZE 100 #ifndef TRUE #define TRUE (1==1) #endif /* TRUE */ #ifndef FALSE #define FALSE !(TRUE) #endif /* FALSE */ /* Return codes */ #define OK 0 #define ERROR 1 #define WARNING 2 #define tolow(c) (isupper(c) ? (c)-'A'+'a' : (c)) /* force to lower case */ #define WARN(msg) {if (!quiet) fprintf msg ; \ if (exit_code == OK) exit_code = WARNING;} #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) typedef enum { OUTPUT_FITS = 0, OUTPUT_PNG, OUTPUT_JPG } FitscutOutputFormat; typedef enum { SCALE_LINEAR = 0, SCALE_LOG, SCALE_SQRT, SCALE_HISTEQ, SCALE_FACTOR, SCALE_RATE, SCALE_ASINH } FitscutScaleType; typedef enum { SCALE_MODE_MINMAX = 0, SCALE_MODE_AUTO, SCALE_MODE_USER } FitscutScaleMode; typedef enum { CMAP_GRAY = 0, CMAP_HEAT, CMAP_COOL, CMAP_RAINBOW, CMAP_RED, CMAP_GREEN, CMAP_BLUE } FitscutColormapType; typedef enum { ALIGN_NONE = 0, ALIGN_FIRST, ALIGN_NORTH, ALIGN_USER_WCS } FitscutAlignType; RETSIGTYPE abort_fitscut (void); void do_exit (int); void fitscut_error (char *); void fitscut_message (int level, const char *format, ...); #define NBINS 10000 extern int foreground; /* set if program run in foreground */ extern int force; /* don't ask questions, overwrite (-f) */ extern int to_stdout; /* output to stdout (-c) */ extern int verbose; /* be verbose (-v) */ extern int quiet; /* be very quiet (-q) */ extern int exit_code; /* program exit code */ #define MAX_CHANNELS 3 #define MAGIC_SIZE_ALL_NUMBER 999999 typedef struct fitscut_image { int output_type; int output_scale; int output_colormap; int output_scale_mode; int output_alignment; int output_compass; int output_invert; float output_zoom; char *input_filename[MAX_CHANNELS]; int input_datatype[MAX_CHANNELS]; char *output_filename; int channels; long x0[MAX_CHANNELS], y0[MAX_CHANNELS], xc[MAX_CHANNELS], yc[MAX_CHANNELS]; long ncols[MAX_CHANNELS], nrows[MAX_CHANNELS]; double user_min[MAX_CHANNELS]; int user_min_set; double user_max[MAX_CHANNELS]; int user_max_set; double user_scale_factor[MAX_CHANNELS]; int user_scale_factor_set; double autoscale_percent_low[MAX_CHANNELS]; double autoscale_percent_high[MAX_CHANNELS]; double autoscale_min[MAX_CHANNELS], autoscale_max[MAX_CHANNELS]; int autoscale_performed; double data_min[MAX_CHANNELS], data_max[MAX_CHANNELS]; float *histogram[MAX_CHANNELS]; float *data[MAX_CHANNELS]; char *header[MAX_CHANNELS]; int header_cards[MAX_CHANNELS]; #ifdef HAVE_LIBWCS struct WorldCoor *wcs[MAX_CHANNELS]; #endif } FitsCutImage; fitscut-1.4.4/histogram.c0000644000133100002000000001023110044515274012242 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Histogram functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: histogram.c,v 1.7 2004/04/30 18:28:12 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #include "fitscut.h" #include "histogram.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif float * compute_histogram (float *arrayp, int length, float dmin, float dmax, long nrows, long ncols) { float *hist; float binsize; float *src; long y, x, ind; float value; /* allocate histogram */ hist = (float*) malloc (sizeof (float) * (length + 1)); /* Initialize histogram */ for (x = 0; x < length; x++) hist[x] = 0; /* Build histogram */ fitscut_message (3, "\tbuilding histogram...\n"); binsize = (dmax - dmin) / (length - 1.0); fitscut_message (4, "\tdmax: %f dmin: %f length: %d binsize: %f ncols: %ld nrows: %ld...\n", dmax, dmin, length, binsize, ncols, nrows); for (y = 0; y < nrows; y++) { for (x = 0; x < ncols; x++) { src = arrayp + y*ncols + x; value = *src; if (value < dmin) ind = 0; else if (value > dmax) ind = length-1; else ind = ceil ((value-dmin) / binsize); hist[ind] += 1.0; } } return (hist); } unsigned char * eq_histogram (float *hist, int length, long width, long height) { int i, j; int *part; unsigned char *lut; double pixels_per_value; double desired; double sum, dif; /* allocate partition */ part = (int*) malloc (sizeof (int) * 257); /* allocate look up table */ lut = (unsigned char*) malloc (sizeof (unsigned char) * (length + 1)); /* Find partition points */ pixels_per_value = (double) (width * height) / 256.0; /* First and last points in partition */ part[0] = 0; part[256] = 256; /* Find intermediate points */ j = 0; sum = hist[0] + hist[1]; for (i = 1; i < 256; i++) { desired = i * pixels_per_value; while (sum <= desired) { j++; sum += hist[j+1]; } /* Nearest sum */ dif = sum - hist[j]; if ((sum - desired) > (dif / 2.0)) part[i] = j; else part[i] = j + 1; } /* Create equalization LUT */ for (j = 0; j < length; j++) { i = 0; while (part[i + 1] <= j) i++; if (i > 255) i = 255; lut[j] = i; } free (part); return (lut); } fitscut-1.4.4/config.h.in0000644000133100002000000000467210521741730012136 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_CFITSIO_FITSIO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FITSIO_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_JPEGLIB_H /* Define to 1 if you have the `cfitsio' library (-lcfitsio). */ #undef HAVE_LIBCFITSIO /* Define to 1 if you have the `jpeg' library (-ljpeg). */ #undef HAVE_LIBJPEG /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `png' library (-lpng). */ #undef HAVE_LIBPNG /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Defined when libwcs is detected */ #undef HAVE_LIBWCS /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_PNG_H /* 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_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION fitscut-1.4.4/getopt1.c0000644000133100002000000001005607371627415011647 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "getopt.h" #if !__STDC__ && !defined(const) && IN_GCC #define const #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #else char *getenv (); #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* _LIBC or not __GNU_LIBRARY__. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == EOF) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ fitscut-1.4.4/draw.c0000644000133100002000000003102210041563617011204 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Fitscut drawing functions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: draw.c,v 1.6 2004/04/21 21:28:47 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif #include "fitscut.h" #include "image_scale.h" #include "draw.h" #ifndef DEGTORAD #define DEGTORAD(x) ((x)*M_PI/180.0) #endif static void rotate_vector (float *invec, float angle, float *outvec) { float cosa, sina; float temp; cosa = cos (DEGTORAD (angle)); sina = sin (DEGTORAD (angle)); /* use a temp variable in case invec and outvec are the same */ temp = invec[0] * cosa + invec[1] * sina; outvec[1] = -invec[0] * sina + invec[1] * cosa; outvec[0] = temp; } static void ImageSetPixel (FitsCutImage *Image, int channel, int x, int y, float value) { float *arrayp; int ncols = Image->ncols[channel]; arrayp = Image->data[channel]; arrayp[ncols * y + x] = value; } static int drawCompareInt (const void *a, const void *b) { return (*(const int *)a) - (*(const int *)b); } void draw_filled_polygon (FitsCutImage *Image, int channel, drawPointPtr p, int n, int c) { /* adapted from gdImageFilledPolygon */ int i; int y; int miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int *polyInts; if (!n) return; polyInts = (int *) malloc (sizeof (int) * n); miny = p[0].y; maxy = p[0].y; for (i = 1; i < n; i++) { if (p[i].y < miny) miny = p[i].y; if (p[i].y > maxy) maxy = p[i].y; } /* Fix in 1.3: count a vertex only once */ for (y = miny; y <= maxy; y++) { /*1.4 int interLast = 0; */ /* int dirLast = 0; */ /* int interFirst = 1; */ ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = p[ind1].y; y2 = p[ind2].y; if (y1 < y2) { x1 = p[ind1].x; x2 = p[ind2].x; } else if (y1 > y2) { y2 = p[ind1].y; y1 = p[ind2].y; x2 = p[ind1].x; x1 = p[ind2].x; } else { continue; } if ((y >= y1) && (y < y2)) { polyInts[ints++] = (y-y1) * (x2-x1) / (y2-y1) + x1; } else if ((y == maxy) && (y > y1) && (y <= y2)) { polyInts[ints++] = (y-y1) * (x2-x1) / (y2-y1) + x1; } } qsort (polyInts, ints, sizeof (int), drawCompareInt); for (i = 0; (i < (ints)); i += 2) { draw_line (Image, channel, polyInts[i], y, polyInts[i+1], y, c); } } } void draw_line (FitsCutImage *Image, int channel, int x1, int y1, int x2, int y2, int value) { /* adapted from GD gdImageLine */ int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; dx = abs (x2-x1); dy = abs (y2-y1); if (dy <= dx) { d = 2 * dy - dx; incr1 = 2 * dy; incr2 = 2 * (dy - dx); if (x1 > x2) { x = x2; y = y2; ydirflag = (-1); xend = x1; } else { x = x1; y = y1; ydirflag = 1; xend = x2; } ImageSetPixel (Image, channel, x, y, value); if (((y2 - y1) * ydirflag) > 0) { while (x < xend) { x++; if (d <0) { d += incr1; } else { y++; d+=incr2; } ImageSetPixel (Image, channel, x, y, value); } } else { while (x < xend) { x++; if (d <0) { d+=incr1; } else { y--; d+=incr2; } ImageSetPixel (Image, channel, x, y, value); } } } else { d = 2 * dx - dy; incr1 = 2 * dx; incr2 = 2 * (dx - dy); if (y1 > y2) { y = y2; x = x2; yend = y1; xdirflag = (-1); } else { y = y1; x = x1; yend = y2; xdirflag = 1; } ImageSetPixel (Image, channel, x, y, value); if (((x2 - x1) * xdirflag) > 0) { while (y < yend) { y++; if (d <0) { d+=incr1; } else { x++; d+=incr2; } ImageSetPixel (Image, channel, x, y, value); } } else { while (y < yend) { y++; if (d <0) { d+=incr1; } else { x--; d+=incr2; } ImageSetPixel (Image, channel, x, y, value); } } } } static void draw_arrow (FitsCutImage *Image, int channel, int x, int y, float angle, int length, int width, int tip_length, int value) { float tip_angle; float vec[2], outvec[2]; int num_tip_points; int x0, y0, x1, y1, tipx, tipy; drawPointPtr arrow; drawPointPtr shaft; tip_angle = 20.0; /* rotate from horizontal */ vec[0] = length; vec[1] = 0; rotate_vector (vec,angle,outvec); tipx = floor (x + outvec[0] + 0.5); tipy = floor (y + outvec[1] + 0.5); /* find arrow tips */ vec[0] = -tip_length; vec[1] = 0; rotate_vector (vec, angle + tip_angle, outvec); x0 = floor (tipx + outvec[0] + 0.5); y0 = floor (tipy + outvec[1] + 0.5); rotate_vector (vec, angle - tip_angle, outvec); x1 = floor (tipx + outvec[0] + 0.5); y1 = floor (tipy + outvec[1] + 0.5); if (tip_length > 10) { num_tip_points = (tip_length > 10) ? 4 : 3; arrow = (drawPoint *) malloc (sizeof (drawPoint) * num_tip_points); arrow[0].x = tipx; arrow[0].y = tipy; arrow[1].x = x0; arrow[1].y = y0; arrow[num_tip_points-1].x = x1; arrow[num_tip_points-1].y = y1; if (num_tip_points > 3) { /* find the new tip of the arrow shaft */ vec[0] = length - tip_length * 0.8; vec[1] = 0; rotate_vector (vec,angle,outvec); tipx = floor (x + outvec[0] + 0.5); tipy = floor (y + outvec[1] + 0.5); arrow[2].x = tipx; arrow[2].y = tipy; } /* draw the arrow head */ draw_filled_polygon (Image, channel, arrow, num_tip_points, value); free (arrow); } else { draw_line (Image, channel, x0, y0, tipx, tipy, value); draw_line (Image, channel, x1, y1, tipx, tipy, value); } /* draw arrow shaft */ if (width > 2) { shaft = (drawPoint *) malloc (sizeof (drawPoint) * 4); vec[0] = 0; vec[1] = width / 2; rotate_vector (vec, angle, outvec); shaft[0].x = x + outvec[0]; shaft[0].y = y + outvec[1]; shaft[1].x = tipx + outvec[0]; shaft[1].y = tipy + outvec[1]; vec[0] = 0; vec[1] = -width / 2; rotate_vector (vec, angle, outvec); shaft[3].x = x + outvec[0]; shaft[3].y = y + outvec[1]; shaft[2].x = tipx + outvec[0]; shaft[2].y = tipy + outvec[1]; draw_filled_polygon (Image, channel, shaft, 4, value); free (shaft); } else { draw_line (Image, channel, x, y, tipx, tipy, value); } } void draw_wcs_compass (FitsCutImage *Image, float north_pa, float east_pa) { float arrow_length; long center[2]; int channel = 0; int draw_channels; float east_size_factor = 0.6; float line_value = 255; float arrow_size_factor; int thickness; int tip_size; int min_size; center[0] = Image->ncols[0] * 0.8; center[1] = Image->nrows[0] * 0.8; min_size = (Image->ncols[0] > Image->nrows[0]) ? Image->nrows[0] : Image->ncols[0]; if (min_size > 1024) arrow_size_factor = 0.05; else if (min_size > 512) arrow_size_factor = 0.10; else if (min_size > 128) arrow_size_factor = 0.20; else arrow_size_factor = 0.30; arrow_length = arrow_size_factor * min_size; thickness = 2; /*floor(arrow_length * 0.05 + 0.5);*/ if (thickness < 1) thickness = 1; fitscut_message (1, "drawing WCS compass north: %f east: %f thickness: %d\n", north_pa, east_pa, thickness); tip_size = floor (arrow_length * 0.2 + 0.5); draw_channels = (Image->channels > 1) ? 2 : 1; for (channel = 0; channel < draw_channels; channel++) { /* draw north line */ draw_arrow (Image, channel, center[0], center[1], north_pa, arrow_length, thickness, tip_size, line_value); /* draw east line */ draw_arrow (Image, channel, center[0], center[1], east_pa, arrow_length * east_size_factor, thickness, tip_size, line_value); } } fitscut-1.4.4/test.fits0000644000133100002000000020700010041555627011754 00000000000000SIMPLE = T / Written by IDL: Wed Apr 21 16:30:48 2004 BITPIX = -32 / Number of bits per data pixel NAXIS = 2 / Number of data axes NAXIS1 = 128 / NAXIS2 = 128 / EXTEND = T / FITS data may contain extensions DATE = '2004-04-21' / Creation UTC (CCCC-MM-DD) date of FITS header COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy COMMENT and Astrophysics', volume 376, page 359; bibcode 2001A&A...376..359H END ?€@@@@€@ @À@àAAA A0A@APA`ApA€AˆAA˜A A¨A°A¸AÀAÈAÐAØAàAèAðAøBBBB BBBBB B$B(B,B0B4B8B<B@BDBHBLBPBTBXB\B`BdBhBlBpBtBxB|B€B|BxBtBpBlBhBdB`B\BXBTBPBLBHBDB@B<B8B4B0B,B(B$B BBBBB BBBAøAðAèAàAØAÐAÈAÀA¸A°A¨A A˜AAˆA€ApA`APA@A0A AA@à@À@ @€@@@?€?€?µó@½@JbÂ@ƒð{@£++@Â¥þ@âF0AÿAâÜA ÌJA0¹ÌA@ª_APNA`’ApˆbA€?ðAˆBB?ðAøƒþAðˆbAèAà’AØ—AÐNAÈ£”AÀª_A¸±ÀA°¹ÌA¨Â›A ÌJA˜ÖüAâÜAˆðA€ÿArºAbF0ARrxAB¥þA2â¬A#++AƒAAð{@èö©@ÊbÂ@¬SE@½@fÁZ@5ó@½@@@JbÂ@fÁZ@‡Ã¶@ @º—(@Ö©›@ó´jA´=AÊA' A6m–AEè¹AUwuAeÌAtÀÀA‚;AŠöA‘ü~A™âA¡Ê=A©´¤A± ûA¹AÁ~ƒAÉoSAÑaJAÙTIAáH4Aé<óAñ2pAù(™B¯B‹YB‡DB ƒkBÇB|VByBuûB s B$p=B(m“B,kB0h›B4fIB8dBA´|üA¼L2AÄVAËõöAÓÏ­AÛ¬(Aã‹AëlKAóO}Aû4B—B®B vuB kÞBaÛBXaBOfBFÞB!>ÂB%7 B)/±B-(­B1!úB5’B9rB=“BA òBEŒBHÿ]BLúaBPõ–BTðùBXìˆB\è@B`äBdà"BhÜHBlØBpÔ÷BtÑ|BxÎB|ÊÛB€cÙB|ÊÛBxÎBtÑ|BpÔ÷BlØBhÜHBdà"B`äB\è@BXìˆBTðùBPõ–BLúaBHÿ]BEŒBA òB=“B9rB5’B1!úB-(­B)/±B%7 B!>ÂBFÞBOfBXaBaÛB kÞB vuB®B—Aû4AóO}AëlKAã‹AÛ¬(AÓÏ­AËõöAÄVA¼L2A´|üA¬²>A¤ìšA,ÑA•sÌA§A†¼A|ûrAmÛkA^Ú®APAAT(A2â¬A$ºçAñ–A £ @ùí‘@âF0@Ìæe@º—(@¬SE@£++@À@Â¥þ@ÊbÂ@Ö©›@æÁZ@ùí‘AöAƒAA A-A:—(AHz¼AV©›AeÌAs´jA>tAˆ´=A8ØA—ÊAŸfA§ A®¸ÿA¶m–A¾(gAÅè¹AÍ­ëAÕwuAÝDâAåÌAìéÚAôÀÀAüš:B;B*B öB ÑBü~BîîBâBÕÚB!Ê=B%¿.B)´¤B-ª–B1 ûB5—ÌB9B=†–BA~ƒBEvÄBIoSBMh+BQaJBUZ«BYTIB]N#BaH4BeBzBi<óBm7šBq2pBu-pBy(™B}#éB€¯B}#éBy(™Bu-pBq2pBm7šBi<óBeBzBaH4B]N#BYTIBUZ«BQaJBMh+BIoSBEvÄBA~ƒB=†–B9B5—ÌB1 ûB-ª–B)´¤B%¿.B!Ê=BÕÚBâBîîBü~B ÑB öB*B;Aüš:AôÀÀAìéÚAåÌAÝDâAÕwuAÍ­ëAÅè¹A¾(gA¶m–A®¸ÿA§ AŸfA—ÊA8ØAˆ´=A>tAs´jAeÌAV©›AHz¼A:—(A-A AƒAAö@ùí‘@æÁZ@Ö©›@ÊbÂ@Â¥þ@à@âF0@èö©@ó´jAÿA £ AƒAAdUA*A6m–ACN APNA^GsAl<·Azp‹A„loA‹¶ÈA“AšsA¡ü×A©„XA±jA¸±ÀAÀUBAÈAϱ,A×hAß$&AæäØAî©·Aör^Aþ>uB×BïáB Ú9BÅÆB²lB BŽ´B~/B"nxB&_‚B*Q>B.C B26žB6*.B:EB>ÜBBëBEýjBIóSBMé BQàLBU×PBYΨB]ÆPBa¾CBe¶~Bi®ýBm§¼Bq ¸Bu™ïBy“]B}B€ÃkB}By“]Bu™ïBq ¸Bm§¼Bi®ýBe¶~Ba¾CB]ÆPBYΨBU×PBQàLBMé BIóSBEýjBBëB>ÜB:EB6*.B26žB.C B*Q>B&_‚B"nxB~/BŽ´B B²lBÅÆB Ú9BïáB×Aþ>uAör^Aî©·AæäØAß$&A×hAϱ,AÈAÀUBA¸±ÀA±jA©„XA¡ü×AšsA“A‹¶ÈA„loAzp‹Al<·A^GsAPNACN A6m–A*AdUAƒAA £ Aÿ@ó´j@èö©@âF0AAÿAð{A´=A½Añ–A A*A5óA@ª_ALæeAYŸ AfÁZAt:ºA€ÿAˆA½A–NmA”ìA¤ìšA¬SEA³ÇA»FsAÂÐAÊbÂAÑýAÙŸ AáH4Aèö©AðªnAøcBÿBð{BÒËB ¶ÈBœOBƒABk‚BTøB?ŒB#++B'ÁB+=B.óB2â¬B6ÒƒB:à B>´7BB¥þBF˜VBJ‹8BN~›BRrxBVfÈBZ[…B^PªBbF0Bf<Bj2NBn(ÜBrºBväBzVB~ B€ÿB~ BzVBväBrºBn(ÜBj2NBf<BbF0B^PªBZ[…BVfÈBRrxBN~›BJ‹8BF˜VBB¥þB>´7B:à B6ÒƒB2â¬B.óB+=B'ÁB#++B?ŒBTøBk‚BƒABœOB ¶ÈBÒËBð{BÿAøcAðªnAèö©AáH4AÙŸ AÑýAÊbÂAÂÐA»FsA³ÇA¬SEA¤ìšA”ìA–NmA½AˆA€ÿAt:ºAfÁZAYŸ ALæeA@ª_A5óA*A Añ–A½A´=Að{AÿAAâÜAƒAAÊA”ìA$ºçA-A6m–A@ª_AK¥’AWB AcgApA|ûrA…%ƒA‹ñ^A’ÜHA™âA ÿ4A¨0¼A¯t&A¶ÇOA¾(gAÅ•ÞAÍ\AÔ¶AÜìAã¯AëI}AòêfAú‘>B¿B÷VBÒ0B ¯BóBn‹BPÂB4zB ˜B$B'çB+ÐYB/º!B3¤ãB7B;}B?jpBCX‰BGGYBK6ÔBO&ñBS§BWîBZú½B^íBbßÚBfÓBjÆÈBnºàBr¯[Bv¤5Bz™kB~ŽöBBjB~ŽöBz™kBv¤5Br¯[BnºàBjÆÈBfÓBbßÚB^íBZú½BWîBS§BO&ñBK6ÔBGGYBCX‰B?jpB;}B7B3¤ãB/º!B+ÐYB'çB$B ˜B4zBPÂBn‹BóB ¯BÒ0B÷VB¿Aú‘>AòêfAëI}Aã¯AÜìAÔ¶AÍ\AÅ•ÞA¾(gA¶ÇOA¯t&A¨0¼A ÿ4A™âA’ÜHA‹ñ^A…%ƒA|ûrApAcgAWB AK¥’A@ª_A6m–A-A$ºçA”ìAÊAƒAAâÜA A ÌJA#++A' A,SEA2â¬A:—(ACN ALæeAWB AbF0AmÛkAyí‘Aƒ5³A‰£ A8ØA–ñ–AÈàA¤ºçA«ÄmA²â¬AºDAÁT(AÈ£”AÐA×hAÞÚ®AæVÁAíÛkAõgâAüûrBJ¿B¼B írB §Bš*BsÌBOfB,ÑB! ìB$ìšB(ξB,²>B0—B4|üB8dBB(ξB$ìšB! ìB,ÑBOfBsÌBš*B §B írB¼BJ¿AüûrAõgâAíÛkAæVÁAÞÚ®A×hAÐAÈ£”AÁT(AºDA²â¬A«ÄmA¤ºçAÈàA–ñ–A8ØA‰£ Aƒ5³Ayí‘AmÛkAbF0AWB ALæeACN A:—(A2â¬A,SEA' A#++A ÌJA0A0¹ÌA2â¬A6m–A;FsAAT(AHz¼APNAYŸ AcgAmÛkAxæÎA‚;AˆtB÷VB´=B t×B8ØBBÊB–ÖBfB#7¸B' B*áMB.¸ÿB2’vB6m–B:JDB>(gBBëBEè¹BIÊ¿BM­ëBQ’,BUwuBY]µB]DâBa,íBeÌBhÿsBléÚBpÔ÷BtÀÀBx­/B|š:B€CîB‚;B€CîB|š:Bx­/BtÀÀBpÔ÷BléÚBhÿsBeÌBa,íB]DâBY]µBUwuBQ’,BM­ëBIÊ¿BEè¹BBëB>(gB:JDB6m–B2’vB.¸ÿB*áMB' B#7¸BfB–ÖBÊBB8ØB t×B´=B÷VB>tAûãAó´jAì_bAåÌAÝØÇAÖ©›Aω·AÈz¼AÁ~ƒAº—(A³ÇA­A¦xA A™¬ÌA“ƒAAˆÒA‡Ã¶A‚;Ayí‘ApAfÁZA^GsAV©›APAJbÂAEè¹AB¥þA@ª_APAPNARrxAUwuAYŸ A^Ú®AeÌAl<·At:ºA|ûrAƒ5³AˆuBÈBBv>B (ÊB ߉Bš*BXaBíBÞB ¦B$p=B(<éB, èB/ÝB3°IB7…hB;\QB?4êBCBFêÅBJÇÚBN¦CBR…îBVfÈBZHÃB^+ÎBbÛBeôÞBiÚËBmÁ•Bq©2Bu‘˜Byz¾B}dšB€§’B‚+B€§’B}dšByz¾Bu‘˜Bq©2BmÁ•BiÚËBeôÞBbÛB^+ÎBZHÃBVfÈBR…îBN¦CBJÇÚBFêÅBCB?4êB;\QB7…hB3°IB/ÝB, èB(<éB$p=B ¦BÞBíBXaBš*B ߉B (ÊBv>BÈBAþ>uAö÷1AﻲAèAálŽAÚ[…AÓ[†AÌnQAÅ•ÞA¾ÔlA¸,€A± ûA«5A¤ìšAžË¤A˜ÖüA“AˆÒAˆuBÙBƒ×BÙB~>uBzXBvr^Br—Bn©·BjÆÈBfäØBcòB_$&B[E‚BWhBS‹ôBO±,BK×ÔBHBD)ÇB@UBB<‚ŒB8±ÀB4âÿB1jB-L%B)„XB%¿.B!ü×B=†BsBÈÝBBc9B ¶ÈBBloBÏXAúp‹AóO}Aì<·Aå9‹AÞGsA×hAÐNAÉé/AÃN A¼Î‰A¶m–A°.…AªA¤%rAždUA˜ÖüA“ƒAAŽošA‰£ A…%ƒA€ÿAzp‹As´jAmÛkAhö©AeÌAbF0A`’ApApˆbArºAtÀÀAxcA|ûrA>tA„loAˆA‹ñ^A8ØA”ÏA™¬ÌAžË¤A¤%rA©´¤A¯t&Aµ__A»r-AÁ¨ÕAÈAÎt°AÕ5AÛ¬(AâjaAé<óAð" A÷ZAþ;B™?B*B ÀßB ]bBÿB¥±BPÂBB³!B#iáB'$B*áMB.¡ŒB2dB6*.B9òtA|ûrAxcAtÀÀArºApˆbA€A€?ðA€ÿA‚;Aƒð{A†¼Aˆ´=A‹¶ÈA½A’ÜHA–ñ–A›TøA A¤ìšAªA¯t&AµóAºÃ AÀª_AÆ·DAÌæeAÓ4ÀAÙŸ Aà$AæÁZAítAô:ºAûãBÿB{åBB ŠÈB½B²lBNmBï`B”ìB!>ÂB$ìšB(ž/B,SEB0 £B3ÇB7…hB;FsB? BBÐBF˜VBJbÂBN/4BQýBUͼBYŸ B]s$BaH4Be¼Bhö©BlÏêBpªnBt†'BxcB|@üB€ÿB‚Bƒð{B‚B€ÿB|@üBxcBt†'BpªnBlÏêBhö©Be¼BaH4B]s$BYŸ BUͼBQýBN/4BJbÂBF˜VBBÐB? B;FsB7…hB3ÇB0 £B,SEB(ž/B$ìšB!>ÂB”ìBï`BNmB²lB½B ŠÈBB{åBÿAûãAô:ºAítAæÁZAà$AÙŸ AÓ4ÀAÌæeAÆ·DAÀª_AºÃ AµóA¯t&AªA¤ìšA A›TøA–ñ–A’ÜHA½A‹¶ÈAˆ´=A†¼Aƒð{A‚;A€ÿA€?ðAˆAˆB írB kÞBðýB|VB yB£ÿB?ŒB"ßËB&„lB*-'B-Ù»B1‰êB5=|B8ô=B<­üB@jBD)ÇBGë„BK¯ BOuúBS>sBWîBZÕQB^£ƒBbsmBfDøBjBmì£BqÂBu™ïByrˆB}LZB€“«B‚·B„pLB‚·B€“«B}LZByrˆBu™ïBqÂBmì£BjBfDøBbsmB^£ƒBZÕQBWîBS>sBOuúBK¯ BGë„BD)ÇB@jB<­üB8ô=B5=|B1‰êB-Ù»B*-'B&„lB"ßËB?ŒB£ÿB yB|VBðýB kÞB írBv>B×Aÿ?¸AøƒþAñÜAëI}AäÎ;AÞlKAØ%êAÑýAËõöAÆAÀUBAºÃ Aµ__A°.…A«5A¦xA¡ü×AÈàA™âA–NmA“A8ØA§A‹¶ÈAŠöAˆðAˆ(gBAÝ®BE•ÞBIPÐBM\BPÎ_BT¶BXUEB\ìB_ä‘Bc¯Bg{pBkI}Bo+BrêfBv½Bz‘>B~f¹B¿Bƒ ¿B„÷VBƒ ¿B¿B~f¹Bz‘>Bv½BrêfBo+BkI}Bg{pBc¯B_ä‘B\ìBXUEBT¶BPÎ_BM\BIPÐBE•ÞBAÝ®B>(gB:v8B6ÇOB3áB/t&B+ÐYB(0¼B$•–B ÿ4BmêBâB\ BÜHBc9B ñ^B‡DB%ƒBÌÃAüûrAör^AðAé¦9AãgAÝDâA×B AÑaJAË¥’AÆAÀª_A»r-A¶m–A± ûA­A¨Â›A¤ºçA ÿ4A”ìAšsA—ÊA•sÌA“ƒAA‘ü~AâÜA8ØA˜A˜5ÜA˜ÖüA™âA›TøA,ÑAŸfA¡ü×A¤ìšA¨0¼A«ÄmA¯¢ÐA³ÇA¸,€A¼Î‰AÁ¨ÕAÆ·DAËõöAÑaJAÖõáAܰ™AâŽAèAî©·Aôâ7Aû4BÏXBƒBYõB ­óB ÑBoñBÜÃBPÂBËtBLhB"Ó7B&_‚B)ððB-‡1B1!úB4ÁB8dB< äB?µGBCcBGðBJÇÚBN~›BR8 BUô BY²qB]s$Ba6BdúøBhÁäBlаBpUFBt!‘Bwï{B{¾ôBçB±#Bƒ›B……ƒBƒ›B±#BçB{¾ôBwï{Bt!‘BpUFBlаBhÁäBdúøBa6B]s$BY²qBUô BR8 BN~›BJÇÚBGðBCcB?µGB< äB8dB4ÁB1!úB-‡1B)ððB&_‚B"Ó7BLhBËtBPÂBÜÃBoñB ÑB ­óBYõBƒBÏXAû4Aôâ7Aî©·AèAâŽAܰ™AÖõáAÑaJAËõöAÆ·DAÁ¨ÕA¼Î‰A¸,€A³ÇA¯¢ÐA«ÄmA¨0¼A¤ìšA¡ü×AŸfA,ÑA›TøA™âA˜ÖüA˜5ÜA A 3+A ÌJA¡Ê=A£++A¤ìšA§ A©„XA¬SEA¯t&A²â¬A¶šxAº—(A¾ÔlAÃN AÈAÌæeAÑýA×B Aܰ™AâF0AèAíÛkAóÖAùí‘BÿB5³BgB £ B éLB8ØB‘#Bñ–BYªBÈàB!>ÂB$ºçB(<éB+ÄmB/QB2â¬B6xÏB:DB=±ÊBAT(BDú'BH£”BLPABPBS²©BWhB[ #B^Ú®Bb——BfVÁBjBmÛkBq ¸BugâBy0ÑB|ûrB€cÙB‚J¿B„2cB†¼B„2cB‚J¿B€cÙB|ûrBy0ÑBugâBq ¸BmÛkBjBfVÁBb——B^Ú®B[ #BWhBS²©BPBLPABH£”BDú'BAT(B=±ÊB:DB6xÏB2â¬B/QB+ÄmB(<éB$ºçB!>ÂBÈàBYªBñ–B‘#B8ØB éLB £ BgB5³BÿAùí‘AóÖAíÛkAèAâF0Aܰ™A×B AÑýAÌæeAÈAÃN A¾ÔlAº—(A¶šxA²â¬A¯t&A¬SEA©„XA§ A¤ìšA£++A¡Ê=A ÌJA 3+A¨A¨0¼A¨Â›A©´¤A«=A¬²>A®¸ÿA±jA³ÇA¶ÇOAºDA½¦þAÁ~ƒAÅ•ÞAÉé/AÎt°AÓ4ÀAØ%êAÝDâAâŽAèAí–AóO}Aù(™AÿžB™?B¯«BÒ0B B8YBzŠBÅîBíBuûBÙ•B#DCB&µ—B*-'B-ª–B1-‰B4µ°B8B¼B;ÔhB?jpBC˜BF¢¦BJDdBMé BQ’,BU=ÝBXìˆB\žB`R:BdûBgÂ-Bk}±Bo;kBrûBBv½Bz€åB~FƒBòB‚ëzB„ÐÏB†¶êB„ÐÏB‚ëzBòB~FƒBz€åBv½BrûBBo;kBk}±BgÂ-BdûB`R:B\žBXìˆBU=ÝBQ’,BMé BJDdBF¢¦BC˜B?jpB;ÔhB8B¼B4µ°B1-‰B-ª–B*-'B&µ—B#DCBÙ•BuûBíBÅîBzŠB8YB BÒ0B¯«B™?AÿžAù(™AóO}Aí–AèAâŽAÝDâAØ%êAÓ4ÀAÎt°AÉé/AÅ•ÞAÁ~ƒA½¦þAºDA¶ÇOA³ÇA±jA®¸ÿA¬²>A«=A©´¤A¨Â›A¨0¼A°A°.…A°¹ÌA± ûA²â¬A´|üA¶m–A¸±ÀA»FsA¾(gAÁT(AÄÆ$AÈz¼AÌnQAÐNAÕ5AÙŸ AÞlKAãgAèAíÛkAóO}AøæÎAþŸ B;B4äBBA~ƒBDú'BHz¼BLBO‰·BS§BV©›BZ?`B]ØÇBau¤BeÌBh¹Bl_bBpˆBs´jBwbçB{ãB~ÇAB>tBƒ_B„÷VB†ÕOBˆ´=B†ÕOB„÷VBƒ_B>tB~ÇAB{ãBwbçBs´jBpˆBl_bBh¹BeÌBau¤B]ØÇBZ?`BV©›BS§BO‰·BLBHz¼BDú'BA~ƒB>B:—(B7, B3ÇB0h›B-B)ÀµB&xB#7¸B BÑ€B¬ÌB’~BƒABÇB ˆÒB Ÿ-BöB÷VB;AÿžAùí‘Aôâ7AðAëI}AæÁZAâjaAÞGsAÚ[…AÖ©›AÓ4ÀAÐAÍ\AÊbÂAÈAÅè¹AÄVAÂ¥þAÁ~ƒAÀª_AÀ*¦AÈAÈ(òAÈ£”AÉoSAÊ‹8AËõöAÍ­ëAϱ,AÑýAÔ¶A×hAÚAÝØÇAálŽAå9‹Aé<óAítAñÜAör^Aû4BÿB™?B4äBáßB Ÿ-B kÞBG B/ÜB%‡B'MB4zBLhB"nxB%šB(ξB, èB/QB2îB5ñïB9L½B<­üB@TBC‚uBFõBJlàBMé BQkBTðùBX{B\ OB_›WBc1 BfÊ:BjfÀBntBq©2BuN×Bx÷CB|¢VB€'úB‚BƒÙ1B…³B‡ŽàB‰kHB‡ŽàB…³BƒÙ1B‚B€'úB|¢VBx÷CBuN×Bq©2BntBjfÀBfÊ:Bc1 B_›WB\ OBX{BTðùBQkBMé BJlàBFõBC‚uB@TB<­üB9L½B5ñïB2îB/QB, èB(ξB%šB"nxBLhB4zB'MB%‡B/ÜBG B kÞB Ÿ-BáßB4äB™?BÿAû4Aör^AñÜAítAé<óAå9‹AálŽAÝØÇAÚA×hAÔ¶AÑýAϱ,AÍ­ëAËõöAÊ‹8AÉoSAÈ£”AÈ(òAÐAÐ'_AÐNAÑaJAÒrxAÓÏ­AÕwuA×hAÙŸ AÜìAÞÚ®AáÙyAåÌAèAì<·Að" Aô:ºAøƒþAüûrBÏXB5³B¯«BÔlBB2BE•ÞBHÿ]BLnQBOâtBS[†BVÙJBZ[…B]âBalŽBdúøBhBl"´Bo»²BsWèBv÷1Bz™kB~>uB€óB‚ÈBB„ž¨B†v>BˆNøBŠ(ÊBˆNøB†v>B„ž¨B‚ÈBB€óB~>uBz™kBv÷1BsWèBo»²Bl"´BhBdúøBalŽB]âBZ[…BVÙJBS[†BOâtBLnQBHÿ]BE•ÞBB2B>ÔlB;}B8,€B4âÿB1 ûB.fßB+5B( 0B$ìšB!ÖåBˤBËtBÖüBîîBBG B ˆÒB Ú9BÂB$%rB'ÁB*B-ÙB0.…B3I˜B6m–B9š B<ΉB@ ªBCN BF˜VBIé/BM@FBPNBTBWhBZÕQB^GsBa¾CBe9‹Bh¹Bl<·BoÄ=BsO}BvÞOBzp‹B~ B€ÏXB‚+B„loB†=BˆB‰âNB‹¶ÈB‰âNBˆB†=B„loB‚+B€ÏXB~ Bzp‹BvÞOBsO}BoÄ=Bl<·Bh¹Be9‹Ba¾CB^GsBZÕQBWhBTBPNBM@FBIé/BF˜VBCN B@ ªB<ΉB9š B6m–B3I˜B0.…B-ÙB*B'ÁB$%rB!>ÂBdUB–ÖBÖüB%‡BƒABðýBošB B £ BYõB%ƒB×BÿAþ;Aúp‹Aö÷1Aó´jAðªnAíÛkAëI}Aèö©AæäØAåÌAã‹AâF0AáH4Aà’Aà$AèAè#MAèAé<óAê2NAëlKAìéÚAî©·AðªnAòêfAõgâAø!AûãAþ>uBÏXB™?B{åBv>B‡DB ­óB éLB8YBš*B ÖB’~B'MBËtB~/B!>ÂB$ |B&æ³B)ÌÅB,¾B/º!B2ÀPB5Ð'B8é)B< äB?4êBBfÒBE ÂB~/BËtB'MB’~B ÖBš*B8YB éLB ­óB‡DBv>B{åB™?BÏXAþ>uAûãAø!AõgâAòêfAðªnAî©·AìéÚAëlKAê2NAé<óAèAè#MAðAð" AðˆbAñ2pAòºAóO}AôÀÀAör^AøcAú‘>AüûrAÿŸîB>tBÈBBloB*BB írB ñ^B ÑB8ØBzŠBÏB5^B¬ÌB4zBˤB!qˆB$%rB&æ³B)´¤B,ާB/t&B2dB5__B8dB;r-B>‰=BA¨ÕBDÐŒBHBK6ÔBNt°BQ¹@BU5BXUEB[¬(B_œBbjaBeщ=B;r-B8dB5__B2dB/t&B,ާB)´¤B&æ³B$%rB!qˆBˤB4zB¬ÌB5^BÏBzŠB8ØB ÑB ñ^B írBB*BloBÈBB>tAÿŸîAüûrAú‘>AøcAör^AôÀÀAóO}AòºAñ2pAðˆbAð" AøAø!AøƒþAù(™AúVAû4Aüš:Aþ>uBÿB¿BJ¿B“8B÷VBv>BB ÀßB ŠÈB kÞBc9BoñB‘#BÅîB yBfîBÑ€BLhB!ÖåB$p=B'ÁB)ÌÅB,ާB/\ÌB26žB5’B8 !B;ËB>BAŽBD)ÇBGGYBJlàBMšBPÎ_BT ©BWKBZ“ÅB]âBa6Bd‹BgîXBkR1BnºàBr(/Bu™ïByïB|ŠB€BÄßBƒ‡‹B…KòB‡BˆÙ¬BŠ¢ßBŒmŒBŽ9¥BŒmŒBŠ¢ßBˆÙ¬B‡B…KòBƒ‡‹BÄßB€B|ŠByïBu™ïBr(/BnºàBkR1BgîXBd‹Ba6B]âBZ“ÅBWKBT ©BPÎ_BMšBJlàBGGYBD)ÇBAŽB>B;ËB8 !B5’B26žB/\ÌB,ާB)ÌÅB'ÁB$p=B!ÖåBLhBÑ€BfîB yBÅîB‘#BoñBc9B kÞB ŠÈB ÀßBBv>B÷VB“8BJ¿B¿BÿAþ>uAüš:Aû4AúVAù(™AøƒþAø!BBÿB?ðB¯BÿB—B;B×Bð{B÷VB¼BYõB´=B (ÊB ¶ÈB ]bB½BðýBÜHBÜÃBñ–BíBTøB¡êB B"nxB$ìšB'y²B*B,¾B/t&B26žB5óB7Þ™B:à B=±ÊB@ª_BC¬WBF·DBIÊ¿BLæeBP ØBS4ÀBVfÈBYŸ B\ÞúB`$BcpBfÁZBjBmtBpÔ÷Bt:ºBw¥B{ãB~†êB€ÿB‚¼ƒB„{åB†=BˆB‰Ä–B‹ŠÈBR„B½BR„B‹ŠÈB‰Ä–BˆB†=B„{åB‚¼ƒB€ÿB~†êB{ãBw¥Bt:ºBpÔ÷BmtBjBfÁZBcpB`$B\ÞúBYŸ BVfÈBS4ÀBP ØBLæeBIÊ¿BF·DBC¬WB@ª_B=±ÊB:à B7Þ™B5óB26žB/t&B,¾B*B'y²B$ìšB"nxB B¡êBTøBíBñ–BÜÃBÜHBðýB½B ]bB ¶ÈB (ÊB´=BYõB¼B÷VBð{B×B;B—BÿB¯B?ðBÿBBƒB>B‹YB÷VB®B*BïáBÒËBÒ0B írB #åB t×B ߉Bc9BÿB²lB|VB\ BPÂBYªBuûB¤îB åÁB#7¸B%šB( 0B*SB-ÙB/º!B2dB5’B7Þ™B:­B=†–B@jBCX‰BFPBIPÐBLZFBOlBR…îBU§hBXÐ3B\B_6BbsmBe¶~BhÿsBlN Bo¢BrûBBvYoBy¼aB}#éB€GìB‚BƒºB…v,B‡4BˆóÚBеUBŒx|BŽ=?BŽBŽ=?BŒx|BеUBˆóÚB‡4B…v,BƒºB‚B€GìB}#éBy¼aBvYoBrûBBo¢BlN BhÿsBe¶~BbsmB_6B\BXÐ3BU§hBR…îBOlBLZFBIPÐBFPBCX‰B@jB=†–B:­B7Þ™B5’B2dB/º!B-ÙB*SB( 0B%šB#7¸B åÁB¤îBuûBYªBPÂB\ B|VB²lBÿBc9B ߉B t×B #åB írBÒ0BÒËBïáB*B®B÷VB‹YB>BƒBBBBˆ0èB‰írB‹«ÉBkÞB-ŸBðýB-ŸBkÞB‹«ÉB‰írBˆ0èB†v>B„½‡Bƒ×BRAB?¸B{ß|BxƒþBu-pBqÜBn÷BkI}BhÔBdÎ;Ba™÷B^lKB[E‚BX%êBU ÒBQýBNõ}BKõöBHÿ]BFBC.•B@UBB=†–B:à B8 !B5__B2ÀPB0.…B-ª–B+5B(ξB&xB$1ìB!ü×BÙ•BÈàBËtBâB yBNmB¥±BBš*B8ØBðÈB §B ¯B ¶ÈB Ú9B öB vuBðB‡DBÂB#DCB%\7B'…ìB)ÀµB, èB.fßB0ÐøB3I˜B5Ð'B8dB;ËB=±ÊB@jBC.•BEýjBHÖ—BK¹®BN¦CBQ›òBTšYBW¡BZ¯ßB]ÆPB`äBdûBg4žBjfÀBmŸBpÝxBt!‘Bwk.BzºB~B€³‚B‚bQB„cB…Æ£B‡{üB‰3YBŠì¨BŒ§ÖBŽdÑB#ŠB‘ãïB#ŠBŽdÑBŒ§ÖBŠì¨B‰3YB‡{üB…Æ£B„cB‚bQB€³‚B~BzºBwk.Bt!‘BpÝxBmŸBjfÀBg4žBdûB`äB]ÆPBZ¯ßBW¡BTšYBQ›òBN¦CBK¹®BHÖ—BEýjBC.•B@jB=±ÊB;ËB8dB5Ð'B3I˜B0ÐøB.fßB, èB)ÀµB'…ìB%\7B#DCB!>ÂBLhBmêB£ÿBï`BPÂBÈÝBXaBBÀbBš*BóBœOBÅÆB ÑB kÞB éLB ƒkB :wB  BB8B8ØBÇBâÜBaÛBü~B²lBƒABn‹BsÌB’~BÊBíBsBB”ìB?ŒB ÿ4B"Ó7B$ºçB&µ—B(›B*áMB-B/QB1 ûB4B6m–B8é)B;r-B>B@ª_BCX‰BFBHÖ—BK¥’BN~›BQaJBTM:BWB BZ?`B]DâB`R:BcgBfƒ1Bi¦9BlÏêBpBs6;Bvr^By´.B|ûrB€#ûBÌÃBƒwøB…%ƒB†ÕOBˆ‡DBŠ;PB‹ñ^B©]Bc9B‘âB’ÜHB‘âBc9B©]B‹ñ^BŠ;PBˆ‡DB†ÕOB…%ƒBƒwøBÌÃB€#ûB|ûrBy´.Bvr^Bs6;BpBlÏêBi¦9Bfƒ1BcgB`R:B]DâBZ?`BWB BTM:BQaJBN~›BK¥’BHÖ—BFBCX‰B@ª_B>B;r-B8é)B6m–B4B1 ûB/QB-B*áMB(›B&µ—B$ºçB"Ó7B ÿ4B?ŒB”ìBBsBíBÊB’~BsÌBn‹BƒAB²lBü~BaÛBâÜBÇB8ØB8BB ÖB7PB|VBÜÃBXaBîîB Bk‚BPÂBOfBfîB–ÖBÞB=†B³!B!>ÂB"ßËB$•–B&_‚B(<éB*-'B,/šB.C B0h›B2îB4âÿB779B9š B< äB>‰=BAŽBC¬WBFPBHÿ]BK¹®BN~›BQM¹BT&¡BWîBYôAB\è@B_ä‘BbèàBeôÞBi=Bl"´BoCûBrkÏBu™ïBxÎB| BG¾BF`B‚ëzB„“B†=B‡éhB‰—öB‹H­BŒûvBް@BføB’ŒB“ÙíB’ŒBføBް@BŒûvB‹H­B‰—öB‡éhB†=B„“B‚ëzBF`BG¾B| BxÎBu™ïBrkÏBoCûBl"´Bi=BeôÞBbèàB_ä‘B\è@BYôABWîBT&¡BQM¹BN~›BK¹®BHÿ]BFPBC¬WBAŽB>‰=B< äB9š B779B4âÿB2îB0h›B.C B,/šB*-'B(<éB&_‚B$•–B"ßËB!>ÂB³!B=†BÞB–ÖBfîBOfBPÂBk‚B BîîBXaBÜÃB|VB7PB ÖBB yB5ÜByBÖüBOfBâBŽ´BTøB4zB,ÑB=†BfB ¦B!ü×B#iáB$ìšB&„lB(0¼B)ððB+ÄmB-ª–B/¢ÐB1¬‚B3ÇB5ñïB8,€B:v8B<ΉB?4êBA¨ÕBD)ÇBF·DBIPÐBKõöBN¦CBQaJBT&¡BVõáBYΨB\°™B_›WBbŽBe‰æBhBk—ÆBn©·BqÂBtâ7BxBB{4B~f¹B€ÏXB‚nB„ƒB…³B‡YõB‰ÎBŠ­óBŒ[PBŽ ÑB¼bB‘oñB“%lB”ÜÃB“%lB‘oñB¼bBŽ ÑBŒ[PBŠ­óB‰ÎB‡YõB…³B„ƒB‚nB€ÏXB~f¹B{4BxBBtâ7BqÂBn©·Bk—ÆBhBe‰æBbŽB_›WB\°™BYΨBVõáBT&¡BQaJBN¦CBKõöBIPÐBF·DBD)ÇBA¨ÕB?4êB<ΉB:v8B8,€B5ñïB3ÇB1¬‚B/¢ÐB-ª–B+ÄmB)ððB(0¼B&„lB$ìšB#iáB!ü×B ¦BfB=†B,ÑB4zBTøBŽ´BâBOfBÖüByB5ÜB yBB B4zBuûBÑ€BFÞBÕÚB~/B?ŒB ˜B! ìB"B#7¸B$p=B%¿.B'$B(ž/B*-'B+ÐYB-‡1B/QB1-‰B3áB5’B7, B9L½B;}B=¼–B@ ªBBfÒBDÐŒBGGYBIÊ¿BLZFBNõ}BQ›òBTM:BWîBYΨB\žB_v±BbXIBeBzBh4ñBk/^Bn1uBq:íBtKBwbçBz€åB}¥:B€gÖB‚Bƒ›B…8¼B†ÙBˆ|BŠ!`B‹ÉBsBQBͦB’~ B”0gB•ä¯B”0gB’~ BͦBQBsB‹ÉBŠ!`Bˆ|B†ÙB…8¼Bƒ›B‚B€gÖB}¥:Bz€åBwbçBtKBq:íBn1uBk/^Bh4ñBeBzBbXIB_v±B\žBYΨBWîBTM:BQ›òBNõ}BLZFBIÊ¿BGGYBDÐŒBBfÒB@ ªB=¼–B;}B9L½B7, B5’B3áB1-‰B/QB-‡1B+ÐYB*-'B(ž/B'$B%¿.B$p=B#7¸B"B! ìB ˜B?ŒB~/BÕÚBFÞBÑ€BuûB4zB B B ÌB 3+B s B ÌJB!>ÂB!Ê=B"nxB#++B$B$ìšB%ð“B' B(<éB)„XB*áMB,SEB-Ù»B/t&B1!úB2â¬B4µ°B6šxB8yB:—(B<­üB>ÔlBA òBCN BE ÔlB<­üB:—(B8yB6šxB4µ°B2â¬B1!úB/t&B-Ù»B,SEB*áMB)„XB(<éB' B%ð“B$ìšB$B#++B"nxB!Ê=B!>ÂB ÌJB s B 3+B ÌB$B$ |B$1ìB$p=B$ÇUB%7 B%¿.B&_‚B'ÁB'çB(ξB)ÌÅB*áMB, èB-L%B.¡ŒB0 £B1‰êB3áB4ÁB6xÏB8B¼B:EB< äB>B@TBB2BD]ôBF˜VBHàÉBK6ÔBMšBP ØBR…îBU ÒBW¡BZ?`B\è@B_›WBbXIBe¼BgîXBjÆÈBm§¼BpåBsùBvz­Byz¾B|çBçBRAB‚ß½B„pLB†ÒB‡š4B‰3YBŠÏ)BŒmŒBŽkB±²B‘WJB’ÿ!B”©#B–U=B˜^B–U=B”©#B’ÿ!B‘WJB±²BŽkBŒmŒBŠÏ)B‰3YB‡š4B†ÒB„pLB‚ß½BRABçB|çByz¾Bvz­BsùBpåBm§¼BjÆÈBgîXBe¼BbXIB_›WB\è@BZ?`BW¡BU ÒBR…îBP ØBMšBK6ÔBHàÉBF˜VBD]ôBB2B@TB>B< äB:EB8B¼B6xÏB4ÁB3áB1‰êB0 £B.¡ŒB-L%B, èB*áMB)ÌÅB(ξB'çB'ÁB&_‚B%¿.B%7 B$ÇUB$p=B$1ìB$ |B(B( 0B(0¼B(m“B(›B)/±B)´¤B*Q>B+=B+ÐYB,²>B-ª–B.¸ÿB/ÝB1jB2dB3ÇB5=|B6ÇOB8dB:DB;ÔhB=¦þB?ЇBA~ƒBC‚uBE•ÞBG¸EBIé/BL($BNt°BPÎ_BS4ÀBU§hBX%êBZ¯ßB]DâB_ä‘BbŽBeBzBhBjÆÈBm–BpnÕBsO}Bv8,By(™B| €BžBÙB‚™?B„"äB…¯«B‡?xBˆÒ0BŠg»BŒBšçB8YBØAB’zŠB”B•ÅîB—nãB™íB—nãB•ÅîB”B’zŠBØAB8YBšçBŒBŠg»BˆÒ0B‡?xB…¯«B„"äB‚™?BÙBžB| €By(™Bv8,BsO}BpnÕBm–BjÆÈBhBeBzBbŽB_ä‘B]DâBZ¯ßBX%êBU§hBS4ÀBPÎ_BNt°BL($BIé/BG¸EBE•ÞBC‚uBA~ƒB?ЇB=¦þB;ÔhB:DB8dB6ÇOB5=|B3ÇB2dB1jB/ÝB.¸ÿB-ª–B,²>B+ÐYB+=B*Q>B)´¤B)/±B(›B(m“B(0¼B( 0B,B, èB,/šB,kB,¾B-(­B-ª–B.C B.óB/º!B0—B1‰êB2’vB3°IB4âÿB6*.B7…hB8ô=B:v8B< äB=±ÊB?jpBA4^BCBDú'BFõBHÿ]BK–BM@FBOuúBQ¹@BT ©BVfÈBXÐ3B[E‚B]ÆPB`R:BbèàBe‰æBh4ñBjéªBm§¼BpnÕBs>§BväBx÷CB{ß|B~ÏKB€ã6B‚bQBƒäÖB…j©B†ó¬BˆÄBŠÖB‹ ÊB5…BŽÌòBføB’‚B“¢{B•CÎB–çiB˜8Bš5)B˜8B–çiB•CÎB“¢{B’‚BføBŽÌòB5…B‹ ÊBŠÖBˆÄB†ó¬B…j©BƒäÖB‚bQB€ã6B~ÏKB{ß|Bx÷CBväBs>§BpnÕBm§¼BjéªBh4ñBe‰æBbèàB`R:B]ÆPB[E‚BXÐ3BVfÈBT ©BQ¹@BOuúBM@FBK–BHÿ]BFõBDú'BCBA4^B?jpB=±ÊB< äB:v8B8ô=B7…hB6*.B4âÿB3°IB2’vB1‰êB0—B/º!B.óB.C B-ª–B-(­B,¾B,kB,/šB, èB0B0 £B0.…B0h›B0¹ÌB1!úB1 ûB26žB2â¬B3¤ãB4|üB5j©B6m–B7…hB8±ÀB9ò(gB?µGBAT(BC˜BDÆ$BF˜VBHz¼BJlàBLnQBN~›BPNBRÉüBU5BWKBYŸ B\B^lKB`äBcgBeôÞBhBk/^BmÛkBpåBsO}BväBxæÎB{¾ôB~Ÿ B€ÃkB‚;Bƒ¶9B…4äB†¶êBˆ(gB<­üB;FsB9òŸB’ÑÒB”g¤B–B—šÑB™8Bš×„Bœy@Bš×„B™8B—šÑB–B”g¤B’ÑÒB‘>ŸB®"BŽ pBŒ•¡B‹ ÏB‰‰Bˆ‡B†‰GB…oBƒ—B‚#mB€³‚B~ŽöB{¾ôBx÷CBv8,BsùBpÔ÷Bn1uBk—ÆBi=Bfƒ1BdûBa™÷B_6B\ÞúBZ“ÅBXUEBV#àBTBQê BOâtBMé BLBJ&BH\BF¢¦BDú'BCcBAÝ®B@jB? B=¼–B<‚ŒB;\QB:JDB9L½B8dB7B6ÒƒB6*.B5—ÌB5’B4µ°B4fIB4-}B4 `B8B8 !B8,€B8dB8±ÀB9rB9B:EB:à B;}B(gB?4êB@UBBA‰BBÐBD)ÇBE•ÞBGðBH£”BJDdBKõöBM·ßBO‰·BQkBS[†BUZ«BWhBYƒbB[¬(B]âB`$BbsmBdÎ;Bg4žBi¦9Bl"´Bn©·Bq:íBsÖBvz­By(™B{ß|B~Ÿ B€³‚B‚Bƒ‡‹B„÷VB†jÒB‡áßB‰\`BŠÚ9BŒ[PB߉BfËBðýB’~ B” ÖB• OB—5^B˜ÌïBšfîBœHB¡êBœHBšfîB˜ÌïB—5^B• OB” ÖB’~ BðýBfËB߉BŒ[PBŠÚ9B‰\`B‡áßB†jÒB„÷VBƒ‡‹B‚B€³‚B~Ÿ B{ß|By(™Bvz­BsÖBq:íBn©·Bl"´Bi¦9Bg4žBdÎ;BbsmB`$B]âB[¬(BYƒbBWhBUZ«BS[†BQkBO‰·BM·ßBKõöBJDdBH£”BGðBE•ÞBD)ÇBBÐBA‰B@UBB?4êB>(gB=0BÜB>´7B?jpB@5NBAŽBBëBCBD)ÇBEW¤BF˜VBGë„BIPÐBJÇÚBLPABMé BO“•BQM¹BS§BTðùBVÙJBXÐ3BZÕQB\è@B_œBa6BcpBe¶~BhÔBjfÀBlÏêBoCûBqÂBtKBvÞOByz¾B| €B~ÏKB€ÃkB‚#mBƒ‡‹B„ï£B†[”B‡ËAB‰>‹BеUBŒ/ƒB¬úB-ŸB±ZB’8B“Á®B•NB–Ý;B˜oBšSB›š B3UBžÎÝB3UB›š BšSB˜oB–Ý;B•NB“Á®B’8B±ZB-ŸB¬úBŒ/ƒBеUB‰>‹B‡ËAB†[”B„ï£Bƒ‡‹B‚#mB€ÃkB~ÏKB| €Byz¾BvÞOBtKBqÂBoCûBlÏêBjfÀBhÔBe¶~BcpBa6B_œB\è@BZÕQBXÐ3BVÙJBTðùBS§BQM¹BO“•BMé BLPABJÇÚBIPÐBGë„BF˜VBEW¤BD)ÇBCBBëBAŽB@5NB?jpB>´7B>ÜB=†–B=“B<­üBsBT¶BUô BWhBXìˆBZB\%9B]ØÇB_›WBalŽBcLBe9‹Bg4žBi<óBkR1BmtBo¢BqÜBt!‘Bvr^BxÎB{4B}¥:B€ÿBRAB‚™?BƒäÖB…4äB†‰GB‡áßB‰>‹BŠŸ-BŒ¨BkÞBŽ×³BG B‘¹ÌB“/ÜB”©#B–%‡B—¤òB™'MBš¬Bœ4zB¿#BŸLhB Ü5B¢nxB Ü5BŸLhB¿#Bœ4zBš¬B™'MB—¤òB–%‡B”©#B“/ÜB‘¹ÌBG BŽ×³BkÞBŒ¨BŠŸ-B‰>‹B‡áßB†‰GB…4äBƒäÖB‚™?BRAB€ÿB}¥:B{4BxÎBvr^Bt!‘BqÜBo¢BmtBkR1Bi<óBg4žBe9‹BcLBalŽB_›WB]ØÇB\%9BZBXìˆBWhBUô BT¶BS>sBQýBPÎ_BO±,BN¦CBM­ëBLÈfBKõöBK6ÔBJ‹8BIóSBIoSBHÿ]BH£”BH\BH(òBH =BLBL BL($BLZFBL bBLúaBMh+BMé BN~›BO&ñBOâtBP°ðBQ’,BR…îBS‹ôBT£ûBUͼBWîBXUEBY²qB[ #B\žB^+ÎB_ÉBau¤Bc1 BdúøBfÓBh¹Bj¬›Bl­PBnºàBpÔ÷BrûBBu-pBwk.By´.B| B~f¹B€gÖB¡XB‚ß½B„"äB…j©B†¶êBˆ‡B‰\`BеUBŒHBsBŽ×³B?òB‘«¾B“üB”“B–jB—|iB˜øxBšw‚B›ùoB~,BŸ£B ¿B¢oB£«ŸB¢oB ¿BŸ£B~,B›ùoBšw‚B˜øxB—|iB–jB”“B“üB‘«¾B?òBŽ×³BsBŒHBеUB‰\`Bˆ‡B†¶êB…j©B„"äB‚ß½B¡XB€gÖB~f¹B| By´.Bwk.Bu-pBrûBBpÔ÷BnºàBl­PBj¬›Bh¹BfÓBdúøBc1 Bau¤B_ÉB^+ÎB\žB[ #BY²qBXUEBWîBUͼBT£ûBS‹ôBR…îBQ’,BP°ðBOâtBO&ñBN~›BMé BMh+BLúaBL bBLZFBL($BL BPBP ØBP'_BPX‹BPNBPõ–BQaJBQàLBRrxBS§BSÏ­BTšYBUwuBVfÈBWhBX{BYŸ BZÕQB\ìB]s$B^Ú®B`R:BaÙyBcpBeÌBfÊ:BhBj^Bl<·Bn(ÜBp" Br(/Bt:ºBvYoBxƒþBzºB|ûrBG¾B€ÏXB‚Bƒ5³B„pLB…¯«B†ó¬BˆÂB¢°B¤%rB¥0B§ÁB¨•BªB¨•B§ÁB¥0B¤%rB¢°B¡>ÂBŸÏùBždUBœûìB›–ÖBš5)B˜ÖüB—|iB–%‡B”ÒqB“ƒAB’8BðýB®"BŽošB5…BŒBŠÏ)B‰£ Bˆ|B‡YõB†=B…%ƒB„cBƒ×B‚B€ÿB€B~;B|@üBzp‹Bx­/Bv÷1BuN×Bs´jBr(/BpªnBo;kBmÛkBlаBkI}BjBhö©BgåƒBfäØBeôÞBeÌBdGÑBc‹BbßÚBbF0Ba¾CBaH4B`äB`’B`R:B`$B` $BdBdûBd#ëBdPÉBd‹Bdà"BeBzBe¶~Bf<BfÓBg{pBh4ñBhÿsBiÚËBjÆÈBkÃ9BlÏêBmì£Bo+BpUFBq ¸BrûBBtd¤BuÜœBwbçBx÷CBz™kB|IB~ BÏûB€ÓRBÄßB‚¼ƒBƒºB„½‡B…Æ£B†ÕOB‡éhB‰ÎBŠ!`B‹DÿBŒmŒBšçBŽÌòBŽB‘>ŸB’~ B“Á®B• sB–U=B—¤òB˜øxBšO¶B›ª“BøBžjÌBŸÏùB¡8iB¢¤B¤ºB¥„rB¦ùB¨pB©êêB«gìB©êêB¨pB¦ùB¥„rB¤ºB¢¤B¡8iBŸÏùBžjÌBøB›ª“BšO¶B˜øxB—¤òB–U=B• sB“Á®B’~ B‘>ŸBŽBŽÌòBšçBŒmŒB‹DÿBŠ!`B‰ÎB‡éhB†ÕOB…Æ£B„½‡BƒºB‚¼ƒBÄßB€ÓRBÏûB~ B|IBz™kBx÷CBwbçBuÜœBtd¤BrûBBq ¸BpUFBo+Bmì£BlÏêBkÃ9BjÆÈBiÚËBhÿsBh4ñBg{pBfÓBf<Be¶~BeBzBdà"Bd‹BdPÉBd#ëBdûBhBhÔBh#MBhOeBhBhÜHBi<óBi®ýBj2NBjÆÈBklKBl"´BléÚBmÁ•Bn©·Bo¢BpªnBqÂBrêfBt!‘BugâBv½Bx!By“]B{ãB|¢VB~>uBçÿB€ÏXB±#B‚™?Bƒ‡‹B„{åB…v,B†v>B‡{üBˆ‡DB‰—öBŠ­óB‹ÉBŒéLBŽkB8YBføB‘š*B’ÑÒB” ÖB•NB–’~B—ÚîB™'MBšw‚B›ËtB# Bž~/BŸÜÉB¡>ÂB¢¤B¤ |B¥xB¦æ³B¨XJB©ÌÅB«DB¬¾B«DB©ÌÅB¨XJB¦æ³B¥xB¤ |B¢¤B¡>ÂBŸÜÉBž~/B# B›ËtBšw‚B™'MB—ÚîB–’~B•NB” ÖB’ÑÒB‘š*BføB8YBŽkBŒéLB‹ÉBŠ­óB‰—öBˆ‡DB‡{üB†v>B…v,B„{åBƒ‡‹B‚™?B±#B€ÏXBçÿB~>uB|¢VB{ãBy“]Bx!Bv½BugâBt!‘BrêfBqÂBpªnBo¢Bn©·BmÁ•BléÚBl"´BklKBjÆÈBj2NBi®ýBi<óBhÜHBhBhOeBh#MBhÔBlBl­Bl"´BlN BlаBlØBm7šBm§¼Bn(ÜBnºàBo]§BpBpÔ÷Bq©2Br—BsùBt†'Bu™ïBv½Bwï{By0ÑBz€åB{ß|B}LZB~ÇAB€'úB€óBÄßB‚+Bƒ{ÝB„`ÕB…KòB†=B‡4Bˆ0èB‰3YBŠ;PB‹H­BŒ[PBsBŽñB±²BØAB’‚B“3WB”g¤B• OB–Ý;B˜NB™cnBš¬B›ùoBJBžžyBŸöfB¡QÏB¢°B¤ºB¥xB¦àB¨L B©º­B«,$B¬ tB®‰B¬ tB«,$B©º­B¨L B¦àB¥xB¤ºB¢°B¡QÏBŸöfBžžyBJB›ùoBš¬B™cnB˜NB–Ý;B• OB”g¤B“3WB’‚BØAB±²BŽñBsBŒ[PB‹H­BŠ;PB‰3YBˆ0èB‡4B†=B…KòB„`ÕBƒ{ÝB‚+BÄßB€óB€'úB~ÇAB}LZB{ß|Bz€åBy0ÑBwï{Bv½Bu™ïBt†'BsùBr—Bq©2BpÔ÷BpBo]§BnºàBn(ÜBm§¼Bm7šBlØBlаBlN Bl"´Bl­BpBpˆBp" BpLÁBpˆbBpÔ÷Bq2pBq ¸BrºBr¯[BsO}BtBtÀÀBu‘˜Bvr^BwbçBxcByrˆBz‘>B{¾ôB|ûrB~FƒBŸîB€ƒ¼B>tB‚B‚ÈBBƒ—B„loB…HB†*B‡BˆBˆóÚB‰írBŠì¨B‹ñ^BŒûvBŽ ÑBQB8ØB‘WJB’zŠB“¢{B”ÏB–B—5^B˜oB™¬ÌBšî§Bœ4zB~,BžË¤B ÊB¡qˆB¢ÉÈB¤%rB¥„rB¦æ³B¨L B©´¤B« -B¬Ž§B®B¯t&B®B¬Ž§B« -B©´¤B¨L B¦æ³B¥„rB¤%rB¢ÉÈB¡qˆB ÊBžË¤B~,Bœ4zBšî§B™¬ÌB˜oB—5^B–B”ÏB“¢{B’zŠB‘WJB8ØBQBŽ ÑBŒûvB‹ñ^BŠì¨B‰írBˆóÚBˆB‡B†*B…HB„loBƒ—B‚ÈBB‚B>tB€ƒ¼BŸîB~FƒB|ûrB{¾ôBz‘>ByrˆBxcBwbçBvr^Bu‘˜BtÀÀBtBsO}Br¯[BrºBq ¸Bq2pBpÔ÷BpˆbBpLÁBp" BpˆBtBteBt!‘BtKBt†'BtÑ|Bu-pBu™ïBväBv¤5BwAÈBwï{Bx­/Byz¾BzXB{DÏB|@üB}LZB~f¹BçB€cÙBòB±#B‚bQBƒ_BƒÙ1B„ž¨B…j©B†=B‡ÍB‡ô´BˆÙ¬B‰Ä–BеUB‹«ÉBŒ§ÖB©]Bް@B¼bBͦB‘ãïB’ÿ!B”B•CÎB–mB—šÑB˜ÌïBšSB›=ãBœ|†B¿#BŸ£B OìB¡éB¢ï‚B¤D B¥0B¦ùB¨XJB©º­B« -B¬ˆ¸B­ô:B¯b¢B°ÓÞB¯b¢B­ô:B¬ˆ¸B« -B©º­B¨XJB¦ùB¥0B¤D B¢ï‚B¡éB OìBŸ£B¿#Bœ|†B›=ãBšSB˜ÌïB—šÑB–mB•CÎB”B’ÿ!B‘ãïBͦB¼bBް@B©]BŒ§ÖB‹«ÉBеUB‰Ä–BˆÙ¬B‡ô´B‡ÍB†=B…j©B„ž¨BƒÙ1Bƒ_B‚bQB±#BòB€cÙBçB~f¹B}LZB|@üB{DÏBzXByz¾Bx­/Bwï{BwAÈBv¤5BväBu™ïBu-pBtÑ|Bt†'BtKBt!‘BteBxBxBBx!BxJGBxƒþBxÎBy(™By“]BzVBz™kB{4B{ß|B|š:B}dšB~>uB'¥B€ÿB€“«B¿B±#B‚J¿B‚ëzBƒ“8B„AàB„÷VB…³B†v>B‡?xBˆBˆäåB‰ÀßBŠ¢ßB‹ŠÈBŒx|BkÞBŽdÑBc9BføB‘oñB’~ B“‘#B”©#B•ÅîB–çiB˜ yB™8BšfîB›š BœÑ€Bž öBŸLhB ¿B¡ÖåB£!ÁB¤p=B¥ÂEB§ÁB¨pB©ÌÅB«,$B¬Ž§B­ô:B¯\ÌB°ÈHB²6žB°ÈHB¯\ÌB­ô:B¬Ž§B«,$B©ÌÅB¨pB§ÁB¥ÂEB¤p=B£!ÁB¡ÖåB ¿BŸLhBž öBœÑ€B›š BšfîB™8B˜ yB–çiB•ÅîB”©#B“‘#B’~ B‘oñBføBc9BŽdÑBkÞBŒx|B‹ŠÈBŠ¢ßB‰ÀßBˆäåBˆB‡?xB†v>B…³B„÷VB„AàBƒ“8B‚ëzB‚J¿B±#B¿B€“«B€ÿB'¥B~>uB}dšB|š:B{ß|B{4Bz™kBzVBy“]By(™BxÎBxƒþBxJGBx!BxBB|B| B| €B|IB|çB|ÊÛB}#éB}B~ B~ŽöB'¥BÏûB€CîB€§’BÙB…¯B‚B‚·Bƒ ¿Bƒ›B„2cB„ÐÏB…v,B†"_B†ÕOB‡ŽàBˆNøB‰|B‰âNBеUB‹ŽsBŒmŒBR„BŽ=?B-ŸB#ŠB‘âB’ŒB“%lB”0gB•@`B–U=B—nãB˜8B™° Bš×„BœHB3UBžgBŸŸãB Ü5B¢oB£`zB¤¨@B¥ó©B§B¡B¨•B©êêB«DB¬ tB®B¯b¢B°ÈHB²0ßB³œVB²0ßB°ÈHB¯b¢B®B¬ tB«DB©êêB¨•B§B¡B¥ó©B¤¨@B£`zB¢oB Ü5BŸŸãBžgB3UBœHBš×„B™° B˜8B—nãB–U=B•@`B”0gB“%lB’ŒB‘âB#ŠB-ŸBŽ=?BR„BŒmŒB‹ŽsBеUB‰âNB‰|BˆNøB‡ŽàB†ÕOB†"_B…v,B„ÐÏB„2cBƒ›Bƒ ¿B‚·B‚B…¯BÙB€§’B€CîBÏûB'¥B~ŽöB~ B}B}#éB|ÊÛB|çB|IB| €B| B€B€B€ÿB€#ûB€?ðB€cÙB€¯B€ÃkB€ÿBBjB—BàzB‚;B‚+Bƒ×BƒwøBƒð{B„pLB„÷VB……ƒB†¼B†¶êB‡YõBˆÄBˆ´=B‰kHBŠ(ÊBŠì¨B‹¶ÈBŒ‡B]bBŽ9¥B½BŽBðýB‘ãïB’ÜHB“ÙíB”ÜÃB•ä¯B–ñ–B˜^B™íBš5)B›TøBœy@B¡êBžÎÝB B¡5uB'¥B€ÿB€“«B¿B±#B‚J¿B‚ëzBƒ“8B„AàB„÷VB…³B†v>B‡?xBˆBˆäåB‰ÀßBŠ¢ßB‹ŠÈBŒx|BkÞBŽdÑBc9BføB‘oñB’~ B“‘#B”©#B•ÅîB–çiB˜ yB™8BšfîB›š BœÑ€Bž öBŸLhB ¿B¡ÖåB£!ÁB¤p=B¥ÂEB§ÁB¨pB©ÌÅB«,$B¬Ž§B­ô:B¯\ÌB°ÈHB²6žB°ÈHB¯\ÌB­ô:B¬Ž§B«,$B©ÌÅB¨pB§ÁB¥ÂEB¤p=B£!ÁB¡ÖåB ¿BŸLhBž öBœÑ€B›š BšfîB™8B˜ yB–çiB•ÅîB”©#B“‘#B’~ B‘oñBføBc9BŽdÑBkÞBŒx|B‹ŠÈBŠ¢ßB‰ÀßBˆäåBˆB‡?xB†v>B…³B„÷VB„AàBƒ“8B‚ëzB‚J¿B±#B¿B€“«B€ÿB'¥B~>uB}dšB|š:B{ß|B{4Bz™kBzVBy“]By(™BxÎBxƒþBxJGBx!BxBBtBteBt!‘BtKBt†'BtÑ|Bu-pBu™ïBväBv¤5BwAÈBwï{Bx­/Byz¾BzXB{DÏB|@üB}LZB~f¹BçB€cÙBòB±#B‚bQBƒ_BƒÙ1B„ž¨B…j©B†=B‡ÍB‡ô´BˆÙ¬B‰Ä–BеUB‹«ÉBŒ§ÖB©]Bް@B¼bBͦB‘ãïB’ÿ!B”B•CÎB–mB—šÑB˜ÌïBšSB›=ãBœ|†B¿#BŸ£B OìB¡éB¢ï‚B¤D B¥0B¦ùB¨XJB©º­B« -B¬ˆ¸B­ô:B¯b¢B°ÓÞB¯b¢B­ô:B¬ˆ¸B« -B©º­B¨XJB¦ùB¥0B¤D B¢ï‚B¡éB OìBŸ£B¿#Bœ|†B›=ãBšSB˜ÌïB—šÑB–mB•CÎB”B’ÿ!B‘ãïBͦB¼bBް@B©]BŒ§ÖB‹«ÉBеUB‰Ä–BˆÙ¬B‡ô´B‡ÍB†=B…j©B„ž¨BƒÙ1Bƒ_B‚bQB±#BòB€cÙBçB~f¹B}LZB|@üB{DÏBzXByz¾Bx­/Bwï{BwAÈBv¤5BväBu™ïBu-pBtÑ|Bt†'BtKBt!‘BteBpBpˆBp" BpLÁBpˆbBpÔ÷Bq2pBq ¸BrºBr¯[BsO}BtBtÀÀBu‘˜Bvr^BwbçBxcByrˆBz‘>B{¾ôB|ûrB~FƒBŸîB€ƒ¼B>tB‚B‚ÈBBƒ—B„loB…HB†*B‡BˆBˆóÚB‰írBŠì¨B‹ñ^BŒûvBŽ ÑBQB8ØB‘WJB’zŠB“¢{B”ÏB–B—5^B˜oB™¬ÌBšî§Bœ4zB~,BžË¤B ÊB¡qˆB¢ÉÈB¤%rB¥„rB¦æ³B¨L B©´¤B« -B¬Ž§B®B¯t&B®B¬Ž§B« -B©´¤B¨L B¦æ³B¥„rB¤%rB¢ÉÈB¡qˆB ÊBžË¤B~,Bœ4zBšî§B™¬ÌB˜oB—5^B–B”ÏB“¢{B’zŠB‘WJB8ØBQBŽ ÑBŒûvB‹ñ^BŠì¨B‰írBˆóÚBˆB‡B†*B…HB„loBƒ—B‚ÈBB‚B>tB€ƒ¼BŸîB~FƒB|ûrB{¾ôBz‘>ByrˆBxcBwbçBvr^Bu‘˜BtÀÀBtBsO}Br¯[BrºBq ¸Bq2pBpÔ÷BpˆbBpLÁBp" BpˆBlBl­Bl"´BlN BlаBlØBm7šBm§¼Bn(ÜBnºàBo]§BpBpÔ÷Bq©2Br—BsùBt†'Bu™ïBv½Bwï{By0ÑBz€åB{ß|B}LZB~ÇAB€'úB€óBÄßB‚+Bƒ{ÝB„`ÕB…KòB†=B‡4Bˆ0èB‰3YBŠ;PB‹H­BŒ[PBsBŽñB±²BØAB’‚B“3WB”g¤B• OB–Ý;B˜NB™cnBš¬B›ùoBJBžžyBŸöfB¡QÏB¢°B¤ºB¥xB¦àB¨L B©º­B«,$B¬ tB®‰B¬ tB«,$B©º­B¨L B¦àB¥xB¤ºB¢°B¡QÏBŸöfBžžyBJB›ùoBš¬B™cnB˜NB–Ý;B• OB”g¤B“3WB’‚BØAB±²BŽñBsBŒ[PB‹H­BŠ;PB‰3YBˆ0èB‡4B†=B…KòB„`ÕBƒ{ÝB‚+BÄßB€óB€'úB~ÇAB}LZB{ß|Bz€åBy0ÑBwï{Bv½Bu™ïBt†'BsùBr—Bq©2BpÔ÷BpBo]§BnºàBn(ÜBm§¼Bm7šBlØBlаBlN Bl"´Bl­BhBhÔBh#MBhOeBhBhÜHBi<óBi®ýBj2NBjÆÈBklKBl"´BléÚBmÁ•Bn©·Bo¢BpªnBqÂBrêfBt!‘BugâBv½Bx!By“]B{ãB|¢VB~>uBçÿB€ÏXB±#B‚™?Bƒ‡‹B„{åB…v,B†v>B‡{üBˆ‡DB‰—öBŠ­óB‹ÉBŒéLBŽkB8YBføB‘š*B’ÑÒB” ÖB•NB–’~B—ÚîB™'MBšw‚B›ËtB# Bž~/BŸÜÉB¡>ÂB¢¤B¤ |B¥xB¦æ³B¨XJB©ÌÅB«DB¬¾B«DB©ÌÅB¨XJB¦æ³B¥xB¤ |B¢¤B¡>ÂBŸÜÉBž~/B# B›ËtBšw‚B™'MB—ÚîB–’~B•NB” ÖB’ÑÒB‘š*BføB8YBŽkBŒéLB‹ÉBŠ­óB‰—öBˆ‡DB‡{üB†v>B…v,B„{åBƒ‡‹B‚™?B±#B€ÏXBçÿB~>uB|¢VB{ãBy“]Bx!Bv½BugâBt!‘BrêfBqÂBpªnBo¢Bn©·BmÁ•BléÚBl"´BklKBjÆÈBj2NBi®ýBi<óBhÜHBhBhOeBh#MBhÔBdBdûBd#ëBdPÉBd‹Bdà"BeBzBe¶~Bf<BfÓBg{pBh4ñBhÿsBiÚËBjÆÈBkÃ9BlÏêBmì£Bo+BpUFBq ¸BrûBBtd¤BuÜœBwbçBx÷CBz™kB|IB~ BÏûB€ÓRBÄßB‚¼ƒBƒºB„½‡B…Æ£B†ÕOB‡éhB‰ÎBŠ!`B‹DÿBŒmŒBšçBŽÌòBŽB‘>ŸB’~ B“Á®B• sB–U=B—¤òB˜øxBšO¶B›ª“BøBžjÌBŸÏùB¡8iB¢¤B¤ºB¥„rB¦ùB¨pB©êêB«gìB©êêB¨pB¦ùB¥„rB¤ºB¢¤B¡8iBŸÏùBžjÌBøB›ª“BšO¶B˜øxB—¤òB–U=B• sB“Á®B’~ B‘>ŸBŽBŽÌòBšçBŒmŒB‹DÿBŠ!`B‰ÎB‡éhB†ÕOB…Æ£B„½‡BƒºB‚¼ƒBÄßB€ÓRBÏûB~ B|IBz™kBx÷CBwbçBuÜœBtd¤BrûBBq ¸BpUFBo+Bmì£BlÏêBkÃ9BjÆÈBiÚËBhÿsBh4ñBg{pBfÓBf<Be¶~BeBzBdà"Bd‹BdPÉBd#ëBdûB`B` $B`$B`R:B`’B`äBaH4Ba¾CBbF0BbßÚBc‹BdGÑBeÌBeôÞBfäØBgåƒBhö©BjBkI}BlаBmÛkBo;kBpªnBr(/Bs´jBuN×Bv÷1Bx­/Bzp‹B|@üB~;B€B€ÿB‚Bƒ×B„cB…%ƒB†=B‡YõBˆ|B‰£ BŠÏ)BŒB5…BŽošB®"BðýB’8B“ƒAB”ÒqB–%‡B—|iB˜ÖüBš5)B›–ÖBœûìBždUBŸÏùB¡>ÂB¢°B¤%rB¥0B§ÁB¨•BªB¨•B§ÁB¥0B¤%rB¢°B¡>ÂBŸÏùBždUBœûìB›–ÖBš5)B˜ÖüB—|iB–%‡B”ÒqB“ƒAB’8BðýB®"BŽošB5…BŒBŠÏ)B‰£ Bˆ|B‡YõB†=B…%ƒB„cBƒ×B‚B€ÿB€B~;B|@üBzp‹Bx­/Bv÷1BuN×Bs´jBr(/BpªnBo;kBmÛkBlаBkI}BjBhö©BgåƒBfäØBeôÞBeÌBdGÑBc‹BbßÚBbF0Ba¾CBaH4B`äB`’B`R:B`$B` $B\B\ OB\%9B\S¸B\”ÀB\è@B]N#B]ÆPB^PªB^íB_›WB`[[Ba,íBbÛBcòBdûBe¼BfDøBg{pBhÁäBjBk}±BlòBnv4BpˆBq©2BsWèBu_BvÞOBxµkBz™kB|ŠB~†êB€GìBRAB‚bQBƒwøB„“B…³B†ÙBˆÄB‰3YBŠg»B‹ ÊBŒÞeBŽ pBfËB±ZB’B“R¡B”©#B–jB—a\B˜ÂáBš'àB›ABœûìBžjÌBŸÜÉB¡QÏB¢ÉÈB¤D B¥ÂEB§B¡B¨Å¤B§B¡B¥ÂEB¤D B¢ÉÈB¡QÏBŸÜÉBžjÌBœûìB›ABš'àB˜ÂáB—a\B–jB”©#B“R¡B’B±ZBfËBŽ pBŒÞeB‹ ÊBŠg»B‰3YBˆÄB†ÙB…³B„“BƒwøB‚bQBRAB€GìB~†êB|ŠBz™kBxµkBvÞOBu_BsWèBq©2BpˆBnv4BlòBk}±BjBhÁäBg{pBfDøBe¼BdûBcòBbÛBa,íB`[[B_›WB^íB^PªB]ÆPB]N#B\è@B\”ÀB\S¸B\%9B\ OBXBX {BX%êBXUEBX—BXìˆBYTIBYΨBZ[…BZú½B[¬(B\o™B]DâB^+ÎB_$&B`-²BaH4BbsmBc¯BdúøBfVÁBgÂ-Bi<óBjÆÈBl_bBntBo»²Bq~ÏBsO}Bu-pBwZByïB{ãB}#éB?¸B€³‚BÌÃB‚ëzB„ƒB…8¼B†gB‡š4BˆÒ0BŠÖB‹PBŒ•¡B߉B-ŸBÇB‘ÕåB“/ÜB”“B•îîB—SÔB˜¼-Bš'àB›–ÖBøBž~/BŸöfB¡qˆB¢ï‚B¤p=B¥ó©B§y²B¥ó©B¤p=B¢ï‚B¡qˆBŸöfBž~/BøB›–ÖBš'àB˜¼-B—SÔB•îîB”“B“/ÜB‘ÕåBÇB-ŸB߉BŒ•¡B‹PBŠÖBˆÒ0B‡š4B†gB…8¼B„ƒB‚ëzBÌÃB€³‚B?¸B}#éB{ãByïBwZBu-pBsO}Bq~ÏBo»²BntBl_bBjÆÈBi<óBgÂ-BfVÁBdúøBc¯BbsmBaH4B`-²B_$&B^+ÎB]DâB\o™B[¬(BZú½BZ[…BYΨBYTIBXìˆBX—BXUEBX%êBX {BTBT ©BT&¡BTVàBTšYBTðùBUZ«BU×PBVfÈBWîBW½—BX„•BY]µBZHÃB[E‚B\S¸B]s$B^£ƒB_ä‘Ba6Bb——BdûBe‰æBg Bh¹BjfÀBl"´Bmì£BoÄ=Bq©2Bs›3Bu™ïBw¥By¼aB{ß|B~B€#ûBF`B‚nBƒ›B„ÌôB†ÒB‡?xBˆÄB‰Ä–B‹ ÏBŒ[PB¬úB¯B\TB‘¹ÌB“üB”ÉB•èB—SÔB˜ÂáBš5)B›ª“B# BžžyB ÊB¡éB£!ÁB¤¨@B¦1RB¤¨@B£!ÁB¡éB ÊBžžyB# B›ª“Bš5)B˜ÂáB—SÔB•èB”ÉB“üB‘¹ÌB\TB¯B¬úBŒ[PB‹ ÏB‰Ä–BˆÄB‡?xB†ÒB„ÌôBƒ›B‚nBF`B€#ûB~B{ß|By¼aBw¥Bu™ïBs›3Bq©2BoÄ=Bmì£Bl"´BjfÀBh¹Bg Be‰æBdûBb——Ba6B_ä‘B^£ƒB]s$B\S¸B[E‚BZHÃBY]µBX„•BW½—BWîBVfÈBU×PBUZ«BTðùBTšYBTVàBT&¡BT ©BPBP ØBP'_BPX‹BPNBPõ–BQaJBQàLBRrxBS§BSÏ­BTšYBUwuBVfÈBWhBX{BYŸ BZÕQB\ìB]s$B^Ú®B`R:BaÙyBcpBeÌBfÊ:BhBj^Bl<·Bn(ÜBp" Br(/Bt:ºBvYoBxƒþBzºB|ûrBG¾B€ÏXB‚Bƒ5³B„pLB…¯«B†ó¬BˆsBT¶BUô BWhBXìˆBZB\%9B]ØÇB_›WBalŽBcLBe9‹Bg4žBi<óBkR1BmtBo¢BqÜBt!‘Bvr^BxÎB{4B}¥:B€ÿBRAB‚™?BƒäÖB…4äB†‰GB‡áßB‰>‹BŠŸ-BŒ¨BkÞBŽ×³BG B‘¹ÌB“/ÜB”©#B–%‡B—¤òB™'MBš¬Bœ4zB¿#BŸLhB Ü5B¢nxB Ü5BŸLhB¿#Bœ4zBš¬B™'MB—¤òB–%‡B”©#B“/ÜB‘¹ÌBG BŽ×³BkÞBŒ¨BŠŸ-B‰>‹B‡áßB†‰GB…4äBƒäÖB‚™?BRAB€ÿB}¥:B{4BxÎBvr^Bt!‘BqÜBo¢BmtBkR1Bi<óBg4žBe9‹BcLBalŽB_›WB]ØÇB\%9BZBXìˆBWhBUô BT¶BS>sBQýBPÎ_BO±,BN¦CBM­ëBLÈfBKõöBK6ÔBJ‹8BIóSBIoSBHÿ]BH£”BH\BH(òBH =BDBD sBD)ÇBD]ôBD¦èBEŒBEvÄBEýjBF˜VBGGYBH =BHàÉBIÊ¿BJÇÚBK×ÔBLúaBN/4BOuúBPÎ_BR8 BS²©BU=ÝBVÙJBX„•BZ?`B\ OB]âB_ÉBa¾CBcÁBeÑÜB>´7B?jpB@5NBAŽBBëBCBD)ÇBEW¤BF˜VBGë„BIPÐBJÇÚBLPABMé BO“•BQM¹BS§BTðùBVÙJBXÐ3BZÕQB\è@B_œBa6BcpBe¶~BhÔBjfÀBlÏêBoCûBqÂBtKBvÞOByz¾B| €B~ÏKB€ÃkB‚#mBƒ‡‹B„ï£B†[”B‡ËAB‰>‹BеUBŒ/ƒB¬úB-ŸB±ZB’8B“Á®B•NB–Ý;B˜oBšSB›š B3UBžÎÝB3UB›š BšSB˜oB–Ý;B•NB“Á®B’8B±ZB-ŸB¬úBŒ/ƒBеUB‰>‹B‡ËAB†[”B„ï£Bƒ‡‹B‚#mB€ÃkB~ÏKB| €Byz¾BvÞOBtKBqÂBoCûBlÏêBjfÀBhÔBe¶~BcpBa6B_œB\è@BZÕQBXÐ3BVÙJBTðùBS§BQM¹BO“•BMé BLPABJÇÚBIPÐBGë„BF˜VBEW¤BD)ÇBCBBëBAŽB@5NB?jpB>´7B>ÜB=†–B=“B<­üB(gB?4êB@UBBA‰BBÐBD)ÇBE•ÞBGðBH£”BJDdBKõöBM·ßBO‰·BQkBS[†BUZ«BWhBYƒbB[¬(B]âB`$BbsmBdÎ;Bg4žBi¦9Bl"´Bn©·Bq:íBsÖBvz­By(™B{ß|B~Ÿ B€³‚B‚Bƒ‡‹B„÷VB†jÒB‡áßB‰\`BŠÚ9BŒ[PB߉BfËBðýB’~ B” ÖB• OB—5^B˜ÌïBšfîBœHB¡êBœHBšfîB˜ÌïB—5^B• OB” ÖB’~ BðýBfËB߉BŒ[PBŠÚ9B‰\`B‡áßB†jÒB„÷VBƒ‡‹B‚B€³‚B~Ÿ B{ß|By(™Bvz­BsÖBq:íBn©·Bl"´Bi¦9Bg4žBdÎ;BbsmB`$B]âB[¬(BYƒbBWhBUZ«BS[†BQkBO‰·BM·ßBKõöBJDdBH£”BGðBE•ÞBD)ÇBBÐBA‰B@UBB?4êB>(gB=0BŸB’ÑÒB”g¤B–B—šÑB™8Bš×„Bœy@Bš×„B™8B—šÑB–B”g¤B’ÑÒB‘>ŸB®"BŽ pBŒ•¡B‹ ÏB‰‰Bˆ‡B†‰GB…oBƒ—B‚#mB€³‚B~ŽöB{¾ôBx÷CBv8,BsùBpÔ÷Bn1uBk—ÆBi=Bfƒ1BdûBa™÷B_6B\ÞúBZ“ÅBXUEBV#àBTBQê BOâtBMé BLBJ&BH\BF¢¦BDú'BCcBAÝ®B@jB? B=¼–B<‚ŒB;\QB:JDB9L½B8dB7B6ÒƒB6*.B5—ÌB5’B4µ°B4fIB4-}B4 `B0B0 £B0.…B0h›B0¹ÌB1!úB1 ûB26žB2â¬B3¤ãB4|üB5j©B6m–B7…hB8±ÀB9ò(gB?µGBAT(BC˜BDÆ$BF˜VBHz¼BJlàBLnQBN~›BPNBRÉüBU5BWKBYŸ B\B^lKB`äBcgBeôÞBhBk/^BmÛkBpåBsO}BväBxæÎB{¾ôB~Ÿ B€ÃkB‚;Bƒ¶9B…4äB†¶êBˆ(gB<­üB;FsB9ò§BväBx÷CB{ß|B~ÏKB€ã6B‚bQBƒäÖB…j©B†ó¬BˆÄBŠÖB‹ ÊB5…BŽÌòBføB’‚B“¢{B•CÎB–çiB˜8Bš5)B˜8B–çiB•CÎB“¢{B’‚BføBŽÌòB5…B‹ ÊBŠÖBˆÄB†ó¬B…j©BƒäÖB‚bQB€ã6B~ÏKB{ß|Bx÷CBväBs>§BpnÕBm§¼BjéªBh4ñBe‰æBbèàB`R:B]ÆPB[E‚BXÐ3BVfÈBT ©BQ¹@BOuúBM@FBK–BHÿ]BFõBDú'BCBA4^B?jpB=±ÊB< äB:v8B8ô=B7…hB6*.B4âÿB3°IB2’vB1‰êB0—B/º!B.óB.C B-ª–B-(­B,¾B,kB,/šB, èB(B( 0B(0¼B(m“B(›B)/±B)´¤B*Q>B+=B+ÐYB,²>B-ª–B.¸ÿB/ÝB1jB2dB3ÇB5=|B6ÇOB8dB:DB;ÔhB=¦þB?ЇBA~ƒBC‚uBE•ÞBG¸EBIé/BL($BNt°BPÎ_BS4ÀBU§hBX%êBZ¯ßB]DâB_ä‘BbŽBeBzBhBjÆÈBm–BpnÕBsO}Bv8,By(™B| €BžBÙB‚™?B„"äB…¯«B‡?xBˆÒ0BŠg»BŒBšçB8YBØAB’zŠB”B•ÅîB—nãB™íB—nãB•ÅîB”B’zŠBØAB8YBšçBŒBŠg»BˆÒ0B‡?xB…¯«B„"äB‚™?BÙBžB| €By(™Bv8,BsO}BpnÕBm–BjÆÈBhBeBzBbŽB_ä‘B]DâBZ¯ßBX%êBU§hBS4ÀBPÎ_BNt°BL($BIé/BG¸EBE•ÞBC‚uBA~ƒB?ЇB=¦þB;ÔhB:DB8dB6ÇOB5=|B3ÇB2dB1jB/ÝB.¸ÿB-ª–B,²>B+ÐYB+=B*Q>B)´¤B)/±B(›B(m“B(0¼B( 0B$B$ |B$1ìB$p=B$ÇUB%7 B%¿.B&_‚B'ÁB'çB(ξB)ÌÅB*áMB, èB-L%B.¡ŒB0 £B1‰êB3áB4ÁB6xÏB8B¼B:EB< äB>B@TBB2BD]ôBF˜VBHàÉBK6ÔBMšBP ØBR…îBU ÒBW¡BZ?`B\è@B_›WBbXIBe¼BgîXBjÆÈBm§¼BpåBsùBvz­Byz¾B|çBçBRAB‚ß½B„pLB†ÒB‡š4B‰3YBŠÏ)BŒmŒBŽkB±²B‘WJB’ÿ!B”©#B–U=B˜^B–U=B”©#B’ÿ!B‘WJB±²BŽkBŒmŒBŠÏ)B‰3YB‡š4B†ÒB„pLB‚ß½BRABçB|çByz¾Bvz­BsùBpåBm§¼BjÆÈBgîXBe¼BbXIB_›WB\è@BZ?`BW¡BU ÒBR…îBP ØBMšBK6ÔBHàÉBF˜VBD]ôBB2B@TB>B< äB:EB8B¼B6xÏB4ÁB3áB1‰êB0 £B.¡ŒB-L%B, èB*áMB)ÌÅB(ξB'çB'ÁB&_‚B%¿.B%7 B$ÇUB$p=B$1ìB$ |B B ÌB 3+B s B ÌJB!>ÂB!Ê=B"nxB#++B$B$ìšB%ð“B' B(<éB)„XB*áMB,SEB-Ù»B/t&B1!úB2â¬B4µ°B6šxB8yB:—(B<­üB>ÔlBA òBCN BE ÔlB<­üB:—(B8yB6šxB4µ°B2â¬B1!úB/t&B-Ù»B,SEB*áMB)„XB(<éB' B%ð“B$ìšB$B#++B"nxB!Ê=B!>ÂB ÌJB s B 3+B ÌBB B4zBuûBÑ€BFÞBÕÚB~/B?ŒB ˜B! ìB"B#7¸B$p=B%¿.B'$B(ž/B*-'B+ÐYB-‡1B/QB1-‰B3áB5’B7, B9L½B;}B=¼–B@ ªBBfÒBDÐŒBGGYBIÊ¿BLZFBNõ}BQ›òBTM:BWîBYΨB\žB_v±BbXIBeBzBh4ñBk/^Bn1uBq:íBtKBwbçBz€åB}¥:B€gÖB‚Bƒ›B…8¼B†ÙBˆ|BŠ!`B‹ÉBsBQBͦB’~ B”0gB•ä¯B”0gB’~ BͦBQBsB‹ÉBŠ!`Bˆ|B†ÙB…8¼Bƒ›B‚B€gÖB}¥:Bz€åBwbçBtKBq:íBn1uBk/^Bh4ñBeBzBbXIB_v±B\žBYΨBWîBTM:BQ›òBNõ}BLZFBIÊ¿BGGYBDÐŒBBfÒB@ ªB=¼–B;}B9L½B7, B5’B3áB1-‰B/QB-‡1B+ÐYB*-'B(ž/B'$B%¿.B$p=B#7¸B"B! ìB ˜B?ŒB~/BÕÚBFÞBÑ€BuûB4zB BB yB5ÜByBÖüBOfBâBŽ´BTøB4zB,ÑB=†BfB ¦B!ü×B#iáB$ìšB&„lB(0¼B)ððB+ÄmB-ª–B/¢ÐB1¬‚B3ÇB5ñïB8,€B:v8B<ΉB?4êBA¨ÕBD)ÇBF·DBIPÐBKõöBN¦CBQaJBT&¡BVõáBYΨB\°™B_›WBbŽBe‰æBhBk—ÆBn©·BqÂBtâ7BxBB{4B~f¹B€ÏXB‚nB„ƒB…³B‡YõB‰ÎBŠ­óBŒ[PBŽ ÑB¼bB‘oñB“%lB”ÜÃB“%lB‘oñB¼bBŽ ÑBŒ[PBŠ­óB‰ÎB‡YõB…³B„ƒB‚nB€ÏXB~f¹B{4BxBBtâ7BqÂBn©·Bk—ÆBhBe‰æBbŽB_›WB\°™BYΨBVõáBT&¡BQaJBN¦CBKõöBIPÐBF·DBD)ÇBA¨ÕB?4êB<ΉB:v8B8,€B5ñïB3ÇB1¬‚B/¢ÐB-ª–B+ÄmB)ððB(0¼B&„lB$ìšB#iáB!ü×B ¦BfB=†B,ÑB4zBTøBŽ´BâBOfBÖüByB5ÜB yBB ÖB7PB|VBÜÃBXaBîîB Bk‚BPÂBOfBfîB–ÖBÞB=†B³!B!>ÂB"ßËB$•–B&_‚B(<éB*-'B,/šB.C B0h›B2îB4âÿB779B9š B< äB>‰=BAŽBC¬WBFPBHÿ]BK¹®BN~›BQM¹BT&¡BWîBYôAB\è@B_ä‘BbèàBeôÞBi=Bl"´BoCûBrkÏBu™ïBxÎB| BG¾BF`B‚ëzB„“B†=B‡éhB‰—öB‹H­BŒûvBް@BføB’ŒB“ÙíB’ŒBføBް@BŒûvB‹H­B‰—öB‡éhB†=B„“B‚ëzBF`BG¾B| BxÎBu™ïBrkÏBoCûBl"´Bi=BeôÞBbèàB_ä‘B\è@BYôABWîBT&¡BQM¹BN~›BK¹®BHÿ]BFPBC¬WBAŽB>‰=B< äB9š B779B4âÿB2îB0h›B.C B,/šB*-'B(<éB&_‚B$•–B"ßËB!>ÂB³!B=†BÞB–ÖBfîBOfBPÂBk‚B BîîBXaBÜÃB|VB7PB ÖBB8B8ØBÇBâÜBaÛBü~B²lBƒABn‹BsÌB’~BÊBíBsBB”ìB?ŒB ÿ4B"Ó7B$ºçB&µ—B(›B*áMB-B/QB1 ûB4B6m–B8é)B;r-B>B@ª_BCX‰BFBHÖ—BK¥’BN~›BQaJBTM:BWB BZ?`B]DâB`R:BcgBfƒ1Bi¦9BlÏêBpBs6;Bvr^By´.B|ûrB€#ûBÌÃBƒwøB…%ƒB†ÕOBˆ‡DBŠ;PB‹ñ^B©]Bc9B‘âB’ÜHB‘âBc9B©]B‹ñ^BŠ;PBˆ‡DB†ÕOB…%ƒBƒwøBÌÃB€#ûB|ûrBy´.Bvr^Bs6;BpBlÏêBi¦9Bfƒ1BcgB`R:B]DâBZ?`BWB BTM:BQaJBN~›BK¥’BHÖ—BFBCX‰B@ª_B>B;r-B8é)B6m–B4B1 ûB/QB-B*áMB(›B&µ—B$ºçB"Ó7B ÿ4B?ŒB”ìBBsBíBÊB’~BsÌBn‹BƒAB²lBü~BaÛBâÜBÇB8ØB8B B  B :wB ƒkB éLB kÞB ÑBÅÆBœOBóBš*BÀbBBXaBÈÝBPÂBï`B£ÿBmêBLhB!>ÂB#DCB%\7B'…ìB)ÀµB, èB.fßB0ÐøB3I˜B5Ð'B8dB;ËB=±ÊB@jBC.•BEýjBHÖ—BK¹®BN¦CBQ›òBTšYBW¡BZ¯ßB]ÆPB`äBdûBg4žBjfÀBmŸBpÝxBt!‘Bwk.BzºB~B€³‚B‚bQB„cB…Æ£B‡{üB‰3YBŠì¨BŒ§ÖBŽdÑB#ŠB‘ãïB#ŠBŽdÑBŒ§ÖBŠì¨B‰3YB‡{üB…Æ£B„cB‚bQB€³‚B~BzºBwk.Bt!‘BpÝxBmŸBjfÀBg4žBdûB`äB]ÆPBZ¯ßBW¡BTšYBQ›òBN¦CBK¹®BHÖ—BEýjBC.•B@jB=±ÊB;ËB8dB5Ð'B3I˜B0ÐøB.fßB, èB)ÀµB'…ìB%\7B#DCB!>ÂBLhBmêB£ÿBï`BPÂBÈÝBXaBBÀbBš*BóBœOBÅÆB ÑB kÞB éLB ƒkB :wB  BBBBˆ0èB‰írB‹«ÉBkÞB-ŸBðýB-ŸBkÞB‹«ÉB‰írBˆ0èB†v>B„½‡Bƒ×BRAB?¸B{ß|BxƒþBu-pBqÜBn÷BkI}BhÔBdÎ;Ba™÷B^lKB[E‚BX%êBU ÒBQýBNõ}BKõöBHÿ]BFBC.•B@UBB=†–B:à B8 !B5__B2ÀPB0.…B-ª–B+5B(ξB&xB$1ìB!ü×BÙ•BÈàBËtBâB yBNmB¥±BBš*B8ØBðÈB §B ¯B ¶ÈB Ú9B öB vuBðB‡DBB‹YB÷VB®B*BïáBÒËBÒ0B írB #åB t×B ߉Bc9BÿB²lB|VB\ BPÂBYªBuûB¤îB åÁB#7¸B%šB( 0B*SB-ÙB/º!B2dB5’B7Þ™B:­B=†–B@jBCX‰BFPBIPÐBLZFBOlBR…îBU§hBXÐ3B\B_6BbsmBe¶~BhÿsBlN Bo¢BrûBBvYoBy¼aB}#éB€GìB‚BƒºB…v,B‡4BˆóÚBеUBŒx|BŽ=?BŽBŽ=?BŒx|BеUBˆóÚB‡4B…v,BƒºB‚B€GìB}#éBy¼aBvYoBrûBBo¢BlN BhÿsBe¶~BbsmB_6B\BXÐ3BU§hBR…îBOlBLZFBIPÐBFPBCX‰B@jB=†–B:­B7Þ™B5’B2dB/º!B-ÙB*SB( 0B%šB#7¸B åÁB¤îBuûBYªBPÂB\ B|VB²lBÿBc9B ߉B t×B #åB írBÒ0BÒËBïáB*B®B÷VB‹YB>BƒBBÿB?ðB¯BÿB—B;B×Bð{B÷VB¼BYõB´=B (ÊB ¶ÈB ]bB½BðýBÜHBÜÃBñ–BíBTøB¡êB B"nxB$ìšB'y²B*B,¾B/t&B26žB5óB7Þ™B:à B=±ÊB@ª_BC¬WBF·DBIÊ¿BLæeBP ØBS4ÀBVfÈBYŸ B\ÞúB`$BcpBfÁZBjBmtBpÔ÷Bt:ºBw¥B{ãB~†êB€ÿB‚¼ƒB„{åB†=BˆB‰Ä–B‹ŠÈBR„B½BR„B‹ŠÈB‰Ä–BˆB†=B„{åB‚¼ƒB€ÿB~†êB{ãBw¥Bt:ºBpÔ÷BmtBjBfÁZBcpB`$B\ÞúBYŸ BVfÈBS4ÀBP ØBLæeBIÊ¿BF·DBC¬WB@ª_B=±ÊB:à B7Þ™B5óB26žB/t&B,¾B*B'y²B$ìšB"nxB B¡êBTøBíBñ–BÜÃBÜHBðýB½B ]bB ¶ÈB (ÊB´=BYõB¼B÷VBð{B×B;B—BÿB¯B?ðBÿAøAø!AøƒþAù(™AúVAû4Aüš:Aþ>uBÿB¿BJ¿B“8B÷VBv>BB ÀßB ŠÈB kÞBc9BoñB‘#BÅîB yBfîBÑ€BLhB!ÖåB$p=B'ÁB)ÌÅB,ާB/\ÌB26žB5’B8 !B;ËB>BAŽBD)ÇBGGYBJlàBMšBPÎ_BT ©BWKBZ“ÅB]âBa6Bd‹BgîXBkR1BnºàBr(/Bu™ïByïB|ŠB€BÄßBƒ‡‹B…KòB‡BˆÙ¬BŠ¢ßBŒmŒBŽ9¥BŒmŒBŠ¢ßBˆÙ¬B‡B…KòBƒ‡‹BÄßB€B|ŠByïBu™ïBr(/BnºàBkR1BgîXBd‹Ba6B]âBZ“ÅBWKBT ©BPÎ_BMšBJlàBGGYBD)ÇBAŽB>B;ËB8 !B5’B26žB/\ÌB,ާB)ÌÅB'ÁB$p=B!ÖåBLhBÑ€BfîB yBÅîB‘#BoñBc9B kÞB ŠÈB ÀßBBv>B÷VB“8BJ¿B¿BÿAþ>uAüš:Aû4AúVAù(™AøƒþAø!AðAð" AðˆbAñ2pAòºAóO}AôÀÀAör^AøcAú‘>AüûrAÿŸîB>tBÈBBloB*BB írB ñ^B ÑB8ØBzŠBÏB5^B¬ÌB4zBˤB!qˆB$%rB&æ³B)´¤B,ާB/t&B2dB5__B8dB;r-B>‰=BA¨ÕBDÐŒBHBK6ÔBNt°BQ¹@BU5BXUEB[¬(B_œBbjaBeщ=B;r-B8dB5__B2dB/t&B,ާB)´¤B&æ³B$%rB!qˆBˤB4zB¬ÌB5^BÏBzŠB8ØB ÑB ñ^B írBB*BloBÈBB>tAÿŸîAüûrAú‘>AøcAör^AôÀÀAóO}AòºAñ2pAðˆbAð" AèAè#MAèAé<óAê2NAëlKAìéÚAî©·AðªnAòêfAõgâAø!AûãAþ>uBÏXB™?B{åBv>B‡DB ­óB éLB8YBš*B ÖB’~B'MBËtB~/B!>ÂB$ |B&æ³B)ÌÅB,¾B/º!B2ÀPB5Ð'B8é)B< äB?4êBBfÒBE ÂB~/BËtB'MB’~B ÖBš*B8YB éLB ­óB‡DBv>B{åB™?BÏXAþ>uAûãAø!AõgâAòêfAðªnAî©·AìéÚAëlKAê2NAé<óAèAè#MAàAà$Aà’AáH4AâF0Aã‹AåÌAæäØAèö©AëI}AíÛkAðªnAó´jAö÷1Aúp‹Aþ;BÿB×B%ƒBYõB £ B BošBðýBƒAB%‡BÖüB–ÖBdUB!>ÂB$%rB'ÁB*B-ÙB0.…B3I˜B6m–B9š B<ΉB@ ªBCN BF˜VBIé/BM@FBPNBTBWhBZÕQB^GsBa¾CBe9‹Bh¹Bl<·BoÄ=BsO}BvÞOBzp‹B~ B€ÏXB‚+B„loB†=BˆB‰âNB‹¶ÈB‰âNBˆB†=B„loB‚+B€ÏXB~ Bzp‹BvÞOBsO}BoÄ=Bl<·Bh¹Be9‹Ba¾CB^GsBZÕQBWhBTBPNBM@FBIé/BF˜VBCN B@ ªB<ΉB9š B6m–B3I˜B0.…B-ÙB*B'ÁB$%rB!>ÂBdUB–ÖBÖüB%‡BƒABðýBošB B £ BYõB%ƒB×BÿAþ;Aúp‹Aö÷1Aó´jAðªnAíÛkAëI}Aèö©AæäØAåÌAã‹AâF0AáH4Aà’Aà$AØAØ%êAØ—AÙTIAÚ[…AÛ¬(AÝDâAß$&AáH4Aã¯AæVÁAé<óAì_bAﻲAóO}A÷ZAûãAÿ?¸BÌÃBƒBgBÒ0B PB ߉BÇB/ÜBîîB¼-B–ÖB~/B!qˆB$p=B'y²B*SB-ª–B0ÐøB4B779B:v8B=¼–BA òBD]ôBG¸EBK–BN~›BQê BUZ«BXÐ3B\JlB_ÉBcLBfÓBj^Bmì£Bq~ÏBu_Bx­/B|IBçÿBÄßBƒ—B…j©B‡?xB‰|BŠì¨B‰|B‡?xB…j©Bƒ—BÄßBçÿB|IBx­/Bu_Bq~ÏBmì£Bj^BfÓBcLB_ÉB\JlBXÐ3BUZ«BQê BN~›BK–BG¸EBD]ôBA òB=¼–B:v8B779B4B0ÐøB-ª–B*SB'y²B$p=B!qˆB~/B–ÖB¼-BîîB/ÜBÇB ߉B PBÒ0BgBƒBÌÃAÿ?¸AûãA÷ZAóO}AﻲAì_bAé<óAæVÁAã¯AáH4Aß$&AÝDâAÛ¬(AÚ[…AÙTIAØ—AØ%êAÐAÐ'_AÐNAÑaJAÒrxAÓÏ­AÕwuA×hAÙŸ AÜìAÞÚ®AáÙyAåÌAèAì<·Að" Aô:ºAøƒþAüûrBÏXB5³B¯«BÔlBB2BE•ÞBHÿ]BLnQBOâtBS[†BVÙJBZ[…B]âBalŽBdúøBhBl"´Bo»²BsWèBv÷1Bz™kB~>uB€óB‚ÈBB„ž¨B†v>BˆNøBŠ(ÊBˆNøB†v>B„ž¨B‚ÈBB€óB~>uBz™kBv÷1BsWèBo»²Bl"´BhBdúøBalŽB]âBZ[…BVÙJBS[†BOâtBLnQBHÿ]BE•ÞBB2B>ÔlB;}B8,€B4âÿB1 ûB.fßB+5B( 0B$ìšB!ÖåBˤBËtBÖüBîîBBG B ˆÒB Ú9BBA~ƒBDú'BHz¼BLBO‰·BS§BV©›BZ?`B]ØÇBau¤BeÌBh¹Bl_bBpˆBs´jBwbçB{ãB~ÇAB>tBƒ_B„÷VB†ÕOBˆ´=B†ÕOB„÷VBƒ_B>tB~ÇAB{ãBwbçBs´jBpˆBl_bBh¹BeÌBau¤B]ØÇBZ?`BV©›BS§BO‰·BLBHz¼BDú'BA~ƒB>B:—(B7, B3ÇB0h›B-B)ÀµB&xB#7¸B BÑ€B¬ÌB’~BƒABÇB ˆÒB Ÿ-BöB÷VB;AÿžAùí‘Aôâ7AðAëI}AæÁZAâjaAÞGsAÚ[…AÖ©›AÓ4ÀAÐAÍ\AÊbÂAÈAÅè¹AÄVAÂ¥þAÁ~ƒAÀª_AÀ*¦A¸A¸,€A¸±ÀA¹AºÃ A¼L2A¾(gAÀUBAÂÐAÅ•ÞAÈ£”AËõöAω·AÓ[†A×hAÛ¬(Aà$AäÎ;Aé¦9Aî©·AóÖAù(™AþŸ BB÷VBáßB Ú9B ߉BðýB ÖB5^BfîB¡êB åÁB$1ìB'…ìB*áMB.C B1¬‚B5’B8yB< äB?ЇBCBF˜VBJ&BM·ßBQM¹BTç[BX„•B\%9B_ÉBcpBg BjÆÈBnv4Br(/BuÜœBy“]B}LZB€ƒ¼B‚bQB„AàB†"_BˆÄB†"_B„AàB‚bQB€ƒ¼B}LZBy“]BuÜœBr(/Bnv4BjÆÈBg BcpB_ÉB\%9BX„•BTç[BQM¹BM·ßBJ&BF˜VBCB?ЇB< äB8yB5’B1¬‚B.C B*áMB'…ìB$1ìB åÁB¡êBfîB5^B ÖBðýB ߉B Ú9BáßB÷VBAþŸ Aù(™AóÖAî©·Aé¦9AäÎ;Aà$AÛ¬(A×hAÓ[†Aω·AËõöAÈ£”AÅ•ÞAÂÐAÀUBA¾(gA¼L2AºÃ A¹A¸±ÀA¸,€A°A°.…A°¹ÌA± ûA²â¬A´|üA¶m–A¸±ÀA»FsA¾(gAÁT(AÄÆ$AÈz¼AÌnQAÐNAÕ5AÙŸ AÞlKAãgAèAíÛkAóO}AøæÎAþŸ B;B4äBA®¸ÿA±jA³ÇA¶ÇOAºDA½¦þAÁ~ƒAÅ•ÞAÉé/AÎt°AÓ4ÀAØ%êAÝDâAâŽAèAí–AóO}Aù(™AÿžB™?B¯«BÒ0B B8YBzŠBÅîBíBuûBÙ•B#DCB&µ—B*-'B-ª–B1-‰B4µ°B8B¼B;ÔhB?jpBC˜BF¢¦BJDdBMé BQ’,BU=ÝBXìˆB\žB`R:BdûBgÂ-Bk}±Bo;kBrûBBv½Bz€åB~FƒBòB‚ëzB„ÐÏB†¶êB„ÐÏB‚ëzBòB~FƒBz€åBv½BrûBBo;kBk}±BgÂ-BdûB`R:B\žBXìˆBU=ÝBQ’,BMé BJDdBF¢¦BC˜B?jpB;ÔhB8B¼B4µ°B1-‰B-ª–B*-'B&µ—B#DCBÙ•BuûBíBÅîBzŠB8YB BÒ0B¯«B™?AÿžAù(™AóO}Aí–AèAâŽAÝDâAØ%êAÓ4ÀAÎt°AÉé/AÅ•ÞAÁ~ƒA½¦þAºDA¶ÇOA³ÇA±jA®¸ÿA¬²>A«=A©´¤A¨Â›A¨0¼A A 3+A ÌJA¡Ê=A£++A¤ìšA§ A©„XA¬SEA¯t&A²â¬A¶šxAº—(A¾ÔlAÃN AÈAÌæeAÑýA×B Aܰ™AâF0AèAíÛkAóÖAùí‘BÿB5³BgB £ B éLB8ØB‘#Bñ–BYªBÈàB!>ÂB$ºçB(<éB+ÄmB/QB2â¬B6xÏB:DB=±ÊBAT(BDú'BH£”BLPABPBS²©BWhB[ #B^Ú®Bb——BfVÁBjBmÛkBq ¸BugâBy0ÑB|ûrB€cÙB‚J¿B„2cB†¼B„2cB‚J¿B€cÙB|ûrBy0ÑBugâBq ¸BmÛkBjBfVÁBb——B^Ú®B[ #BWhBS²©BPBLPABH£”BDú'BAT(B=±ÊB:DB6xÏB2â¬B/QB+ÄmB(<éB$ºçB!>ÂBÈàBYªBñ–B‘#B8ØB éLB £ BgB5³BÿAùí‘AóÖAíÛkAèAâF0Aܰ™A×B AÑýAÌæeAÈAÃN A¾ÔlAº—(A¶šxA²â¬A¯t&A¬SEA©„XA§ A¤ìšA£++A¡Ê=A ÌJA 3+A˜A˜5ÜA˜ÖüA™âA›TøA,ÑAŸfA¡ü×A¤ìšA¨0¼A«ÄmA¯¢ÐA³ÇA¸,€A¼Î‰AÁ¨ÕAÆ·DAËõöAÑaJAÖõáAܰ™AâŽAèAî©·Aôâ7Aû4BÏXBƒBYõB ­óB ÑBoñBÜÃBPÂBËtBLhB"Ó7B&_‚B)ððB-‡1B1!úB4ÁB8dB< äB?µGBCcBGðBJÇÚBN~›BR8 BUô BY²qB]s$Ba6BdúøBhÁäBlаBpUFBt!‘Bwï{B{¾ôBçB±#Bƒ›B……ƒBƒ›B±#BçB{¾ôBwï{Bt!‘BpUFBlаBhÁäBdúøBa6B]s$BY²qBUô BR8 BN~›BJÇÚBGðBCcB?µGB< äB8dB4ÁB1!úB-‡1B)ððB&_‚B"Ó7BLhBËtBPÂBÜÃBoñB ÑB ­óBYõBƒBÏXAû4Aôâ7Aî©·AèAâŽAܰ™AÖõáAÑaJAËõöAÆ·DAÁ¨ÕA¼Î‰A¸,€A³ÇA¯¢ÐA«ÄmA¨0¼A¤ìšA¡ü×AŸfA,ÑA›TøA™âA˜ÖüA˜5ÜAA8ØAâÜA‘ü~A“ƒAA•sÌA—ÊAšsA”ìA ÿ4A¤ºçA¨Â›A­A± ûA¶m–A»r-AÀª_AÆAË¥’AÑaJA×B AÝDâAãgAé¦9AðAör^AüûrBÌÃB%ƒB‡DB ñ^Bc9BÜHB\ BâBmêB ÿ4B$•–B(0¼B+ÐYB/t&B3áB6ÇOB:v8B>(gBAÝ®BE•ÞBIPÐBM\BPÎ_BT¶BXUEB\ìB_ä‘Bc¯Bg{pBkI}Bo+BrêfBv½Bz‘>B~f¹B¿Bƒ ¿B„÷VBƒ ¿B¿B~f¹Bz‘>Bv½BrêfBo+BkI}Bg{pBc¯B_ä‘B\ìBXUEBT¶BPÎ_BM\BIPÐBE•ÞBAÝ®B>(gB:v8B6ÇOB3áB/t&B+ÐYB(0¼B$•–B ÿ4BmêBâB\ BÜHBc9B ñ^B‡DB%ƒBÌÃAüûrAör^AðAé¦9AãgAÝDâA×B AÑaJAË¥’AÆAÀª_A»r-A¶m–A± ûA­A¨Â›A¤ºçA ÿ4A”ìAšsA—ÊA•sÌA“ƒAA‘ü~AâÜA8ØAˆAˆB írB kÞBðýB|VB yB£ÿB?ŒB"ßËB&„lB*-'B-Ù»B1‰êB5=|B8ô=B<­üB@jBD)ÇBGë„BK¯ BOuúBS>sBWîBZÕQB^£ƒBbsmBfDøBjBmì£BqÂBu™ïByrˆB}LZB€“«B‚·B„pLB‚·B€“«B}LZByrˆBu™ïBqÂBmì£BjBfDøBbsmB^£ƒBZÕQBWîBS>sBOuúBK¯ BGë„BD)ÇB@jB<­üB8ô=B5=|B1‰êB-Ù»B*-'B&„lB"ßËB?ŒB£ÿB yB|VBðýB kÞB írBv>B×Aÿ?¸AøƒþAñÜAëI}AäÎ;AÞlKAØ%êAÑýAËõöAÆAÀUBAºÃ Aµ__A°.…A«5A¦xA¡ü×AÈàA™âA–NmA“A8ØA§A‹¶ÈAŠöAˆðAˆÂB$ìšB(ž/B,SEB0 £B3ÇB7…hB;FsB? BBÐBF˜VBJbÂBN/4BQýBUͼBYŸ B]s$BaH4Be¼Bhö©BlÏêBpªnBt†'BxcB|@üB€ÿB‚Bƒð{B‚B€ÿB|@üBxcBt†'BpªnBlÏêBhö©Be¼BaH4B]s$BYŸ BUͼBQýBN/4BJbÂBF˜VBBÐB? B;FsB7…hB3ÇB0 £B,SEB(ž/B$ìšB!>ÂB”ìBï`BNmB²lB½B ŠÈBB{åBÿAûãAô:ºAítAæÁZAà$AÙŸ AÓ4ÀAÌæeAÆ·DAÀª_AºÃ AµóA¯t&AªA¤ìšA A›TøA–ñ–A’ÜHA½A‹¶ÈAˆ´=A†¼Aƒð{A‚;A€ÿA€?ðApApˆbArºAtÀÀAxcA|ûrA>tA„loAˆA‹ñ^A8ØA”ÏA™¬ÌAžË¤A¤%rA©´¤A¯t&Aµ__A»r-AÁ¨ÕAÈAÎt°AÕ5AÛ¬(AâjaAé<óAð" A÷ZAþ;B™?B*B ÀßB ]bBÿB¥±BPÂBB³!B#iáB'$B*áMB.¡ŒB2dB6*.B9òtA|ûrAxcAtÀÀArºApˆbA`A`’AbF0AeÌAhö©AmÛkAs´jAzp‹A€ÿA…%ƒA‰£ AŽošA“ƒAA˜ÖüAždUA¤%rAªA°.…A¶m–A¼Î‰AÃN AÉé/AÐNA×hAÞGsAå9‹Aì<·AóO}Aúp‹BÏXBloBB ¶ÈBc9BBÈÝBsB=†B!ü×B%¿.B)„XB-L%B1jB4âÿB8±ÀB<‚ŒB@UBBD)ÇBHBK×ÔBO±,BS‹ôBWhB[E‚B_$&BcòBfäØBjÆÈBn©·Br—Bvr^BzXB~>uBÙBƒ×BÙB~>uBzXBvr^Br—Bn©·BjÆÈBfäØBcòB_$&B[E‚BWhBS‹ôBO±,BK×ÔBHBD)ÇB@UBB<‚ŒB8±ÀB4âÿB1jB-L%B)„XB%¿.B!ü×B=†BsBÈÝBBc9B ¶ÈBBloBÏXAúp‹AóO}Aì<·Aå9‹AÞGsA×hAÐNAÉé/AÃN A¼Î‰A¶m–A°.…AªA¤%rAždUA˜ÖüA“ƒAAŽošA‰£ A…%ƒA€ÿAzp‹As´jAmÛkAhö©AeÌAbF0A`’APAPNARrxAUwuAYŸ A^Ú®AeÌAl<·At:ºA|ûrAƒ5³AˆuBÈBBv>B (ÊB ߉Bš*BXaBíBÞB ¦B$p=B(<éB, èB/ÝB3°IB7…hB;\QB?4êBCBFêÅBJÇÚBN¦CBR…îBVfÈBZHÃB^+ÎBbÛBeôÞBiÚËBmÁ•Bq©2Bu‘˜Byz¾B}dšB€§’B‚+B€§’B}dšByz¾Bu‘˜Bq©2BmÁ•BiÚËBeôÞBbÛB^+ÎBZHÃBVfÈBR…îBN¦CBJÇÚBFêÅBCB?4êB;\QB7…hB3°IB/ÝB, èB(<éB$p=B ¦BÞBíBXaBš*B ߉B (ÊBv>BÈBAþ>uAö÷1AﻲAèAálŽAÚ[…AÓ[†AÌnQAÅ•ÞA¾ÔlA¸,€A± ûA«5A¤ìšAžË¤A˜ÖüA“AˆÒAˆtB÷VB´=B t×B8ØBBÊB–ÖBfB#7¸B' B*áMB.¸ÿB2’vB6m–B:JDB>(gBBëBEè¹BIÊ¿BM­ëBQ’,BUwuBY]µB]DâBa,íBeÌBhÿsBléÚBpÔ÷BtÀÀBx­/B|š:B€CîB‚;B€CîB|š:Bx­/BtÀÀBpÔ÷BléÚBhÿsBeÌBa,íB]DâBY]µBUwuBQ’,BM­ëBIÊ¿BEè¹BBëB>(gB:JDB6m–B2’vB.¸ÿB*áMB' B#7¸BfB–ÖBÊBB8ØB t×B´=B÷VB>tAûãAó´jAì_bAåÌAÝØÇAÖ©›Aω·AÈz¼AÁ~ƒAº—(A³ÇA­A¦xA A™¬ÌA“ƒAAˆÒA‡Ã¶A‚;Ayí‘ApAfÁZA^GsAV©›APAJbÂAEè¹AB¥þA@ª_A0A0¹ÌA2â¬A6m–A;FsAAT(AHz¼APNAYŸ AcgAmÛkAxæÎA‚;AˆB0—B4|üB8dBB(ξB$ìšB! ìB,ÑBOfBsÌBš*B §B írB¼BJ¿AüûrAõgâAíÛkAæVÁAÞÚ®A×hAÐAÈ£”AÁT(AºDA²â¬A«ÄmA¤ºçAÈàA–ñ–A8ØA‰£ Aƒ5³Ayí‘AmÛkAbF0AWB ALæeACN A:—(A2â¬A,SEA' A#++A ÌJAAâÜAƒAAÊA”ìA$ºçA-A6m–A@ª_AK¥’AWB AcgApA|ûrA…%ƒA‹ñ^A’ÜHA™âA ÿ4A¨0¼A¯t&A¶ÇOA¾(gAÅ•ÞAÍ\AÔ¶AÜìAã¯AëI}AòêfAú‘>B¿B÷VBÒ0B ¯BóBn‹BPÂB4zB ˜B$B'çB+ÐYB/º!B3¤ãB7B;}B?jpBCX‰BGGYBK6ÔBO&ñBS§BWîBZú½B^íBbßÚBfÓBjÆÈBnºàBr¯[Bv¤5Bz™kB~ŽöBBjB~ŽöBz™kBv¤5Br¯[BnºàBjÆÈBfÓBbßÚB^íBZú½BWîBS§BO&ñBK6ÔBGGYBCX‰B?jpB;}B7B3¤ãB/º!B+ÐYB'çB$B ˜B4zBPÂBn‹BóB ¯BÒ0B÷VB¿Aú‘>AòêfAëI}Aã¯AÜìAÔ¶AÍ\AÅ•ÞA¾(gA¶ÇOA¯t&A¨0¼A ÿ4A™âA’ÜHA‹ñ^A…%ƒA|ûrApAcgAWB AK¥’A@ª_A6m–A-A$ºçA”ìAÊAƒAAâÜAAÿAð{A´=A½Añ–A A*A5óA@ª_ALæeAYŸ AfÁZAt:ºA€ÿAˆA½A–NmA”ìA¤ìšA¬SEA³ÇA»FsAÂÐAÊbÂAÑýAÙŸ AáH4Aèö©AðªnAøcBÿBð{BÒËB ¶ÈBœOBƒABk‚BTøB?ŒB#++B'ÁB+=B.óB2â¬B6ÒƒB:à B>´7BB¥þBF˜VBJ‹8BN~›BRrxBVfÈBZ[…B^PªBbF0Bf<Bj2NBn(ÜBrºBväBzVB~ B€ÿB~ BzVBväBrºBn(ÜBj2NBf<BbF0B^PªBZ[…BVfÈBRrxBN~›BJ‹8BF˜VBB¥þB>´7B:à B6ÒƒB2â¬B.óB+=B'ÁB#++B?ŒBTøBk‚BƒABœOB ¶ÈBÒËBð{BÿAøcAðªnAèö©AáH4AÙŸ AÑýAÊbÂAÂÐA»FsA³ÇA¬SEA¤ìšA”ìA–NmA½AˆA€ÿAt:ºAfÁZAYŸ ALæeA@ª_A5óA*A Añ–A½A´=Að{Aÿ@à@âF0@èö©@ó´jAÿA £ AƒAAdUA*A6m–ACN APNA^GsAl<·Azp‹A„loA‹¶ÈA“AšsA¡ü×A©„XA±jA¸±ÀAÀUBAÈAϱ,A×hAß$&AæäØAî©·Aör^Aþ>uB×BïáB Ú9BÅÆB²lB BŽ´B~/B"nxB&_‚B*Q>B.C B26žB6*.B:EB>ÜBBëBEýjBIóSBMé BQàLBU×PBYΨB]ÆPBa¾CBe¶~Bi®ýBm§¼Bq ¸Bu™ïBy“]B}B€ÃkB}By“]Bu™ïBq ¸Bm§¼Bi®ýBe¶~Ba¾CB]ÆPBYΨBU×PBQàLBMé BIóSBEýjBBëB>ÜB:EB6*.B26žB.C B*Q>B&_‚B"nxB~/BŽ´B B²lBÅÆB Ú9BïáB×Aþ>uAör^Aî©·AæäØAß$&A×hAϱ,AÈAÀUBA¸±ÀA±jA©„XA¡ü×AšsA“A‹¶ÈA„loAzp‹Al<·A^GsAPNACN A6m–A*AdUAƒAA £ Aÿ@ó´j@èö©@âF0@À@Â¥þ@ÊbÂ@Ö©›@æÁZ@ùí‘AöAƒAA A-A:—(AHz¼AV©›AeÌAs´jA>tAˆ´=A8ØA—ÊAŸfA§ A®¸ÿA¶m–A¾(gAÅè¹AÍ­ëAÕwuAÝDâAåÌAìéÚAôÀÀAüš:B;B*B öB ÑBü~BîîBâBÕÚB!Ê=B%¿.B)´¤B-ª–B1 ûB5—ÌB9B=†–BA~ƒBEvÄBIoSBMh+BQaJBUZ«BYTIB]N#BaH4BeBzBi<óBm7šBq2pBu-pBy(™B}#éB€¯B}#éBy(™Bu-pBq2pBm7šBi<óBeBzBaH4B]N#BYTIBUZ«BQaJBMh+BIoSBEvÄBA~ƒB=†–B9B5—ÌB1 ûB-ª–B)´¤B%¿.B!Ê=BÕÚBâBîîBü~B ÑB öB*B;Aüš:AôÀÀAìéÚAåÌAÝDâAÕwuAÍ­ëAÅè¹A¾(gA¶m–A®¸ÿA§ AŸfA—ÊA8ØAˆ´=A>tAs´jAeÌAV©›AHz¼A:—(A-A AƒAAö@ùí‘@æÁZ@Ö©›@ÊbÂ@Â¥þ@ @£++@¬SE@º—(@Ìæe@âF0@ùí‘A £ Añ–A$ºçA2â¬AAT(APA^Ú®AmÛkA|ûrA†¼A§A•sÌA,ÑA¤ìšA¬²>A´|üA¼L2AÄVAËõöAÓÏ­AÛ¬(Aã‹AëlKAóO}Aû4B—B®B vuB kÞBaÛBXaBOfBFÞB!>ÂB%7 B)/±B-(­B1!úB5’B9rB=“BA òBEŒBHÿ]BLúaBPõ–BTðùBXìˆB\è@B`äBdà"BhÜHBlØBpÔ÷BtÑ|BxÎB|ÊÛB€cÙB|ÊÛBxÎBtÑ|BpÔ÷BlØBhÜHBdà"B`äB\è@BXìˆBTðùBPõ–BLúaBHÿ]BEŒBA òB=“B9rB5’B1!úB-(­B)/±B%7 B!>ÂBFÞBOfBXaBaÛB kÞB vuB®B—Aû4AóO}AëlKAã‹AÛ¬(AÓÏ­AËõöAÄVA¼L2A´|üA¬²>A¤ìšA,ÑA•sÌA§A†¼A|ûrAmÛkA^Ú®APAAT(A2â¬A$ºçAñ–A £ @ùí‘@âF0@Ìæe@º—(@¬SE@£++@€@ƒð{@½@ @µó@Ìæe@æÁZAÿA½A”ìA,SEA;FsAJbÂAYŸ Ahö©AxcAƒð{A‹¶ÈA“ƒAA›TøA£++A«=A²â¬AºÃ AÂ¥þAÊ‹8AÒrxAÚ[…AâF0Aê2NAòºAúVBÿB÷VBðB éLBâÜBÜÃBÖüBÑ€B ÌJB$ÇUB(›B,¾B0¹ÌB4µ°B8±ÀB<­üB@ª_BD¦èBH£”BL bBPNBTšYBX—B\”ÀB`’Bd‹BhBlаBpˆbBt†'BxƒþB|çB€?ðB|çBxƒþBt†'BpˆbBlаBhBd‹B`’B\”ÀBX—BTšYBPNBL bBH£”BD¦èB@ª_B<­üB8±ÀB4µ°B0¹ÌB,¾B(›B$ÇUB ÌJBÑ€BÖüBÜÃBâÜB éLBðB÷VBÿAúVAòºAê2NAâF0AÚ[…AÒrxAÊ‹8AÂ¥þAºÃ A²â¬A«=A£++A›TøA“ƒAA‹¶ÈAƒð{AxcAhö©AYŸ AJbÂA;FsA,SEA”ìA½Aÿ@æÁZ@Ìæe@µó@ @½@ƒð{@@@JbÂ@fÁZ@‡Ã¶@ @º—(@Ö©›@ó´jA´=AÊA' A6m–AEè¹AUwuAeÌAtÀÀA‚;AŠöA‘ü~A™âA¡Ê=A©´¤A± ûA¹AÁ~ƒAÉoSAÑaJAÙTIAáH4Aé<óAñ2pAù(™B¯B‹YB‡DB ƒkBÇB|VByBuûB s B$p=B(m“B,kB0h›B4fIB8dBBB?ðAøƒþAðˆbAèAà’AØ—AÐNAÈ£”AÀª_A¸±ÀA°¹ÌA¨Â›A ÌJA˜ÖüAâÜAˆðA€ÿArºAbF0ARrxAB¥þA2â¬A#++AƒAAð{@èö©@ÊbÂ@¬SE@½@fÁZ@5ó@½?€?µó@½@JbÂ@ƒð{@£++@Â¥þ@âF0AÿAâÜA ÌJA0¹ÌA@ª_APNA`’ApˆbA€?ðAˆ #endif #include #include #include #include #include #include "getopt.h" #include #include #include "png.h" /* includes zlib.h and setjmp.h */ #include #include #include "fitscut.h" #include "output_png.h" #include "image_scale.h" #include "revision.h" #include "colormap.h" #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif #define PNG_NUM_TEXT 1 static void png_create_mean_green (png_byte *line, int ncols) { long col; int skip = 1; int stride = 3; png_byte *pp; float temp_val; pp = line+skip; for (col = 0; col < ncols; col++) { temp_val = (*(pp - 1) + *(pp + 1)) / 2; *pp = (png_byte) (temp_val); pp += stride; } } static void png_scale_row_linear (float *arrayp, png_byte *line, int skip, int stride, long ncols, float scale, float minval, float maxval, float clip_val, int invert) { long col; float t,tx; png_byte *pp; int do_scale = 1; if ( (minval == 0) && (maxval == clip_val) ) do_scale = 0; pp = line + skip; for (col = 0; col < ncols; col++) { if (do_scale) { /*t = scale * ( val * bscale + bzer - datamin );*/ t = scale * (arrayp[col] - minval); tx = MIN (t, clip_val); t = MAX (0,tx); /*fprintf(stderr, " val: %f ", t);*/ } else { t = arrayp[col]; } if (invert) t = clip_val - t; *pp = (png_byte) t; pp += stride; } } static void png_write_rgb_image (png_struct *png_ptr, FitsCutImage *Image, int bit_depth) { float scale[MAX_CHANNELS]; int row, k; double *datamin, *datamax, clip_val; int line_len; png_byte *line; int mean_green = 0; clip_val = pow (2.0,bit_depth) - 1; switch (Image->output_scale_mode) { case SCALE_MODE_AUTO: datamin = Image->autoscale_min; datamax = Image->autoscale_max; /* check for user overrides */ if (Image->user_min_set == 1) { fitscut_message (1, "user min takes precedent over auto scale min\n"); datamin = Image->user_min; } if (Image->user_max_set == 1) { fitscut_message (1, "user max takes precedent over auto scale max\n"); datamax = Image->user_max; } break; break; case SCALE_MODE_USER: if (Image->user_min_set == 1) datamin = Image->user_min; else datamin = Image->data_min; if (Image->user_max_set == 1) datamax = Image->user_max; else datamax = Image->data_max; break; case SCALE_MODE_MINMAX: default: datamin = Image->data_min; datamax = Image->data_max; break; } for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; if ( datamin[k] < datamax[k] ) scale[k] = clip_val / (datamax[k] - datamin[k]); else scale[k] = 1.0; fitscut_message (1, "\tchannel %d data min: %f max: %f clip: %f scale: %f\n", k, datamin[k], datamax[k], clip_val, scale[k]); } if (Image->data[0] != NULL && Image->data[1] == NULL && Image->data[2] != NULL) { fitscut_message (1, "creating a green channel from mean of red and blue\n"); mean_green = 1; } line_len = Image->ncols[0] * (bit_depth / 8) * Image->channels; line = (png_byte *) calloc (line_len, 1); for (row = Image->nrows[0] - 1; row >= 0; row--) { for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; png_scale_row_linear (Image->data[k] + row * Image->ncols[k], line, k, Image->channels, Image->ncols[k], scale[k], datamin[k], datamax[k], clip_val, Image->output_invert); } if (mean_green == 1) { png_create_mean_green (line, Image->ncols[0]); } png_write_row (png_ptr, line); } free (line); } static void png_write_simple_image (png_struct *png_ptr, FitsCutImage *Image, int bit_depth) { float scale = 1.0; int row; double datamin, datamax, clip_val; png_byte *line; clip_val = pow (2.0, bit_depth) - 1; switch (Image->output_scale_mode) { case SCALE_MODE_AUTO: datamin = Image->autoscale_min[0]; datamax = Image->autoscale_max[0]; break; case SCALE_MODE_USER: if (Image->user_min_set == 1) datamin = Image->user_min[0]; else datamin = Image->data_min[0]; if (Image->user_max_set == 1) datamax = Image->user_max[0]; else datamax = Image->data_max[0]; break; case SCALE_MODE_MINMAX: default: datamin = Image->data_min[0]; datamax = Image->data_max[0]; break; } /* Just in case we have a file with constant value. */ if ( datamin < datamax ) scale = clip_val / (datamax - datamin ); fitscut_message (2, "\tdata min: %f max: %f clip: %f scale: %f\n", datamin, datamax, clip_val, scale); if ((line = (png_byte *) malloc (Image->ncols[0] * bit_depth / 8)) == NULL) fitscut_error ("out of memory allocating PNG row buffer"); for (row = Image->nrows[0] - 1; row >= 0; row--) { png_scale_row_linear (Image->data[0] + row * Image->ncols[0], line, 0, 1, Image->ncols[0], scale, datamin, datamax, clip_val, Image->output_invert); png_write_row (png_ptr, line); } free (line); } int write_to_png (FitsCutImage *Image) { FILE *fp; long width, height; int bit_depth, color_type, num_palette = 256; char comment_text[64]; png_color *palette = NULL; png_struct *png_ptr; png_info *info_ptr; png_text text_ptr[PNG_NUM_TEXT]; width = Image->ncols[0]; height = Image->nrows[0]; bit_depth = 8; if (to_stdout) fp = stdout; else fp = fopen(Image->output_filename,"wb"); if (!fp) return ERROR; png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) fitscut_error ("cannot allocate LIBPNG structure"); info_ptr = png_create_info_struct (png_ptr); if (info_ptr == NULL) { png_destroy_write_struct (&png_ptr, (png_infopp)NULL); fitscut_error ("cannot allocate LIBPNG structures"); } if (setjmp (png_jmpbuf (png_ptr))) { png_destroy_write_struct (&png_ptr, &info_ptr); fitscut_error ("setjmp returns error condition (1)"); } png_init_io (png_ptr, fp); if (Image->channels == 1) { num_palette = 256; switch (Image->output_colormap) { case CMAP_RED: case CMAP_GREEN: case CMAP_BLUE: case CMAP_RAINBOW: case CMAP_COOL: case CMAP_HEAT: color_type = PNG_COLOR_TYPE_PALETTE; palette = get_png_palette (Image->output_colormap, num_palette); break; case CMAP_GRAY: default: color_type = PNG_COLOR_TYPE_GRAY; } } else { fitscut_message (2, "\t\tusing RGB color type\n"); color_type = PNG_COLOR_TYPE_RGB; } /* 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 */ png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_PLTE (png_ptr, info_ptr, palette, num_palette); /* write comments into the image */ text_ptr[0].key = "Software"; sprintf (comment_text, "Created by fitscut %s (William Jon McCann)", VERSION); text_ptr[0].text = strdup (comment_text); text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; #ifdef PNG_iTXt_SUPPORTED text_ptr[0].lang = NULL; #endif png_set_text (png_ptr, info_ptr, text_ptr, PNG_NUM_TEXT); /* write the png-info struct */ png_write_info (png_ptr, info_ptr); if (Image->channels == 1) png_write_simple_image (png_ptr, Image, bit_depth); else png_write_rgb_image (png_ptr, Image, bit_depth); fitscut_message (2, "finished writing PNG image\n"); png_write_end (png_ptr, info_ptr); png_destroy_write_struct (&png_ptr, &info_ptr); fflush (stdout); free (png_ptr); free (info_ptr); return (OK); } fitscut-1.4.4/colormap.c0000644000133100002000000001214510041552725012066 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Colormap functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: colormap.c,v 1.5 2004/04/21 20:13:09 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #include "fitscut.h" #include "colormap.h" #include "util.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif static void load_color (char *str, long nresult, float **list) { float *x, *y; long npoints; npoints = parse_coordinates (str, &x, &y); *list = interpolate_points (nresult, x, y, npoints); } static void heat_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,0)(.34,1)(1,1)"; char *greenStr = "(0,0)(1,1)"; char *blueStr = "(0,0)(.65,0)(.98,1)(1,1)"; *red = redStr; *green = greenStr; *blue = blueStr; } static void cool_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,0)(.29,0)(.76,.1)(1,1)"; char *greenStr = "(0,0)(.22,0)(.96,1)(1,1)"; char *blueStr = "(0,0)(.53,1)(1,1)"; *red = redStr; *green = greenStr; *blue = blueStr; } static void rainbow_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,1)(.2,0)(.6,0)(.8,1)(1,1)"; char *greenStr = "(0,0)(.2,0)(.4,1)(.8,1)(1,0)"; char *blueStr = "(0,1)(.4,1)(.6,0)(1,0)"; *red=redStr; *green=greenStr; *blue=blueStr; } static void red_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,0)(1,1)"; char *greenStr = "(0,0)(0,0)"; char *blueStr = "(0,0)(0,0)"; *red = redStr; *green = greenStr; *blue = blueStr; } static void green_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,0)(0,0)"; char *greenStr = "(0,0)(1,1)"; char *blueStr = "(0,0)(0,0)"; *red = redStr; *green = greenStr; *blue = blueStr; } static void blue_color_map_def (char **red, char **green, char **blue) { char *redStr = "(0,0)(0,0)"; char *greenStr = "(0,0)(0,0)"; char *blueStr = "(0,0)(1,1)"; *red = redStr; *green = greenStr; *blue = blueStr; } static ColorMap * get_colormap (int type, long nvals) { float *red, *green, *blue; char *redStr, *greenStr, *blueStr; ColorMap *CM; CM = (ColorMap *) malloc (sizeof (ColorMap)); switch (type) { case CMAP_COOL: cool_color_map_def (&redStr, &greenStr, &blueStr); break; case CMAP_RAINBOW: rainbow_color_map_def (&redStr, &greenStr, &blueStr); break; case CMAP_RED: red_color_map_def (&redStr, &greenStr, &blueStr); break; case CMAP_GREEN: green_color_map_def (&redStr, &greenStr, &blueStr); break; case CMAP_BLUE: blue_color_map_def (&redStr, &greenStr, &blueStr); break; case CMAP_HEAT: default: heat_color_map_def (&redStr, &greenStr, &blueStr); break; } load_color (redStr, nvals, &red); load_color (greenStr, nvals, &green); load_color (blueStr, nvals, &blue); CM->red = red; CM->green = green; CM->blue = blue; /* always put white at the top */ CM->red[nvals-1] = 1; CM->blue[nvals-1] = 1; CM->green[nvals-1] = 1; return (CM); } png_color * get_png_palette (int type, long nvals) { int i; ColorMap *CM; png_color *palette; long max_val; float f; palette = (png_color *) malloc (sizeof (png_color) * nvals); CM = get_colormap (type, nvals); /* scale the map channels */ max_val = nvals - 1; for (i = 0; i < nvals; i++) { f = CM->red[i] * max_val; palette[i].red = (unsigned char) f; f = CM->green[i] * max_val; palette[i].green = (unsigned char) f; f = CM->blue[i] * max_val; palette[i].blue = (unsigned char) f; } return palette; } fitscut-1.4.4/output_jpg.h0000644000133100002000000000155710041552726012465 00000000000000/* declarations for output_jpg.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: output_jpg.h,v 1.2 2004/04/21 20:13:10 mccannwj Exp $ */ int write_to_jpg (FitsCutImage *); fitscut-1.4.4/output_png.h0000644000133100002000000000156010041552726012463 00000000000000/* declarations for output_png.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: output_png.h,v 1.6 2004/04/21 20:13:10 mccannwj Exp $ */ int write_to_png (FitsCutImage *); fitscut-1.4.4/THANKS0000644000133100002000000000004710041552725011017 00000000000000Thanks to the authors of gzip and GIMP.fitscut-1.4.4/AUTHORS0000644000133100002000000000004410041552724011150 00000000000000William Jon McCann fitscut-1.4.4/ChangeLog0000644000133100002000000001134410521742347011664 000000000000002006-10-31 William Jon McCann * revision.h (REVDATE): * configure.in: * NEWS: Update for 1.4.4 release. * output_png.c (write_to_png): Change png_write_destroy to png_destroy_write_struct. 2006-04-17 William Jon McCann * Makefile.am (check): Use $(top_srcdir) in tests. * revision.h (REVDATE): * NEWS: * configure.in: Update for 1.4.3 release. 2006-04-17 William Jon McCann * .cvsignore: New file. * resize.c (resize_image_sample_reduce): Workaround a gcc compiler bug by not casting the results of floor. 2004-07-27 William Jon McCann * NEWS: * revision.h (REVDATE): * configure.in: Update for release. * fitscut.c (check_input, main): Interpret warnings as errors. (check_output): Exit on error condition. * file_check.c (check_input_file): Don't issue a warning when the input file is a symbolic link. 2004-05-11 William Jon McCann * NEWS: Updated. * revision.h (REVDATE): Bump version for release. * configure.in: * extract.c: * fitscut.c: * resize.c: * output_fits.c: Look for fitsio.h with cfitsio prefix and without. * fitscut.spec.in: * Makefile.am (EXTRA_DIST): * configure.in: Add spec file. 2004-05-10 William Jon McCann * autogen.sh: New file. * revision.h: * configure.in: * NEWS: * README: Updated for 1.4.0 release. 2004-04-30 William Jon McCann * image_scale.[ch] (asinh_image2): Removed function. * fitscut.c (scale_image): Fix bug from missing break statements. * output_jpg.c (jpg_write_simple_image): * output_png.c (png_write_simple_image): Align verbose messages. * image_scale.c (autoscale_channel): Require higher verbosity for autoscale range messages. * histogram.c (compute_histogram): Require higher verbosity for histogram related messages. * fitscut.c (fitscut_initialize): Use 0,100 as defaults for autoscale. (main): Set scale mode to autoscale when autoscale-{min,max} are set. * Makefile.am (check): Use unambiguous autoscale option. * fitscut.c (main): Get autoscale-{min,max} from commandline. 2004-04-29 William Jon McCann * image_scale.c (autoscale_channel): Use autoscale low/high per channel. * fitscut.c (show_usage): Separate sections. Add some help text. * fitscut.h: Replace defines with enums. * output_fits.c (write_to_fits): Remove SCALE_NONE 2004-04-22 William Jon McCann * extract.c (extract_fits): Fix bug introduced by inappropriately initializing variables in a loop. * image_scale.c (autoscale_image): Set autoscale_performed flag. (asinh_image2, asinh_image): Rewrite algorithm so as not use any additional memory. Try to hook up user min/max values. * fitscut.c (fitscut_initialize): Use TRUE/FALSE where possible. * fitscut.h: Ensure TRUE/FALSE are defined. Add autoscale_performed flag to structure. * Makefile.am (check): Fix test names. Add asinh test. 2004-04-21 William Jon McCann * fitscut.c (fitscut_message, align_image, render_compass) (write_image, check_input): * wcs_align.c (wcs_initialize_channel, wcs_align_first) (wcs_remap_channel): * resize.c (resize_image_sample_reduce) (resize_image_sample_enlarge): * output_png.c (png_write_rgb_image, png_write_simple_image) (write_to_png): * output_jpg.c (jpg_write_rgb_image, jpg_write_simple_image) (write_to_jpg): * output_fits.c (write_to_fits): * image_scale.c (autoscale_channel, autoscale_image, log_image) (sqrt_image, asinh_image, scan_min_max, mult_image, rate_image): * histogram.c (compute_histogram): * extract.c (extract_fits, cutout_alloc, fits_get_exposure_time): * draw.c (draw_wcs_compass): Use new fitscut_message function. * test.fits: * Makefile.am (check): Change size of test file. 2004-04-21 William Jon McCann * AUTHORS: * NEWS: * Makefile.am: New file. * colormap.[ch]: * draw.[ch]: * extract.[ch]: * file_check.[ch]: * fitscut.[ch]: * getopt1.[ch]: * getopt.[ch]: * histogram.[ch]: * image_scale.[ch]: * output_fits.[ch]: * output_jpg.[ch]: * output_png.[ch]: * resize.[ch]: * util.[ch]: * wcs_align.[ch]: Add GPL license text. Change indentation to 8 chars. Add spacing around functions and operators. Fix compiler warnings. * configure.in: Add warnings. Define version here instead of in revision.h. Produce config.h. Report an error when required header is not found. Add WCS_LIBS variable. * THANKS: * TODO: * README: Updated. * COPYING: Added GPL license. 2003-11-25 William Jon McCann * revision.h: Increment version for test release. 2003-11-24 William Jon McCann * fitscut.[ch]: * image_scale.[ch]: added asinh scaling. fitscut-1.4.4/output_fits.h0000644000133100002000000000156310041552726012647 00000000000000/* declarations for output_fits.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: output_fits.h,v 1.5 2004/04/21 20:13:10 mccannwj Exp $ */ void write_to_fits (FitsCutImage *); fitscut-1.4.4/INSTALL0000644000133100002000000001411407431775443011152 00000000000000This is a generic INSTALL file for utilities distributions. Some features specific to fitscut have been added. To compile this package: 1. Configure the package for your system. In the directory that this file is in, type `./configure'. If you're using `csh' on an old version of System V, you might need to type `sh configure' instead to prevent `csh' from trying to execute `configure' itself. If you are using Ultrix, you might need to type `sh5 configure' to avoid bugs in /bin/sh. Note that 'sh -x configure' may give different results than 'sh configure', making it difficult to debug configure scripts. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the Makefile(s) (one in each subdirectory of the source directory). In some packages it creates a C header file containing system-dependent definitions. It also creates a file `config.status' that you can run in the future to recreate the current configuration. Running `configure' takes a minute or two. While it is running, it prints some messages that tell what it is doing. If you don't want to see the messages, run `configure' with its standard output redirected to `/dev/null'; for example, `./configure >/dev/null'. To compile the package in a different directory from the one containing the source code, you must use a version of `make' that supports the VPATH variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run `configure'. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If for some reason `configure' is not in the source code directory that you are configuring, then it will report that it can't find the source code. In that case, run `configure' with the option `--srcdir=DIR', where DIR is the directory that contains the source code. By default, `make install' will install the package's files in /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify an installation prefix other than /usr/local by giving `configure' the option `--prefix=PATH'. Alternately, you can do so by consistently giving a value for the `prefix' variable when you run `make', e.g., make prefix=/usr/gnu make prefix=/usr/gnu install You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH' or set the `make' variable `exec_prefix' to PATH, the package will use PATH as the prefix for installing programs and libraries. Data files and documentation will still use the regular prefix. Normally, all files are installed using the regular prefix. Another `configure' option is useful mainly in `Makefile' rules for updating `config.status' and `Makefile'. The `--no-create' option figures out the configuration for your system and records it in `config.status', without actually configuring the package (creating `Makefile's and perhaps a configuration header file). Later, you can run `./config.status' to actually configure the package. You can also give `config.status' the `--recheck' option, which makes it re-run `configure' with the same arguments you used before. This option is useful if you change `configure'. `configure' ignores any other arguments that you give it. If your system requires unusual options for compilation or linking that `configure' doesn't know about, you can give `configure' initial values for some variables by setting them in the environment. In Bourne-compatible shells, you can do that on the command line like this: CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure For csh compatible shells, you can do something like this: (setenv CC 'gcc -traditional' ; ./configure) The `make' variables that you might want to override with environment variables when running `configure' are: (For these variables, any value given in the environment overrides the value that `configure' would choose:) CC C compiler program. Default is `cc', or `gcc' if `gcc' is in your PATH. INSTALL Program to use to install files. Default is `install' if you have it, `cp' otherwise. If you have an non-standard `install', use INSTALL="cp -p" (For these variables, any value given in the environment is added to the value that `configure' chooses:) DEFS Configuration options, in the form `-Dfoo -Dbar ...' CFLAGS Compiler options, such as `-O -g ...' LIBS Libraries to link with, in the form `-lfoo -lbar ...' If you need to do unusual things to compile the package, we encourage you to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the README so we can include them in the next release. Note: if your CFITSIO header files are not in a directory searched by default you will have to specify their location like this: setenv CFLAGS '-I/usr/local/include/cfitsio' Examine the Makefile that configure produces and uncomment lines as necessary. 2. Type `make' to compile the package. If you want, you can override the `make' variables CFLAGS and LDFLAGS like this: make CFLAGS=-O2 LDFLAGS=-s 3. The package comes with self-tests. If you want to run them, type `make check'. 4. Type `make install' to install programs, data files, and documentation. The man pages are installed by default with an extension `.1' (one). If you want the extension `.l' (lower case L) use: make manext=l install If you are using csh or tcsh, you must type `rehash' after `make install' to make sure that the command `fitscut' will invoke the new executable. 5. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), the header file containing system-dependent definitions (if the package uses one), and `config.status' (all the files that `configure' created), type `make distclean'. The file `configure.in' is used as a template to create `configure' by a program called `autoconf'. You will only need it if you want to regenerate `configure' using a newer version of `autoconf'. 6. Special targets fitscut-1.4.4/colormap.h0000644000133100002000000000171510041552725012074 00000000000000/* declarations for colormap.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: colormap.h,v 1.3 2004/04/21 20:13:09 mccannwj Exp $ */ #include typedef struct { float *red; float *green; float *blue; } ColorMap; png_color *get_png_palette (int, long); fitscut-1.4.4/output_jpg.c0000644000133100002000000002606310044515275012460 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * JPEG output functions * * Author: William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: output_jpg.c,v 1.5 2004/04/30 18:28:13 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "getopt.h" #include #include #include #include #include #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #include "fitscut.h" #include "output_jpg.h" #include "image_scale.h" #include "revision.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif static void jpg_create_mean_green (JSAMPLE *line, int ncols) { long col; int skip = 1; int stride = 3; unsigned char *pp; float temp_val; pp = line + skip; for (col=0; col < ncols; col++) { temp_val = (*(pp - 1) + *(pp + 1)) / 2; *pp = (unsigned char) (temp_val); pp += stride; } } static void jpg_scale_row_linear (float *arrayp, JSAMPLE *line, int skip, int stride, long ncols, float scale, float minval, float maxval, float clip_val, int invert) { long col; float t,tx; unsigned char *pp; int do_scale = 1; if ((minval == 0) && (maxval == clip_val)) do_scale = 0; pp = line + skip; for (col = 0; col < ncols; col++) { if (do_scale) { /*t = scale * ( val * bscale + bzer - datamin );*/ t = scale * (arrayp[col] - minval); tx = MIN (t, clip_val); t = MAX (0, tx); /*fprintf(stderr, " val: %f ", t);*/ } else { t = arrayp[col]; } if (invert) { t = clip_val - t; } *pp = (unsigned char)t; /*fprintf(stderr,"t: %d\n", *pp);*/ pp += stride; } } static void jpg_write_rgb_image (struct jpeg_compress_struct *cinfo_ptr, FitsCutImage *Image, int bit_depth) { float scale[MAX_CHANNELS]; int row, k; double *datamin, *datamax, clip_val; int line_len; unsigned char *line; int mean_green = 0; JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ clip_val = pow (2.0,bit_depth)-1; switch (Image->output_scale_mode) { case SCALE_MODE_AUTO: datamin = Image->autoscale_min; datamax = Image->autoscale_max; /* check for user overrides */ if (Image->user_min_set == 1) { fitscut_message (1, "user min takes precedent over auto scale min\n"); datamin = Image->user_min; } if (Image->user_max_set == 1) { fitscut_message (1, "user max takes precedent over auto scale max\n"); datamax = Image->user_max; } break; break; case SCALE_MODE_USER: if (Image->user_min_set == 1) datamin = Image->user_min; else datamin = Image->data_min; if (Image->user_max_set == 1) datamax = Image->user_max; else datamax = Image->data_max; break; case SCALE_MODE_MINMAX: default: datamin = Image->data_min; datamax = Image->data_max; break; } for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; if ( datamin[k] < datamax[k] ) scale[k] = clip_val / (datamax[k] - datamin[k]); else scale[k] = 1.0; fitscut_message (2, "\tchannel %d data min: %f max: %f clip: %f scale: %f\n", k, datamin[k], datamax[k], clip_val, scale[k]); } if (Image->data[0] != NULL && Image->data[1] == NULL && Image->data[2] != NULL) { fitscut_message (1, "creating a green channel from mean of red and blue\n"); mean_green = 1; } line_len = Image->ncols[0] * (bit_depth / 8) * Image->channels; line = (unsigned char *) calloc (line_len, 1); for (row = Image->nrows[0] - 1; row >= 0; row--) { for (k = 0; k < Image->channels; k++) { if (Image->data[k] == NULL) continue; jpg_scale_row_linear (Image->data[k] + row * Image->ncols[k], line, k, Image->channels, Image->ncols[k], scale[k], datamin[k], datamax[k], clip_val, Image->output_invert); } if (mean_green == 1) jpg_create_mean_green (line, Image->ncols[0]); row_pointer[0] = line; jpeg_write_scanlines (cinfo_ptr, (JSAMPARRAY) row_pointer, 1); } free (line); } static void jpg_write_simple_image (struct jpeg_compress_struct *cinfo_ptr, FitsCutImage *Image, int bit_depth) { float scale = 1.0; int row; double datamin, datamax, clip_val; unsigned char *line; JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ clip_val = pow (2.0,bit_depth)-1; switch (Image->output_scale_mode) { case SCALE_MODE_AUTO: datamin = Image->autoscale_min[0]; datamax = Image->autoscale_max[0]; break; case SCALE_MODE_USER: if (Image->user_min_set == 1) datamin = Image->user_min[0]; else datamin = Image->data_min[0]; if (Image->user_max_set == 1) datamax = Image->user_max[0]; else datamax = Image->data_max[0]; break; case SCALE_MODE_MINMAX: default: datamin = Image->data_min[0]; datamax = Image->data_max[0]; break; } /* Just in case we have a file with constant value. */ if (datamin < datamax) scale = clip_val / (datamax - datamin); fitscut_message (2, "\tdata min: %f max: %f clip: %f scale: %f\n", datamin, datamax, clip_val, scale); if ((line = (unsigned char *) malloc (Image->ncols[0] * bit_depth / 8)) == NULL) fitscut_error ("out of memory allocating JPEG row buffer"); for (row = Image->nrows[0]-1; row >= 0; row--) { /*fitscut_message (10, "\trow %d of %ld - scaling", row, Image->nrows[0]);*/ jpg_scale_row_linear (Image->data[0] + row * Image->ncols[0], line, 0, 1, Image->ncols[0], scale, datamin, datamax, clip_val, Image->output_invert); /*fitscut_message (10, "\twriting\n");*/ row_pointer[0] = line; jpeg_write_scanlines (cinfo_ptr, (JSAMPARRAY) row_pointer, 1); } free (line); } int write_to_jpg (FitsCutImage *Image) { FILE *outfile; long width, height; int bit_depth, num_palette; char comment_text[64]; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; cinfo.err = jpeg_std_error (&jerr); jpeg_create_compress (&cinfo); width = Image->ncols[0]; height = Image->nrows[0]; bit_depth = 8; if (to_stdout) outfile = stdout; else outfile = fopen (Image->output_filename, "wb"); if (!outfile) return ERROR; jpeg_stdio_dest (&cinfo, outfile); cinfo.image_width = width; /* image width and height, in pixels */ cinfo.image_height = height; if (Image->channels == 1) { num_palette = 256; switch (Image->output_colormap) { case CMAP_RED: case CMAP_GREEN: case CMAP_BLUE: case CMAP_RAINBOW: case CMAP_COOL: case CMAP_HEAT: break; case CMAP_GRAY: default: break; } fitscut_message (1, "\t\tusing GRAYSCALE color type\n"); cinfo.input_components = 1; /* # of color components per pixel */ cinfo.in_color_space = JCS_GRAYSCALE; } else { fitscut_message (1, "\t\tusing RGB color type\n"); cinfo.input_components = 3; /* # of color components per pixel */ cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ } jpeg_set_defaults (&cinfo); jpeg_start_compress (&cinfo, TRUE); sprintf (comment_text, "Created by fitscut %s (William Jon McCann)", VERSION); jpeg_write_marker (&cinfo, JPEG_COM, comment_text, strlen (comment_text)); if (Image->channels == 1) jpg_write_simple_image (&cinfo, Image, bit_depth); else jpg_write_rgb_image (&cinfo, Image, bit_depth); fitscut_message (2, "finished writing JPEG image\n"); jpeg_finish_compress (&cinfo); jpeg_destroy_compress (&cinfo); fflush (stdout); return (OK); } fitscut-1.4.4/revision.h0000644000133100002000000000155110521732656012122 00000000000000/* revision.h * Copyright (C) 1999 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: revision.h,v 1.32 2006/10/31 20:44:30 mccannwj Exp $ */ #define REVDATE "Tue Oct 31 16:43:46 EST 2006" fitscut-1.4.4/COPYING0000644000133100002000000004311010041552724011134 00000000000000 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) 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) year 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. fitscut-1.4.4/draw.h0000644000133100002000000000206410041552725011213 00000000000000/* declarations for draw.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: draw.h,v 1.2 2004/04/21 20:13:09 mccannwj Exp $ */ typedef struct { int x, y; } drawPoint, *drawPointPtr; void draw_wcs_compass (FitsCutImage *,float,float); void draw_line (FitsCutImage *, int, int, int, int, int, int); void draw_filled_polygon (FitsCutImage *, int, drawPointPtr, int, int); fitscut-1.4.4/fitscut.c0000644000133100002000000011551510101551250011725 00000000000000/* -*- mode:C; indent-tabs-mode:nil; tab-width:8; c-basic-offset:8; -*- * * Extract a cutout from a FITS format file * Copyright (C) 2001 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * requires CFITSIO library * (http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html) * * $Id: fitscut.c,v 1.44 2004/07/27 22:09:44 mccannwj Exp $ */ #ifdef HAVE_CONFIG_H #include #endif /* AIX requires this to be the first thing in the file. */ #if defined (_AIX) && !defined (__GNUC__) #pragma alloca #endif #include #include #include #include #include #include "getopt.h" #include #include #ifndef errno extern int errno; #endif #ifdef STDC_HEADERS #include #else /* Not STDC_HEADERS */ extern void exit (); extern char *malloc (); #endif /* STDC_HEADERS */ #ifdef HAVE_STRING_H #include #else #include #endif #ifdef NO_TIME_H # include #else # include #endif #ifndef NO_FCNTL_H # include #endif #ifdef HAVE_SYS_FILE_H #include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef __GNUC__ #undef alloca #define alloca(n) __builtin_alloca (n) #else /* Not GCC. */ #ifdef HAVE_ALLOCA_H #include #else /* Not HAVE_ALLOCA_H. */ #ifndef _AIX extern char *alloca (); #endif /* Not AIX. */ #endif /* HAVE_ALLOCA_H. */ #endif /* GCC. */ #include #include #include #include #include #ifdef HAVE_CFITSIO_FITSIO_H #include #else #include #endif #ifdef HAVE_LIBPNG #include /* includes zlib.h and setjmp.h */ #endif #ifdef HAVE_LIBWCS #include #endif #include "tailor.h" #include "fitscut.h" #include "revision.h" #ifdef HAVE_LIBWCS #include "wcs_align.h" #endif #include "draw.h" #include "extract.h" #include "file_check.h" #include "image_scale.h" #include "output_png.h" #include "output_jpg.h" #include "output_fits.h" #ifdef DMALLOC #include #define DMALLOC_FUNC_CHECK 1 #endif struct option longopts[] = { { "verbose", 0, 0, 'v' }, { "help", 0, 0, 'h' }, { "version", 0, 0, 'V' }, { "force", 0, 0, 'f' }, { "png", 0, 0, 'p' }, { "jpg", 0, 0, 'j' }, { "x", required_argument, 0, 'x' }, { "y", required_argument, 0, 'y' }, { "rows", required_argument, 0, 'r' }, { "columns", required_argument, 0, 'c' }, { "autoscale", required_argument, 0, 'a' }, { "autoscale-min", required_argument, 0, 16 }, { "autoscale-max", required_argument, 0, 17 }, { "log-scale", 0, 0, 'l' }, { "sqrt-scale", 0, 0, 's' }, { "histeq-scale", 0, 0, 'e' }, { "asinh-scale", 0, 0, 14 }, { "linear-scale", 0, 0, 15 }, { "palette", required_argument, 0, 't' }, { "min",required_argument, 0, 1 }, { "max",required_argument, 0, 2 }, { "x0", required_argument, 0, 3 }, { "y0", required_argument, 0, 4 }, { "align", 0, 0, 5 }, { "compass", 0, 0, 6 }, { "rate", 0, 0, 7 }, { "factor", required_argument, 0, 8 }, { "red", required_argument, 0, 9 }, { "green", required_argument, 0, 10 }, { "blue", required_argument, 0, 11 }, { "all", 0, 0, 12 }, { "zoom",required_argument , 0, 13 }, { "invert", 0, 0, 'i' }, { 0, 0, 0, 0 } }; extern char version[]; char usage[] = "Usage: %s [options] file [green] [blue] [outfile]\n"; char *progname; int foreground = 1; /* set if program run in foreground */ int force = 0; /* don't ask questions, overwrite (-f) */ int to_stdout = 1; /* output to stdout (-c) */ int verbose = 0; /* be verbose (-v) */ int quiet = 0; /* be very quiet (-q) */ int exit_code = OK; /* program exit code */ void fitscut_message (int level, const char *format, ...) { va_list args; va_start (args, format); if (verbose >= level) vfprintf (stderr, format, args); va_end (args); } /* * Free all dynamically allocated variables and exit with the given code. */ void do_exit (int exitcode) { static int in_exit = 0; if (in_exit) exit (exitcode); in_exit = 1; /* free memory etc. */ exit (exitcode); } RETSIGTYPE abort_fitscut () { /* close, remove files */ do_exit (ERROR); } void fitscut_error (char *m) { fprintf (stderr, "\n%s: %s\n", progname, m); abort_fitscut (); } static void show_version () { fprintf (stderr, "%s %s (%s)\n", progname, VERSION, REVDATE); } static void show_supported_palettes () { fputs ("\nSupported palettes:\n", stderr); fputs ("\tgray heat cool rainbow red green blue\n", stderr); } static void show_usage () { fprintf (stderr, usage, progname); fputs ("Options are:\n", stderr); fputs (" -f, --force\t\tforce overwrite of output file\n", stderr); fputs (" -h, --help\t\tdisplay this help and exit\n", stderr); fputs (" -v, --verbose\t\tverbose operation\n", stderr); fputs (" -V, --version\t\toutput version information and exit\n\n", stderr); fputs (" -p, --png\t\toutput a PNG format file\n", stderr); fputs (" -j, --jpg\t\toutput a JPEG format file\n", stderr); fputs (" -x, --x=N\t\tX center coordinate\n", stderr); fputs (" -y, --y=N\t\tY center coordinate\n", stderr); fputs (" --x0=N\t\tX corner coordinate\n", stderr); fputs (" --y0=N\t\tY corner coordinate\n", stderr); fputs (" -r, --rows=N\t\tnumber of rows (height)\n", stderr); fputs (" -c, --columns=N\tnumber of columns (width)\n", stderr); fputs (" --all\t\textract a cutout of the same size as the input image\n\n", stderr); fputs (" --linear-scale\toutput in linear scale [default]\n", stderr); fputs (" -l, --log-scale\toutput in log scale\n", stderr); fputs (" -s, --sqrt-scale\toutput in square root scale\n", stderr); fputs (" -e, --histeq-scale\thistogram equalized output\n", stderr); fputs (" --asinh-scale\tasinh equalized output\n", stderr); fputs (" -i, --invert\t\tinvert output colors\n", stderr); fputs (" --palette=name\toutput palette name (png output only)\n", stderr); fputs (" --factor=value\tmultiply image by value\n", stderr); fputs (" --rate\t\tscale image by exposure time factor\n\n", stderr); fputs (" --autoscale=percent\tpercent of histogram to include\n\n", stderr); fputs ("\t\t\tIf percent is a single value it is interpreted as\n", stderr); fputs ("\t\t\tthe percentage of the histogram to include.\n", stderr); fputs ("\t\t\tIf percent is two values separated by a comma it\n", stderr); fputs ("\t\t\tis interpreted as the lower and upper bounds\n", stderr); fputs ("\t\t\tof the histogram to include (eg. --autoscale=1.5,98.5)\n\n", stderr); fputs (" --autoscale-min=percent\tlower bound percentage of histogram to include\n", stderr); fputs (" --autoscale-max=percent\tupper bound percentage of histogram to include\n", stderr); fputs (" --min=value\timage value to use for scale minimum\n", stderr); fputs (" --max=value\timage value to use for scale maximum\n\n", stderr); fputs ("\t\t\tThe value for --min or --max may be either one value to\n", stderr); fputs ("\t\t\tbe used for all images (eg. --min=0), or one value for\n", stderr); fputs ("\t\t\teach image separated by a comma (eg. --min=0,0,0)\n\n", stderr); fputs (" --red=file\tfilename to be used in red channel of color image\n", stderr); fputs (" --green=file\tfilename to be used in green channel of color image\n", stderr); fputs (" --blue=file\tfilename to be used in blue channel of color image\n\n", stderr); fputs (" --zoom=factor\tzoom input image by positive multiplicative factor\n\n", stderr); #ifdef HAVE_LIBWCS fputs (" --align\t\tuse WCS information in header to align images\n", stderr); fputs (" --compass\t\tadd a WCS compass to the image\n", stderr); #endif show_supported_palettes (); } static void scale_image (FitsCutImage *Image) { scan_min_max (Image); switch (Image->output_scale) { case SCALE_HISTEQ: histeq_image (Image); break; case SCALE_SQRT: sqrt_image (Image); break; case SCALE_LOG: log_image (Image); break; case SCALE_FACTOR: mult_image (Image); break; case SCALE_RATE: rate_image (Image); break; case SCALE_ASINH: asinh_image (Image); break; case SCALE_LINEAR: default: break; } switch (Image->output_scale_mode) { case SCALE_MODE_AUTO: autoscale_image (Image); break; default: break; } } #ifdef HAVE_LIBWCS static void align_image (FitsCutImage *Image) { switch (Image->output_alignment) { case ALIGN_FIRST: fitscut_message (1, "\tAligning to first channel..."); wcs_align_first (Image); fitscut_message (1, "done.\n"); break; case ALIGN_NONE: default: break; } } static void render_compass (FitsCutImage *Image) { float north_pa, east_pa; struct WorldCoor *wcs; wcs = Image->wcs[0]; if (wcs == NULL) return; if (iswcs (wcs) == 0) return; north_pa = -wcs->pa_north; east_pa = -wcs->pa_east; fitscut_message (1, "found WCS north: %f east: %f\n", north_pa, east_pa); draw_wcs_compass (Image, north_pa, east_pa); } #endif static void write_image (FitsCutImage *Image) { int retval; switch (Image->output_type) { case OUTPUT_FITS: fitscut_message (1, "Creating FITS file...\n"); write_to_fits (Image); break; case OUTPUT_PNG: fitscut_message (1, "Creating PNG file...\n"); retval = write_to_png (Image); if (retval) { fitscut_message (0, "error creating PNG file.\n"); do_exit (2); } break; case OUTPUT_JPG: fitscut_message (1, "Creating JPG file...\n"); retval = write_to_jpg (Image); if (retval) { fitscut_message (0, "error creating JPG file.\n"); do_exit (2); } break; default: break; } } static void release_data (FitsCutImage *Image) { int k; for (k = 0; k < Image->channels; k++) { free (Image->data[k]); if (Image->header[k] != NULL) free (Image->header[k]); } } static void treat_input (FitsCutImage *Image) { extract_fits (Image); scale_image (Image); #ifdef HAVE_LIBWCS wcs_initialize (Image); align_image (Image); if (Image->output_compass) render_compass (Image); #endif write_image (Image); release_data (Image); } static int check_input (FitsCutImage *Image) { int retval; int k; for (k = 0; k < Image->channels; k++) { if (Image->input_filename[k] != NULL) { fitscut_message (1, "Checking input file: %s\n", Image->input_filename[k]); if ((retval = check_input_file (Image->input_filename[k])) != OK) return ERROR; } if (Image->x0[k] < 0) fitscut_message (1, "%s: warning: cutout x0 < 0 for channel %d\n", progname, k); if (Image->y0[k] < 0) fitscut_message (1, "%s: warning: cutout y0 < 0 for channel %d\n", progname, k); if (Image->ncols[k] < 0) { fitscut_message (0, "%s: cutout width must be > 0 for channel %d\n", progname, k); return ERROR; } if (Image->nrows[k] < 0) { fitscut_message (0, "%s: cutout height must be > 0 for channel %d\n", progname, k); return ERROR; } } return OK; } static int check_output (char *ofname, char *ifname) { if (check_output_file (ofname, ifname) != OK) return ERROR; return OK; } static void fitscut_initialize (FitsCutImage *Image) { int k; Image->output_type = OUTPUT_FITS; Image->output_scale = SCALE_LINEAR; Image->output_scale_mode = SCALE_MODE_MINMAX; Image->output_colormap = CMAP_GRAY; Image->output_compass = 0; Image->output_zoom = 0; Image->output_invert = 0; Image->channels = 0; Image->user_min_set = FALSE; Image->user_max_set = FALSE; Image->user_scale_factor_set = FALSE; Image->input_filename[0] = Image->input_filename[1] = Image->input_filename[2] = NULL; Image->autoscale_performed = FALSE; for (k = 0; k < MAX_CHANNELS; k++) { Image->user_min[k] = 0; Image->user_max[k] = 0; Image->autoscale_percent_low[k] = 0.0; Image->autoscale_percent_high[k] = 100.0; Image->user_scale_factor[k] = 1.0; Image->header[k] = NULL; #ifdef HAVE_LIBWCS Image->wcs[k] = NULL; #endif Image->data[k] = NULL; Image->xc[k] = Image->yc[k] = Image->x0[k] = Image->y0[k] = Image->ncols[k] = Image->nrows[k] = -1; } Image->output_alignment = ALIGN_NONE; } int main (int argc, char *argv[]) { int optc; int h = 0; int V = 0; int lose = 0; int proglen; /* length of progname */ char ofname[MAX_PATH_LEN]; int arg_count, k; FitsCutImage Image; char *cmap_name = NULL; char *tmpstr = NULL; char *sptr = NULL; int user_min_count = 0; int user_max_count = 0; int autoscale_min_count = 0; int autoscale_max_count = 0; int user_scale_factor_count = 0; int i; #ifdef DEBUGGING mtrace (); #endif fitscut_initialize (&Image); /* set up globals */ EXPAND (argc, argv); /* wild card expansion if necessary */ progname = (char *) basename (argv[0]); proglen = strlen (progname); /* Suppress .exe for MSDOS, OS/2 and VMS: */ if (proglen > 4 && strequ (progname + proglen - 4, ".exe")) progname[proglen-4] = '\0'; foreground = signal (SIGINT, SIG_IGN) != SIG_IGN; if (foreground) (void) signal (SIGINT, (sig_type)abort_fitscut); while ((optc = getopt_long (argc, argv, "hviVfpjlsex:y:r:c:a:t:", longopts, (int *) 0)) != EOF) { switch (optc) { case 'v': verbose++; break; case 'V': V = 1; break; case 'h': h = 1; break; case 'f': force = 1; break; case 'i': Image.output_invert = 1; break; case 'l': Image.output_scale = SCALE_LOG; break; case 'e': Image.output_scale = SCALE_HISTEQ; break; case 's': Image.output_scale = SCALE_SQRT; break; case 'p': Image.output_type = OUTPUT_PNG; break; case 'j': Image.output_type = OUTPUT_JPG; break; case 'x': Image.xc[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.xc[i] = Image.xc[0]; break; case 'y': Image.yc[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.yc[i] = Image.yc[0]; break; case 'r': Image.nrows[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.nrows[i] = Image.nrows[0]; break; case 'c': Image.ncols[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.ncols[i] = Image.ncols[0]; break; case 't': /* palette */ cmap_name = strdup (optarg); break; case 'a': /* autoscale */ if (strchr (optarg,',') != NULL) { /* we have a value pair */ tmpstr = strdup (optarg); sptr = strtok (tmpstr, ","); if (sptr != NULL) { Image.autoscale_percent_low[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) Image.autoscale_percent_high[0] = strtod (sptr, (char **)NULL); } free (tmpstr); } else { Image.autoscale_percent_high[0] = strtod (optarg, (char **)NULL); Image.autoscale_percent_low[0] = 100.0 - Image.autoscale_percent_high[0]; } if ((Image.autoscale_percent_high[0] < 100) && (Image.autoscale_percent_high[0] > 0)) Image.output_scale_mode = SCALE_MODE_AUTO; break; case 1: /* min */ if (strchr (optarg, ',') != NULL) { /* we have a value for each channel */ tmpstr = strdup (optarg); sptr = strtok (tmpstr, ","); if (sptr != NULL) { Image.user_min[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.user_min[1] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.user_min[2] = strtod (sptr, (char **)NULL); user_min_count = 3; } } } free (tmpstr); } else { Image.user_min[0] = strtod (optarg, (char **)NULL); } Image.user_min_set = TRUE; break; case 2: /* max */ /* we have a value for each channel */ if (strchr (optarg, ',') != NULL) { tmpstr = strdup (optarg); sptr = strtok (tmpstr, ","); if (sptr != NULL) { Image.user_max[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.user_max[1] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.user_max[2] = strtod (sptr, (char **)NULL); user_max_count = 3; } } } free (tmpstr); } else { Image.user_max[0] = strtod (optarg, (char **)NULL); } Image.user_max_set = TRUE; break; case 3: /* x0 */ Image.x0[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.x0[i] = Image.x0[0]; break; case 4: /* y0 */ Image.y0[0] = strtol (optarg, (char **)NULL, 0); for (i = 1; i < MAX_CHANNELS; i++) Image.y0[i] = Image.y0[0]; break; case 5: /* align */ Image.output_alignment = ALIGN_FIRST; break; case 6: /* compass */ Image.output_compass = 1; break; case 7: /* rate */ Image.output_scale = SCALE_RATE; break; case 8: /* factor */ if (strchr (optarg,',') != NULL) { /* we have a value for each channel */ tmpstr = strdup (optarg); sptr = strtok(tmpstr, ","); if (sptr != NULL) { Image.user_scale_factor[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if ( sptr != NULL) { Image.user_scale_factor[1] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if ( sptr != NULL) { Image.user_scale_factor[2] = strtod (sptr, (char **)NULL); user_scale_factor_count = 3; } } } free (tmpstr); } else { Image.user_scale_factor[0] = strtod (optarg, (char **)NULL); } Image.user_scale_factor_set = TRUE; Image.output_scale = SCALE_FACTOR; break; case 9: /* red */ Image.input_filename[0] = strdup (optarg); Image.channels = 3; break; case 10: /* green */ Image.input_filename[1] = strdup (optarg); Image.channels = 3; break; case 11: /* blue */ Image.input_filename[2] = strdup (optarg); Image.channels = 3; break; case 12: /* all */ for (i = 0; i < MAX_CHANNELS; i++) { Image.x0[i] = 0; Image.y0[i] = 0; Image.xc[i] = 0; Image.yc[i] = 0; Image.nrows[i] = MAGIC_SIZE_ALL_NUMBER; Image.ncols[i] = MAGIC_SIZE_ALL_NUMBER; } break; case 13: /* zoom */ Image.output_zoom = strtod (optarg, (char **)NULL); /* HACK - FIXME */ if (Image.output_zoom > 1) { Image.output_zoom = floor (Image.output_zoom); } break; case 14: Image.output_scale = SCALE_ASINH; break; case 15: Image.output_scale = SCALE_LINEAR; break; case 16: /* autoscale min */ if (strchr (optarg, ',') != NULL) { /* we have a value for each channel */ tmpstr = strdup (optarg); sptr = strtok (tmpstr, ","); if (sptr != NULL) { Image.autoscale_percent_low[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.autoscale_percent_low[1] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.autoscale_percent_low[2] = strtod (sptr, (char **)NULL); autoscale_min_count = 3; } } } free (tmpstr); } else { Image.autoscale_percent_low[0] = strtod (optarg, (char **)NULL); } Image.output_scale_mode = SCALE_MODE_AUTO; break; case 17: /* autoscale max */ if (strchr (optarg, ',') != NULL) { /* we have a value for each channel */ tmpstr = strdup (optarg); sptr = strtok (tmpstr, ","); if (sptr != NULL) { Image.autoscale_percent_high[0] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.autoscale_percent_high[1] = strtod (sptr, (char **)NULL); sptr = strtok (NULL, ","); if (sptr != NULL) { Image.autoscale_percent_high[2] = strtod (sptr, (char **)NULL); autoscale_max_count = 3; } } } free (tmpstr); } else { Image.autoscale_percent_high[0] = strtod (optarg, (char **)NULL); } Image.output_scale_mode = SCALE_MODE_AUTO; break; default: lose = 1; break; } } if (V) { /* Print version number. */ show_version (); if (! h) exit (0); } if (h) { /* Print help info and exit. */ show_usage (); exit (0); } if (cmap_name != NULL) { /* translate name into a code */ if (! strcasecmp (cmap_name, "heat")) Image.output_colormap = CMAP_HEAT; else if (!strcasecmp (cmap_name, "cool")) Image.output_colormap = CMAP_COOL; else if (!strcasecmp (cmap_name, "rainbow")) Image.output_colormap = CMAP_RAINBOW; else if (!strcasecmp (cmap_name, "gray")) Image.output_colormap = CMAP_GRAY; else if (!strcasecmp (cmap_name, "red")) Image.output_colormap = CMAP_RED; else if (!strcasecmp (cmap_name, "green")) Image.output_colormap = CMAP_GREEN; else if (!strcasecmp (cmap_name, "blue")) Image.output_colormap = CMAP_BLUE; else { fprintf (stderr, "Warning: palette %s unknown, using grayscale.\n", cmap_name); Image.output_colormap = CMAP_GRAY; } } else { Image.output_colormap = CMAP_GRAY; } for (i = 0; i < MAX_CHANNELS; i++) { if ((Image.xc[i] > 1) && (Image.ncols[i] > 1)) Image.x0[i] = Image.xc[i] - Image.ncols[i] / 2; if ((Image.yc[i] > 1) && (Image.nrows[i] > 1)) Image.y0[i] = Image.yc[i] - Image.nrows[i] / 2; } /* if the user didn't specify enough min/max values */ if (user_min_count < 3) for (k = 1; k < MAX_CHANNELS; k++) Image.user_min[k] = Image.user_min[0]; if (user_max_count < 3) for (k = 1; k < MAX_CHANNELS; k++) Image.user_max[k] = Image.user_max[0]; if (autoscale_min_count < 3) for (k = 1; k < MAX_CHANNELS; k++) Image.autoscale_percent_low[k] = Image.autoscale_percent_low[0]; if (autoscale_max_count < 3) for (k = 1; k < MAX_CHANNELS; k++) Image.autoscale_percent_high[k] = Image.autoscale_percent_high[0]; if ((Image.user_min_set || Image.user_max_set) && Image.output_scale_mode != SCALE_MODE_AUTO) Image.output_scale_mode = SCALE_MODE_USER; arg_count = argc - optind; if ( (Image.input_filename[0] != NULL) || (Image.input_filename[1] != NULL) || (Image.input_filename[2] != NULL)) { if (check_input (&Image) != OK) do_exit (1); if (arg_count >= 1) { to_stdout = 0; make_output_name (ofname, argv[optind++]); check_output (ofname, Image.input_filename[0]); } else { strcpy (ofname, "-"); } } else { if (arg_count >= 1) { Image.input_filename[0] = strdup (argv[optind++]); if (arg_count == 1) { Image.channels = 1; if (check_input (&Image) == ERROR) do_exit (1); strcpy (ofname, "-"); } else if (arg_count == 2) { to_stdout = 0; Image.channels = 1; if (check_input (&Image) == ERROR) do_exit (1); make_output_name (ofname, argv[optind++]); check_output (ofname,Image.input_filename[0]); } else if (arg_count == 3) { Image.input_filename[1] = strdup (argv[optind++]); Image.input_filename[2] = strdup (argv[optind++]); Image.channels = 3; if (check_input (&Image) == ERROR) do_exit (1); strcpy (ofname,"-"); } else if (arg_count == 4) { Image.input_filename[1] = strdup (argv[optind++]); Image.input_filename[2] = strdup (argv[optind++]); to_stdout = 0; Image.channels = 3; if (check_input (&Image) == ERROR) do_exit(1); make_output_name (ofname, argv[optind++]); check_output (ofname, Image.input_filename[0]); check_output (ofname, Image.input_filename[1]); check_output (ofname, Image.input_filename[2]); } else { show_usage (); exit (0); } } else { show_usage (); exit (1); } } if (to_stdout) { SET_BINARY_MODE (fileno (stdout)); } Image.output_filename = strdup (ofname); treat_input (&Image); return OK; } fitscut-1.4.4/histogram.h0000644000133100002000000000173010041552726012253 00000000000000/* declarations for histogram.c * Copyright (C) 2002 William Jon McCann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: histogram.h,v 1.3 2004/04/21 20:13:10 mccannwj Exp $ */ unsigned char *eq_histogram (float *, int, long , long ); float *compute_histogram (float *, int, float , float , long , long );