tessa-0.3.1/0002777000175000017500000000000010073013515007634 500000000000000tessa-0.3.1/doc/0002777000175000017500000000000010073013516010402 500000000000000tessa-0.3.1/doc/Makefile.am0000644000175000017500000000040010003737755012355 00000000000000sgml_input = quickref.sgml html_files = $(sgml_input:.sgml=.html) if HAS_DB2HTML htmldir = $(datadir)/doc/@PACKAGE@ html_DATA = $(html_files) endif EXTRA_DIST = $(sgml_input) CLEANFILES = $(html_files) %.html: %.sgml version rm -f $@ $(DB2HTML) -u $< tessa-0.3.1/doc/Makefile.in0000644000175000017500000002010510073013342012354 00000000000000# Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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 = : 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@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAS_DB2HTML_FALSE = @HAS_DB2HTML_FALSE@ HAS_DB2HTML_TRUE = @HAS_DB2HTML_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@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ 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@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ sgml_input = quickref.sgml html_files = $(sgml_input:.sgml=.html) @HAS_DB2HTML_TRUE@htmldir = $(datadir)/doc/@PACKAGE@ @HAS_DB2HTML_TRUE@html_DATA = $(html_files) EXTRA_DIST = $(sgml_input) CLEANFILES = $(html_files) subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = version DIST_SOURCES = DATA = $(html_DATA) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am version.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) version: $(top_builddir)/config.status version.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ uninstall-info-am: htmlDATA_INSTALL = $(INSTALL_DATA) install-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(htmldir) @list='$(html_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(htmlDATA_INSTALL) $$d$$p $(DESTDIR)$(htmldir)/$$f"; \ $(htmlDATA_INSTALL) $$d$$p $(DESTDIR)$(htmldir)/$$f; \ done uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(htmldir)/$$f"; \ rm -f $(DESTDIR)$(htmldir)/$$f; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: $(mkinstalldirs) $(DESTDIR)$(htmldir) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -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-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-htmlDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-htmlDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-htmlDATA install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-htmlDATA uninstall-info-am %.html: %.sgml version rm -f $@ $(DB2HTML) -u $< # 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: tessa-0.3.1/doc/quickref.sgml0000644000175000017500000003776110073011521013021 00000000000000 ]>
Tessa quick reference guide Josselin Mouette École centrale de Lyon
josselin.mouette@ec-lyon.fr
Tessa &version; version &version;, 07 July 2004 This guide describes how to get quickly started with Tessa and run your first FDTD simulations. It doesn't describe how Tessa works, neither is it a complete description of Tessa's features.
Installing Tessa When Tessa is not available as a binary package for your system, installation is done through GNU autotools:
./configure make (as root) make install
You will need as prerequisites: The Hierarchical Data Format 5 library which is used to read and store all the data used by Tessa. Zlib, which is a prerequisite for HDF5 anyway. Necessary only if you use the provided module to generate the optical structures: Python, the scripting language used to generate the structures. NumPy, the Numeric Python extension. Numarray is not yet supported because it is too slow. PyTables, which brings in HDF5 support for Python. (optional) h5utils, a set of tools to manipulate HDF5 files, for e.g. cartography extraction. (optional) The Fastest Fourier Transform of the West library, version 3, which allows to output frequency spectrums.
Creating your optical structure The first step before running the simulation is to "draw" the structure you want to simulate. You can generate it as you like, as long as it is in the HF5 format. If you already have tools that generate e.g. three-dimensional data files in text format, you can convert them to HDF5 using h5fromtxt from the h5utils package. If you start from scratch, you can use the python module provided with Tessa to generate a wide range of structures. First, create a file named e.g. tchat.py (the .py extension is for python scripts). This file should look like follows. First, import the Tessa module.
from tessa import *
Then, create an IndexFile instance, name it as you want.
asv=IndexFile(5,4,2.4,index=1.444)
The 3 first arguments are the size of the structure. It is generally convenient to express them in micrometers or meters, but it is not necessary. The optional index parameter is the default index in the structure. You can now fill your structure with geometric objects, e.g. cylinders.
asv.addobj(Cylinder(2.5,2,1,None,1,1.4,index=3.5)) asv.addobj(Cylinder(2.5,2,.7,None,1,1.4,index=1.444))
The two first required arguments for the Cylinder constructor tell the position of its center, the two following are the radii (the second radius being None, it is taken equal to the first), and the two final tell the vertical limitation for the cylinder. Order does matter: the second cylinder here will actually replace the first one where it is drawn. We obtain here a micro-ring.
asv.addobj(Block(1,1.3,-1,6,1,1.4,index=3.5)) asv.addobj(Block(3.7,4,-1,6,1,1.4,index=3.5))
These two blocks describe waveguides used to bring some optical signal to our micro-ring. The arguments are three couples of coordinates delimiting the block: x1, x2, y1, y2, z1, z2. Note that you can also use absorbing materials. Just add a absor = value parameter, with value being the absorption coefficient in m-1. Finally, we write the structure to HDF5 files.
asv.write("tchat1",delta_x=.05) asv.write("tchat2",delta_x=.1,oversampling=1)
Two files are written here: tchat1.h5 and tchat2.h5. You can write as many as you want, with a delta_x parameter defining the space step for the FDTD simulation. Be careful to use the same unit you used to define the size of the structure. Here, the second file is written using an oversampling of 1 instead of the default (which is 4). This is useful if you want to see the result immediately (the script will run 64 times faster), but the HDF5 file won't be accurate enough for launchinga simulation. Use it when designing the structures. You can draw several other types of geometric objects with this module. The complete documentation is accessible through python's internal help. Just run python in a shell, and, in the interpreter, type "import tessa; help(tessa)" (without the quotes). You can also easily make complex structures, such as photonic crystals, using loops just like in any other python script. If you don't know how to program in python, learn it. Even if you don't know how to program at all, achieving such things is easy. Once you have your script, process it:
python tchat.py
It can take several minutes, but you only have to run it once. This will generate the HDF5 file(s). You can control the result using h5ls, h5totxt and h5topng.
Describing the simulation Once you have a HDF5 file containing the structure you want to simulate, you have to fill the simulation file. So, create e.g. tchat.fdtd. The .fdtd extension is purely for convenience, but it is generally a good idea. This file is a simple list of variable = value lines. Required parameters index_file = tchat.h5 Defines the HDF5 file containing the simulated structure. Incidentally defines the size of the simulation. delta_x = 0.1e-6 The spatial step of the simulation, in meters. Always use meters here, whatever unit you used when making the HDF5 file. it_max = 100000 The total number of iterations. One of the following: freq = 2e14 The frequency around which the simulation is achieved, in Hz. lambda = 1.5e-6 Ditto, but using the correspounding wavelength in meters. Optional parameters delta_t = 1.11e-16 The time step of an iteration. Defaults to a value slightly shorter than the maximum acceptable value for a stable simulation. block_size = 10 The size of the basic calculation block, in cells (that means, in units of delta_x. It affects performance when too small or too large. Defaults to 10. num_pml = 10 The size of the perfectly matched layers, in cells. Defaults to 10. Note that the PMLs are added outside the working space, so this parameter doesn't change the size of the actually computed structure. pml_refl = 1.e-3 The theoretical reflection of the perfectly matched layers under normal incidence. Defaults to 1.e-3, that is 0.1 %. One of the following: injection = sinus 10 Set the injection to a single frequency. The parameter gives the number of periods during which the signal takes place. injection = gauss 20 Set the injection to a gaussian spectrum around the base frequency. The parameter gives the relative frequency width in percent. injection_file = kikoo.dat Use the contents of a file as the amplitude of the injected signal. The file should be ASCII data, with one value per line, meaning one value per iteration. The default injection is a sinus with 10 periods of starting time. injection_pos = 10,50,25 The position of the injection, in cells. Defaults to the center of the simulation area. Currently, only dipole injection is supported. injection_dir = 0.707,-0.707,0 The direction and maximal amplitude of the injection, in C.m. The computed injection is multiplied by each of these factors for the directions x, y and z respectively. Defaults to 0,0,1. As a consequence, by default, the computed numerical values are normalized for a dipole moment equal to 1 C.m. Defining the output Each of these parameters can be used as many times as you want, to have multiple outputs. output_cartoE = 0-2000/100 Output cartographies for the electric field (all three components), in the HDF5 format. The parameter explains at which iterations the output should be made. The above example makes this output every 100 iterations during the first 2000 iterations. Any of these parameters can be omitted, defaulting respectively to zero, the last iteration and 100. output_cartoH = /1000 Same as above, but for the magnetic field. output_ponctE = 60,70,25 Output the three components of the electric field at each iteration, at the point defined by the three coordinates, in unit cells. The output file has 4 columns: the time in seconds, and the field in the 3 directions. If Tessa was built with support for discrete Fourier transforms, a file containing the Fourier transform is output as well, the first column containing the frequency in hertz. output_ponctH = 60,70,25 Same as above, but for the magnetic field. output_poynting = 45-55,70,45-55 Output the flow of the Poynting vector through a rectangular surface. The size of the surface is defined by two couples of coordinates and its position is defined by one single coordinate, in unit cells. The coordinates are always in the x, y, z order; the one being alone defines the direction of the plane. total_loss = 1 Output the flow of the Poynting vector through all external surfaces. This is the total power lost by the system. Defaults to 0 (disabled). Invoking Tessa Run the simulation you defined above by typing tessa tchat.fdtd and wait. Tessa is believed to run faster than commercial implementation of the FDTD algorithm, but this algorithm is nevertheless slow. Extracting the results Viewing cartographies The HDF5 format used for the output contains three-dimensional data. It is possible to directly view this data using tools like Vis5d+ or MayaVi, but it is generally more convenient to extract it as two-dimensional pictures. You can do it very easily using h5topng from the h5utils package. For example, to extract the data for the y component of the electric field at z = 25 (in unit cells), just run:
h5topng -Z -c bluered -S 3 -C tchat1.h5 -d y_comp -z 25 E*.h5
You can refer to the h5topng manual for more information.
Viewing spectra The .dat files where spectra are written can be directly used for visualization. Just import them in a spreadsheet, or use xmgrace.
tessa-0.3.1/doc/version.in0000644000175000017500000000001210003714421012316 00000000000000@VERSION@ tessa-0.3.1/src/0002777000175000017500000000000010073013515010423 500000000000000tessa-0.3.1/src/simul.c0000644000175000017500000011550210063341120011631 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include "utils.h" #include "output.h" #include "block.h" #include #include #include #include #ifdef HAVE_MPI #include #endif // Note: we use HH=H/cdtdx instead of H, winning a multiplication per point #define pos_xp (pos+b->ny*b->nz) #define pos_yp (pos+b->nz) #define pos_zp (pos+1) #define pos_xpn (iy*bxp->nz+iz) #define pos_ypn (ix*byp->ny*byp->nz+iz) #define pos_zpn ((ix*bzp->ny+iy)*bzp->nz) #define pos_xm (pos-b->ny*b->nz) #define pos_ym (pos-b->nz) #define pos_zm (pos-1) #define pos_xmn (((bxm->nx-1)*bxm->ny+iy)*bxm->nz+iz) #define pos_ymn (((ix+1)*bym->ny-1)*bym->nz+iz) #define pos_zmn ((ix*bzm->ny+iy+1)*bzm->nz-1) // Warning: rotE is in fact -rot(E) #define browse_block_with_rotE(INSTRUCTIONS) \ pos=0; \ for(ix=0;ixnx-1;ix++) \ { \ for(iy=0;iyny-1;iy++) \ { \ for(iz=0;iznz-1;iz++) \ { \ rotEx=Ey[pos_zp]-Ey[pos]+Ez[pos]-Ez[pos_yp]; \ rotEy=Ez[pos_xp]-Ez[pos]+Ex[pos]-Ex[pos_zp]; \ rotEz=Ex[pos_yp]-Ex[pos]+Ey[pos]-Ey[pos_xp]; \ INSTRUCTIONS \ pos++; \ } \ rotEx=bzp->Ey[pos_zpn]-Ey[pos]+Ez[pos]- Ez[pos_yp] ; \ rotEy= Ez[pos_xp] -Ez[pos]+Ex[pos]-bzp->Ex[pos_zpn]; \ rotEz= Ex[pos_yp] -Ex[pos]+Ey[pos]- Ey[pos_xp] ; \ INSTRUCTIONS \ pos++; \ } \ for(iz=0;iznz-1;iz++) \ { \ rotEx= Ey[pos_zp] -Ey[pos]+Ez[pos]-byp->Ez[pos_ypn]; \ rotEy= Ez[pos_xp] -Ez[pos]+Ex[pos]- Ex[pos_zp] ; \ rotEz=byp->Ex[pos_ypn]-Ex[pos]+Ey[pos]- Ey[pos_xp] ; \ INSTRUCTIONS \ pos++; \ } \ rotEx=bzp->Ey[pos_zpn]-Ey[pos]+Ez[pos]-byp->Ez[pos_ypn]; \ rotEy= Ez[pos_xp] -Ez[pos]+Ex[pos]-bzp->Ex[pos_zpn]; \ rotEz=byp->Ex[pos_ypn]-Ex[pos]+Ey[pos]- Ey[pos_xp] ; \ INSTRUCTIONS \ pos++; \ } \ for(iy=0;iyny-1;iy++) \ { \ for(iz=0;iznz-1;iz++) \ { \ rotEx= Ey[pos_zp] -Ey[pos]+Ez[pos]- Ez[pos_yp] ; \ rotEy=bxp->Ez[pos_xpn]-Ez[pos]+Ex[pos]- Ex[pos_zp] ; \ rotEz= Ex[pos_yp] -Ex[pos]+Ey[pos]-bxp->Ey[pos_xpn]; \ INSTRUCTIONS \ pos++; \ } \ rotEx=bzp->Ey[pos_zpn]-Ey[pos]+Ez[pos]- Ez[pos_yp] ; \ rotEy=bxp->Ez[pos_xpn]-Ez[pos]+Ex[pos]-bzp->Ex[pos_zpn]; \ rotEz= Ex[pos_yp] -Ex[pos]+Ey[pos]-bxp->Ey[pos_xpn]; \ INSTRUCTIONS \ pos++; \ } \ for(iz=0;iznz-1;iz++) \ { \ rotEx= Ey[pos_zp] -Ey[pos]+Ez[pos]-byp->Ez[pos_ypn]; \ rotEy=bxp->Ez[pos_xpn]-Ez[pos]+Ex[pos]- Ex[pos_zp] ; \ rotEz=byp->Ex[pos_ypn]-Ex[pos]+Ey[pos]-bxp->Ey[pos_xpn]; \ INSTRUCTIONS \ pos++; \ } \ rotEx=bzp->Ey[pos_zpn]-Ey[pos]+Ez[pos]-byp->Ez[pos_ypn]; \ rotEy=bxp->Ez[pos_xpn]-Ez[pos]+Ex[pos]-bzp->Ex[pos_zpn]; \ rotEz=byp->Ex[pos_ypn]-Ex[pos]+Ey[pos]-bxp->Ey[pos_xpn]; \ INSTRUCTIONS \ pos++; \ assert(pos==b->nx*b->ny*b->nz) #define browse_block_with_rotH(INSTRUCTIONS) \ pos=0; \ ix=0;iy=0;iz=0; \ rotHx=HHz[pos]-bym->HHz[pos_ymn]+bzm->HHy[pos_zmn]-HHy[pos]; \ rotHy=HHx[pos]-bzm->HHx[pos_zmn]+bxm->HHz[pos_xmn]-HHz[pos]; \ rotHz=HHy[pos]-bxm->HHy[pos_xmn]+bym->HHx[pos_ymn]-HHx[pos]; \ INSTRUCTIONS \ pos++; \ for(iz=1;iznz;iz++) \ { \ rotHx=HHz[pos]-bym->HHz[pos_ymn]+ HHy[pos_zm] -HHy[pos]; \ rotHy=HHx[pos]- HHx[pos_zm] +bxm->HHz[pos_xmn]-HHz[pos]; \ rotHz=HHy[pos]-bxm->HHy[pos_xmn]+bym->HHx[pos_ymn]-HHx[pos]; \ INSTRUCTIONS \ pos++; \ } \ for(iy=1;iyny;iy++) \ { \ iz=0; \ rotHx=HHz[pos]- HHz[pos_ym] +bzm->HHy[pos_zmn]-HHy[pos]; \ rotHy=HHx[pos]-bzm->HHx[pos_zmn]+bxm->HHz[pos_xmn]-HHz[pos]; \ rotHz=HHy[pos]-bxm->HHy[pos_xmn]+ HHx[pos_ym] -HHx[pos]; \ INSTRUCTIONS \ pos++; \ for(iz=1;iznz;iz++) \ { \ rotHx=HHz[pos]- HHz[pos_ym] + HHy[pos_zm] -HHy[pos]; \ rotHy=HHx[pos]- HHx[pos_zm] +bxm->HHz[pos_xmn]-HHz[pos]; \ rotHz=HHy[pos]-bxm->HHy[pos_xmn]+ HHx[pos_ym] -HHx[pos]; \ INSTRUCTIONS \ pos++; \ } \ } \ for(ix=1;ixnx;ix++) \ { \ iy=0;iz=0; \ rotHx=HHz[pos]-bym->HHz[pos_ymn]+bzm->HHy[pos_zmn]-HHy[pos]; \ rotHy=HHx[pos]-bzm->HHx[pos_zmn]+ HHz[pos_xm] -HHz[pos]; \ rotHz=HHy[pos]- HHy[pos_xm] +bym->HHx[pos_ymn]-HHx[pos]; \ INSTRUCTIONS \ pos++; \ for(iz=1;iznz;iz++) \ { \ rotHx=HHz[pos]-bym->HHz[pos_ymn]+ HHy[pos_zm] -HHy[pos]; \ rotHy=HHx[pos]- HHx[pos_zm] + HHz[pos_xm] -HHz[pos]; \ rotHz=HHy[pos]- HHy[pos_xm] +bym->HHx[pos_ymn]-HHx[pos]; \ INSTRUCTIONS \ pos++; \ } \ for(iy=1;iyny;iy++) \ { \ iz=0; \ rotHx=HHz[pos]- HHz[pos_ym] +bzm->HHy[pos_zmn]-HHy[pos]; \ rotHy=HHx[pos]-bzm->HHx[pos_zmn]+ HHz[pos_xm] -HHz[pos]; \ rotHz=HHy[pos]- HHy[pos_xm] + HHx[pos_ym] -HHx[pos]; \ INSTRUCTIONS \ pos++; \ for(iz=1;iznz;iz++) \ { \ rotHx=HHz[pos]-HHz[pos_ym]+HHy[pos_zm]-HHy[pos]; \ rotHy=HHx[pos]-HHx[pos_zm]+HHz[pos_xm]-HHz[pos]; \ rotHz=HHy[pos]-HHy[pos_xm]+HHx[pos_ym]-HHx[pos]; \ INSTRUCTIONS \ pos++; \ } \ } \ } \ assert(pos==b->nx*b->ny*b->nz) static void iter_H_plain_block(varBlock *b) { int pos; // TODO: benchmark when we replace pos by a macro based on ix,iy,iz. int ix,iy,iz; varBlock *bxp=b->block_xp; varBlock *byp=b->block_yp; varBlock *bzp=b->block_zp; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double rotEx,rotEy,rotEz; browse_block_with_rotE( HHx[pos]+=rotEx; HHy[pos]+=rotEy; HHz[pos]+=rotEz; ); } static void iter_E_plain_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *cn=b->cn; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]+=cn[pos]*rotHx; Ey[pos]+=cn[pos]*rotHy; Ez[pos]+=cn[pos]*rotHz; ); } static void iter_E_abs_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumEx=b->absor->sumEx; double *sumEy=b->absor->sumEy; double *sumEz=b->absor->sumEz; double *cn=b->cn; double *dec=b->absor->dec; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]=( (1-dec[pos])*Ex[pos] + cn[pos]*rotHx - SQUARE(dec[pos]*dec[pos])*sumEx[pos] )/(1+dec[pos]); sumEx[pos]+=Ex[pos]; Ey[pos]=( (1-dec[pos])*Ey[pos] + cn[pos]*rotHy - SQUARE(dec[pos]*dec[pos])*sumEy[pos] )/(1+dec[pos]); sumEy[pos]+=Ey[pos]; Ez[pos]=( (1-dec[pos])*Ez[pos] + cn[pos]*rotHz - SQUARE(dec[pos]*dec[pos])*sumEz[pos] )/(1+dec[pos]); sumEz[pos]+=Ez[pos]; ); } static void iter_H_PML_x_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxp=b->block_xp; varBlock *byp=b->block_yp; varBlock *bzp=b->block_zp; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotEx=b->PML->sumrotEx; double decay=b->PML->x_decay; double x_rotcoef=b->PML->x_rotcoef; double x_sumrotcoef=b->PML->x_sumrotcoef; double rotEx,rotEy,rotEz; browse_block_with_rotE( HHx[pos]+=x_rotcoef*rotEx+x_sumrotcoef*sumrotEx[pos]; sumrotEx[pos]+=rotEx; HHy[pos]=HHy[pos]*decay+rotEy; HHz[pos]=HHz[pos]*decay+rotEz; ); } static void iter_E_PML_x_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotHx=b->PML->sumrotHHx; double *cn=b->cn; double decay=b->PML->x_decay; double x_rotcoef=b->PML->x_rotcoef; double x_sumrotcoef=b->PML->x_sumrotcoef; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]+=cn[pos]*(x_rotcoef*rotHx+x_sumrotcoef*sumrotHx[pos]); sumrotHx[pos]+=rotHx; Ey[pos]=Ey[pos]*decay+cn[pos]*rotHy; Ez[pos]=Ez[pos]*decay+cn[pos]*rotHz; ); } static void iter_H_PML_y_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxp=b->block_xp; varBlock *byp=b->block_yp; varBlock *bzp=b->block_zp; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotEy=b->PML->sumrotEy; double decay=b->PML->y_decay; double y_rotcoef=b->PML->y_rotcoef; double y_sumrotcoef=b->PML->y_sumrotcoef; double rotEx,rotEy,rotEz; browse_block_with_rotE( HHx[pos]=HHx[pos]*decay+rotEx; HHy[pos]+=y_rotcoef*rotEy+y_sumrotcoef*sumrotEy[pos]; sumrotEy[pos]+=rotEy; HHz[pos]=HHz[pos]*decay+rotEz; ); } static void iter_E_PML_y_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotHy=b->PML->sumrotHHy; double *cn=b->cn; double decay=b->PML->y_decay; double y_rotcoef=b->PML->y_rotcoef; double y_sumrotcoef=b->PML->y_sumrotcoef; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]=Ex[pos]*decay+cn[pos]*rotHx; Ey[pos]+=cn[pos]*(y_rotcoef*rotHy+y_sumrotcoef*sumrotHy[pos]); sumrotHy[pos]+=rotHy; Ez[pos]=Ez[pos]*decay+cn[pos]*rotHz; ); } static void iter_H_PML_z_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxp=b->block_xp; varBlock *byp=b->block_yp; varBlock *bzp=b->block_zp; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotEz=b->PML->sumrotEz; double decay=b->PML->z_decay; double z_rotcoef=b->PML->z_rotcoef; double z_sumrotcoef=b->PML->z_sumrotcoef; double rotEx,rotEy,rotEz; browse_block_with_rotE( HHx[pos]=HHx[pos]*decay+rotEx; HHy[pos]=HHy[pos]*decay+rotEy; HHz[pos]+=z_rotcoef*rotEz+z_sumrotcoef*sumrotEz[pos]; sumrotEz[pos]+=rotEz; ); } static void iter_E_PML_z_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotHz=b->PML->sumrotHHz; double *cn=b->cn; double decay=b->PML->z_decay; double z_rotcoef=b->PML->z_rotcoef; double z_sumrotcoef=b->PML->z_sumrotcoef; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]=Ex[pos]*decay+cn[pos]*rotHx; Ey[pos]=Ey[pos]*decay+cn[pos]*rotHy; Ez[pos]+=cn[pos]*(z_rotcoef*rotHz+z_sumrotcoef*sumrotHz[pos]); sumrotHz[pos]+=rotHz; ); } static void iter_H_PML_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxp=b->block_xp; varBlock *byp=b->block_yp; varBlock *bzp=b->block_zp; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotEx=b->PML->sumrotEx; double *sumrotEy=b->PML->sumrotEy; double *sumrotEz=b->PML->sumrotEz; double *sumHHx=b->PML->sumHHx; double *sumHHy=b->PML->sumHHy; double *sumHHz=b->PML->sumHHz; double x_decay=b->PML->x_decay; double y_decay=b->PML->y_decay; double z_decay=b->PML->z_decay; double x_rotcoef=b->PML->x_rotcoef; double y_rotcoef=b->PML->y_rotcoef; double z_rotcoef=b->PML->z_rotcoef; double x_sumrotcoef=b->PML->x_sumrotcoef; double y_sumrotcoef=b->PML->y_sumrotcoef; double z_sumrotcoef=b->PML->z_sumrotcoef; double x_sumcoef=b->PML->x_sumcoef; double y_sumcoef=b->PML->y_sumcoef; double z_sumcoef=b->PML->z_sumcoef; double rotEx,rotEy,rotEz; browse_block_with_rotE( HHx[pos]=HHx[pos]*x_decay+x_rotcoef*rotEx+x_sumrotcoef*sumrotEx[pos]-x_sumcoef*sumHHx[pos]; sumHHx[pos]+=HHx[pos]; sumrotEx[pos]+=rotEx; HHy[pos]=HHy[pos]*y_decay+y_rotcoef*rotEy+y_sumrotcoef*sumrotEy[pos]-y_sumcoef*sumHHy[pos]; sumHHy[pos]+=HHy[pos]; sumrotEy[pos]+=rotEy; HHz[pos]=HHz[pos]*z_decay+z_rotcoef*rotEz+z_sumrotcoef*sumrotEz[pos]-z_sumcoef*sumHHz[pos]; sumHHz[pos]+=HHz[pos]; sumrotEz[pos]+=rotEz; ); } static void iter_E_PML_block(varBlock *b) { int pos; int ix,iy,iz; varBlock *bxm=b->block_xm; varBlock *bym=b->block_ym; varBlock *bzm=b->block_zm; double *HHx=b->HHx; double *HHy=b->HHy; double *HHz=b->HHz; double *Ex=b->Ex; double *Ey=b->Ey; double *Ez=b->Ez; double *sumrotHx=b->PML->sumrotHHx; double *sumrotHy=b->PML->sumrotHHy; double *sumrotHz=b->PML->sumrotHHz; double *sumEx=b->PML->sumEx; double *sumEy=b->PML->sumEy; double *sumEz=b->PML->sumEz; double *cn=b->cn; double x_decay=b->PML->x_decay; double y_decay=b->PML->y_decay; double z_decay=b->PML->z_decay; double x_rotcoef=b->PML->x_rotcoef; double y_rotcoef=b->PML->y_rotcoef; double z_rotcoef=b->PML->z_rotcoef; double x_sumrotcoef=b->PML->x_sumrotcoef; double y_sumrotcoef=b->PML->y_sumrotcoef; double z_sumrotcoef=b->PML->z_sumrotcoef; double x_sumcoef=b->PML->x_sumcoef; double y_sumcoef=b->PML->y_sumcoef; double z_sumcoef=b->PML->z_sumcoef; double rotHx,rotHy,rotHz; browse_block_with_rotH( Ex[pos]=Ex[pos]*x_decay+cn[pos]*(x_rotcoef*rotHx+x_sumrotcoef*sumrotHx[pos])-x_sumcoef*sumEx[pos]; sumEx[pos]+=Ex[pos]; sumrotHx[pos]+=rotHx; Ey[pos]=Ey[pos]*y_decay+cn[pos]*(y_rotcoef*rotHy+y_sumrotcoef*sumrotHy[pos])-y_sumcoef*sumEy[pos]; sumEy[pos]+=Ey[pos]; sumrotHy[pos]+=rotHy; Ez[pos]=Ez[pos]*z_decay+cn[pos]*(z_rotcoef*rotHz+z_sumrotcoef*sumrotHz[pos])-z_sumcoef*sumEz[pos]; sumEz[pos]+=Ez[pos]; sumrotHz[pos]+=rotHz; ); } #undef pos_xp #undef pos_yp #undef pos_zp #undef pos_xpn #undef pos_ypn #undef pos_zpn #undef pos_xm #undef pos_ym #undef pos_zm #undef pos_xmn #undef pos_ymn #undef pos_zmn #undef browse_block_with_rotE #undef browse_block_with_rotH static double integ_poynt_x(const varOutputPoynt *p,varBlock *start_block,varBlockList *b) { varBlock *cur_block; double res=0; int miny,minz,maxy,maxz; int px = p->x1 - start_block->off_x; int i,j,pos; while(p->y2 > start_block->off_y) { cur_block=start_block; miny=MAX(0,p->y1-cur_block->off_y); maxy=MIN(cur_block->ny,p->y2-cur_block->off_y); while(p->z2 > cur_block->off_z) { #ifdef HAVE_MPI if(cur_block->mpi_node==b->mpi_node) #endif { minz=MAX(0,p->z1-cur_block->off_z); maxz=MIN(cur_block->nz,p->z2-cur_block->off_z); for(i=miny;iny+i)*cur_block->nz+j); res+=cur_block->Ey[pos]*cur_block->HHz[pos]-cur_block->HHy[pos]*cur_block->Ez[pos]; } } cur_block=cur_block->block_zp; } start_block=start_block->block_yp; } return res; } static double integ_poynt_y(const varOutputPoynt *p,varBlock *start_block,varBlockList *b) { varBlock *cur_block; double res=0; int minz,minx,maxz,maxx; int py = p->y1 - start_block->off_y; int i,j,pos; while(p->z2 > start_block->off_z) { cur_block=start_block; minz=MAX(0,p->z1-cur_block->off_z); maxz=MIN(cur_block->nz,p->z2-cur_block->off_z); while(p->x2 > cur_block->off_x) { #ifdef HAVE_MPI if(cur_block->mpi_node==b->mpi_node) #endif { minx=MAX(0,p->x1-cur_block->off_x); maxx=MIN(cur_block->nx,p->x2-cur_block->off_x); for(i=minz;iny+py)*cur_block->nz+i); res+=cur_block->Ez[pos]*cur_block->HHx[pos]-cur_block->HHz[pos]*cur_block->Ex[pos]; } } cur_block=cur_block->block_xp; } start_block=start_block->block_zp; } return res; } static double integ_poynt_z(const varOutputPoynt *p,varBlock *start_block,varBlockList *b) { varBlock *cur_block; double res=0; int minx,miny,maxx,maxy; int pz = p->z1 - start_block->off_z; int i,j,pos; while(p->x2 > start_block->off_x) { cur_block=start_block; minx=MAX(0,p->x1-cur_block->off_x); maxx=MIN(cur_block->nx,p->x2-cur_block->off_x); while(p->y2 > cur_block->off_y) { #ifdef HAVE_MPI if(cur_block->mpi_node==b->mpi_node) #endif { miny=MAX(0,p->y1-cur_block->off_y); maxy=MIN(cur_block->ny,p->y2-cur_block->off_y); for(i=minx;iny+j)*cur_block->nz+pz); res+=cur_block->Ex[pos]*cur_block->HHy[pos]-cur_block->HHx[pos]*cur_block->Ey[pos]; } } cur_block=cur_block->block_yp; } start_block=start_block->block_xp; } return res; } #ifdef HAVE_MPI static int field_buflen; static int cur_send_request; static double **before_buffer; static double **after_buffer; static MPI_Request *before_reqs; static MPI_Request *after_reqs; static inline void field_x_pack(double *dest, varBlock *block, double *field) { memcpy(dest,field,block->ny*block->nz*sizeof(double)); } static inline void field_x_unpack(double *src, varBlock *block, double *field) { memcpy(field,src,block->ny*block->nz*sizeof(double)); } static inline void field_y_pack(double *dest, varBlock *block, double *field) { int i; for(i=0;inx;i++) memcpy(dest+i*block->nz,field+i*block->ny*block->nz,block->nz*sizeof(double)); } static inline void field_y_unpack(double *src, varBlock *block, double *field) { int i; for(i=0;inx;i++) memcpy(field+i*block->ny*block->nz,src+i*block->nz,block->nz*sizeof(double)); } static inline void field_z_pack(double *dest, varBlock *block, double *field) { int i,j; for(i=0;inx;i++) for(j=0;jny;j++) dest[i*block->ny+j]=field[(i*block->ny+j)*block->nz]; } static inline void field_z_unpack(double *src, varBlock *block, double *field) { int i,j; for(i=0;inx;i++) for(j=0;jny;j++) field[(i*block->ny+j)*block->nz]=src[i*block->ny+j]; } static void initiate_receive(int num, double **buf, MPI_Request *reqs, int tag) { int i; for(i=0;impi_blocks_before, before_reqs, MPI_STATUSES_IGNORE); for(i=0;impi_blocks_before;i++) { p=(int *) before_buffer[i]; bl=b->blocks+p[0]; switch(p[1]) { case DIR_X: field_x_unpack(before_buffer[i]+1, bl, bl->HHy+(bl->nx-1)*bl->ny*bl->nz); field_x_unpack(before_buffer[i]+1+bl->ny*bl->nz, bl, bl->HHz+(bl->nx-1)*bl->ny*bl->nz); break; case DIR_Y: field_y_unpack(before_buffer[i]+1, bl, bl->HHz+(bl->ny-1)*bl->nz); field_y_unpack(before_buffer[i]+1+bl->nz*bl->nx, bl, bl->HHx+(bl->ny-1)*bl->nz); break; case DIR_Z: field_z_unpack(before_buffer[i]+1, bl, bl->HHx+bl->nz-1); field_z_unpack(before_buffer[i]+1+bl->nx*bl->ny, bl, bl->HHy+bl->nz-1); break; default: panic("Cannot find field direction in MPI message."); } } } static void block_propagate_H(varBlock *bl, varBlock *first_block) { int i; int num=bl-first_block; int *p; if(bl->block_xp->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) after_buffer[i]; // Gruik gruik // The first 8 bytes are used to store // block number and direction p[0]=num; p[1]=DIR_X; field_x_pack(after_buffer[i]+1, bl, bl->HHy+(bl->nx-1)*bl->ny*bl->nz); field_x_pack(after_buffer[i]+1+bl->ny*bl->nz, bl, bl->HHz+(bl->nx-1)*bl->ny*bl->nz); // printf("Node %i sending block %ix to node %i.\n",bl->mpi_node,num,bl->block_xp->mpi_node); MPI_Isend(after_buffer[i], 1+2*bl->ny*bl->nz, MPI_DOUBLE, bl->block_xp->mpi_node, TAG_HFIELD, MPI_COMM_WORLD, after_reqs+i); } if(bl->block_yp->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) after_buffer[i]; p[0]=num; p[1]=DIR_Y; field_y_pack(after_buffer[i]+1, bl, bl->HHz+(bl->ny-1)*bl->nz); field_y_pack(after_buffer[i]+1+bl->nz*bl->nx, bl, bl->HHx+(bl->ny-1)*bl->nz); // printf("Node %i sending block %iy to node %i.\n",bl->mpi_node,num,bl->block_yp->mpi_node); MPI_Isend(after_buffer[i], 1+2*bl->nz*bl->nx, MPI_DOUBLE, bl->block_yp->mpi_node, TAG_HFIELD, MPI_COMM_WORLD, after_reqs+i); } if(bl->block_zp->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) after_buffer[i]; p[0]=num; p[1]=DIR_Z; field_z_pack(after_buffer[i]+1, bl, bl->HHx+bl->nz-1); field_z_pack(after_buffer[i]+1+bl->nx*bl->ny, bl, bl->HHy+bl->nz-1); // printf("Node %i sending block %iz to node %i.\n",bl->mpi_node,num,bl->block_zp->mpi_node); MPI_Isend(after_buffer[i], 1+2*bl->nx*bl->ny, MPI_DOUBLE, bl->block_zp->mpi_node, TAG_HFIELD, MPI_COMM_WORLD, after_reqs+i); } } static void receive_E_msgs(varBlockList *b) { varBlock *bl; int i; int *p; // MPI_Waitall(b->mpi_blocks_after, after_reqs, MPI_STATUSES_IGNORE); for(i=0;impi_blocks_after;i++) { p=(int *) after_buffer[i]; bl=b->blocks+p[0]; switch(p[1]) { case DIR_X: field_x_unpack(after_buffer[i]+1, bl, bl->Ey); field_x_unpack(after_buffer[i]+1+bl->ny*bl->nz, bl, bl->Ez); break; case DIR_Y: field_y_unpack(after_buffer[i]+1, bl, bl->Ez); field_y_unpack(after_buffer[i]+1+bl->nz*bl->nx, bl, bl->Ex); break; case DIR_Z: field_z_unpack(after_buffer[i]+1, bl, bl->Ex); field_z_unpack(after_buffer[i]+1+bl->nx*bl->ny, bl, bl->Ey); break; default: panic("Cannot find field direction in MPI message."); } } } static void block_propagate_E(varBlock *bl, varBlock *first_block) { int i; int num=bl-first_block; int *p; if(bl->block_xm->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) before_buffer[i]; p[0]=num; p[1]=DIR_X; field_x_pack(before_buffer[i]+1, bl, bl->Ey); field_x_pack(before_buffer[i]+1+bl->ny*bl->nz, bl, bl->Ez); MPI_Isend(before_buffer[i], 1+2*bl->ny*bl->nz, MPI_DOUBLE, bl->block_xm->mpi_node, TAG_EFIELD, MPI_COMM_WORLD, before_reqs+i); } if(bl->block_ym->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) before_buffer[i]; p[0]=num; p[1]=DIR_Y; field_y_pack(before_buffer[i]+1, bl, bl->Ez); field_y_pack(before_buffer[i]+1+bl->nz*bl->nx, bl, bl->Ex); MPI_Isend(before_buffer[i], 1+2*bl->nz*bl->nx, MPI_DOUBLE, bl->block_ym->mpi_node, TAG_EFIELD, MPI_COMM_WORLD, before_reqs+i); } if(bl->block_zm->mpi_node != bl->mpi_node) { i=cur_send_request++; p=(int *) before_buffer[i]; p[0]=num; p[1]=DIR_Z; field_z_pack(before_buffer[i]+1, bl, bl->Ex); field_z_pack(before_buffer[i]+1+bl->nx*bl->ny, bl, bl->Ey); MPI_Isend(before_buffer[i], 1+2*bl->nx*bl->ny, MPI_DOUBLE, bl->block_zm->mpi_node, TAG_EFIELD, MPI_COMM_WORLD, before_reqs+i); } } #endif // HAVE_MPI int RunSimul(SimulDesc *thesimul) { int max_iteration=thesimul->simul->it_max; int iteration,i; float time_begin,time_end; varBlockList *b=index_array_to_blocks_with_pml(thesimul); varBlock *curBlock; double cdtdx=CELERITY*thesimul->simul->delta_t/thesimul->space->delta_x; int total_cells=thesimul->space->nx*thesimul->space->ny*thesimul->space->nz; varBlock *inj_block=search_block(b,thesimul->inj->x,thesimul->inj->y,thesimul->inj->z); int inj_pos_in_block=offset_in_block(inj_block,thesimul->inj->x,thesimul->inj->y,thesimul->inj->z); double *output_buffer=NULL; double *field_buf=NULL; // A temporary buffer to store the // field in a block. Only for MPI. int nb_ponctoutput=thesimul->output->nb_poncts; varBlock **ponct_out_blocks=myalloc(nb_ponctoutput*sizeof(varBlock *)); int *ponct_out_offsets=myalloc(nb_ponctoutput*sizeof(int)); varOutputPonct *tmp_ponct; int nb_poyntoutput=thesimul->output->nb_poynts; varBlock **poynt_out_init_blocks=myalloc(nb_poyntoutput*sizeof(varBlock *)); varOutputPoynt *tmp_poynt; #ifdef HAVE_MPI double **mpi_buffers; MPI_Request *mpi_reqs; // The maximum send buffer we'll need consists in 2 fields for // each allocated block. field_buflen=2*SQUARE(MAX(thesimul->space->num_pml,thesimul->space->block_size))+1; // We allocate 8 extra bytes at the beginning for the 2 ints // (block number and direction) mpi_buffers=myalloc((b->mpi_blocks_before+b->mpi_blocks_after)*sizeof(double *)); before_buffer=mpi_buffers; after_buffer=mpi_buffers+b->mpi_blocks_before; mpi_reqs=myalloc((b->mpi_blocks_before+b->mpi_blocks_after)*sizeof(MPI_Request)); before_reqs=mpi_reqs; after_reqs=mpi_reqs+b->mpi_blocks_before; for(i=0;impi_blocks_before;i++) before_buffer[i]=myalloc(field_buflen*sizeof(double)); for(i=0;impi_blocks_after;i++) after_buffer[i]=myalloc(field_buflen*sizeof(double)); #endif // HAVE_MPI // Only allocate output buffer on first node. if(thesimul->output->nb_cartos) { #ifdef HAVE_MPI if(b->mpi_node==0) { field_buf=myalloc(CUBE(MAX(thesimul->space->num_pml,thesimul->space->block_size))*sizeof(double)); output_buffer=myalloc(total_cells*sizeof(double)); } #else // HAVE_MPI output_buffer=myalloc(total_cells*sizeof(double)); #endif // HAVE_MPI } for(i=0;ioutput->poncts[i]); ponct_out_blocks[i]=search_block(b,tmp_ponct->x,tmp_ponct->y,tmp_ponct->z); ponct_out_offsets[i]=offset_in_block(ponct_out_blocks[i],tmp_ponct->x,tmp_ponct->y,tmp_ponct->z); } for(i=0;ioutput->poynts[i]); poynt_out_init_blocks[i] = search_block(b,tmp_poynt->x1,tmp_poynt->y1,tmp_poynt->z1); } time_begin=get_time(); for(iteration=0;iterationmpi_node == 0 && #endif iteration%10 == 0 ) { printf("\rIteration #%i --- %i %% completed",iteration,iteration*100/max_iteration); fflush(stdout); } // Dipole injection #ifdef HAVE_MPI if(b->mpi_node == inj_block->mpi_node) #endif { inj_block->Ex[inj_pos_in_block] += thesimul->inj->dir_x*thesimul->inj->injection[iteration]; inj_block->Ey[inj_pos_in_block] += thesimul->inj->dir_y*thesimul->inj->injection[iteration]; inj_block->Ez[inj_pos_in_block] += thesimul->inj->dir_z*thesimul->inj->injection[iteration]; } // iterate H #ifdef HAVE_MPI cur_send_request=0; initiate_receive(b->mpi_blocks_before, before_buffer, before_reqs, TAG_HFIELD); // Go in the reverse order so that the field to be sent // is computed first for(i=b->mpi_endblock;i-->b->mpi_startblock;) #else for(i=0;in;i++) #endif { curBlock=b->blocks+i; if(curBlock->PML==NULL) iter_H_plain_block(curBlock); else { switch(curBlock->PML->block_type) { case BLOCK_PML_FACE_X: iter_H_PML_x_block(curBlock); break; case BLOCK_PML_FACE_Y: iter_H_PML_y_block(curBlock); break; case BLOCK_PML_FACE_Z: iter_H_PML_z_block(curBlock); break; default: iter_H_PML_block(curBlock); } } #ifdef HAVE_MPI block_propagate_H(curBlock,b->blocks); #endif } #ifdef HAVE_MPI MPI_Waitall(b->mpi_blocks_after+b->mpi_blocks_before, mpi_reqs, MPI_STATUSES_IGNORE); receive_H_msgs(b); // MPI_Barrier(MPI_COMM_WORLD); #endif // iterate E #ifdef HAVE_MPI cur_send_request=0; initiate_receive(b->mpi_blocks_after, after_buffer, after_reqs, TAG_EFIELD); for(i=b->mpi_startblock;impi_endblock;i++) #else for(i=0;in;i++) #endif { curBlock=b->blocks+i; if(curBlock->PML==NULL) { if(curBlock->absor==NULL) iter_E_plain_block(curBlock); else iter_E_abs_block(curBlock); } else { switch(curBlock->PML->block_type) { case BLOCK_PML_FACE_X: iter_E_PML_x_block(curBlock); break; case BLOCK_PML_FACE_Y: iter_E_PML_y_block(curBlock); break; case BLOCK_PML_FACE_Z: iter_E_PML_z_block(curBlock); break; default: iter_E_PML_block(curBlock); } } #ifdef HAVE_MPI block_propagate_E(curBlock,b->blocks); #endif } #ifdef HAVE_MPI MPI_Waitall(b->mpi_blocks_before+b->mpi_blocks_after, mpi_reqs, MPI_STATUSES_IGNORE); receive_E_msgs(b); // MPI_Barrier(MPI_COMM_WORLD); #endif // Cartography output for(i=0;ioutput->nb_cartos;i++) if(iteration>=thesimul->output->cartos[i].begin && iterationoutput->cartos[i].end && (iteration-thesimul->output->cartos[i].begin)%thesimul->output->cartos[i].interv==0) switch(thesimul->output->cartos[i].field) { case FIELD_E: output_carto(b, thesimul->space, iteration, max_iteration, "E", FIELD_E, 1, output_buffer, field_buf); break; case FIELD_H: output_carto(b, thesimul->space, iteration, max_iteration, "H", FIELD_H, cdtdx, output_buffer, field_buf); break; default: panic("unknown field"); } // Ponctual output for(i=0;impi_node==b->mpi_node) #endif { tmp_ponct = &(thesimul->output->poncts[i]); switch(tmp_ponct->field) { case FIELD_E: tmp_ponct->valx[iteration]=ponct_out_blocks[i]->Ex[ponct_out_offsets[i]]; tmp_ponct->valy[iteration]=ponct_out_blocks[i]->Ey[ponct_out_offsets[i]]; tmp_ponct->valz[iteration]=ponct_out_blocks[i]->Ez[ponct_out_offsets[i]]; break; case FIELD_H: tmp_ponct->valx[iteration]=ponct_out_blocks[i]->HHx[ponct_out_offsets[i]]*cdtdx; tmp_ponct->valy[iteration]=ponct_out_blocks[i]->HHy[ponct_out_offsets[i]]*cdtdx; tmp_ponct->valz[iteration]=ponct_out_blocks[i]->HHz[ponct_out_offsets[i]]*cdtdx; break; } } // Poynting output for(i=0;ioutput->poynts[i]); switch(tmp_poynt->dir) { case DIR_X: tmp_poynt->val[iteration]=integ_poynt_x(tmp_poynt,poynt_out_init_blocks[i],b); break; case DIR_Y: tmp_poynt->val[iteration]=integ_poynt_y(tmp_poynt,poynt_out_init_blocks[i],b); break; case DIR_Z: tmp_poynt->val[iteration]=integ_poynt_z(tmp_poynt,poynt_out_init_blocks[i],b); break; } } } // End of the main loop time_end=get_time(); #ifdef HAVE_MPI if(b->mpi_node == 0) #endif printf("\rSimulation took %.2f seconds. \nEach of the %i iterations took %.3f seconds.\n",time_end,max_iteration,(time_end-time_begin)/max_iteration); free(output_buffer); // Ponctual output for(i=0;ioutput->poncts[i]); #ifdef HAVE_MPI // MPI_Barrier(MPI_COMM_WORLD); if(b->mpi_node) { if(ponct_out_blocks[i]->mpi_node==b->mpi_node) { MPI_Send(tmp_ponct->valx, max_iteration, MPI_DOUBLE, 0, TAG_PONCTOUT, MPI_COMM_WORLD); MPI_Send(tmp_ponct->valy, max_iteration, MPI_DOUBLE, 0, TAG_PONCTOUT, MPI_COMM_WORLD); MPI_Send(tmp_ponct->valz, max_iteration, MPI_DOUBLE, 0, TAG_PONCTOUT, MPI_COMM_WORLD); } continue; } else if(ponct_out_blocks[i]->mpi_node) { MPI_Recv(tmp_ponct->valx, max_iteration, MPI_DOUBLE, ponct_out_blocks[i]->mpi_node, TAG_PONCTOUT, MPI_COMM_WORLD, MPI_STATUS_IGNORE); MPI_Recv(tmp_ponct->valy, max_iteration, MPI_DOUBLE, ponct_out_blocks[i]->mpi_node, TAG_PONCTOUT, MPI_COMM_WORLD, MPI_STATUS_IGNORE); MPI_Recv(tmp_ponct->valz, max_iteration, MPI_DOUBLE, ponct_out_blocks[i]->mpi_node, TAG_PONCTOUT, MPI_COMM_WORLD, MPI_STATUS_IGNORE); } #endif // HAVE_MPI if(snprintf(filename,FILENAME_BUF-1,"%c_%i_%i_%i",(tmp_ponct->field==FIELD_E)?'E':'H',tmp_ponct->x,tmp_ponct->y,tmp_ponct->z)<0) perror("ponct_output"); else output_datfile3_fft(tmp_ponct->valx,tmp_ponct->valy,tmp_ponct->valz,max_iteration,filename,thesimul->simul->delta_t); } free(ponct_out_blocks); free(ponct_out_offsets); // Poynting output free(poynt_out_init_blocks); for(i=0;ioutput->poynts[i]); int res=-1; #ifdef HAVE_MPI double *tmpdata=NULL; if(b->mpi_node==0) tmpdata=myalloc(max_iteration*sizeof(double)); MPI_Reduce(tmp_poynt->val, tmpdata, max_iteration, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if(b->mpi_node==0) { memcpy(tmp_poynt->val, tmpdata, max_iteration*sizeof(double)); free(tmpdata); } else continue; #endif // HAVE_MPI switch(tmp_poynt->dir) { case DIR_X: res=snprintf(filename,FILENAME_BUF-1,"poynt%i_x=%i",i,tmp_poynt->x1); break; case DIR_Y: res=snprintf(filename,FILENAME_BUF-1,"poynt%i_y=%i",i,tmp_poynt->y1); break; case DIR_Z: res=snprintf(filename,FILENAME_BUF-1,"poynt%i_z=%i",i,tmp_poynt->z1); break; } if(res<0) perror("poynt_output"); else { int cons=1; if(thesimul->output->total_loss && i<6 && i%2==0) cons=-1; output_datfile_const(tmp_poynt->val,max_iteration,filename,thesimul->simul->delta_t,cons*cdtdx*SQUARE(thesimul->space->delta_x)); } } if(thesimul->output->total_loss #ifdef HAVE_MPI && b->mpi_node==0 #endif ) { double *t=myalloc(max_iteration*sizeof(double)); for(i=0;ioutput->poynts[0].val[i]+thesimul->output->poynts[1].val[i] -thesimul->output->poynts[2].val[i]+thesimul->output->poynts[3].val[i] -thesimul->output->poynts[4].val[i]+thesimul->output->poynts[5].val[i]; output_datfile_const(t,max_iteration,"poynt_total",thesimul->simul->delta_t,cdtdx*SQUARE(thesimul->space->delta_x)); free(t); } #ifdef HAVE_MPI for(i=0;impi_blocks_before;i++) free(before_buffer[i]); for(i=0;impi_blocks_after;i++) free(after_buffer[i]); free(mpi_buffers); free(mpi_reqs); #endif destroy_blocklist(b); return 0; } tessa-0.3.1/src/simul.h0000644000175000017500000000005307751461506011655 00000000000000extern int RunSimul(SimulDesc *thesimul); tessa-0.3.1/src/file.c0000644000175000017500000000352507751455730011447 00000000000000/* Copyright (c) 2003 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include #include #include #include "utils.h" /* Reads the contents of a file. Don't forget to free() the returned buffer. */ char *read_file(char *path) { FILE *thefile; char *buffer; int read_chars=0; int bufsize=FILE_BUFFER; int i; thefile=fopen(path,"r"); if(thefile==NULL) { perror(path); return NULL; } if((buffer=malloc(bufsize))==NULL) panic("Not enough memory"); while((i=fread(buffer+read_chars,1,FILE_BUFFER,thefile))==FILE_BUFFER) { read_chars+=i; if(read_chars+FILE_BUFFER>bufsize) { bufsize*=2; buffer=realloc(buffer,bufsize); } } fclose(thefile); read_chars+=i; buffer=realloc(buffer,read_chars+1); buffer[read_chars]='\0'; return buffer; } /* Write in a file, overwriting it if necessary. */ int write_file(char *path,char *buffer) { FILE *thefile; int i; thefile=fopen(path,"w"); if(thefile==NULL) { perror(path); return -1; } i=strlen(buffer); if(fwrite(buffer,1,i,thefile) #include #include #include "arrayh5.h" #define CHECK(cond, msg) { if (!(cond)) { fprintf(stderr, "arrayh5 error: %s\n", msg); exit(EXIT_FAILURE); } } #define CHK_MALLOC(p, t, n) CHECK(p = (t *) malloc(sizeof(t) * (n)), "out of memory") /* Normally, HDF5 prints out all sorts of error messages, e.g. if a dataset can't be found, in addition to returning an error code. The following macro can be wrapped around code to temporarily suppress error messages. */ #define SUPPRESS_HDF5_ERRORS(statements) { \ H5E_auto_t xxxxx_err_func; \ void *xxxxx_err_func_data; \ H5Eget_auto(&xxxxx_err_func, &xxxxx_err_func_data); \ H5Eset_auto(NULL, NULL); \ { statements; } \ H5Eset_auto(xxxxx_err_func, xxxxx_err_func_data); \ } arrayh5 arrayh5_create_withdata(int rank, const int *dims, double *data) { arrayh5 a; int i; CHECK(rank >= 0, "non-positive rank"); a.rank = rank; CHK_MALLOC(a.dims, int, rank); a.N = 1; for (i = 0; i < rank; ++i) { a.dims[i] = dims[i]; a.N *= dims[i]; } if (data) a.data = data; else { CHK_MALLOC(a.data, double, a.N); } return a; } arrayh5 arrayh5_create(int rank, const int *dims) { return arrayh5_create_withdata(rank, dims, NULL); } arrayh5 arrayh5_clone(arrayh5 a) { return arrayh5_create(a.rank, a.dims); } void arrayh5_destroy(arrayh5 a) { free(a.dims); free(a.data); } int arrayh5_conformant(arrayh5 a, arrayh5 b) { int i; if (a.rank != b.rank) return 0; for (i = 0; i < a.rank; ++i) if (a.dims[i] != b.dims[i]) return 0; return 1; } static void rtranspose(int curdim, int rank, const int *dims, int curindex, int curindex_t, const double *data, double *data_t) { int prod_before = 1, prod_after = 1; int i; if (rank == 0) { *data_t = *data; return; } for (i = 0; i < curdim; ++i) prod_before *= dims[i]; for (i = curdim + 1; i < rank; ++i) prod_after *= dims[i]; if (curdim == rank - 1) { for (i = 0; i < dims[curdim]; ++i) data_t[curindex_t + i * prod_before] = data[curindex + i]; } else { for (i = 0; i < dims[curdim]; ++i) rtranspose(curdim + 1, rank, dims, curindex + i * prod_after, curindex_t + i * prod_before, data, data_t); } } void arrayh5_transpose(arrayh5 *a) { double *data_t; int i; CHK_MALLOC(data_t, double, a->N); rtranspose(0, a->rank, a->dims, 0, 0, a->data, data_t); free(a->data); a->data = data_t; for (i = 0; i < a->rank - 1 - i; ++i) { int dummy = a->dims[i]; a->dims[i] = a->dims[a->rank - 1 - i]; a->dims[a->rank - 1 - i] = dummy; } } void arrayh5_getrange(arrayh5 a, double *min, double *max) { int i; CHECK(a.N > 0, "no elements in array"); *min = *max = a.data[0]; for (i = 1; i < a.N; ++i) { if (a.data[i] < *min) *min = a.data[i]; if (a.data[i] > *max) *max = a.data[i]; } } static herr_t find_dataset(hid_t group_id, const char *name, void *d) { char **dname = (char **) d; H5G_stat_t info; H5Gget_objinfo(group_id, name, 1, &info); if (info.type == H5G_DATASET) { CHK_MALLOC(*dname, char, strlen(name) + 1); strcpy(*dname, name); return 1; } return 0; } const char arrayh5_read_strerror[][100] = { "no error", "error opening HD5 file", "couldn't find data set in HDF5 file", "error reading data from HDF5", "error reading data slice from HDF5", "invalid slice of HDF5 data", "non-positive rank in HDF file", "error opening data set in HDF file", }; int arrayh5_read(arrayh5 *a, const char *fname, const char *datapath, char **dataname, int slicedim, int islice, int center_slice) { hid_t file_id = -1, data_id = -1, space_id = -1; char *dname = NULL; int err = 0; hsize_t i, rank, *dims_copy, *maxdims; int *dims; CHECK(a, "NULL array passed to arrayh5_read"); a->dims = NULL; a->data = NULL; file_id = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); if (file_id < 0) { err = 1; goto done; } if (datapath && datapath[0]) { CHK_MALLOC(dname, char, strlen(datapath) + 1); strcpy(dname, datapath); } else { if (H5Giterate(file_id, "/", NULL, find_dataset, &dname) <= 0) { err = 2; goto done; } } data_id = H5Dopen(file_id, dname); if (data_id < 0) { err = 7; goto done; } space_id = H5Dget_space(data_id); rank = H5Sget_simple_extent_ndims(space_id); if (rank <= 0) { err = 6; goto done; } CHK_MALLOC(dims, int, rank); CHK_MALLOC(dims_copy, hsize_t, rank); CHK_MALLOC(maxdims, hsize_t, rank); H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); for (i = 0; i < rank; ++i) dims[i] = dims_copy[i]; free(maxdims); free(dims_copy); if (slicedim < 0 || (slicedim >= rank && islice == 0)) { *a = arrayh5_create(rank, dims); free(dims); if (H5Dread(data_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *) a->data) < 0) { err = 3; goto done; } } else if (slicedim < rank) { if (center_slice) islice += dims[slicedim] / 2; if (islice >= 0 && islice < dims[slicedim]) { hssize_t *start; hsize_t *count, *count2; hid_t mem_space_id; herr_t readerr; CHK_MALLOC(start, hssize_t, rank); CHK_MALLOC(count, hsize_t, rank); CHK_MALLOC(count2, hsize_t, rank); for (i = 0; i < rank; ++i) { count[i] = dims[i]; count2[i] = dims[i]; start[i] = 0; } start[slicedim] = islice; count[slicedim] = 1; H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL); for (i = slicedim; i + 1 < rank; ++i) count2[i] = dims[i] = dims[i + 1]; start[slicedim] = 0; rank = rank - 1; if (rank == 0) { rank = 1; count2[0] = dims[0] = 1; *a = arrayh5_create(0, dims); } else *a = arrayh5_create(rank, dims); free(dims); mem_space_id = H5Screate_simple(rank, count2, NULL); H5Sselect_hyperslab(mem_space_id, H5S_SELECT_SET, start, NULL, count2, NULL); readerr = H5Dread(data_id, H5T_NATIVE_DOUBLE, mem_space_id, space_id, H5P_DEFAULT, (void *) a->data); H5Sclose(mem_space_id); free(count2); free(count); free(start); if (readerr < 0) { err = 4; goto done; } } } else { free(dims); err = 5; goto done; } done: if (err >= 3 && err <= 4) arrayh5_destroy(*a); if (space_id >= 0) H5Sclose(space_id); if (data_id >= 0) H5Dclose(data_id); if (dataname) *dataname = dname; else free(dname); if (file_id >= 0) H5Fclose(file_id); return err; } static int dataset_exists(hid_t id, const char *name) { hid_t data_id; SUPPRESS_HDF5_ERRORS(data_id = H5Dopen(id, name)); if (data_id >= 0) H5Dclose(data_id); return (data_id >= 0); } void arrayh5_write(arrayh5 a, char *filename, char *dataname, short append_data) { int i; hid_t file_id, space_id, type_id, data_id; hsize_t *dims_copy; if (append_data) file_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); else file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK(file_id >= 0, "error opening HDF5 output file"); if (dataset_exists(file_id, dataname)) H5Gunlink(file_id, dataname); /* delete it */ CHECK(a.rank > 0, "non-positive rank"); CHK_MALLOC(dims_copy, hsize_t, a.rank); for (i = 0; i < a.rank; ++i) dims_copy[i] = a.dims[i]; space_id = H5Screate_simple(a.rank, dims_copy, NULL); free(dims_copy); type_id = H5T_NATIVE_DOUBLE; data_id = H5Dcreate(file_id, dataname, type_id, space_id, H5P_DEFAULT); H5Sclose(space_id); H5Dwrite(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, a.data); H5Dclose(data_id); H5Fclose(file_id); } tessa-0.3.1/src/arrayh5.h0000644000175000017500000000427707751454423012113 00000000000000/* Copyright (c) 1999, 2000, 2001, 2002 Massachusetts Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef ARRAYH5_H #define ARRAYH5_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /***********************************************************************/ typedef struct { int rank, *dims, N; double *data; } arrayh5; extern arrayh5 arrayh5_create_withdata(int rank, const int *dims,double *data); extern arrayh5 arrayh5_create(int rank, const int *dims); extern arrayh5 arrayh5_clone(arrayh5 a); extern void arrayh5_transpose(arrayh5 *a); extern void arrayh5_destroy(arrayh5 a); extern int arrayh5_conformant(arrayh5 a, arrayh5 b); extern void arrayh5_getrange(arrayh5 a, double *min, double *max); extern const char arrayh5_read_strerror[][100]; extern int arrayh5_read(arrayh5 *a, const char *fname, const char *datapath, char **dataname, int slicedim, int islice, int center_slice); extern void arrayh5_write(arrayh5 a, char *filename, char *dataname, short append_data); /***********************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* ARRAYH5_H */ tessa-0.3.1/src/init.c0000644000175000017500000005124510061612503011452 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include #include #include #include #include #include #include "file.h" #include "utils.h" #include "arrayh5.h" #include "output.h" SimulDesc *alloc_simuldesc() { SimulDesc *blop; blop=myalloc(sizeof(SimulDesc)); memset(blop,0,sizeof(SimulDesc)); blop->space=myalloc(sizeof(varSpace)); memset(blop->space,0,sizeof(varSpace)); blop->simul=myalloc(sizeof(varSimul)); memset(blop->simul,0,sizeof(varSimul)); blop->inj=myalloc(sizeof(varInj)); memset(blop->inj,0,sizeof(varInj)); blop->output=myalloc(sizeof(varOutput)); memset(blop->output,0,sizeof(varOutput)); return blop; } void free_simuldesc(SimulDesc *blop) { int i; free(blop->space->index); free(blop->space->absor); free(blop->space); free(blop->simul); free(blop->inj->injection); free(blop->inj); for(i=0;ioutput->nb_poncts;i++) { free(blop->output->poncts[i].valx); free(blop->output->poncts[i].valy); free(blop->output->poncts[i].valz); } free(blop->output->poncts); for(i=0;ioutput->nb_poynts;i++) free(blop->output->poynts[i].val); free(blop->output->poynts); free(blop->output->cartos); free(blop->output); free(blop); } int fill_varspace(varSpace *space, char *path) { arrayh5 a; char *dataname; int errcode,i; dataname = split_dataname(path); if(dataname == NULL) dataname="index"; errcode = arrayh5_read(&a,path,dataname,NULL,-1,0,0); if(errcode) { fprintf(stderr,"Problem while reading %s:%s : %s\n",path,dataname,arrayh5_read_strerror[errcode]); return -1; } if(a.rank!=3) { arrayh5_destroy(a); fprintf(stderr,"%s:%s is not a 3-dimensional array !\n",path,dataname); return -2; } space->nx=a.dims[0]; space->ny=a.dims[1]; space->nz=a.dims[2]; for(i=0;i<3;i++) if(a.dims[i]<5) { fprintf(stderr,"%s:%s: array too small in direction %c.\n",path,dataname,'x'+i); arrayh5_destroy(a); return -3; } space->index=myalloc(space->nx*space->ny*space->nz*sizeof(double)); memcpy(space->index,a.data,space->nx*space->ny*space->nz*sizeof(double)); arrayh5_destroy(a); space->min_index=space->index[0]; for(i=0;inx*space->ny*space->nz;i++) if(space->index[i] < space->min_index) space->min_index=space->index[i]; if(space->min_index < 1.) { fprintf(stderr,"Refraction index is lower than 1 !\n"); return -4; } { H5E_auto_t h5errorfunc; void *h5clientdata; // Save and restore the error printing stuff, // but disable it for this call H5Eget_auto(&h5errorfunc, &h5clientdata); H5Eset_auto(NULL,NULL); dataname="absor"; errcode = arrayh5_read(&a,path,dataname,NULL,-1,0,0); H5Eset_auto(h5errorfunc, h5clientdata); } if(errcode) return 0; printf("%s: absorption data detected.\n",path); if(a.rank!=3) { arrayh5_destroy(a); fprintf(stderr,"%s:%s is not a 3-dimensional array !\n",path,dataname); return -2; } if(space->nx != a.dims[0] || space->ny != a.dims[1] || space->nz != a.dims[2]) { fprintf(stderr,"%s:%s: size does not match index array.\n",path,dataname); arrayh5_destroy(a); return -3; } space->absor=myalloc(space->nx*space->ny*space->nz*sizeof(double)); memcpy(space->absor,a.data,space->nx*space->ny*space->nz*sizeof(double)); arrayh5_destroy(a); return 0; } int extract_beginendinterv(char *gloo, int *begin, int *end, int *interv) { int i; *begin=*interv=0; *end=INT_MAX; if(gloo[0]=='/') *interv=atoi(gloo+1); else if(gloo[0]=='-') { i=1; *end=atoi(gloo+1); while(gloo[i]>='0' && gloo[i]<='9') i++; if(gloo[i]=='/') *interv=atoi(gloo+i); } else if(gloo[0]<'0' || gloo[0]>'9') return -1; else { i=0; *begin=atoi(gloo); while(gloo[i]>='0' && gloo[i]<='9') i++; if(gloo[i]!='-') { *end=*begin+1; *interv=1; } else { i++; if(gloo[i]>='0' && gloo[i]<='9') *end=atoi(gloo+i); while(gloo[i]>='0' && gloo[i]<='9') i++; if(gloo[i]=='/') *interv=atoi(gloo+i+1); } } return 0; } int fill_varinj_file(SimulDesc *blop, char *path) { char *contents; char *blip; varInj *inj=blop->inj; int it_max=blop->simul->it_max; int count=0; if(it_max<=0) return -2; contents=read_file(path); if(contents==NULL) return -1; free(inj->injection); inj->injection=myalloc(it_max*sizeof(double)); blip=contents; while(countinjection[count]=atof(blip)*sin(2*M_PI*inj->basefreq*count*blop->simul->delta_t); count++; while(blip[0]!='\r' && blip[0]!='\n' && blip[0]!=0) blip++; if(blip[0]=='\r') blip++; if(blip[0]=='\n') blip++; } //if(countinjection=myrealloc(inj->injection,count*sizeof(double)); //} if(blip[0]!='\r' && blip[0]!='\n' && blip[0]!=0) { fprintf(stderr,"Warning: file %s contains more than %i values.\n",path,it_max); } //inj->inj_max=count; free(contents); return 0; } int fill_varinj_sin(SimulDesc *blop, double periods) { varInj *inj=blop->inj; int i; int it_max=blop->simul->it_max; if(it_max<=0) return -2; free(inj->injection); inj->injection=myalloc(it_max*sizeof(double)); //inj->inj_max=it_max; for(i=0;iinjection[i]=(.5*erf(5.*inj->basefreq*i*blop->simul->delta_t/periods-2.5)+.5)\ * sin(2*M_PI*inj->basefreq*i*blop->simul->delta_t); return 0; } int fill_varinj_gauss(SimulDesc *blop, double relwidth) { varInj *inj=blop->inj; int i; int it_max=blop->simul->it_max; if(it_max<=0) return -2; free(inj->injection); //inj->inj_max=ceil(320./(inj->basefreq*relwidth*blop->simul->delta_t)); inj->injection=myalloc(it_max*sizeof(double)); for(i=0;iinjection[i]=exp(-SQUARE(inj->basefreq*relwidth*i*blop->simul->delta_t/40.-4))\ * sin(2*M_PI*inj->basefreq*i*blop->simul->delta_t); return 0; } int fill_varinj_defaults(SimulDesc *blop) { int i; varInj *inj=blop->inj; int pospola; double constpola; double *tempinj; if(inj->injection==NULL) { int res; printf("Defaulting to sine wave with 10 periods of start time.\n"); if((res=fill_varinj_sin(blop,10))<0) return res; } if(output_datfile_fft(blop->inj->injection,blop->simul->it_max,"p_inj",blop->simul->delta_t)<0) fprintf(stderr,"Warning: could not output injected polarization.\n"); if( inj->x <= 0 || inj->x >= blop->space->nx-1 || inj->y <= 0 || inj->y >= blop->space->ny-1 || inj->z <= 0 || inj->z >= blop->space->nz-1 ) { if(inj->x || inj->y || inj->z) fprintf(stderr,"Warning: injection position out of range.\n"); printf("Centering injection position.\n"); inj->x=blop->space->nx/2; inj->y=blop->space->ny/2; inj->z=blop->space->nz/2; } // For dipole injection, we convert all of that into the \Delta E that // will be injected. For each iteration: // \Delta E = -\Delta p/(\epsilon_0 \epsilon_r (\Delta x)^3 \Delta t) // // Let's be careful: because of that, the function is not idempotent. Maybe // a better solution is needed. pospola=(inj->x*blop->space->ny+inj->y)*blop->space->nz+inj->z; constpola=-1/(EPSILON_0*SQUARE(blop->space->index[pospola])*CUBE(blop->space->delta_x)); tempinj=myalloc(blop->simul->it_max*sizeof(double)); tempinj[0]=blop->inj->injection[0]*constpola; for(i=1;isimul->it_max;i++) tempinj[i]=(blop->inj->injection[i]-blop->inj->injection[i-1])*constpola; free(blop->inj->injection); blop->inj->injection=tempinj; if(inj->dir_x==0 && inj->dir_y==0 && inj->dir_z==0) { printf("Using default injection direction Z.\n"); inj->dir_z=1; } return 0; } int validate_output (SimulDesc *blop) { int i; if(blop->output->nb_cartos==0 && blop->output->nb_poncts==0 && blop->output->nb_poynts==0 && blop->output->total_loss==0) fprintf(stderr,"Warning: no output defined ! Simulation will be useless.\n"); for(i=0;ioutput->nb_cartos;i++) { varOutputCarto *cur=&(blop->output->cartos[i]); if(cur->begin<0 || cur->begin>=blop->simul->it_max) { fprintf(stderr,"Incorrect begin iteration %i.\n",cur->begin); return -5; } if(cur->interv<0 || cur->interv>=blop->simul->it_max) { fprintf(stderr,"Incorrect interval %i.\n",cur->interv); return -5; } else if(cur->interv==0) { cur->interv=DEFAULT_INTERVAL; printf("No interval specified, using default value %i.\n",DEFAULT_INTERVAL); } if(cur->end < cur->begin+1) { fprintf(stderr,"Incorrect end iteration %i.\n",cur->end); return -5; } if(cur->end > blop->simul->it_max) cur->end=blop->simul->it_max; } for(i=0;ioutput->nb_poncts;i++) { varOutputPonct *cur=&(blop->output->poncts[i]); if( cur->x <= 0 || cur->x >= blop->space->nx-1 || cur->y <= 0 || cur->y >= blop->space->ny-1 || cur->z <= 0 || cur->z >= blop->space->nz-1 ) { if(cur->x || cur->y || cur->z) fprintf(stderr,"Warning: output position out of range.\n"); printf("Centering output position.\n"); cur->x=blop->space->nx/2; cur->y=blop->space->ny/2; cur->z=blop->space->nz/2; } if(cur->valx==NULL) cur->valx=myalloc(blop->simul->it_max*sizeof(double)); if(cur->valy==NULL) cur->valy=myalloc(blop->simul->it_max*sizeof(double)); if(cur->valz==NULL) cur->valz=myalloc(blop->simul->it_max*sizeof(double)); } if(blop->output->total_loss > 0) { // printf("total losses\n"); blop->output->total_loss = -1; blop->output->nb_poynts += 6; blop->output->poynts=myrealloc(blop->output->poynts,blop->output->nb_poynts*sizeof(varOutputPoynt)); if(blop->output->nb_poynts > 6) memmove(&(blop->output->poynts[6]),blop->output->poynts,(blop->output->nb_poynts-6)*sizeof(varOutputPoynt)); memset(blop->output->poynts,0,6*sizeof(varOutputPoynt)); for(i=0;i<6;i++) { varOutputPoynt *cur=&(blop->output->poynts[i]); cur->x2=blop->space->nx; cur->y2=blop->space->ny; cur->z2=blop->space->nz; } blop->output->poynts[0].x2=1; blop->output->poynts[1].x1=blop->space->nx-1; blop->output->poynts[2].y2=1; blop->output->poynts[3].y1=blop->space->ny-1; blop->output->poynts[4].z2=1; blop->output->poynts[5].z1=blop->space->nz-1; blop->output->poynts[0].dir=DIR_X; blop->output->poynts[1].dir=DIR_X; blop->output->poynts[2].dir=DIR_Y; blop->output->poynts[3].dir=DIR_Y; blop->output->poynts[4].dir=DIR_Z; blop->output->poynts[5].dir=DIR_Z; } for(i=0;ioutput->nb_poynts;i++) { varOutputPoynt *cur=&(blop->output->poynts[i]); if(cur->x1 < 0 || cur->x2 <= cur->x1 || blop->space->nx < cur->x2 || cur->y1 < 0 || cur->y2 <= cur->y1 || blop->space->ny < cur->y2 || cur->z1 < 0 || cur->z2 <= cur->z1 || blop->space->nz < cur->z2) { fprintf(stderr,"Output plane position out of range.\n"); return -5; } if(cur->val==NULL) cur->val=myalloc(blop->simul->it_max*sizeof(double)); } return 0; } int validate_simuldesc (SimulDesc *blop) { double max_deltat,good_deltat; int i; if(blop->space->delta_x==0) { fprintf(stderr,"I need a space step !\n"); return -1; } if(blop->simul->it_max==0) { fprintf(stderr,"I need an iteration number !\n"); return -1; } if(blop->inj->basefreq==0) { fprintf(stderr,"I need a frequency/wavelength !\n"); return -1; } if(blop->space->delta_x > .2*CELERITY/blop->inj->basefreq) { if(blop->space->delta_x > .5*CELERITY/blop->inj->basefreq) { fprintf(stderr,"The half-wavelength should be shorter than the space step.\n"); return -2; } fprintf(stderr,"Warning: the wavelength is ridiculously low.\n"); } max_deltat = blop->space->delta_x*blop->space->min_index/(CELERITY*SQRT_3); good_deltat = blop->space->delta_x*blop->space->min_index/(CELERITY*3); if(blop->simul->delta_t==0) { blop->simul->delta_t = good_deltat; printf("Setting iteration time to %e.\n",good_deltat); } else if(blop->simul->delta_t > max_deltat) { fprintf(stderr,"Error: iteration time to big, %le > %le.\n",blop->simul->delta_t,max_deltat); return -5; } if(blop->space->num_pml==0) { blop->space->num_pml=10; printf("Using %i-layer PMLs.\n",blop->space->num_pml); } if(blop->space->block_size==0) { blop->space->block_size=10; printf("Using default block size (%i).\n",blop->space->block_size); } if(blop->space->pml_refl==0) { blop->space->pml_refl=1.e-3; printf("PML theoretical reflection under normal incidence: %e\n",blop->space->pml_refl); } else if(blop->space->pml_refl>1) { fprintf(stderr,"Do you REALLY want a reflection greater than 1?\n"); return -6; } blop->space->pml_decay=-CELERITY*log(blop->space->pml_refl)/(2*blop->space->num_pml*blop->space->delta_x); if(blop->space->pml_decay*blop->simul->delta_t > 1) { fprintf(stderr,"Such a reflection cannot be achieved with only %i PMLs.\n",blop->space->num_pml); return -6; } else if(blop->space->pml_decay*blop->simul->delta_t > 0.3) { printf("Warning: This is quite a small reflection for %i PMLs.\n",blop->space->num_pml); } if(blop->space->absor) for(i=0;ispace->nx*blop->space->ny*blop->space->nz;i++) if(abs(blop->space->absor[i]*CELERITY*blop->simul->delta_t/blop->space->index[i])>.5) { fprintf(stderr,"Absorbtion coefficient too large.\n"); return -7; } return 0; } SimulDesc *read_simul(char *path) { char *contents; SimulDesc *blop; char *f1; char *f2; char *f3; int l,l1,l2,line; char *index_file=NULL; char *inj_file=NULL; int inj_type=INJ_NONE; double sin_periods=0, gauss_width=0; int result; contents=read_file(path); if(contents==NULL) return NULL; blop=alloc_simuldesc(); f1=contents; line=1; while(*f1!='\0') { l=l1=l2=0; while(*f1==' ' || *f1=='\t') // Leading whitespace f1++; while(f1[l]!='\n' && f1[l]!='#' && f1[l]!='\0') // Go to the end of the line l++; while(f1[l1]!=' ' && f1[l1]!='=' && l11 && l2==1 && (l2=f1+l-f2)>0) { // This is OK f1[l1]=0; f2[l2]=0; // printf("%s\n",f2); if(!strcasecmp(f1,"index_file")) { free(index_file); index_file=mystrdup(f2); } else if(!strcasecmp(f1,"delta_x")) blop->space->delta_x=atof(f2); else if(!strcasecmp(f1,"num_pml")) blop->space->num_pml=atoi(f2); else if(!strcasecmp(f1,"block_size")) blop->space->block_size=atoi(f2); else if(!strcasecmp(f1,"pml_refl")) blop->space->pml_refl=atof(f2); else if(!strcasecmp(f1,"delta_t")) blop->simul->delta_t=atof(f2); else if(!strcasecmp(f1,"it_max")) blop->simul->it_max=atoi(f2); else if(!strcasecmp(f1,"freq")) blop->inj->basefreq=atof(f2); else if(!strcasecmp(f1,"lambda")) blop->inj->basefreq=CELERITY/atof(f2); else if(!strcasecmp(f1,"injection")) { double x; if(sscanf(f2,"sinus %lf",&x)==1 || sscanf(f2,"sin %lf",&x)==1) { inj_type=INJ_SINUS; sin_periods=x; } else if(sscanf(f2,"gauss %lf",&x)==1 || sscanf(f2,"gaussian %lf",&x)==1) { inj_type=INJ_GAUSS; gauss_width=x; } } else if(!strcasecmp(f1,"injection_pos")) { int x,y,z; if(sscanf(f2,"%i,%i,%i",&x,&y,&z)<3) fprintf(stderr,"Warning: %s: incorrect %s field line %i\n",path,f1,line); else { blop->inj->x=x; blop->inj->y=y; blop->inj->z=z; } } else if(!strcasecmp(f1,"injection_dir")) { double x,y,z; if(sscanf(f2,"%lf,%lf,%lf",&x,&y,&z)<3) fprintf(stderr,"Warning: %s: incorrect %s field line %i\n",path,f1,line); else { blop->inj->dir_x=x; blop->inj->dir_y=y; blop->inj->dir_z=z; } } else if((!strcasecmp(f1,"output_cartoE")) || (!strcasecmp(f1,"output_cartoH"))) { int b,e,i; varOutputCarto *current_carto; if(extract_beginendinterv(f2,&b,&e,&i)) fprintf(stderr,"Warning: %s: incorrect %s field line %i\n",path,f1,line); else { blop->output->nb_cartos++; blop->output->cartos=myrealloc(blop->output->cartos,blop->output->nb_cartos*sizeof(varOutputCarto)); current_carto = &(blop->output->cartos[blop->output->nb_cartos-1]); switch(f1[12]) { case 'E': case 'e': current_carto->field=FIELD_E; break; case 'H': case 'h': current_carto->field=FIELD_H; break; default: panic("GNE ? Unknown field. This shouldn't happen at all."); } current_carto->begin=b; current_carto->end=e; current_carto->interv=i; } } else if((!strcasecmp(f1,"output_ponctE")) || (!strcasecmp(f1,"output_ponctH"))) { int x,y,z; varOutputPonct *current_ponct; if(sscanf(f2,"%i,%i,%i",&x,&y,&z)<3) fprintf(stderr,"Warning: %s: incorrect %s field line %i\n",path,f1,line); else { blop->output->nb_poncts++; blop->output->poncts=myrealloc(blop->output->poncts,blop->output->nb_poncts*sizeof(varOutputPonct)); current_ponct = &(blop->output->poncts[blop->output->nb_poncts-1]); memset(current_ponct,0,sizeof(varOutputPonct)); switch(f1[12]) { case 'E': case 'e': current_ponct->field=FIELD_E; break; case 'H': case 'h': current_ponct->field=FIELD_H; break; default: panic("GNE ? Unknown field. This shouldn't happen at all."); } current_ponct->x=x; current_ponct->y=y; current_ponct->z=z; } } else if(!strcasecmp(f1,"output_poynting")) { int dir,x1,x2,y1,y2,z1,z2; varOutputPoynt *current_poynt; if(sscanf(f2,"%i,%i-%i,%i-%i",&x1,&y1,&y2,&z1,&z2)==5) { dir=DIR_X; x2=x1+1; } else if(sscanf(f2,"%i-%i,%i,%i-%i",&x1,&x2,&y1,&z1,&z2)==5) { dir=DIR_Y; y2=y1+1; } else if(sscanf(f2,"%i-%i,%i-%i,%i",&x1,&x2,&y1,&y2,&z1)==5) { dir=DIR_Z; z2=z1+1; } else { dir=-1; fprintf(stderr,"Warning: %s: incorrect %s field line %i\n",path,f1,line); } if(dir>=0) { blop->output->nb_poynts++; blop->output->poynts=myrealloc(blop->output->poynts,blop->output->nb_poynts*sizeof(varOutputPoynt)); current_poynt = &(blop->output->poynts[blop->output->nb_poynts-1]); memset(current_poynt,0,sizeof(varOutputPoynt)); current_poynt->dir=dir; current_poynt->x1=x1; current_poynt->x2=x2; current_poynt->y1=y1; current_poynt->y2=y2; current_poynt->z1=z1; current_poynt->z2=z2; } } else if(!strcasecmp(f1,"total_loss")) blop->output->total_loss=atoi(f2); else if(!strcasecmp(f1,"injection_file")) { inj_type=INJ_FILE; free(inj_file); inj_file=mystrdup(f2); } else fprintf(stderr,"Warning: %s: unknown field %s line %i\n",path,f1,line); } else if(l1 || l2) { fprintf(stderr,"Warning: %s: parse error line %i\n",path,line); } line++; f1=f3; } free(contents); result=fill_varspace(blop->space,index_file); if(result>=0) result=validate_simuldesc(blop); free(index_file); if(result>=0) { switch(inj_type) { case INJ_FILE: result=fill_varinj_file(blop,inj_file); break; case INJ_SINUS: result=fill_varinj_sin(blop,sin_periods); break; case INJ_GAUSS: result=fill_varinj_gauss(blop,gauss_width); break; } } if(result>=0) result=fill_varinj_defaults(blop); free(inj_file); if(result>=0) result=validate_output(blop); if(result<0) { free_simuldesc(blop); return NULL; } return blop; } tessa-0.3.1/src/init.h0000644000175000017500000000111507751454423011467 00000000000000extern SimulDesc *alloc_simuldesc(); extern void free_simuldesc(SimulDesc *blop); extern int fill_varspace(varSpace *space, char *path); extern int extract_beginendinterv(char *gloo, int *begin, int *end, int *interv); extern int fill_varinj_file(SimulDesc *blop, char *path); extern int fill_varinj_sin(SimulDesc *blop, double periods); extern int fill_varinj_gauss(SimulDesc *blop, double relwidth); extern int fill_varinj_defaults(SimulDesc *blop); extern int validate_output (SimulDesc *blop); extern int validate_simuldesc (SimulDesc *blop); extern SimulDesc *read_simul(char *path); tessa-0.3.1/src/main.c0000644000175000017500000000355710061573560011447 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include #include #include "init.h" #include "simul.h" #include "utils.h" #ifdef HAVE_MPI #include #endif #ifdef HAVE_MPI #define SEXY "orgy" #else // HAVE_MPI #ifdef HAVE_FFTW3 #define SEXY "yes" #else #define SEXY "no" #endif // HAVE_FFTW3 #endif // HAVE_MPI void usage(char *foobar) { printf("Usage : %s file.fdtd\n",foobar); #ifdef HAVE_MPI MPI_Abort(MPI_COMM_WORLD,1); #endif exit(1); } int main(int argc, char **argv) { SimulDesc *simul; #ifdef HAVE_MPI int mpi_node; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_node); #endif // HAVE_MPI #ifdef HAVE_MPI if(mpi_node==0) #endif { if(argc<2) usage(argv[0]); printf(" ASV: %s / %s / %s\n",__DATE__,SEXY,VERSION); } #ifdef HAVE_MPI if(mpi_node) simul = alloc_simuldesc(); else #endif // HAVE_MPI simul = read_simul(argv[1]); #ifdef HAVE_MPI simul=broadcast_simuldesc(simul); #endif if(simul==NULL) { #ifdef HAVE_MPI if(mpi_node==0) #endif printf("%s: error while reading simulation file\n",argv[1]); return -1; } RunSimul(simul); #ifdef HAVE_MPI MPI_Finalize(); #endif return 0; } tessa-0.3.1/src/config.h.in0000644000175000017500000000446410061105552012370 00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H /* Define to 1 if you have the header file. */ #undef HAVE_COMPLEX_H /* Define if the fftw3 library is available */ #undef HAVE_FFTW3 /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if you have & link an MPI library. */ #undef HAVE_MPI /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_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_RESOURCE_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 /* Define to deactivate debugging stuff */ #undef NDEBUG /* 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 to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned' if does not define. */ #undef size_t tessa-0.3.1/src/output.c0000644000175000017500000001514710061612552012054 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include #include #include #include #include #ifdef HAVE_FFTW3 #include #endif #ifdef HAVE_MPI #include #endif #include "utils.h" #include "arrayh5.h" #include "block.h" int output_datfile_const(const double *values, int number, const char *name, double interval, double constant) { FILE *thefile; int i; char filename[FILENAME_BUF]; if((i=snprintf(filename,FILENAME_BUF-1,"%s.dat",name))<0) { perror(name); return -1; } if(i>=FILENAME_BUF-1) { fprintf(stderr,"%s: too long filename for array output.",name); return -1; } if(values==NULL) { fprintf(stderr,"%s: cannot output empty array!\n",name); return -5; } thefile=fopen(filename,"w"); if(thefile==NULL) { perror(filename); return -1; } for(i=0;i=FILENAME_BUF-1) { fprintf(stderr,"%s: too long filename for array output.",name); return -1; } if(valx==NULL || valy==NULL || valz==NULL) { fprintf(stderr,"%s: cannot output empty array!\n",name); return -5; } thefile=fopen(filename,"w"); if(thefile==NULL) { perror(filename); return -1; } for(i=0;i1000000000) // Well, that would be quite a long simulation panic("no, really, that's too many iterations"); if(snprintf(d,14,"%s%i%s","%s%0",(int) ceil(log10(max_iteration)),"d.h5")<0) panic("whoa ?"); if(snprintf(filename,FILENAME_BUF-1,d,name,iteration)<0) panic("filename too long for field output"); size[0]=space->nx; size[1]=space->ny; size[2]=space->nz; a.N=space->nx*space->ny*space->nz; a.rank=3; a.dims=size; a.data=temp_field; block_extract_field(b,space,field,DIR_X,constant,temp_field,temp_bfield); #ifdef HAVE_MPI if(b->mpi_node==0) #endif arrayh5_write(a,filename,"x_comp",0); block_extract_field(b,space,field,DIR_Y,constant,temp_field,temp_bfield); #ifdef HAVE_MPI if(b->mpi_node==0) #endif arrayh5_write(a,filename,"y_comp",1); block_extract_field(b,space,field,DIR_Z,constant,temp_field,temp_bfield); #ifdef HAVE_MPI if(b->mpi_node==0) #endif arrayh5_write(a,filename,"z_comp",1); } tessa-0.3.1/src/output.h0000644000175000017500000000157410060060303012046 00000000000000extern int output_datfile_const(const double *values, int number, const char *name, double interval, double constant); extern int output_datfile(const double *values, int number, const char *name, double interval); extern int output_datfile_const_fft(double *values, int number, const char *name, double interval, double constant); extern int output_datfile_fft(double *values, int number, const char *name, double interval); extern int output_datfile3(const double *valx, const double *valy, const double *valz, int number, const char *name, double interval); extern int output_datfile3_fft(const double *valx, const double *valy, const double *valz, int number, const char *name, double interval); extern void output_carto(const varBlockList *b, const varSpace *space, int iteration, int max_iteration, const char *name, int field, double constant, double *temp_field,double *temp_bfield); tessa-0.3.1/src/utils.c0000644000175000017500000001560110061613623011647 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include "init.h" #include #include #include #include #include #include #ifdef HAVE_MPI #include #endif /* Stop immediately, with an error message. */ void panic(char *message) { fprintf(stderr,"Fatal : %s\n",message); #ifdef HAVE_MPI MPI_Abort(MPI_COMM_WORLD,1); #endif exit(-1); } /* Allocate memory with error checking. */ void *myalloc(size_t size) { void *buf; buf=malloc(size); if(buf==NULL) panic("not enough memory for allocation"); memset(buf,0,size); return buf; } /* Same for reallocation */ void *myrealloc(void *ptr, size_t size) { void *buf; buf=realloc(ptr,size); if(buf==NULL) panic("not enough memory for reallocation"); return buf; } /* Same for strdup */ char *mystrdup(const char *s) { char *buf; buf=strdup(s); if(buf==NULL) panic("not enough memory for allocation"); return buf; } /* Split the name of a file and the name of the data slice. Modifies path to contain only the file name, and return the name of the slice. */ char *split_dataname(char *path) { char *foo; foo=rindex(path,':'); if(foo==NULL) return NULL; foo[0]=0; return foo+1; } float get_time(void) { struct rusage usage; getrusage(RUSAGE_SELF,&usage); return usage.ru_utime.tv_sec+usage.ru_utime.tv_usec/1000000.; } #ifdef HAVE_MPI SimulDesc *broadcast_simuldesc(SimulDesc *simul) { int tmp=0; int i; if(simul) tmp=1; MPI_Bcast(&tmp, 1, MPI_INT, 0, MPI_COMM_WORLD); if(tmp==0) { if(simul) free_simuldesc(simul); return NULL; } MPI_Bcast(&(simul->space->nx), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->ny), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->nz), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->block_size), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->num_pml), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->delta_x), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->min_index), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->pml_refl), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->space->pml_decay), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); if(simul->space->index==NULL) simul->space->index=myalloc(simul->space->nx*simul->space->ny*simul->space->nz*sizeof(double)); MPI_Bcast(simul->space->index, simul->space->nx*simul->space->ny*simul->space->nz, MPI_DOUBLE, 0, MPI_COMM_WORLD); if(simul->space->absor) tmp=1; MPI_Bcast(&tmp, 1, MPI_INT, 0, MPI_COMM_WORLD); if(tmp) { if(simul->space->absor==NULL) simul->space->absor=myalloc(simul->space->nx*simul->space->ny*simul->space->nz*sizeof(double)); MPI_Bcast(simul->space->absor, simul->space->nx*simul->space->ny*simul->space->nz, MPI_DOUBLE, 0, MPI_COMM_WORLD); } MPI_Bcast(&(simul->simul->delta_t), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->simul->it_max), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->x), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->y), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->z), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->dir_x), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->dir_y), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->dir_z), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->inj->basefreq), 1, MPI_DOUBLE, 0, MPI_COMM_WORLD); if(simul->inj->injection==NULL) simul->inj->injection=myalloc(simul->simul->it_max*sizeof(double)); MPI_Bcast(simul->inj->injection, simul->simul->it_max, MPI_DOUBLE, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->nb_cartos), 1, MPI_INT, 0, MPI_COMM_WORLD); if(simul->output->nb_cartos && simul->output->cartos==NULL) simul->output->cartos=myalloc(simul->output->nb_cartos*sizeof(varOutputCarto)); MPI_Bcast(&(simul->output->nb_poncts), 1, MPI_INT, 0, MPI_COMM_WORLD); if(simul->output->nb_poncts && simul->output->poncts==NULL) simul->output->poncts=myalloc(simul->output->nb_poncts*sizeof(varOutputPonct)); MPI_Bcast(&(simul->output->nb_poynts), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->total_loss), 1, MPI_INT, 0, MPI_COMM_WORLD); if(simul->output->nb_poynts && simul->output->poynts==NULL) simul->output->poynts=myalloc(simul->output->nb_poynts*sizeof(varOutputPoynt)); for(i=0;ioutput->nb_cartos;i++) { MPI_Bcast(&(simul->output->cartos[i].field), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->cartos[i].begin), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->cartos[i].interv), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->cartos[i].end), 1, MPI_INT, 0, MPI_COMM_WORLD); } for(i=0;ioutput->nb_poncts;i++) { MPI_Bcast(&(simul->output->poncts[i].field), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poncts[i].x), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poncts[i].y), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poncts[i].z), 1, MPI_INT, 0, MPI_COMM_WORLD); if(simul->output->poncts[i].valx==NULL) simul->output->poncts[i].valx=myalloc(simul->simul->it_max*sizeof(double)); if(simul->output->poncts[i].valy==NULL) simul->output->poncts[i].valy=myalloc(simul->simul->it_max*sizeof(double)); if(simul->output->poncts[i].valz==NULL) simul->output->poncts[i].valz=myalloc(simul->simul->it_max*sizeof(double)); } for(i=0;ioutput->nb_poynts;i++) { MPI_Bcast(&(simul->output->poynts[i].dir), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].x1), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].x2), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].y1), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].y2), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].z1), 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&(simul->output->poynts[i].z2), 1, MPI_INT, 0, MPI_COMM_WORLD); if(simul->output->poynts[i].val==NULL) simul->output->poynts[i].val=myalloc(simul->simul->it_max*sizeof(double)); } return simul; } #endif // HAVE_MPI tessa-0.3.1/src/utils.h0000644000175000017500000000051010061565004011644 00000000000000#include extern void panic(char *message); extern void *myalloc(size_t size); extern void *myrealloc(void *ptr, size_t size); extern char *mystrdup(const char *s); extern char *split_dataname(char *path); extern float get_time(void); #ifdef HAVE_MPI extern SimulDesc *broadcast_simuldesc(SimulDesc *simul); #endif tessa-0.3.1/src/fdtd3d.h0000644000175000017500000001376710063322020011665 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" // Spatial parameters for structure typedef struct { int nx,ny,nz; // Size of working space int block_size; // Max. size for blocks int num_pml; // How many cells for each PML double delta_x; // Size of base cell double min_index; // Minimum index for the whole structure double pml_refl; // Theoretical reflection for a PML under normal incidence double pml_decay; // Field decay inside the PML's double *index; // The index for the whole structure double *absor; // The absorption rate for the whole structure } varSpace; // Simulation parameters typedef struct { double delta_t; // Iteration duration int it_max; // Number of iterations } varSimul; typedef struct { int x,y,z; // Injection position (we only support dipole injection currently) double dir_x,dir_y,dir_z; // What gets injected for each component of E double basefreq; // Base frequency in Hz double *injection; // Injection over time (a table of length it_max) } varInj; enum { FIELD_E, FIELD_H }; enum { INJ_NONE, INJ_FILE, INJ_SINUS, INJ_GAUSS }; enum { DIR_NONE, DIR_X, DIR_Y, DIR_Z }; typedef struct { int field; int begin; int interv; int end; } varOutputCarto; typedef struct { int field; int x,y,z; double *valx; double *valy; double *valz; } varOutputPonct; typedef struct { int dir; int x1,x2; int y1,y2; int z1,z2; double *val; } varOutputPoynt; typedef struct { int nb_cartos; varOutputCarto *cartos; int nb_poncts; varOutputPonct *poncts; int nb_poynts; int total_loss; varOutputPoynt *poynts; } varOutput; // The structure containing everything typedef struct { varSpace *space; varSimul *simul; varInj *inj; varOutput *output; } SimulDesc; #define BLOCK_PML_FACE_X 1 #define BLOCK_PML_FACE_Y 2 #define BLOCK_PML_FACE_Z 4 #define BLOCK_PML_NONE 0 #define BLOCK_PML_CORNER 7 #define BLOCK_PML_EDGE_YZ 6 #define BLOCK_PML_EDGE_ZX 5 #define BLOCK_PML_EDGE_XY 3 // Block specials for PML typedef struct { int block_type; double *sumrotEx; double *sumrotEy; double *sumrotEz; double *sumrotHHx; double *sumrotHHy; double *sumrotHHz; double *sumEx; double *sumEy; double *sumEz; double *sumHHx; double *sumHHy; double *sumHHz; double x_decay; double y_decay; double z_decay; double x_rotcoef,y_rotcoef,z_rotcoef; double x_sumrotcoef,y_sumrotcoef,z_sumrotcoef; double x_sumcoef,y_sumcoef,z_sumcoef; } varPMLblock; typedef struct { double *dec; // decay rate for E field due to absorbing/active material // Can be common to several blocks: check for double-free() // In fact we store c*alpha*delta_t/index double *sumEx; double *sumEy; double *sumEz; } varAbsBlock; // A simulation block typedef struct SvarBlock { int nx,ny,nz; // Size of the block int off_x,off_y,off_z; // Offsets indicating the block's position #ifdef HAVE_MPI int mpi_node; // Node on which this block is allocated #endif double *cn; // (cdt/ndx)^2 array for the block // Can be common to several blocks: check for double-free() double *Ex; double *Ey; double *Ez; double *HHx; double *HHy; double *HHz; struct SvarBlock *block_xm; // The block for the previous x value struct SvarBlock *block_xp; // etc. struct SvarBlock *block_ym; struct SvarBlock *block_yp; struct SvarBlock *block_zm; struct SvarBlock *block_zp; varPMLblock *PML; // If non-NULL, we are in a PML varAbsBlock *absor; // If non-NULL, there is absorption } varBlock; typedef struct { int n; int nx,ny,nz; // Number of blocks in each direction #ifdef HAVE_MPI int mpi_node; // Identity of the current process int mpi_nnodes; // Number of processes int mpi_nblocks; // Maximum number of blocks per process int mpi_startblock; // Block where to start int mpi_endblock; // Block where to end int mpi_blocks_before; // Number of blocks where we send E (and receive H) int mpi_blocks_after; // Number of blocks where we send H and receive E #endif varBlock *blocks; // Other things to be freed unsigned long *index_crc; // The CRC of each index (cn) block unsigned long *decay_crc; // The CRC of each dec block varPMLblock *PMLblocks; varAbsBlock *AbsBlocks; int num_pmlblocks; int num_absblocks; varBlock *empty_block; // an empty block containing only zero fields double *empty; // an zero memory area double *garbage; // an allocated memory area which can contain anything } varBlockList; #if 0 typedef struct { double *prem; // first plan double *dern; // last plan } OneCteMur; typedef struct { OneCteMur C1; OneCteMur C2; OneCteMur C3; } OneDirMur; typedef struct { OneDirMur Cx; OneDirMur Cy; OneDirMur Cz; } ConstMur; #endif #define FILE_BUFFER 4096 // Minimal size for the file reading buffer #define FILENAME_BUF 32 // Maximal lendth for generated filenames #define DEFAULT_INTERVAL 100 // Default interval for outputting cartographies #define CELERITY 2.99792458e8 #define EPSILON_0 8.854187817e-12 #define MU_0 1.25663706144e-6 #define SQRT_3 1.7320508075688772 #define SQRT_2 1.4142135623730951 #define SQUARE(x) ((x)*(x)) #define CUBE(x) ((x)*(x)*(x)) #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #ifdef HAVE_MPI #define TAG_EFIELD 1 #define TAG_HFIELD 2 #define TAG_CARTOOUT 3 #define TAG_PONCTOUT 4 #define TAG_POYNTOUT 5 #define TAG_INIT 6 #endif tessa-0.3.1/src/block.c0000644000175000017500000004760210062320220011574 00000000000000/* Copyright (c) 2003-2004 Ecole centrale de Lyon * * 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, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fdtd3d.h" #include #include #include #include #include "utils.h" #ifdef HAVE_MPI #include #endif static int fill_block(varBlockList *blocklist, int num_block, int nx, int ny, int nz, int off_x, int off_y, int off_z, double *orig_index, double *orig_absor, int orig_nx, int orig_ny, int orig_nz, double cdtdx, double delta_t, double pml_decay) { varBlock *blocks=blocklist->blocks; varBlock *block=blocks+num_block; int i,j,k,orig_x,orig_y,orig_z,block_type; int has_absor=0; double dt_decay=delta_t*pml_decay; double *tmp_dec=NULL; block->nx=nx; block->ny=ny; block->nz=nz; block->off_x=off_x; block->off_y=off_y; block->off_z=off_z; assert(nx && ny && nz); // We don't want an empty block block_type=BLOCK_PML_NONE; // pointers to neighbours if(off_x<0) { block_type|=BLOCK_PML_FACE_X; block->block_xm=blocklist->empty_block; } else block->block_xm = block - blocklist->ny*blocklist->nz; if(off_x>=orig_nx) { block_type|=BLOCK_PML_FACE_X; block->block_xp=blocklist->empty_block; } else block->block_xp = block + blocklist->ny*blocklist->nz; if(off_y<0) { block_type|=BLOCK_PML_FACE_Y; block->block_ym=blocklist->empty_block; } else block->block_ym = block - blocklist->nz; if(off_y>=orig_ny) { block_type|=BLOCK_PML_FACE_Y; block->block_yp=blocklist->empty_block; } else block->block_yp = block + blocklist->nz; if(off_z<0) { block_type|=BLOCK_PML_FACE_Z; block->block_zm=blocklist->empty_block; } else block->block_zm = block - 1; if(off_z>=orig_nz) { block_type|=BLOCK_PML_FACE_Z; block->block_zp=blocklist->empty_block; } else block->block_zp = block + 1; #ifdef HAVE_MPI if(block_type != BLOCK_PML_NONE) // Gruik gruik, but we need the pointer to be non-NULL, and // it should segfault anyway if we try to access it block->PML=(varPMLblock *) 1; if(blocklist->mpi_node!=block->mpi_node) { // Allocate fields only for blocks near the calculation if(block->block_ym->mpi_node==blocklist->mpi_node || block->block_zm->mpi_node==blocklist->mpi_node) block->Ex=myalloc(nx*ny*nz*sizeof(double)); if(block->block_xm->mpi_node==blocklist->mpi_node || block->block_zm->mpi_node==blocklist->mpi_node) block->Ey=myalloc(nx*ny*nz*sizeof(double)); if(block->block_xm->mpi_node==blocklist->mpi_node || block->block_ym->mpi_node==blocklist->mpi_node) block->Ez=myalloc(nx*ny*nz*sizeof(double)); if(block->block_yp->mpi_node==blocklist->mpi_node || block->block_zp->mpi_node==blocklist->mpi_node) block->HHx=myalloc(nx*ny*nz*sizeof(double)); if(block->block_xp->mpi_node==blocklist->mpi_node || block->block_zp->mpi_node==blocklist->mpi_node) block->HHy=myalloc(nx*ny*nz*sizeof(double)); if(block->block_xp->mpi_node==blocklist->mpi_node || block->block_yp->mpi_node==blocklist->mpi_node) block->HHz=myalloc(nx*ny*nz*sizeof(double)); return nx*ny*nz; } #endif block->cn=myalloc(nx*ny*nz*sizeof(double)); if(orig_absor) tmp_dec=myalloc(nx*ny*nz*sizeof(double)); // Fill the index array #define posit(x,y,z) (((x)*ny+(y))*nz+(z)) #define orig_posit(x,y,z) (((x)*orig_ny+(y))*orig_nz+(z)) for(i=0;i=orig_nx) orig_x=orig_nx-1; for(j=0;j=orig_ny) orig_y=orig_ny-1; for(k=0;k=orig_nz) orig_z=orig_nz-1; block->cn[posit(i,j,k)]=SQUARE(cdtdx/orig_index[orig_posit(orig_x,orig_y,orig_z)]); if(orig_absor && orig_absor[orig_posit(orig_x,orig_y,orig_z)]) { tmp_dec[posit(i,j,k)]=CELERITY*delta_t*orig_absor[orig_posit(orig_x,orig_y,orig_z)]/ orig_index[orig_posit(orig_x,orig_y,orig_z)]; has_absor=1; } } } } #undef posit #undef orig_posit // Check whether we already have such an index block blocklist->index_crc[num_block]=crc32(0,(void *)block->cn,nx*ny*nz*sizeof(double)); for(i=0;iindex_crc[i] == blocklist->index_crc[num_block]) { block->Ex=block->cn; memset(block->Ex,0,nx*ny*nz*sizeof(double)); block->cn=blocks[i].cn; break; } } if(block_type==BLOCK_PML_NONE && has_absor) { // Use special absorbing blocks only outside of the PML's block->absor=blocklist->AbsBlocks + blocklist->num_absblocks++; block->absor->dec=tmp_dec; blocklist->decay_crc[num_block]=crc32(0,(void *)tmp_dec,nx*ny*nz*sizeof(double)); for(i=0;idecay_crc[i] == blocklist->decay_crc[num_block]) { block->absor->sumEx=tmp_dec; memset(block->absor->sumEx,0,nx*ny*nz*sizeof(double)); block->absor->dec=blocks[i].absor->dec; break; } } if(block->absor->sumEx==NULL) block->absor->sumEx=myalloc(nx*ny*nz*sizeof(double)); block->absor->sumEy=myalloc(nx*ny*nz*sizeof(double)); block->absor->sumEz=myalloc(nx*ny*nz*sizeof(double)); } else if(orig_absor) block->Ey=tmp_dec; // Allocated and unused, already set to zero if(block->Ex==NULL) block->Ex=myalloc(nx*ny*nz*sizeof(double)); if(block->Ey==NULL) block->Ey=myalloc(nx*ny*nz*sizeof(double)); block->Ez=myalloc(nx*ny*nz*sizeof(double)); block->HHx=myalloc(nx*ny*nz*sizeof(double)); block->HHy=myalloc(nx*ny*nz*sizeof(double)); block->HHz=myalloc(nx*ny*nz*sizeof(double)); if(block_type==BLOCK_PML_NONE) return nx*ny*nz; block->PML=blocklist->PMLblocks + blocklist->num_pmlblocks; block->PML->x_decay=(1-dt_decay/2)/(1+dt_decay/2); block->PML->y_decay=(1-dt_decay/2)/(1+dt_decay/2); block->PML->z_decay=(1-dt_decay/2)/(1+dt_decay/2); block->PML->x_rotcoef=1; block->PML->y_rotcoef=1; block->PML->z_rotcoef=1; if(block_type&BLOCK_PML_FACE_X) { block->PML->sumrotEx=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumrotHHx=myalloc(nx*ny*nz*sizeof(double)); } if(block_type&BLOCK_PML_FACE_Y) { block->PML->sumrotEy=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumrotHHy=myalloc(nx*ny*nz*sizeof(double)); } if(block_type&BLOCK_PML_FACE_Z) { block->PML->sumrotEz=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumrotHHz=myalloc(nx*ny*nz*sizeof(double)); } switch(block_type) { case BLOCK_PML_FACE_X: case BLOCK_PML_FACE_Y: case BLOCK_PML_FACE_Z: // For faces, we use only the necessary fields break; default: // Here some fields are computed but unused, let's compute them // all in the same memory area if(!(block_type&BLOCK_PML_FACE_X)) { block->PML->sumrotEx=blocklist->garbage; block->PML->sumrotHHx=blocklist->garbage; } if(!(block_type&BLOCK_PML_FACE_Y)) { block->PML->sumrotEy=blocklist->garbage; block->PML->sumrotHHy=blocklist->garbage; } if(!(block_type&BLOCK_PML_FACE_Z)) { block->PML->sumrotEz=blocklist->garbage; block->PML->sumrotHHz=blocklist->garbage; } block->PML->sumEx=blocklist->garbage; block->PML->sumEy=blocklist->garbage; block->PML->sumEz=blocklist->garbage; block->PML->sumHHx=blocklist->garbage; block->PML->sumHHy=blocklist->garbage; block->PML->sumHHz=blocklist->garbage; } if((block_type&BLOCK_PML_FACE_Y)&&(block_type&BLOCK_PML_FACE_Z)) { block->PML->sumEx=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumHHx=myalloc(nx*ny*nz*sizeof(double)); block->PML->x_decay=(1-dt_decay)/(1+dt_decay); block->PML->x_sumcoef=SQUARE(dt_decay)/(1+dt_decay); } if((block_type&BLOCK_PML_FACE_Z)&&(block_type&BLOCK_PML_FACE_X)) { block->PML->sumEy=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumHHy=myalloc(nx*ny*nz*sizeof(double)); block->PML->y_decay=(1-dt_decay)/(1+dt_decay); block->PML->y_sumcoef=SQUARE(dt_decay)/(1+dt_decay); } if((block_type&BLOCK_PML_FACE_X)&&(block_type&BLOCK_PML_FACE_Y)) { block->PML->sumEz=myalloc(nx*ny*nz*sizeof(double)); block->PML->sumHHz=myalloc(nx*ny*nz*sizeof(double)); block->PML->z_decay=(1-dt_decay)/(1+dt_decay); block->PML->z_sumcoef=SQUARE(dt_decay)/(1+dt_decay); } switch(block_type) { case BLOCK_PML_FACE_X: block->PML->x_rotcoef=1+dt_decay/2; block->PML->x_sumrotcoef=dt_decay; break; case BLOCK_PML_FACE_Y: block->PML->y_rotcoef=1+dt_decay/2; block->PML->y_sumrotcoef=dt_decay; break; case BLOCK_PML_FACE_Z: block->PML->z_rotcoef=1+dt_decay/2; block->PML->z_sumrotcoef=dt_decay; break; case BLOCK_PML_EDGE_YZ: block->PML->x_rotcoef=1/(1+dt_decay); block->PML->y_sumrotcoef=dt_decay/(1+dt_decay/2); block->PML->z_sumrotcoef=dt_decay/(1+dt_decay/2); break; case BLOCK_PML_EDGE_ZX: block->PML->y_rotcoef=1/(1+dt_decay); block->PML->z_sumrotcoef=dt_decay/(1+dt_decay/2); block->PML->x_sumrotcoef=dt_decay/(1+dt_decay/2); break; case BLOCK_PML_EDGE_XY: block->PML->z_rotcoef=1/(1+dt_decay); block->PML->x_sumrotcoef=dt_decay/(1+dt_decay/2); block->PML->y_sumrotcoef=dt_decay/(1+dt_decay/2); break; case BLOCK_PML_CORNER: block->PML->x_rotcoef=(1+dt_decay/2)/(1+dt_decay); block->PML->y_rotcoef=(1+dt_decay/2)/(1+dt_decay); block->PML->z_rotcoef=(1+dt_decay/2)/(1+dt_decay); block->PML->x_sumrotcoef=dt_decay/(1+dt_decay); block->PML->y_sumrotcoef=dt_decay/(1+dt_decay); block->PML->z_sumrotcoef=dt_decay/(1+dt_decay); break; } blocklist->num_pmlblocks++; block->PML->block_type=block_type; return nx*ny*nz; } varBlockList *index_array_to_blocks_with_pml(SimulDesc *simul) { int block_nx,block_ny,block_nz,total_cells,cur_block; int npml,bs,i,j,k,n; int off_x,off_y,off_z; varBlockList *a; varSpace *space=simul->space; double cdtdx=CELERITY*simul->simul->delta_t/space->delta_x; if(space==NULL || space->index==NULL) return NULL; block_nx=space->nx/space->block_size; if(space->nx%space->block_size) block_nx++; block_ny=space->ny/space->block_size; if(space->ny%space->block_size) block_ny++; block_nz=space->nz/space->block_size; if(space->nz%space->block_size) block_nz++; a=myalloc(sizeof(varBlockList)); a->nx=block_nx+2; a->ny=block_ny+2; a->nz=block_nz+2; a->n=a->nx*a->ny*a->nz; a->blocks=myalloc(sizeof(varBlock)*a->n); a->index_crc=myalloc(sizeof(unsigned long)*a->n); a->PMLblocks=myalloc(sizeof(varPMLblock)*(a->n - block_nx*block_ny*block_nz)); if(space->absor) { a->AbsBlocks=myalloc(sizeof(varAbsBlock)*a->n); a->decay_crc=myalloc(sizeof(unsigned long)*a->n); } total_cells=(space->nx+2*space->num_pml)*(space->ny+2*space->num_pml)*(space->nz+2*space->num_pml); a->empty_block=myalloc(sizeof(varBlock)); a->empty_block->nx=MAX(space->num_pml,space->block_size); a->empty_block->ny=a->empty_block->nx; a->empty_block->nz=a->empty_block->nx; a->empty=myalloc(CUBE(a->empty_block->nx)*sizeof(double)); a->empty_block->Ex=a->empty; a->empty_block->Ey=a->empty; a->empty_block->Ez=a->empty; a->empty_block->HHx=a->empty; a->empty_block->HHy=a->empty; a->empty_block->HHz=a->empty; a->garbage=myalloc(CUBE(a->empty_block->nx)*sizeof(double)); npml=space->num_pml; bs=space->block_size; #ifdef HAVE_MPI MPI_Comm_rank(MPI_COMM_WORLD, &(a->mpi_node)); MPI_Comm_size(MPI_COMM_WORLD, &(a->mpi_nnodes)); a->mpi_nblocks=(a->n-1)/a->mpi_nnodes+1; a->mpi_startblock=a->mpi_nblocks*a->mpi_node; // Could be improved a->mpi_endblock=MIN(a->n,a->mpi_startblock+a->mpi_nblocks); for(i = 0; i < a->n; i++) a->blocks[i].mpi_node=i/a->mpi_nblocks; a->empty_block->mpi_node=a->mpi_node; #endif #define inc_block(NX,NY,NZ,off_x,off_y,off_z) fill_block(a,cur_block++,NX,NY,NZ,off_x,off_y,off_z,space->index,space->absor,space->nx,space->ny,space->nz,cdtdx,simul->simul->delta_t,space->pml_decay); cur_block=0; n=0; off_x=off_y=off_z=-npml; n+=inc_block(npml,npml,npml,-npml,-npml,-npml); for(k=0;knz-k*bs),-npml,-npml,k*bs); n+=inc_block(npml,npml,npml,-npml,-npml,space->nz); for(j=0;jny-j*bs),npml,-npml,j*bs,-npml); for(k=0;kny-j*bs),MIN(bs,space->nz-k*bs),-npml,j*bs,k*bs); n+=inc_block(npml,MIN(bs,space->ny-j*bs),npml,-npml,j*bs,space->nz); } n+=inc_block(npml,npml,npml,-npml,space->ny,-npml); for(k=0;knz-k*bs),-npml,space->ny,k*bs); n+=inc_block(npml,npml,npml,-npml,space->ny,space->nz); for(i=0;inx-i*bs),npml,npml,i*bs,-npml,-npml); for(k=0;knx-i*bs),npml,MIN(bs,space->nz-k*bs),i*bs,-npml,k*bs); n+=inc_block(MIN(bs,space->nx-i*bs),npml,npml,i*bs,-npml,space->nz); for(j=0;jnx-i*bs),MIN(bs,space->ny-j*bs),npml,i*bs,j*bs,-npml); for(k=0;knx-i*bs),MIN(bs,space->ny-j*bs),MIN(bs,space->nz-k*bs),i*bs,j*bs,k*bs); n+=inc_block(MIN(bs,space->nx-i*bs),MIN(bs,space->ny-j*bs),npml,i*bs,j*bs,space->nz); } n+=inc_block(MIN(bs,space->nx-i*bs),npml,npml,i*bs,space->ny,-npml); for(k=0;knx-i*bs),npml,MIN(bs,space->nz-k*bs),i*bs,space->ny,k*bs); n+=inc_block(MIN(bs,space->nx-i*bs),npml,npml,i*bs,space->ny,space->nz); } n+=inc_block(npml,npml,npml,space->nx,-npml,-npml); for(k=0;knz-k*bs),space->nx,-npml,k*bs); n+=inc_block(npml,npml,npml,space->nx,-npml,space->nz); for(j=0;jny-j*bs),npml,space->nx,j*bs,-npml); for(k=0;kny-j*bs),MIN(bs,space->nz-k*bs),space->nx,j*bs,k*bs); n+=inc_block(npml,MIN(bs,space->ny-j*bs),npml,space->nx,j*bs,space->nz); } n+=inc_block(npml,npml,npml,space->nx,space->ny,-npml); for(k=0;knz-k*bs),space->nx,space->ny,k*bs); n+=inc_block(npml,npml,npml,space->nx,space->ny,space->nz); #undef inc_block assert(n == total_cells); assert(cur_block == a->n); #ifndef HAVE_MPI assert(a->num_pmlblocks == a->n - block_nx*block_ny*block_nz); #endif assert(a->num_absblocks <= a->n); free(a->index_crc); a->index_crc=NULL; free(space->index); space->index=NULL; if(space->absor) { free(a->decay_crc); a->decay_crc=NULL; free(space->absor); space->absor=NULL; } #ifdef HAVE_MPI for(i=a->mpi_startblock;impi_endblock;i++) { if(a->blocks[i].block_xm->mpi_node != a->mpi_node) a->mpi_blocks_before++; if(a->blocks[i].block_ym->mpi_node != a->mpi_node) a->mpi_blocks_before++; if(a->blocks[i].block_zm->mpi_node != a->mpi_node) a->mpi_blocks_before++; if(a->blocks[i].block_xp->mpi_node != a->mpi_node) a->mpi_blocks_after++; if(a->blocks[i].block_yp->mpi_node != a->mpi_node) a->mpi_blocks_after++; if(a->blocks[i].block_zp->mpi_node != a->mpi_node) a->mpi_blocks_after++; } #endif // HAVE_MPI return a; } varBlock *search_block(const varBlockList *l,int x,int y,int z) { int i; for(i=0;in;i++) if(l->blocks[i].PML==NULL && x>=l->blocks[i].off_x && xblocks[i].off_x+l->blocks[i].nx && y>=l->blocks[i].off_y && yblocks[i].off_y+l->blocks[i].ny && z>=l->blocks[i].off_z && zblocks[i].off_z+l->blocks[i].nz) return l->blocks+i; return NULL; } int offset_in_block(const varBlock *b,int x, int y, int z) { return ((x-b->off_x)*b->ny+y-b->off_y)*b->nz+z-b->off_z; } void destroy_blocklist(varBlockList *b) { int i,j; for(i=0;in;i++) { for(j=0;jblocks[i].cn==b->blocks[j].cn) break; if(i==j) free(b->blocks[i].cn); if(b->blocks[i].absor) { for(j=0;jblocks[j].absor && b->blocks[i].absor->dec==b->blocks[j].absor->dec) break; if(i==j) free(b->blocks[i].absor->dec); free(b->blocks[i].absor->sumEx); free(b->blocks[i].absor->sumEy); free(b->blocks[i].absor->sumEz); } free(b->blocks[i].Ex); free(b->blocks[i].Ey); free(b->blocks[i].Ez); free(b->blocks[i].HHx); free(b->blocks[i].HHy); free(b->blocks[i].HHz); } free(b->blocks); free(b->index_crc); free(b->decay_crc); for(i=0;inum_pmlblocks;i++) { #define free_ifok(pointer) if((pointer)!=b->empty && (pointer)!=b->garbage) free(pointer) free_ifok(b->PMLblocks[i].sumrotEx); free_ifok(b->PMLblocks[i].sumrotEy); free_ifok(b->PMLblocks[i].sumrotEz); free_ifok(b->PMLblocks[i].sumrotHHx); free_ifok(b->PMLblocks[i].sumrotHHy); free_ifok(b->PMLblocks[i].sumrotHHz); free_ifok(b->PMLblocks[i].sumEx); free_ifok(b->PMLblocks[i].sumEy); free_ifok(b->PMLblocks[i].sumEz); free_ifok(b->PMLblocks[i].sumHHx); free_ifok(b->PMLblocks[i].sumHHy); free_ifok(b->PMLblocks[i].sumHHz); #undef free_ifok } free(b->PMLblocks); free(b->AbsBlocks); free(b->empty_block); free(b->empty); free(b->garbage); free(b); } void block_extract_field(const varBlockList *b,const varSpace *space,int field,int dir,double constant,double *dest,double *tmpbuf) { int i,j,k,p; varBlock *bl; int nx,ny,nz; int orig_ny=space->ny,orig_nz=space->nz; double *tmp_field=NULL; #define posit(x,y,z) (((x)*ny+(y))*nz+(z)) #define orig_posit(x,y,z) (((x)*orig_ny+(y))*orig_nz+(z)) for(p=0;pn;p++) { bl=b->blocks+p; if(bl->PML) continue; nx=bl->nx; ny=bl->ny; nz=bl->nz; #ifdef HAVE_MPI // MPI_Barrier(MPI_COMM_WORLD); if(b->mpi_node==bl->mpi_node) { #endif // HAVE_MPI switch(field) { case FIELD_E: switch(dir) { case DIR_X: tmp_field=bl->Ex; break; case DIR_Y: tmp_field=bl->Ey; break; case DIR_Z: tmp_field=bl->Ez; break; default: panic("unknown direction."); } break; case FIELD_H: switch(dir) { case DIR_X: tmp_field=bl->HHx; break; case DIR_Y: tmp_field=bl->HHy; break; case DIR_Z: tmp_field=bl->HHz; break; default: panic("unknown direction."); } break; default: panic("unknown field."); } #ifdef HAVE_MPI if(b->mpi_node) // We need to send it to the master { MPI_Send(tmp_field, bl->nx*bl->ny*bl->nz, MPI_DOUBLE, 0, TAG_CARTOOUT, MPI_COMM_WORLD); continue; } } else if(b->mpi_node==0) { MPI_Recv(tmpbuf, bl->nx*bl->ny*bl->nz, MPI_DOUBLE, bl->mpi_node, TAG_CARTOOUT, MPI_COMM_WORLD, MPI_STATUS_IGNORE); tmp_field=tmpbuf; } else continue; #endif // HAVE_MPI for(i=0;ioff_x,j+bl->off_y,k+bl->off_z)]=tmp_field[posit(i,j,k)]*constant; } #undef posit #undef orig_posit } tessa-0.3.1/src/block.h0000644000175000017500000000061610060060122011573 00000000000000extern varBlockList *index_array_to_blocks_with_pml(SimulDesc *simul); extern varBlock *search_block(const varBlockList *l,int x,int y,int z); extern int offset_in_block(const varBlock *b,int x, int y, int z); extern void destroy_blocklist(varBlockList *b); extern void block_extract_field(const varBlockList *b,const varSpace *space,int field,int dir,double constant,double *dest,double *tmpbuf); tessa-0.3.1/NEWS0000644000175000017500000000000007751673061010254 00000000000000tessa-0.3.1/TODO0000644000175000017500000000040310063343001010226 00000000000000* Optimization tests/addons: * Features: - nonlinear media - Huygens surface injection - surface mode recovering output - volume injection/output - multiple injections - normalized FFT * Documentation: - complete reference * Cosmetic stuff: tessa-0.3.1/depcomp0000755000175000017500000003305210041367741011136 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 . 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 # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi 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 tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 tessa-0.3.1/aclocal.m40000644000175000017500000012140110073013332011402 00000000000000# generated automatically by aclocal 1.7.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_PREREQ([2.52]) # serial 6 # 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 -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 10 AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.9])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # serial 5 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AM_PATH_PYTHON([MINIMUM-VERSION]) # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST) am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do if test "$am_cv_pathless_PYTHON" = : ; then AC_MSG_ERROR([no suitable Python interpreter found]) fi AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) tessa-0.3.1/README0000644000175000017500000000154210063310207010425 00000000000000This is Tessa 3D-FDTD. This software is designed to study optical structures at the wavelength scale using the finite-differences time-domain method. The Tessa home-page is located at: http://alioth.debian.org/projects/tessa/ You can always find the latest version here. This software is free software, and as such comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Tessa was developed by: Josselin Mouette Laboratoire d'électronique, optoélectronique et microsystèmes (UMR 5512) École centrale de Lyon, France Although it is not required, we'd appreciate some acknowledgement in all publications for which you used this software. The installation is done with GNU autotools: ./configure make make install ./configure --help will give you a list of configuration options. Some documentation can be found in the doc/ directory. tessa-0.3.1/configure0000755000175000017500000053654010073013344011472 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="src/fdtd3d.h" # 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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DB2HTML HAS_DB2HTML_TRUE HAS_DB2HTML_FALSE MPICC MPILIBS PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir 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] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --enable-debug compile with extra runtime checks for debugging Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-mpi enable MPI parallelization 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 src/config.h" am__api_version="1.7" 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 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=tessa VERSION=0.3.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_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 : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # 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 string.h limits.h math.h complex.h assert.h stdio.h stdlib.h sys/time.h sys/resource.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 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sqrt+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 sqrt (); int main () { sqrt (); ; 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_sqrt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sqrt=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_sqrt" >&5 echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 if test $ac_cv_lib_m_sqrt = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 echo $ECHO_N "checking for crc32 in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_crc32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crc32 (); int main () { crc32 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_z_crc32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_crc32=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5 echo "${ECHO_T}$ac_cv_lib_z_crc32" >&6 if test $ac_cv_lib_z_crc32 = yes; then LIBS="-lz $LIBS" else { { echo "$as_me:$LINENO: error: Tessa requires the Zlib library to be installed." >&5 echo "$as_me: error: Tessa requires the Zlib library to be installed." >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for H5Fopen in -lhdf5" >&5 echo $ECHO_N "checking for H5Fopen in -lhdf5... $ECHO_C" >&6 if test "${ac_cv_lib_hdf5_H5Fopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhdf5 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char H5Fopen (); int main () { H5Fopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_hdf5_H5Fopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_hdf5_H5Fopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_hdf5_H5Fopen" >&5 echo "${ECHO_T}$ac_cv_lib_hdf5_H5Fopen" >&6 if test $ac_cv_lib_hdf5_H5Fopen = yes; then LIBS="-lhdf5 $LIBS" else { { echo "$as_me:$LINENO: error: Tessa requires the HDF5 libraries to be installed." >&5 echo "$as_me: error: Tessa requires the HDF5 libraries to be installed." >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for fftw_plan_dft_r2c_1d in -lfftw3" >&5 echo $ECHO_N "checking for fftw_plan_dft_r2c_1d in -lfftw3... $ECHO_C" >&6 if test "${ac_cv_lib_fftw3_fftw_plan_dft_r2c_1d+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw3 $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 fftw_plan_dft_r2c_1d (); int main () { fftw_plan_dft_r2c_1d (); ; 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_fftw3_fftw_plan_dft_r2c_1d=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fftw3_fftw_plan_dft_r2c_1d=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_fftw3_fftw_plan_dft_r2c_1d" >&5 echo "${ECHO_T}$ac_cv_lib_fftw3_fftw_plan_dft_r2c_1d" >&6 if test $ac_cv_lib_fftw3_fftw_plan_dft_r2c_1d = yes; then LIBS="-lfftw3 $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_FFTW3 1 _ACEOF else { echo "$as_me:$LINENO: WARNING: FFTW3 libraries not detected. Discrete Fourier transforms won't be computed." >&5 echo "$as_me: WARNING: FFTW3 libraries not detected. Discrete Fourier transforms won't be computed." >&2;} fi for ac_prog in docbook2html 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_DB2HTML+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DB2HTML"; then ac_cv_prog_DB2HTML="$DB2HTML" # 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_DB2HTML="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi DB2HTML=$ac_cv_prog_DB2HTML if test -n "$DB2HTML"; then echo "$as_me:$LINENO: result: $DB2HTML" >&5 echo "${ECHO_T}$DB2HTML" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$DB2HTML" && break done if test -n "$DB2HTML"; then HAS_DB2HTML_TRUE= HAS_DB2HTML_FALSE='#' else HAS_DB2HTML_TRUE='#' HAS_DB2HTML_FALSE= fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" debug=$enableval else debug=no fi; if test "$debug" = "no"; then cat >>confdefs.h <<\_ACEOF #define NDEBUG 1 _ACEOF fi # Check whether --with-mpi or --without-mpi was given. if test "${with_mpi+set}" = set; then withval="$with_mpi" with_mpi=$withval else with_mpi=no fi; if test "$with_mpi" = "yes"; then for ac_prog in mpicc hcc mpcc mpcc_r mpxlc 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_MPICC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # 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_MPICC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then echo "$as_me:$LINENO: result: $MPICC" >&5 echo "${ECHO_T}$MPICC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$MPICC" && break done test -n "$MPICC" || MPICC="$CC" acx_mpi_save_CC="$CC" CC="$MPICC" if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init" >&5 echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6 if test "${ac_cv_func_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define MPI_Init to an innocuous variant, in case declares MPI_Init. For example, HP-UX 11i declares gettimeofday. */ #define MPI_Init innocuous_MPI_Init /* System header to define __stub macros and hopefully few prototypes, which can conflict with char MPI_Init (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef MPI_Init /* 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 MPI_Init (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_MPI_Init) || defined (__stub___MPI_Init) choke me #else char (*f) () = MPI_Init; #endif #ifdef __cplusplus } #endif int main () { return f != MPI_Init; ; 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_func_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_MPI_Init=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6 if test $ac_cv_func_MPI_Init = yes; then MPILIBS=" " fi fi if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $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 MPI_Init (); int main () { MPI_Init (); ; 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_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=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_mpi_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 if test $ac_cv_lib_mpi_MPI_Init = yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $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 MPI_Init (); int main () { MPI_Init (); ; 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_mpich_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=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_mpich_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6 if test $ac_cv_lib_mpich_MPI_Init = yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $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 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 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$acx_mpi_save_CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then { { echo "$as_me:$LINENO: error: could not find mpi library for --with-mpi" >&5 echo "$as_me: error: could not find mpi library for --with-mpi" >&2;} { (exit 1); exit 1; }; } : else cat >>confdefs.h <<\_ACEOF #define HAVE_MPI 1 _ACEOF : fi CC="$MPICC" LIBS="$MPILIBS $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_MPI 1 _ACEOF fi # Find any Python interpreter. for ac_prog in python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 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_path_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) 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_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$PYTHON" && break done am_display_PYTHON=python echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6 if test "${am_cv_python_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 echo "${ECHO_T}$am_cv_python_version" >&6 PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6 if test "${am_cv_python_platform+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 echo "${ECHO_T}$am_cv_python_platform" >&6 PYTHON_PLATFORM=$am_cv_python_platform echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6 if test "${am_cv_python_pythondir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 echo "${ECHO_T}$am_cv_python_pythondir" >&6 pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6 if test "${am_cv_python_pyexecdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 echo "${ECHO_T}$am_cv_python_pyexecdir" >&6 pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE ac_config_files="$ac_config_files Makefile src/Makefile python/Makefile doc/Makefile doc/version" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAS_DB2HTML_TRUE}" && test -z "${HAS_DB2HTML_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAS_DB2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAS_DB2HTML\" 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" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "python/Makefile" ) CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/version" ) CONFIG_FILES="$CONFIG_FILES doc/version" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/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,@AMTAR@,$AMTAR,;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,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;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,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@DB2HTML@,$DB2HTML,;t t s,@HAS_DB2HTML_TRUE@,$HAS_DB2HTML_TRUE,;t t s,@HAS_DB2HTML_FALSE@,$HAS_DB2HTML_FALSE,;t t s,@MPICC@,$MPICC,;t t s,@MPILIBS@,$MPILIBS,;t t s,@PYTHON@,$PYTHON,;t t s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t s,@PYTHON_PREFIX@,$PYTHON_PREFIX,;t t s,@PYTHON_EXEC_PREFIX@,$PYTHON_EXEC_PREFIX,;t t s,@PYTHON_PLATFORM@,$PYTHON_PLATFORM,;t t s,@pythondir@,$pythondir,;t t s,@pkgpythondir@,$pkgpythondir,;t t s,@pyexecdir@,$pyexecdir,;t t s,@pkgpyexecdir@,$pkgpyexecdir,;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 # 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; } 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 _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 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi tessa-0.3.1/configure.ac0000644000175000017500000000305610073013076012042 00000000000000AC_INIT(src/fdtd3d.h) AM_CONFIG_HEADER(src/config.h) AM_INIT_AUTOMAKE(tessa,0.3.1) AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_INSTALL AC_HEADER_STDC AC_CHECK_HEADERS([string.h limits.h math.h complex.h assert.h stdio.h stdlib.h sys/time.h sys/resource.h unistd.h]) AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_LIB(m, sqrt) AC_CHECK_LIB(z, crc32, LIBS="-lz $LIBS", AC_MSG_ERROR([Tessa requires the Zlib library to be installed.])) AC_CHECK_LIB(hdf5, H5Fopen, LIBS="-lhdf5 $LIBS", AC_MSG_ERROR([Tessa requires the HDF5 libraries to be installed.])) AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_1d, LIBS="-lfftw3 $LIBS" AC_DEFINE(HAVE_FFTW3, 1, [Define if the fftw3 library is available]), AC_MSG_WARN([FFTW3 libraries not detected. Discrete Fourier transforms won't be computed.])) AC_CHECK_PROGS(DB2HTML,docbook2html) AM_CONDITIONAL(HAS_DB2HTML, test -n "$DB2HTML") AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[compile with extra runtime checks for debugging])], debug=$enableval, debug=no) if test "$debug" = "no"; then AC_DEFINE(NDEBUG, 1, [Define to deactivate debugging stuff]) fi AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi],[enable MPI parallelization])], with_mpi=$withval, with_mpi=no) if test "$with_mpi" = "yes"; then sinclude(acx_mpi.m4) ACX_MPI([], [AC_MSG_ERROR(could not find mpi library for --with-mpi)]) CC="$MPICC" LIBS="$MPILIBS $LIBS" AC_DEFINE(HAVE_MPI,1,[Define if you have & link an MPI library.]) fi AM_PATH_PYTHON AC_OUTPUT([ Makefile src/Makefile python/Makefile doc/Makefile doc/version ]) tessa-0.3.1/install-sh0000755000175000017500000001572210041367741011571 00000000000000#!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" 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 "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog 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" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : 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 : 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 : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; 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 : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } tessa-0.3.1/missing0000755000175000017500000002403210041367741011156 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. 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' is missing on your system. 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 missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 you do not seem to have it handy on your system. 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 tessa-0.3.1/mkinstalldirs0000755000175000017500000000370410041367741012370 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here tessa-0.3.1/Makefile.am0000644000175000017500000000003110003716472011601 00000000000000SUBDIRS = src python doc tessa-0.3.1/Makefile.in0000644000175000017500000003775510073013342011632 00000000000000# Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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 = : 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@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAS_DB2HTML_FALSE = @HAS_DB2HTML_FALSE@ HAS_DB2HTML_TRUE = @HAS_DB2HTML_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@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ 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@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ 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@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src python doc subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL Makefile.am NEWS TODO aclocal.m4 \ configure configure.ac depcomp install-sh missing mkinstalldirs \ py-compile DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/doc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | 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 $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: -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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive dist \ dist-all dist-gzip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-data install-data-am \ install-data-recursive install-exec install-exec-am \ install-exec-recursive install-info install-info-am \ install-info-recursive install-man install-recursive \ install-strip installcheck installcheck-am installdirs \ installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ mostlyclean-generic mostlyclean-recursive pdf pdf-am \ pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive # 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: tessa-0.3.1/python/0002777000175000017500000000000010073013516011156 500000000000000tessa-0.3.1/python/tessa.py0000644000175000017500000004152410073003133012561 00000000000000"""Generate HDF5 optical structures for FDTD simulations""" import Numeric,math,types,tables _array=Numeric.array _sqrt=math.sqrt _resize=Numeric.resize def _alwaystrue(x,y,z): return True def _spherefunc(x0,y0,z0,r,x,y,z): return ((x0-x)**2+(y0-y)**2+(z0-z)**2struct.x2 except AssertionError: for j in range(ny): y=j*delta_x try: for struct in self.structlist: assert y+delta_xstruct.y2 except AssertionError: for k in range(nz): z=k*delta_x try: for struct in self.structlist: assert z+delta_xstruct.z2 except AssertionError: tmpdata=_resize(float(self.index), (oversampling,oversampling,oversampling)) if(do_absor): tmpdata2=_resize(0., (oversampling,oversampling,oversampling)) for struct in self.structlist: struct.local_index_absor_fill(x,y,z,delta_x, oversampling, tmpdata, tmpdata2) absorarr[i][j][k]=sum(sum(sum(tmpdata2)))/oversampling**3 else: for struct in self.structlist: struct.local_index_fill(x,y,z,delta_x, oversampling, tmpdata) indexarr[i][j][k]=sum(sum(sum(tmpdata)))/oversampling**3 if(filename[-3:]!='.h5'): filename+='.h5' f=tables.openFile(filename,mode='w') f.createArray(f.root, 'index', indexarr) if(do_absor): f.createArray(f.root, 'absor', absorarr) f.close() def addobj(self,struct): """Add a geometric object to the structure struct: the object to add (must be a GeomStruct instance)""" assert isinstance(struct,GeomStruct) self.structlist.append(struct) class GeomStruct: """Generic geometric object class""" def __init__(self,func,x1,x2,y1,y2,z1,z2,index=1,absor=0,check_bounds=False): """Create a generic geometric object func: a 3-argument function describing the object. func(x,y,z) must be True when inside the object, and False outside x1,x2,y1,y2,z1,z2: bounds outside which func(x,y,z) is always False, i.e. a bounding box surrounding the object index: the refractive index inside the object (default=1.) absor: the absorption coefficient inside the object (default=0.) check_bounds: set it to True when func(x,y,z) is not guaranteed to be False outside the bounding box. E.g. if func(x,y,z) is always True you can use it to build a block (default=False)""" self.index=float(index) self.absor=float(absor) assert type(func) is types.FunctionType self.func=func self.x1=float(x1) self.x2=float(x2) self.y1=float(y1) self.y2=float(y2) self.z1=float(z1) self.z2=float(z2) self.check_bounds=check_bounds def isinside(self,x,y,z): """Check whether a given coordinate is inside the geometric object x,y,z: coordinates of where to check""" if(self.check_bounds): if(x=self.x2 or y=self.y2 or z=self.z2): return False return self.func(x,y,z) def local_index_fill(self,x0,y0,z0,delta_x,nb,ar): """Fill an cubic array with the index of the object at the coordinates where we are inside. x0,y0,z0: coordinates of the starting corner of the array delta_x: the space step between two consecutive positions in the array nb: number of cells in each direction ar: the array to be filled, of size nb^3""" if(x0+1self.x2 or y0+1self.y2 or z0+1self.z2): return for i in range(nb): x=x0+i*delta_x/nb for j in range(nb): y=y0+j*delta_x/nb for k in range(nb): z=z0+k*delta_x/nb if self.isinside(x,y,z): ar[i,j,k]=self.index def local_index_absor_fill(self,x0,y0,z0,delta_x,nb,ar,ar2): """Fill an cubic array with the index of the object at the coordinates where we are inside, and another array with the absorption coefficient. x0,y0,z0: coordinates of the starting corner of the array delta_x: the space step between two consecutive positions in the array nb: number of cells in each direction ar: the array to be filled with the index, of size nb^3 ar2: the array to be filled with the absorption coefficient, same size""" if(x0+1self.x2 or y0+1self.y2 or z0+1self.z2): return for i in range(nb): x=x0+i*delta_x/nb for j in range(nb): y=y0+j*delta_x/nb for k in range(nb): z=z0+k*delta_x/nb if self.isinside(x,y,z): ar[i,j,k]=self.index ar2[i,j,k]=self.absor class Block(GeomStruct): """Block object class""" def __init__(self,x1,x2,y1,y2,z1,z2,index=1,absor=0): """Create and initialize a block object x1,x2,y1,y2,z1,z2: bounding coordinates for the block index: refractive index inside the block (default=1.) absor: the absorption coefficient inside the object (default=0.)""" GeomStruct.__init__(self,_alwaystrue, x1,x2,y1,y2,z1,z2,index=index,absor=absor,check_bounds=True) class Sphere(GeomStruct): """Sphere object class""" def __init__(self,x0,y0,z0,r,index=1,absor=0): """Create and initialize a sphere object x0,y0,z0: center of the sphere r: radius of the sphere index: refractive index inside the sphere (default=1.) absor: the absorption coefficient inside the object (default=0.)""" self.center=(x0,y0,z0) self.radius=r GeomStruct.__init__(self,(lambda x,y,z:_spherefunc(x0,y0,z0,r,x,y,z)), x0-r,x0+r,y0-r,y0+r,z0-r,z0+r,index=index,absor=absor) # We define a prism by: # * a projection plane: x, y or z (c=0) # * an axis - by default it is orthogonal to the plane # * a 2D function of the remaining variables in this plane # * the limits of this function *in the plane* a1 This program would probably have never existed without the work of Pascal Bontoux. He left us on 28th july 2002. tessa-0.3.1/INSTALL0000644000175000017500000000000007751673061010606 00000000000000tessa-0.3.1/ChangeLog0000644000175000017500000002021510073013265011322 000000000000002004-07-07 15:27 Josselin Mouette * doc/quickref.sgml, python/tessa.py, configure.ac: * version 0.3.1 * update documentation * the python module now handles cones 2004-06-14 15:42 Josselin Mouette * doc/quickref.sgml, TODO: * Updated todo-list, and fixed documentation date. * This will be the actual 0.3 release. 2004-06-14 15:29 Josselin Mouette * src/fdtd3d.h, src/simul.c, README, configure.ac: * Filled in the README. * Version 0.3 * Final MPI optimizations; removed all MPI_Barrier calls. 2004-06-11 13:53 Josselin Mouette * src/: block.c, simul.c: Final bugfixes. First tests say MPI completely works now. 2004-06-10 12:39 Josselin Mouette * src/: block.c, fdtd3d.h, simul.c: * Fixed crash during output, using appropriate MPI_Barrier's. * Reworked communication model, to allocate the exact number of needed buffers for each process instead of using MPI_NUM_BUFFERS. There are only two MPI_Waitall for each process now. 2004-06-09 14:16 Josselin Mouette * src/: fdtd3d.h, init.c, main.c, simul.c, utils.c, utils.h: * MPI now seems to work, at least for the field communication. Some work remains to do for the output stuff. * Removed the noisy error messages when no absorption is found. 2004-06-07 15:53 Josselin Mouette * src/: fdtd3d.h, main.c, simul.c, utils.c: Finished implementing MPI. Now builds. We'll see later whether it actually works. 2004-06-04 16:43 Josselin Mouette * src/: block.c, block.h, fdtd3d.h, main.c, output.c, output.h, simul.c, utils.c: Go on with MPI support. Reworked message reception a bit, and implemented ponctual/carto output. Don't expect it to build yet. 2004-06-03 21:20 Josselin Mouette * src/block.c, src/fdtd3d.h, src/main.c, src/simul.c, src/utils.c, configure.ac, acx_mpi.m4: Begin to implement MPI parallelisation. Almost all the code is here now, but the output stuff needs to be reworked. 2004-05-27 17:15 Josselin Mouette * doc/quickref.sgml, src/block.c, src/init.c, src/simul.c: A few fixes so that absorbing materials are actually computed. Also fix the documentation. 2004-05-27 15:49 Josselin Mouette * doc/quickref.sgml: Document the absorbing material stuff. 2004-05-27 15:32 Josselin Mouette * python/tessa.py, src/block.c, src/fdtd3d.h, src/init.c, src/simul.c: Add support for absorbing/active materials. This is done through a new 'absor' property of geometric objects, which defines the absorption coefficient in m^-1. 2004-04-22 13:50 Josselin Mouette * src/simul.c, configure.ac: * Don't output DFT's for Poynting output, they are meaningless. * Make 0.2.2 release. 2004-04-20 11:03 Josselin Mouette * doc/quickref.sgml, src/fdtd3d.h, src/init.c, src/simul.c: Make the Poynting output work correctly. Now tested and functional. 2004-04-05 22:01 Josselin Mouette * doc/quickref.sgml, src/fdtd3d.h, src/init.c, src/simul.c, TODO: * Implement the Poynting vector flow output. * Use more reasonable defaults for the PMLs. 2004-03-15 14:12 Josselin Mouette * doc/quickref.sgml, src/block.c, src/fdtd3d.h, src/init.c, src/output.c, configure.ac: Various cleanups. Tag for version 0.2.1. 2004-03-05 18:15 Josselin Mouette * doc/quickref.sgml, python/tessa.py, TODO: Use PyTables to generate the index files. 2004-03-05 16:57 Josselin Mouette * TODO: Updated todo list. 2004-01-30 14:22 Josselin Mouette * doc/quickref.sgml: Incorporate Xavier's corrections in the tutorial. 2004-01-26 14:28 Josselin Mouette * src/init.c: Bleh, I corrupted init.c. 2004-01-26 14:26 Josselin Mouette * doc/quickref.sgml, src/init.c: We have a full version of the quick reference guide. 2004-01-26 08:11 Josselin Mouette * doc/quickref.sgml, src/init.c: A few more lines of doc. 2004-01-22 15:05 Josselin Mouette * doc/Makefile.am, doc/quickref.sgml, doc/version.in, Makefile.am, configure.ac: First draft of quick reference guide. 2004-01-20 12:40 Josselin Mouette * configure.ac: 0.2 release. 2004-01-20 12:34 Josselin Mouette * src/init.c: Don't warn too early for too important PML reflection. 2004-01-19 16:02 Josselin Mouette * src/fdtd3d.h, src/simul.c, TODO: Fixed the pos_{x,z}{m,p} macros. Everything seems to work fine now. 2004-01-16 16:59 Josselin Mouette * src/: Attic/mur.c, Attic/mur.h, Makefile.am, block.c, block.h, fdtd3d.h, init.c, output.c, output.h, simul.c: Finally the output code is here, and all builds fine. 2004-01-15 23:21 Josselin Mouette * src/: block.c, fdtd3d.h, simul.c: Reimplemented the main loop and ponctual output. 2004-01-14 16:43 Josselin Mouette * src/: block.c, block.h, fdtd3d.h, simul.c: Blocks can now be freed, and the beginning of output code is here. 2004-01-12 16:10 Josselin Mouette * src/simul.c: The FDTD code inside blocks is finished. Still have to go through the blocks. 2003-12-18 15:18 Josselin Mouette * src/simul.c: Implement a generic loop for a block. We are close to something working now. 2003-12-16 16:03 Josselin Mouette * src/: block.c, block.h, fdtd3d.h, init.c, simul.c: * Another progress towards a working PML setup. Still don't expect anything to build. 2003-12-15 16:31 Josselin Mouette * configure.ac, src/block.c, src/fdtd3d.h, src/simul.c: * Finished block splitting and memory allocation. * Now require Zlib, as we use crc32 for index compression. 2003-12-12 17:31 Josselin Mouette * src/: block.c, fdtd3d.h, init.c, simul.c: Well, it looks like it is impossible to make Mur ABC's in 3D properly. This is the start of a rewrite using unsplit PML and field tiling. Don't expÃect it to build. 2003-11-19 16:42 Josselin Mouette * src/: output.c, simul.c: Correct compilation errors. 2003-11-19 16:41 Josselin Mouette * src/output.c: Fix minor warning. 2003-11-19 12:04 Josselin Mouette * src/simul.c: Finished rewriting Mur boundary conditions. Untested yet. 2003-11-19 10:11 Josselin Mouette * src/simul.c, TODO: Added todo-list. Begin a complete rewrite of Mur boundary conditions. 2003-11-06 13:57 Josselin Mouette * python/Makefile.am, python/tessa.py, Makefile.am, configure.ac: Include python module to build HDF5 structures 2003-11-05 10:20 Josselin Mouette * src/: Makefile.am, fdtd3d.h, init.c, main.c, simul.c: remove inj_max. We now inject stuff all over the simulation, setting it to zero if necessary. Also fix a segfault, and use -Wall by default. 2003-11-04 10:38 Josselin Mouette * configure.ac: Use NDEBUG by default. 2003-11-04 10:26 Josselin Mouette * src/Attic/mur.c, src/fdtd3d.h, src/init.c, src/main.c, src/output.c, src/utils.c, INSTALL, autogen.sh, NEWS, README, configure.ac: Now builds. We also have conditional activation of FFTW stuff. 2003-11-03 15:36 Josselin Mouette * src/Attic/mur.c, src/Attic/mur.h, src/Makefile.am, src/arrayh5.c, src/arrayh5.h, src/fdtd3d.h, src/file.c, src/file.h, src/init.c, src/init.h, src/main.c, src/output.c, src/output.h, src/simul.c, src/simul.h, src/utils.c, src/utils.h, Makefile.am, AUTHORS, COPYING: Importing sources. tessa-0.3.1/COPYING0000644000175000017500000004311007751455472010625 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. tessa-0.3.1/py-compile0000755000175000017500000000474510041367741011574 00000000000000#!/bin/sh # py-compile - Compile a Python program # Copyright 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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. # called as "py-compile [--basedir DIR] PY_FILES ... if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= case "$1" in --basedir) basedir=$2 shift 2 ;; --help) echo "Usage: py-compile [--basedir DIR] PY_FILES ..." echo "Byte compile some python scripts. This should be performed" echo "after they have been moved to the final installation location" exit 0 ;; --version) echo "py-compile version 0.0" exit 0 ;; esac if [ $# = 0 ]; then echo "No files given to $0" 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then trans="path = file" else trans="path = os.path.join('$basedir', file)" fi $PYTHON -c " import sys, os, string, py_compile files = '''$*''' print 'Byte-compiling python modules...' for file in string.split(files): $trans if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(path) print" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, string, py_compile files = '''$*''' print 'Byte-compiling python modules (optimized versions) ...' for file in string.split(files): $trans if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(path) print" 2>/dev/null || :