From d23e5ce699a8d7c15eb5312d448fc8fba23b9558 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Thu, 5 Aug 2004 14:26:37 +0000 Subject: [PATCH] *** empty log message *** --- Cantera/fortran/src/cantera_thermo.f90 | 14 + Cantera/fortran/src/fct_interface.f90 | 430 ++ Cantera/matlab/setup_winmatlab.py | 10 +- Cantera/python/Cantera/XML.py | 34 - Cantera/src/ChemEquil.cpp | 6 +- Cantera/src/FtnODESys.h | 56 - Cantera/src/ImplicitChem.h | 118 - Cantera/src/MultiDomain.h | 155 - Cantera/src/PolyThermo.h | 99 - Cantera/src/PolyThermoMgr.h | 96 - Cantera/src/ResidEval.h | 114 - Cantera/src/TigerPolynomial.h | 116 - Cantera/src/flowBoundaries.h | 209 - Cantera/src/funcs.h | 11 - Cantera/src/gases.h | 29 - Cantera/src/import.h | 41 - Cantera/src/importXML.h | 25 - Cantera/src/mix_utils.h | 95 - Cantera/src/zeroD/ReactorBase.cpp | 2 +- Makefile.in | 3 + config/configure | 5424 +++++++++++++++++------- config/configure.in | 6 +- configure | 16 +- tools/Makefile.in | 3 + tools/src/finish_install.py.in | 2 + tools/templates/f90/demo.f90 | 96 + tools/templates/f90/demo.mak.in | 94 + 27 files changed, 4540 insertions(+), 2764 deletions(-) create mode 100644 Cantera/fortran/src/fct_interface.f90 delete mode 100755 Cantera/src/FtnODESys.h delete mode 100755 Cantera/src/ImplicitChem.h delete mode 100755 Cantera/src/MultiDomain.h delete mode 100755 Cantera/src/PolyThermo.h delete mode 100755 Cantera/src/PolyThermoMgr.h delete mode 100755 Cantera/src/ResidEval.h delete mode 100755 Cantera/src/TigerPolynomial.h delete mode 100755 Cantera/src/flowBoundaries.h delete mode 100644 Cantera/src/funcs.h delete mode 100755 Cantera/src/gases.h delete mode 100755 Cantera/src/import.h delete mode 100755 Cantera/src/importXML.h delete mode 100755 Cantera/src/mix_utils.h create mode 100644 tools/templates/f90/demo.f90 create mode 100644 tools/templates/f90/demo.mak.in diff --git a/Cantera/fortran/src/cantera_thermo.f90 b/Cantera/fortran/src/cantera_thermo.f90 index 124a6410c..dd446d616 100644 --- a/Cantera/fortran/src/cantera_thermo.f90 +++ b/Cantera/fortran/src/cantera_thermo.f90 @@ -12,8 +12,22 @@ module cantera_thermo integer :: nsp end type phase_t +! these definitions are for use with the equilibrate function. integer, parameter :: TV = 100 integer, parameter :: HP = 101 + integer, parameter :: SP = 102 + integer, parameter :: PV = 103 + integer, parameter :: TP = 104 + integer, parameter :: UV = 105 + integer, parameter :: SV = 107 + + integer, parameter :: VT = -100 + integer, parameter :: PH = -101 + integer, parameter :: PS = -102 + integer, parameter :: VP = -103 + integer, parameter :: PT = -104 + integer, parameter :: VU = -105 + integer, parameter :: VS = -107 contains diff --git a/Cantera/fortran/src/fct_interface.f90 b/Cantera/fortran/src/fct_interface.f90 new file mode 100644 index 000000000..fb580a7d9 --- /dev/null +++ b/Cantera/fortran/src/fct_interface.f90 @@ -0,0 +1,430 @@ +module fct +interface + + subroutine cantera_error(proc, msg) + character*(*), intent(in) :: proc + character*(*), intent(in) :: msg + end subroutine cantera_error + + integer function phase_nelements(n) + integer, intent(in) :: n + end function phase_nelements + + integer function phase_nspecies(n) + integer, intent(in) :: n + end function phase_nspecies + + double precision function phase_temperature(n) + integer, intent(in) :: n + end function phase_temperature + + integer function phase_settemperature(n, t) + integer, intent(in) :: n + double precision, intent(in) :: t + end function phase_settemperature + + double precision function phase_density(n) + integer, intent(in) :: n + end function phase_density + + integer function phase_setdensity(n, rho) + integer, intent(in) :: n + double precision, intent(in) :: rho + end function phase_setdensity + + double precision function phase_molardensity(n) + integer, intent(in) :: n + end function phase_molardensity + + double precision function phase_meanmolecularweight(n) + integer, intent(in) :: n + end function phase_meanmolecularweight + + integer function phase_elementindex(n, nm) + integer, intent(in) :: n + character*(*), intent(in) :: nm + end function phase_elementindex + + integer function phase_speciesindex(n, nm) + integer, intent(in) :: n + character*(*), intent(in) :: nm + end function phase_speciesindex + + integer function phase_getmolefractions(n, x) + integer, intent(in) :: n + double precision, intent(out) :: x(*) + end function phase_getmolefractions + + double precision function phase_molefraction(n, k) + integer, intent(in) :: n + integer, intent(in) :: k + end function phase_molefraction + + integer function phase_getmassfractions(n, y) + integer, intent(in) :: n + double precision, intent(out) :: y(*) + end function phase_getmassfractions + + double precision function phase_massfraction(n, k) + integer, intent(in) :: n + integer, intent(in) :: k + end function phase_massfraction + + integer function phase_setmolefractions(n, x, norm) + integer, intent(in) :: n + double precision, intent(in) :: x(*) + integer, intent(in) :: norm + end function phase_setmolefractions + + integer function phase_setmolefractionsbyname(n, x) + integer, intent(in) :: n + character*(*), intent(in) :: x + end function phase_setmolefractionsbyname + + integer function phase_setmassfractions(n, y, norm) + integer, intent(in) :: n + double precision, intent(in) :: y(*) + integer, intent(in) :: norm + end function phase_setmassfractions + + integer function phase_setmassfractionsbyname(n, y) + integer, intent(in) :: n + character*(*), intent(in) :: y + end function phase_setmassfractionsbyname + + integer function phase_getatomicweights(n, atw) + integer, intent(in) :: n + double precision, intent(out) :: atw(*) + end function phase_getatomicweights + + integer function phase_getmolecularweights(n, mw) + integer, intent(in) :: n + double precision, intent(out) :: mw(*) + end function phase_getmolecularweights + + integer function phase_getspeciesname(n, k, nm) + integer, intent(in) :: n + integer, intent(in) :: k + character*(*), intent(out) :: nm + end function phase_getspeciesname + + integer function phase_getelementname(n, m, nm) + integer, intent(in) :: n + integer, intent(in) :: m + character*(*), intent(out) :: nm + end function phase_getelementname + + double precision function phase_natoms(n, k, m) + integer, intent(in) :: n + integer, intent(in) :: k + integer, intent(in) :: m + end function phase_natoms + + integer function newthermofromxml(mxml) + integer, intent(in) :: mxml + end function newthermofromxml + + integer function th_eostype(n) + integer, intent(in) :: n + end function th_eostype + + double precision function th_enthalpy_mole(n) + integer, intent(in) :: n + end function th_enthalpy_mole + + double precision function th_intenergy_mole(n) + integer, intent(in) :: n + end function th_intenergy_mole + + double precision function th_entropy_mole(n) + integer, intent(in) :: n + end function th_entropy_mole + + double precision function th_gibbs_mole(n) + integer, intent(in) :: n + end function th_gibbs_mole + + double precision function th_cp_mole(n) + integer, intent(in) :: n + end function th_cp_mole + + double precision function th_cv_mole(n) + integer, intent(in) :: n + end function th_cv_mole + + double precision function th_pressure(n) + integer, intent(in) :: n + end function th_pressure + + double precision function th_enthalpy_mass(n) + integer, intent(in) :: n + end function th_enthalpy_mass + + double precision function th_intEnergy_mass(n) + integer, intent(in) :: n + end function th_intEnergy_mass + + double precision function th_entropy_mass(n) + integer, intent(in) :: n + end function th_entropy_mass + + double precision function th_gibbs_mass(n) + integer, intent(in) :: n + end function th_gibbs_mass + + double precision function th_cp_mass(n) + integer, intent(in) :: n + end function th_cp_mass + + double precision function th_cv_mass(n) + integer, intent(in) :: n + end function th_cv_mass + + integer function th_chempotentials(n, murt) + integer, intent(in) :: n + double precision, intent(out) :: murt(*) + end function th_chempotentials + + integer function th_setpressure(n, p) + integer, intent(in) :: n + double precision, intent(in) :: p + end function th_setpressure + + integer function th_set_hp(n, v1, v2) + integer, intent(in) :: n + double precision, intent(in) :: v1 + double precision, intent(in) :: v2 + end function th_set_hp + + integer function th_set_uv(n, v1, v2) + integer, intent(in) :: n + double precision, intent(in) :: v1 + double precision, intent(in) :: v2 + end function th_set_uv + + integer function th_set_sv(n, v1, v2) + integer, intent(in) :: n + double precision, intent(in) :: v1 + double precision, intent(in) :: v2 + end function th_set_sv + + integer function th_set_sp(n, v1, v2) + integer, intent(in) :: n + double precision, intent(in) :: v1 + double precision, intent(in) :: v2 + end function th_set_sp + + integer function th_equil(n, XY) + integer, intent(in) :: n + integer, intent(in) :: XY + end function th_equil + + double precision function th_refpressure(n) + integer, intent(in) :: n + end function th_refpressure + + double precision function th_mintemp(n, k) + integer, intent(in) :: n + integer, intent(in) :: k + end function th_mintemp + + double precision function th_maxtemp(n, k) + integer, intent(in) :: n + integer, intent(in) :: k + end function th_maxtemp + + integer function th_getenthalpies_rt(n, h_rt) + integer, intent(in) :: n + double precision, intent(out) :: h_rt(*) + end function th_getenthalpies_rt + + integer function th_getentropies_r(n, s_r) + integer, intent(in) :: n + double precision, intent(out) :: s_r(*) + end function th_getentropies_r + + integer function th_getcp_r(n, lenm, cp_r) + integer, intent(in) :: n + integer, intent(out) :: lenm + double precision, intent(out) :: cp_r(*) + end function th_getcp_r + + integer function newkineticsfromxml(mxml, iphase, neighbor1, neighbor2, neighbor3, neighbor4) + integer, intent(in) :: mxml + integer, intent(in) :: iphase + integer, intent(in) :: neighbor1 + integer, intent(in) :: neighbor2 + integer, intent(in) :: neighbor3 + integer, intent(in) :: neighbor4 + end function newkineticsfromxml + + integer function kin_type(n) + integer, intent(in) :: n + end function kin_type + + integer function kin_start(n, p) + integer, intent(in) :: n + integer, intent(in) :: p + end function kin_start + + integer function kin_speciesindex(n, nm, ph) + integer, intent(in) :: n + character*(*), intent(in) :: nm + character*(*), intent(in) :: ph + end function kin_speciesindex + + integer function kin_ntotalspecies(n) + integer, intent(in) :: n + end function kin_ntotalspecies + + integer function kin_nreactions(n) + integer, intent(in) :: n + end function kin_nreactions + + double precision function kin_reactantstoichcoeff(n, k, i) + integer, intent(in) :: n + integer, intent(in) :: k + integer, intent(in) :: i + end function kin_reactantstoichcoeff + + double precision function kin_productstoichcoeff(n, k, i) + integer, intent(in) :: n + integer, intent(in) :: k + integer, intent(in) :: i + end function kin_productstoichcoeff + + integer function kin_reactiontype(n, i) + integer, intent(in) :: n + integer, intent(in) :: i + end function kin_reactiontype + + integer function kin_getfwdratesofprogress(n, fwdROP) + integer, intent(in) :: n + double precision, intent(out) :: fwdROP(*) + end function kin_getfwdratesofprogress + + integer function kin_getrevratesofprogress(n, revROP) + integer, intent(in) :: n + double precision, intent(out) :: revROP(*) + end function kin_getrevratesofprogress + + integer function kin_isreversible(n, i) + integer, intent(in) :: n + integer, intent(in) :: i + end function kin_isreversible + + integer function kin_getnetratesofprogress(n, netROP) + integer, intent(in) :: n + double precision, intent(out) :: netROP(*) + end function kin_getnetratesofprogress + + integer function kin_getcreationrates(n, cdot) + integer, intent(in) :: n + double precision, intent(out) :: cdot(*) + end function kin_getcreationrates + + integer function kin_getdestructionrates(n, ddot) + integer, intent(in) :: n + double precision, intent(out) :: ddot(*) + end function kin_getdestructionrates + + integer function kin_getnetproductionrates(n, wdot) + integer, intent(in) :: n + double precision, intent(out) :: wdot(*) + end function kin_getnetproductionrates + + double precision function kin_multiplier(n, i) + integer, intent(in) :: n + integer, intent(in) :: i + end function kin_multiplier + + integer function kin_getequilibriumconstants(n, kc) + integer, intent(in) :: n + double precision, intent(out) :: kc(*) + end function kin_getequilibriumconstants + + integer function kin_getreactionstring(n, i, buf) + integer, intent(in) :: n + integer, intent(in) :: i + character*(*), intent(out) :: buf + end function kin_getreactionstring + + integer function kin_setmultiplier(n, i, v) + integer, intent(in) :: n + integer, intent(in) :: i + double precision, intent(out) :: v + end function kin_setmultiplier + + integer function kin_advancecoverages(n, tstep) + integer, intent(in) :: n + double precision, intent(in) :: tstep + end function kin_advancecoverages + + integer function newtransport(model, ith, loglevel) + character*(*), intent(in) :: model + integer, intent(in) :: ith + integer, intent(in) :: loglevel + end function newtransport + + double precision function trans_viscosity(n) + integer, intent(in) :: n + end function trans_viscosity + + double precision function trans_thermalConductivity(n) + integer, intent(in) :: n + end function trans_thermalConductivity + + integer function trans_getThermalDiffCoeffs(n, dt) + integer, intent(in) :: n + double precision, intent(out) :: dt(*) + end function trans_getThermalDiffCoeffs + + integer function trans_getMixDiffCoeffs(n, d) + integer, intent(in) :: n + double precision, intent(out) :: d(*) + end function trans_getMixDiffCoeffs + + integer function trans_getBinDiffCoeffs(n, ld, d) + integer, intent(in) :: n + integer, intent(in) :: ld + double precision, intent(out) :: d(*) + end function trans_getBinDiffCoeffs + + integer function trans_getMultiDiffCoeffs(n, ld, d) + integer, intent(in) :: n + integer, intent(in) :: ld + double precision, intent(out) :: d(*) + end function trans_getMultiDiffCoeffs + + integer function trans_setParameters(n, type, k, d) + integer, intent(in) :: n + integer, intent(in) :: type + integer, intent(in) :: k + double precision, intent(in) :: d(*) + end function trans_setParameters + + integer function ctphase_report(nth, buf, show_thermo) + integer, intent(in) :: nth + character*(*), intent(out) :: buf + integer, intent(in) :: show_thermo + end function ctphase_report + + integer function ctgetCanteraError(buf) + character*(*), intent(out) :: buf + end function ctgetCanteraError + + integer function ctaddCanteraDirectory(buflen, buf) + integer, intent(in) :: buflen + character*(*), intent(in) :: buf + end function ctaddCanteraDirectory + + integer function ctbuildSolutionFromXML(src, ixml, id, ith, ikin) + character*(*), intent(in) :: src + integer, intent(in) :: ixml + character*(*), intent(in) :: id + integer, intent(in) :: ith + integer, intent(in) :: ikin + end function ctbuildSolutionFromXML + +end interface +end module fct diff --git a/Cantera/matlab/setup_winmatlab.py b/Cantera/matlab/setup_winmatlab.py index a3f05d90e..9b33fffd4 100644 --- a/Cantera/matlab/setup_winmatlab.py +++ b/Cantera/matlab/setup_winmatlab.py @@ -1,16 +1,16 @@ import sys -bindir = 'c:/cantera/bin' -libdir = 'd:/dgg/dv/sf/cantera/build/lib/i686-pc-win32' -incdir = 'd:/dgg/dv/sf/cantera/build/include' -dflibdir = 'D:\Program Files\Microsoft Visual Studio\DF98\LIB' +bindir = '/Applications/Cantera/bin' +libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.4.0' +incdir = '/Users/dgg/dv/sf/cantera/build/include' +dflibdir = '' bllibstr = "-lctlapack -lctblas" bllibs = bllibstr.replace('-l',' ') bllist = bllibs.split() -bldir = "d:/dgg/dv/sf/cantera/build/lib/i686-pc-win32" +bldir = "/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.4.0" libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes', 'cvode', 'ctmath', 'tpx'] diff --git a/Cantera/python/Cantera/XML.py b/Cantera/python/Cantera/XML.py index f91004ab7..ccfe94e48 100644 --- a/Cantera/python/Cantera/XML.py +++ b/Cantera/python/Cantera/XML.py @@ -157,44 +157,10 @@ class XML_Node: s += line return s -## def getRef(self): -## if not self["idRef"]: return self -## return find_XML(src = self["src"], root = self.root(), -## id = self["idRef"]) - - def clear_XML(): _cantera.xml_clear() -## def find_XML(src = "", root = None, id = "", loc = "", name=""): -## doc = None -## r = None -## if src: -## ihash = string.find(src,'#') -## if ihash < 0: -## fname = src -## else: -## fname, idnew = string.split(src,'#') -## if idnew: id = idnew -## if fname: -## doc = XML_Node(name="doc", src=fname) -## root = None -## elif root: -## doc = root -## elif root: -## doc = root -## else: -## raise exceptions.CanteraError("either root or src must be specified.") - -## ## try: -## if loc or id or name: -## r = doc.child(loc=loc, id=id, name=name) -## else: -## r = doc -## return r - - def getFloatArray(node, convert_units=0): sz = int(node['size']) return _cantera.ctml_getFloatArray(node._xml_id, convert_units, sz) diff --git a/Cantera/src/ChemEquil.cpp b/Cantera/src/ChemEquil.cpp index 02a25fb84..20abe2140 100755 --- a/Cantera/src/ChemEquil.cpp +++ b/Cantera/src/ChemEquil.cpp @@ -294,9 +294,9 @@ namespace Cantera { } } if (j < m_mm) - return -1; - //throw CanteraError("estimateElementPotentials", - // "too few species (" + int2str(j) + ")."); + // return -1; + throw CanteraError("estimateElementPotentials", + "too few species (" + int2str(j) + ")."); for (m = 0; m < m_mm; m++) { for (n = 0; n < m_mm; n++) { diff --git a/Cantera/src/FtnODESys.h b/Cantera/src/FtnODESys.h deleted file mode 100755 index d9a82c05c..000000000 --- a/Cantera/src/FtnODESys.h +++ /dev/null @@ -1,56 +0,0 @@ - -#ifndef CT_FTNODESYS_H -#define CT_FTNODESYS_H - -#ifdef WIN32 -#pragma warning(disable:4786) -#pragma warning(disable:4503) -#endif - -namespace Cantera { - - - typedef void (*Ftn_RHS_Func) (integer* n, doublereal* t, doublereal* y, - doublereal* ydot); - - /** - * A class to integrate a system of ODE's defined by a Fortran function. - * Not currently used. - */ - class FtnODESys : public FuncEval { - - public: - - FtnODESys(int n, doublereal* y0, Ftn_RHS_Func f) { - m_func = f; - m_n = n; - m_y0.resize(n); - int i; - for (i = 0; i < n; i++) m_y0[i] = y0[i]; - } - - virtual ~FtnODESys(){} - - virtual void eval(double t, double* y, double* ydot) { - m_func(&m_n, &t, y, ydot); - } - - virtual void getInitialConditions(double t0, double* y) { - int i; - for (i = 0; i < m_n; i++) y[i] = m_y0[i]; - } - - virtual int neq() { return m_n; } - - protected: - int m_n; - vector_fp m_y0; - Ftn_RHS_Func m_func; - - private: - - }; - -} - -#endif diff --git a/Cantera/src/ImplicitChem.h b/Cantera/src/ImplicitChem.h deleted file mode 100755 index bbc198935..000000000 --- a/Cantera/src/ImplicitChem.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @file ImplicitChem.h - * - * $Author$ - * $Revision$ - * $Date$ - */ - -// Copyright 2001 California Institute of Technology - -#ifndef CT_IMPCHEM_H -#define CT_IMPCHEM_H - -#ifdef WIN32 -#pragma warning(disable:4786) -#pragma warning(disable:4503) -#endif - -#include "FuncEval.h" -#include "CVode.h" -#include "Kinetics.h" -#include "ThermoPhase.h" - -namespace Cantera { - - /** - * Advances the composition of an associated phase object in time - * by implicitly integrating - * \f[ - * \dot Y_k = \frac{\omega_k}{\rho} - * \f] - */ - class ImplicitChem : public FuncEval { - - public: - - /** - * Constructor. - */ - ImplicitChem(Kinetics& kin, ThermoPhase& therm); - - - /** - * Destructor. Deletes the integrator. - */ - virtual ~ImplicitChem(){ delete m_integ; } - - - /** - * Overloads the virtual function - * declared in FuncEval. - */ - virtual void initialize(doublereal t0 = 0.0); - - void adiabatic() { - m_energy = true; - } - - void isothermal() { - m_energy = false; - } - - /** - * Integrate from t0 to t1. The integrator is reinitialized - * first. - */ - void integrate(doublereal t0, doublereal t1) { - m_integ->reinitialize(t0, *this); - m_integ->setMaxStepSize(t1 - t0); - m_rho = m_thermo->density(); - m_integ->integrate(t1); - updateState(m_integ->solution()); - } - - /** - * Integrate from t0 to t1 without reinitializing the - * integrator. - */ - void integrate0(doublereal t0, doublereal t1) { - m_integ->integrate(t1); - updateState(m_integ->solution()); - } - - // overloaded methods of class FuncEval - virtual int neq() { return m_nsp; } - virtual void eval(doublereal t, doublereal* y, doublereal* ydot); - virtual void getInitialConditions(doublereal t0, size_t leny, - doublereal* y); - - - protected: - - /** - * Set the mixture to a state consistent with solution - * vector y. - */ - void updateState(doublereal* y); - - //Kinetics::phase_t* m_mix; - Kinetics* m_kin; - ThermoPhase* m_thermo; - int m_nsp; - Integrator* m_integ; // pointer to integrator - doublereal m_atol, m_rtol; // tolerances - doublereal m_maxstep; // max step size - array_fp m_wt; - doublereal m_rho; - bool m_energy; - doublereal m_h0; - doublereal m_press; - - private: - - }; -} - -#endif - diff --git a/Cantera/src/MultiDomain.h b/Cantera/src/MultiDomain.h deleted file mode 100755 index 1a3c218f4..000000000 --- a/Cantera/src/MultiDomain.h +++ /dev/null @@ -1,155 +0,0 @@ -deprecated -/** - * - * @file Resid1D.h - * - * >>>>> Under construction! <<<<< - * - * $Author$ - * $Date$ - * $Revision$ - * - * Copyright 2002 California Institute of Technology - * - */ - -#ifndef CT_MULTIDOM_H -#define CT_MULTIDOM_H - - -#include "stringUtils.h" -#include "Resid1D.h" - -namespace Cantera { - - - /** - * Residual function evaluator for a one-dimensional problem. - */ - class MultiDomain { - public: - - /** - * Constructor. - * @param nv Number of variables at each grid point. - * @param points Number of grid points. - */ - MultiDomain() : m_bw(0), m_nd(0), m_rdt(0.0), m_jac_ok(false) {} - - /// Destructor. - virtual ~MultiDomain(){} - - int nDomains() const { return m_nd; } - - Resid1D& domain(int i) const { return *m_dom[i]; } - int start(int i) const { return m_start[i]; } - int size() const { return m_size; } - int bandwidth() const { return m_bw; } - - virtual void addDomain(Resid1D* d) { - m_dom.push_back(d); - int sz = d->nPoints() - * d->nComponents(); - if (m_nd > 0) { - m_start.push_back(m_start.back() + m_states.back()); - } - else - m_start.push_back(0); - m_states.push_back(sz); - m_comp.push_back(d->nComponents()); - m_points.push_back(d->nPoints()); - int bw1, bw2 = 0; - bw1 = 2*d->nComponents() - 1; - if (m_nd > 0) { - bw2 = d->nComponents() + m_dom[m_nd-1]->nComponents() - 1; - } - if (bw1 > m_bw) m_bw = bw1; - if (bw2 > m_bw) m_bw = bw2; - m_nd = m_states.size(); - m_size = m_start.back() + m_states.back(); - } - - void evalDomain(int i, int j, doublereal* x, doublereal* r, - doublereal rdt) { - int jpt; - if (j < 0) - jpt = j; - else - jpt = (j - m_start[i])/m_comp[i]; - //cout << "calling Resid1D::eval. jpt, start = " << jpt << " " << m_start[i] << endl; - m_dom[i]->eval(jpt, x + m_start[i], r + m_start[i], rdt); - } - - - doublereal ssnorm(doublereal* x, doublereal* r) { - //cout << " calling eval to get ss norm " << endl; - eval(-1, x, r, 0.0); - doublereal ss = 0.0; - for (int i = 0; i < m_size; i++) - ss = fmaxx(fabs(r[i]),ss); - return ss; - } - - doublereal rdt() const { return m_rdt; } - - void initTimeInteg(doublereal dt, doublereal* x) { - doublereal rdt_old = m_rdt; - m_rdt = 1.0/dt; - if (fabs(rdt_old - m_rdt) > Tiny) { - m_jac_ok = false; - } - int i; - for (i = 0; i < m_nd; i++) - m_dom[i]->initTimeInteg(dt, x + m_start[i]); - } - - bool transient() const { return (m_rdt != 0.0);} - bool steady() const { return (m_rdt == 0.0); } - - void setSteadyMode() { - if (m_rdt > 0) - m_jac_ok = false; - m_rdt = 0.0; - } - - void eval(int j, double* x, double* r, doublereal rdt=-1.0) { - int i, jpt; - if (rdt < 0.0) rdt = m_rdt; - if (j < 0) { - for (i = 0; i < m_nd; i++) { - evalDomain(i, j, x, r, rdt); - } - } - else { - for (i = 0; i < m_nd; i++) { - if (j >= m_start[i]) { - //cout << "calling evalDomain with j = " << j << endl; - evalDomain(i, j, x, r, rdt); - jpt = j - m_start[i]; - if (jpt == 0 && i > 0) - evalDomain(i-1, j-1, x, r, rdt); - else if (jpt == m_states[i] - 1 && i < m_nd - 1) - evalDomain(i+1, j+1, x, r, rdt); - break; - } - } - } - } - - protected: - doublereal m_rdt; - bool m_jac_ok; - int m_nd, m_bw, m_size; - vector_int m_states; - vector_int m_start; - vector_int m_comp, m_points; - vector m_dom; - - private: - - }; -} - -#endif - - diff --git a/Cantera/src/PolyThermo.h b/Cantera/src/PolyThermo.h deleted file mode 100755 index 517f58037..000000000 --- a/Cantera/src/PolyThermo.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file PolyThermo.h - * - * $Author$ - * $Revision$ - * $Date$ - */ - -// Copyright 2001 California Institute of Technology - - -#include "utilities.h" - -#ifndef CT_POLYTHERMO_H -#define CT_POLYTHERMO_H - -namespace Cantera { - - /** - * A polynomial parameterization for one temperature range. - * Seven coefficients \f$(a_0,\dots,a_6)\f$ are used to represent - * \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as - * polynomials in \f$ T \f$ : - * \f[ - * \frac{c_p(T)}{R} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4 - * \f] - * \f[ - * \frac{h^0(T)}{RT} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2 - + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + a_5. - * \f] - * \f[ - * \frac{s^0(T)}{R} = a_0\ln T + a_1 T + \frac{a_2}{2} T^2 - + \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6. - * \f] - * - * This class is designed specifically for use by class NasaThermo. - */ - - template - class PolyThermo { - - public: - - PolyThermo() {} - - void setCoefficients(const vector_fp& coeffs) { - m_c.resize(N + 1); - m_h.resize(N + 1); - m_s.resize(N + 1); - //copy(coeffs.begin(), coeffs.begin() + N + 3, m_c.begin()); - m_c[0] = coeffs[2]; - m_h[0] = m_c[0]; - m_s[0] = coeffs[1]; - for (int i = 1; i <= N; i++) { - m_c[i] = coeffs[i+2]; - m_h[i] = m_c[i]/(i+1); - m_s[i] = m_c[i]/i; - } - m_h0 = coeffs[0]; - m_s0 = coeffs[2]; - } - - virtual ~PolyThermo(){} - - // these inline functions are defined only for readability - static doublereal tlog(const doublereal* tt) { return tt[0]; } - static doublereal trecip(const doublereal* tt) { return tt[1]; } - - doublereal h0_RT(const doublereal* tt) const { - return m_c[0] * trecip(tt) + m_c[2]; } - doublereal s0_R(const doublereal* tt) const { - return m_c[2] * tlog(tt) + m_c[1]; } - - void updateProperties(const doublereal* tt, - doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const { - doublereal cpt, ht, st; - cpt = m_c[0] + dot4(tt+2,m_c.begin()+1); - ht = m_h0*tt[1] + m_h[0] + dot4(tt+2,m_h.begin()+1); - st = m_s0*tt[0] + m_s[0] + dot4(tt+2,m_s.begin()+1); //s0_R(tt); - *cp_R = cpt; - *h_RT = ht; - *s_R = st; - } - - protected: - - doublereal m_h0, m_s0; - vector_fp m_c, m_h, m_s; - }; - -} - -#endif - - - - - - diff --git a/Cantera/src/PolyThermoMgr.h b/Cantera/src/PolyThermoMgr.h deleted file mode 100755 index 9bd8c06ce..000000000 --- a/Cantera/src/PolyThermoMgr.h +++ /dev/null @@ -1,96 +0,0 @@ - -#ifndef CT_POLYTHERMMGR_H -#define CT_POLYTHERMOMGR_H - -#include "PolyThermo.h" -#include "ctexceptions.h" -#include "polyfit.h" -#include "SpeciesThermo.h" - -namespace Cantera { - - /** - * A species thermodynamic property manager for polynomial - * parameterizations. - */ - template - class PolyThermoMgr : public SpeciesThermo { - - public: - - PolyThermoMgr() : - m_nsp(0), - m_minTemp(0.0), - m_maxTemp(1.e30), - m_p0(-1.0) - { m_t.resize(N + 1); } - - virtual ~PolyThermoMgr() {} - - virtual void install(int index, int type, const vector_fp& coeffs, - doublereal minTemp = 0.0, - doublereal maxTemp = 1.e30, - doublereal refPressure = OneAtm) { - m_thermo.push_back(PolyThermo()); - PolyThermo& th = m_thermo.back(); - if (coeffs.size() != N + 3) - throw CanteraError("PolyThermoMgr::install", - string("wrong number of coefficients ") - +int2str(coeffs.size())); - th.setCoefficients(coeffs); - if (m_nsp > 0 && refPressure != m_p0) { - throw CanteraError("PolyThermoMgr::install", - "reference pressure mismatch"); - } - else if (m_nsp == 0) - m_p0 = refPressure; - - m_index.push_back(index); - m_nsp++; - - if (minTemp > m_minTemp) m_minTemp = minTemp; - if (maxTemp < m_maxTemp) m_maxTemp = maxTemp; - } - - virtual void update(doublereal t, vector_fp& cp_R, - vector_fp& h_RT, vector_fp& s_R) const { - int i; - - m_t[0] = log(t); - m_t[1] = 1.0/t; - m_t[2] = t; - // int i; - const int nmax = N + 1; - for (i = 2; i < nmax; i++) m_t[i+1] = m_t[i]*t; - - doublereal* bcp = cp_R.begin(); - doublereal* bh = h_RT.begin(); - doublereal* bs = s_R.begin(); - doublereal* tt = m_t.begin(); - size_t k; - for (k = 0; k < m_nsp; k++, bcp++, bh++, bs++) { - m_thermo[k].updateProperties(tt, bcp, bh, bs); - } - } - - virtual doublereal minTemp(int k=-1) const {return m_minTemp;} - virtual doublereal maxTemp(int k=-1) const {return m_maxTemp;} - virtual doublereal refPressure() const {return m_p0;} - virtual int reportType(int index) const { return POLYNOMIAL_4;} - - protected: - - size_t m_nsp; - vector > m_thermo; - vector m_index; - doublereal m_minTemp; - doublereal m_maxTemp; - doublereal m_p0; - mutable vector_fp m_t; - }; - -} - -#endif - - diff --git a/Cantera/src/ResidEval.h b/Cantera/src/ResidEval.h deleted file mode 100755 index e1b0c1680..000000000 --- a/Cantera/src/ResidEval.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * @file FuncEval.h - * - * $Author$ - * $Revision$ - * $Date$ - */ - -// Copyright 2001 California Institute of Technology - -#ifndef CT_RESIDEVAL_H -#define CT_RESIDEVAL_H - -#ifdef WIN32 -#pragma warning(disable:4786) -#pragma warning(disable:4503) -#endif - -namespace Cantera { - - - /** - * - * Virtual base class for DAE residual function evaluators. - * - */ - class ResidEval { - - public: - - /** - * Evaluate the residual function. - * @param t time (input, do not modify) - * @param y solution vector (input, do not modify) - * @param ydot rate of change of solution vector. (input, do - * not modify) - */ - virtual void evalResid(double t, const double deltaT, - const double* y, - const double* ydot, - double* resid)=0; - - /** Number of equations. */ - virtual int neq()=0; - - // virtual bool init(double t0)=0; - virtual double* solution()=0; - virtual double* solution_dot()=0; - - /** - * Fill the solution vector with the initial conditions - * at initial time t0. - */ - virtual void getInitialConditions(double t0, size_t leny, double* y)=0; - - /** - * Report the analytical result if available and describe - * how close the numerical solution is to the analytical - * solution - */ - virtual void analytical_solution(double, double *)=0; - virtual void analytical_solution_dot(double, double *)=0; - - /** - * Write out to a file or to standard output the current solution - * ievent is a description of the event that caused this - * function to be called. - */ - virtual void writeSolution(int ievent, double t, - const double *y, const double *ydot) = 0; - - /** - * Apply a filter - */ - virtual void applyFilter(const double time, const double deltaT, - const double *ydot, const double *y, - double *delta_y) = 0; - - /** - * Write out to a file or to standard output the current solution - * ievent is a description of the event that caused this - * function to be called. - */ - virtual void writeSolutionFilter(int ievent, double t, - const double * const y, - const double * const ydot, - const double * const delta_y, - const char * const fname) = 0; - - /** - * This function returns a value of the delta t constraint - * that may exist in the problem. - * - */ - virtual double delta_t_constraint(const double t, const double *y, - const double *ydot) = 0; - - virtual void adjustAtol(double *) = 0; - - /** - * This function may be used to create output at various points in the - * execution of an application. - * - */ - virtual void user_out(const int ifunc, const double t, const double *y, - const double *ydot) = 0; - - protected: - - private: - - }; -} -#endif diff --git a/Cantera/src/TigerPolynomial.h b/Cantera/src/TigerPolynomial.h deleted file mode 100755 index 814349b05..000000000 --- a/Cantera/src/TigerPolynomial.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @file TigerPolynomial.h - * - * $Author$ - * $Revision$ - * $Date$ - */ - -WARNING: May be out of date. Test before using! - - -// Copyright 2001 California Institute of Technology - - -#ifndef CT_TigerPOLY_H -#define CT_TigerPOLY_H - -#include "TempFuncMgr.h" - -namespace Cantera { - - /** - * The Tiger polynomial parameterization. - */ - - - class TigerPolynomial { - - public: - - TigerPolynomial() : m_lowT(0.0), m_highT(0.0), m_Pref(0.0), - m_coeff(vector_fp(11)) {} - - /** - * construct a Tiger polynomial parameterization from the - * values in vector coeffs. - * @param coeffs(0) minimum temperature (K) - * @param coeffs(1) maximum temperature (K) - * @param coeffs(2) standard-state pressure (Pa) - * @param coeffs(3)-coeffs(11) polynomial coefficients - */ - - TigerPolynomial(int n, const vector_fp& coeffs) : - - m_lowT (coeffs[0]), - m_highT (coeffs[1]), - m_Pref (coeffs[2]), - m_coeff (vector_fp(8)) { - - m_coeff[0] = coeffs[3]; - m_coeff[1] = 1.e-3 * coeffs[4]; - m_coeff[2] = 1.e-6 * coeffs[5]; - m_coeff[3] = 1.e-9 * coeffs[6]; - m_coeff[4] = 1.e3 * coeffs[7]; - m_coeff[5] = 1.e6 * coeffs[8]; - m_coeff[6] = 1.e9 * coeffs[9]; - m_coeff[7] = 1.e9 * coeffs[10] / - (GasConst_cal_mol_K * 298.15); - - if (Debug::on) { - Debug::require(coeffs.size(), 11, Debug::NotLessThan); - } - } - - doublereal minTemp() const { return m_lowT; } - doublereal maxTemp() const { return m_highT; } - doublereal refPressure() const { return m_Pref; } - - void updateProperties(const TempFuncMgr& tt, - vector_fp& cp_R, vector_fp& h_RT, vector_fp& s_R, - vector_fp& g_RT) const { - - doublereal ct0 = m_coeff[0]; - doublereal ct1 = m_coeff[1]*tt.value(0); - doublereal ct2 = m_coeff[2]*tt.value(T2_INDEX); - doublereal ct3 = m_coeff[3]*tt.value(T3_INDEX); - doublereal ctm1 = m_coeff[4]*tt.value(TRECIP_INDEX); - doublereal ctm2 = m_coeff[5]/tt.value(T2_INDEX); - doublereal ctm3 = m_coeff[6]/tt.value(T3_INDEX); - - cp_R[m_index] = ct0 + ct1 + ct2 + ct3 - + ctm1 + ctm2 + ctm3; - - h_RT[m_index] = ct0 + 0.5 * ct1 + ct2/3.0 - + 0.25 * ct3 - + m_coeff[4] * tt.value(TLOG_INDEX) / tt.value(0) - - ctm2 - 0.5 * ctm3 - + m_coeff[7]*tt.value(TRECIP_INDEX); - - s_R[m_index] = m_coeff[0] * tt.value(TLOG_INDEX) + ct1 - + 0.5 * ct2 + ct3/3.0 - - ctm1 - 0.5 * ctm2 - ctm3/3.0 - + m_coeff[8] / GasConst_cal_mol_K ; - - g_RT[m_index] = h_RT[m_index] - s_R[m_index]; - } - - protected: - - doublereal m_lowT, m_highT, m_Pref; - vector_fp m_coeff; - int m_index; - - private: - - }; - -} - -#endif - - - - - - diff --git a/Cantera/src/flowBoundaries.h b/Cantera/src/flowBoundaries.h deleted file mode 100755 index 037341500..000000000 --- a/Cantera/src/flowBoundaries.h +++ /dev/null @@ -1,209 +0,0 @@ -/** - * - */ - -#ifndef CT_FLOW_BOUNDS -#define CT_FLOW_BOUNDS - -#include -#include "ct_defs.h" -//#include "surfKinetics.h" - -using namespace Cantera; - -namespace FlowBdry { - - class Boundary { - - public: - Boundary(int nsp = 0) - : rtau(1.e5), m_lr(1), m_nsp(nsp), m_nv(nsp+4), - m_bv(0), m_bp(0), m_temp(0.0), m_mdot(0.0), m_V(0.0) { - m_y.resize(nsp, 0.1); - } - virtual ~Boundary(){} - - doublereal rtau; - doublereal T() { return m_temp; } - doublereal mdot() { return m_mdot; } - doublereal V() { return m_V; } - doublereal* Y() { return m_y.begin(); } - - int orient() { return m_lr; } - int faceLeft() { m_lr = -1; return m_lr; } - int faceRight() { m_lr = 1; return m_lr; } - - void setNSpecies(int n) { m_nsp = n; } - void set_mdot(doublereal mdot) { m_mdot = mdot; } - void set_V(doublereal V) { m_V = V; } - void set_T(doublereal T) { m_temp = T; } - void set_Y(const doublereal* y) { - copy(y, y+m_nsp, m_y.begin()); - } - - virtual void evalInt(int j, doublereal* x, doublereal* r) { - int i; - for (i = 0; i < m_bv; i++) { - r[i] = x[i]; - } - } - virtual void eval(doublereal* x0, doublereal density, - doublereal* data, doublereal* r) { - throw CanteraError("Boundary::eval", - " ERROR!! Base class eval called!"); - } - - virtual int nIntVars() { return m_bv; } - virtual int nIntPoints() { return m_bp; } - - protected: - - int offset(int n) { return m_lr*n*m_nv; } - - int m_lr, m_nsp, m_nv; - int m_bv, m_bp; - doublereal m_temp, m_mdot, m_V; - vector_fp m_y; - }; - - - /** - * zero axial velocity, zero gradients for everything else. - */ - class SymmPlane : public Boundary { - - public: - SymmPlane(int nsp) : Boundary(nsp) {} - virtual ~SymmPlane() {} - - virtual void eval(doublereal* x0, doublereal density, - doublereal* data, doublereal* r) { - for (int n = 0; n < m_nv; n++) { - r[n] = x0[n] - x0[offset(1) + n]; - } - r[0] = x0[0]; - } - - protected: - int m_iloc; - }; - - - - /** - * Zero gradients for all components, except V, which is zero. - */ - class Outlet : public Boundary { - - public: - - Outlet(int nsp) : Boundary(nsp) {} - virtual ~Outlet() {} - - virtual void eval(doublereal* x0, doublereal density, - doublereal* data, doublereal* r) { - for (int n = 0; n < m_nv; n++) { - r[n] = -rtau*(x0[n] - x0[offset(1) + n]); - } - r[1] = -rtau*x0[1]; - } - }; - - -#ifdef INCL_SURF - - class Surface : public Boundary { - - public: - - Surface(int nsp, SurfKinetics* kin=0) - : Boundary(nsp), m_kin(kin), m_dt(1.e3) { - if (m_kin) - m_sdot.resize(m_kin->nTotal()); - else - m_sdot.resize(nsp); - } - virtual ~Surface(){} - - - virtual void eval(doublereal* x0, doublereal density, - doublereal* data, doublereal* r) { - - doublereal sum = 0.0, mdot = 0.0; - // updateSurfaceRates(x0[2], density, x0+4); - - for (int k = 0; k < m_nsp; k++) { - // r[4+k] = m_sdot[k] - m_lr*data[k]; - //mdot += m_sdot[k]; - //sum += x0[4+k]; - r[4+k] = - m_lr*data[k]; - sum += x0[4+k]; - } - r[4] = 1.0 - sum; - - // match the Stefan velocity at the surface - r[0] = density*x0[0] - m_lr*mdot; - r[1] = x0[1]; // no slip - r[2] = x0[2] - m_temp; // specified T - r[3] = x0[3]; - } - - /** - * Update the mass species production rates, given - * the species mass fractions at the surface. - * @param y - */ - virtual void updateSurfaceRates(doublereal t, - doublereal rho, doublereal* y) { - int k; - if (m_kin) { - for (k = 0; k < m_nsp; k++) { - m_sdot[k] = fmaxx(Tiny, y[k]); - } - m_kin->bulkPhase(0)->setState_TR(t, rho); - m_kin->bulkPhase(0)->setMassFractions_NoNorm(m_sdot.begin()); - //m_kin->integrate(m_dt); - m_kin->getNetProductionRates(m_sdot.begin()); - } - else - for (k = 0; k < m_nsp; k++) m_sdot[k] = 0.0; - - } - - - - protected: - - const doublereal* m_wt; - vector_fp m_sdot; - SurfKinetics* m_kin; - doublereal m_dt; - }; - -#endif - - class Inlet : public Boundary { - - public: - Inlet(int nsp, doublereal* wt=0) - : Boundary(nsp) {} - virtual ~Inlet(){} - - virtual void eval(doublereal* x0, - doublereal density, doublereal* flux, doublereal* r) { - int k; - for (k = 0; k < m_nsp; k++) { - r[4+k] = rtau*(m_y[k] - x0[k+4] - flux[k]/m_mdot); - } - r[0] = -rtau*(density*x0[0] - m_lr*m_mdot); - r[1] = -rtau*(x0[1] - V()); - r[2] = -rtau*(x0[2] - T()); // specified T - r[3] = -rtau*x0[3]; - } - }; - -} - - - -#endif diff --git a/Cantera/src/funcs.h b/Cantera/src/funcs.h deleted file mode 100644 index d7b98e161..000000000 --- a/Cantera/src/funcs.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CT_FUNCS_H -#define CT_FUNCS_H - -#include "ct_defs.h" - -namespace Cantera { - doublereal linearInterp(doublereal x, const vector_fp& xpts, - const vector_fp& fpts); -} - -#endif diff --git a/Cantera/src/gases.h b/Cantera/src/gases.h deleted file mode 100755 index e452a991f..000000000 --- a/Cantera/src/gases.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @file gases.h - * - */ - -// Copyright 2001 California Institute of Technology - - -#ifndef CT_GASES_H -#define CT_GASES_H - -#include "IdealGasMix.h" -#include "TransportFactory.h" - -namespace Cantera { - - template - class GasWithTransport : public IdealGasMix, public T { - public: - GasWithTransport(map& params, - TransportFactory* f = 0) { - if (f == 0) - f = TransportFactory::factory(); - f->initTransport(*self, dbase); - } - }; -} - -#endif diff --git a/Cantera/src/import.h b/Cantera/src/import.h deleted file mode 100755 index 08a07ed02..000000000 --- a/Cantera/src/import.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file import.h - * - * functions to import objects from files. - * - * $Author$ - * $Revision$ - * $Date$ - */ - -// Copyright 2001 California Institute of Technology - - -#ifndef CT_IMPORTERS_H -#define CT_IMPORTERS_H - -#include "importCK.h" -//#include "importXML.h" -#include "importCTML.h" - -namespace Cantera { - - /** - * import the specifications for a phase from a file, including - * elements, species, and reactions. The file formats currently - * supported are - * - * - CKML "Chemical Kinetics Markup Language." This XML-based - * markup language has been developed by M. Aivazis and R. Muller - * at Caltech and is used in their Fuego software package. - * - * - CK This is the name we give to the widely-used format - * developed by Kee, Miller, and Rupley for the Chemkin-II - * software package. - * - */ - bool importFromFile(Thermo* th, Kinetics* k, map& params); - -} - -#endif diff --git a/Cantera/src/importXML.h b/Cantera/src/importXML.h deleted file mode 100755 index c13c0603b..000000000 --- a/Cantera/src/importXML.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file importXML.h - * - */ - -// Copyright 2001 California Institute of Technology - - -#ifndef CT_IMPORTXML_H -#define CT_IMPORTXML_H - -#include - -#include "GasKinetics.h" - -namespace Cantera { - - bool isXMLFile(string infile); - - bool importXML(const string& infile, phase_t& gas, Kinetics& kin); - -} - -#endif - diff --git a/Cantera/src/mix_utils.h b/Cantera/src/mix_utils.h deleted file mode 100755 index 16c9c2ad1..000000000 --- a/Cantera/src/mix_utils.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef CT_MIX_UTILS_H -#define CT_MIX_UTILS_H - -#include "ctexceptions.h" - -namespace Cantera { - - doublereal quadInterp(doublereal x0, doublereal* x, doublereal* y); - -// /** Set the temperature (K), pressure (Pa), and mole fractions. */ -// template -// void set_TPX(S& s, doublereal t, doublereal p, doublereal* x) { -// s.setMoleFractions(x); s.setTemperature(t); s.setPressure(p); -// } - -// template -// void set_HP(S& s, doublereal h, doublereal p, doublereal tol) { -// doublereal dt; -// s.setPressure(p); -// for (int n = 0; n < 20; n++) { -// dt = (h - s.enthalpy_mass())/s.cp_mass(); -// if (dt > 100.0) dt = 100.0; -// else if (dt < -100.0) dt = -100.0; -// s.setState_TP(s._temp() + dt, p); -// if (fabs(dt) < tol) { -// return; -// } -// } -// throw CanteraError("set_HP","no convergence. dt = " + fp2str(dt)); -// } - -// template -// void set_UV(S& s, doublereal u, doublereal v, -// doublereal tol) { -// doublereal dt; -// s.setDensity(1.0/v); -// for (int n = 0; n < 20; n++) { -// dt = (u - s.intEnergy_mass())/s.cv_mass(); -// if (dt > 100.0) dt = 100.0; -// else if (dt < -100.0) dt = -100.0; -// s.setTemperature(s._temp() + dt); -// if (fabs(dt) < tol) return; -// } -// throw CanteraError("set_UV","no convergence. dt = " + fp2str(dt)); -// } - -// template -// void set_SP(S& s, doublereal entropy, doublereal p, -// doublereal tol) { -// doublereal dt; -// s.setPressure(p); -// for (int n = 0; n < 20; n++) { -// dt = (entropy - s.entropy_mass())*s.temperature()/s.cp_mass(); -// if (dt > 100.0) dt = 100.0; -// else if (dt < -100.0) dt = -100.0; -// s.setState_TP(s._temp() + dt, p); -// if (fabs(dt) < tol) return; -// } -// throw CanteraError("set_SP","no convergence. dt = " + fp2str(dt)); -// } - -// template -// void set_SV(S& s, doublereal entropy, doublereal v, -// doublereal tol) { -// doublereal dt; -// s.setDensity(1.0/v); -// for (int n = 0; n < 20; n++) { -// dt = (entropy - s.entropy_mass())*s.temperature()/s.cv_mass(); -// if (dt > 100.0) dt = 100.0; -// else if (dt < -100.0) dt = -100.0; -// s.setTemperature(s._temp() + dt); -// if (fabs(dt) < tol) return; -// } -// throw CanteraError("set_SV","no convergence. dt = " + fp2str(dt)); -// } - - template - void mapSpeciesData(const S1& s1, const S2& s2, const doublereal* data1, - doublereal* data2) { - int n1 = s1.nSpecies(); - int n2 = s2.nSpecies(); - int n, m2; - - // zero out the destination array - for (n = 0; n < n2; n++) data2[n] = 0.0; - - // copy - for (n = 0; n < n1; n++) { - m2 = s2.speciesIndex(s1.speciesName(n)); - if (m2 >= 0) data2[m2] = data1[n]; - } - } -} - -#endif diff --git a/Cantera/src/zeroD/ReactorBase.cpp b/Cantera/src/zeroD/ReactorBase.cpp index bab58dd51..ea9a35167 100644 --- a/Cantera/src/zeroD/ReactorBase.cpp +++ b/Cantera/src/zeroD/ReactorBase.cpp @@ -83,7 +83,7 @@ namespace Cantera { doublereal mout = 0.0; for (int i = 0; i < nout; i++) mout += m_outlet[i]->massFlowRate(); - return volume()/mout; + return mass()/mout; } FlowDevice& ReactorBase::inlet(int n) { return *m_inlet[n]; } diff --git a/Makefile.in b/Makefile.in index 61420129e..9b794eaf6 100755 --- a/Makefile.in +++ b/Makefile.in @@ -104,6 +104,9 @@ tools-install: hdr-install: @INSTALL@ -d @ct_incdir@ cp -r -f build/include/cantera @ct_incroot@ +ifeq ($(build_f90),1) + cp -f build/include/cantera/*.mod @ct_incroot@ +endif # collect scattered header files and build the include directory hdr-collect: diff --git a/config/configure b/config/configure index a28f4a6d1..489c7e4dc 100755 --- a/config/configure +++ b/config/configure @@ -1,26 +1,287 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.57. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Defaults: -ac_help= +# 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 + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +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="Cantera.README" +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 CVF_LIBDIR local_inst local_python_inst python_prefix ctversion homedir ct_libdir ct_incdir ct_incroot ct_bindir ct_datadir ct_demodir ct_templdir ct_mandir ct_tutdir ct_docdir ct_dir COMPACT_INSTALL CANTERA_LIBDIR CANTERA_INCDIR CT_TOOLS_BIN CANTERA_BINDIR CANTERA_EXAMPLES_DIR CANTERA_DATADIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os username ctroot buildinc buildlib buildbin MAKE ARCHIVE DO_RANLIB RANLIB SOEXT SHARED PIC LCXX_FLAGS LCXX_END_LIBS USERDIR INCL_USER_CODE KERNEL BUILD_CK LIB_DIR build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_DIR LOCAL_LIB_DIRS LOCAL_LIBS CANTERA_PARTICLES_DIR BUILD_PARTICLES CT_SHARED_LIB BUILD_F90 F90 F90FLAGS PYTHON_CMD WIN_PYTHON_CMD BUILD_PYTHON MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC F77 FFLAGS ac_ct_F77 FLIBS precompile_headers CXX_DEPENDS OS_IS_DARWIN OS_IS_WIN OS_IS_CYGWIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT local_math_libs math_libs SO LDSHARED 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. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,10 +290,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE 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' @@ -46,17 +312,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - 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" @@ -64,59 +322,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + 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" ;; + 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" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + 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=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + 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'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,95 +383,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # 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 << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --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 -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -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 ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + 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" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + 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" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -222,19 +432,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + 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) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -248,26 +458,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + 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_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_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +494,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +504,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +515,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + 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" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + 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 - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + 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. @@ -367,99 +576,110 @@ EOF 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_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" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { 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 ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # 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 - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + 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 -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# 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 -# 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 +# 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 -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=Cantera.README # 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_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + 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=.. @@ -469,13 +689,442 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(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_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_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_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_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS +# +# 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 + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Some influential environment variables: + CXX C++ compiler command + CXXFLAGS 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 + CC C compiler command + CFLAGS C compiler flags + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + 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 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&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.* *.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 @@ -486,35 +1135,91 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { 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 -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= +# 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 -else - ac_n= ac_c='\c' ac_t= +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers ../config.h" + ac_aux_dir= for ac_dir in . $srcdir/.; do if test -f $ac_dir/install-sh; then @@ -525,27 +1230,33 @@ for ac_dir in . $srcdir/.; do 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 "configure: error: can not find install-sh or install.sh in . $srcdir/." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . $srcdir/." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in . $srcdir/." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +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. echo echo "--------------------------------------------------------------" -echo +echo echo " Cantera Configuration Script " -echo +echo echo "--------------------------------------------------------------" echo -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NDEBUG 1 -EOF +_ACEOF ac_sys_system=`uname -s` @@ -588,14 +1299,14 @@ if test "x${prefix}" = "xNONE"; then fi local_inst=0 # if test ! -d ${prefix}; then -# echo +# echo # echo "********************************************************************" # echo "Installation directory ${prefix} does not exist. Either create it and" # echo "re-run configure, or specify another installation directory using the" # echo "prefix option:" # echo " ./configure --prefix=" # echo "********************************************************************" -# exit 1 +# exit 1 #fi fi @@ -629,7 +1340,7 @@ ctversion=${CANTERA_VERSION} homedir=${HOME} -if test -z $local_inst; then +if test -z $local_inst; then ct_libdir=${prefix}/lib/cantera/${ctversion} ct_incdir=${prefix}/include/cantera ct_incroot=${prefix}/include @@ -717,96 +1428,89 @@ if test -z "$CANTERA_EXAMPLES_DIR"; then CANTERA_EXAMPLES_DIR=$CANTERA_ROOT/exam +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. # The aliases save the names the user supplied, while $host etc. # will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:749: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:770: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:788: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && +test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- - ctroot=`(cd ..;pwd)` builddir=$target if test "x${OS_IS_WIN}" = "x1"; then @@ -816,7 +1520,7 @@ fi if test -z "$username"; then username=$USER; fi - + buildinc=$ctroot/build/include @@ -828,21 +1532,21 @@ buildlib=$ctroot/build/lib/$builddir buildbin=$ctroot/build/bin/$builddir -cat >> confdefs.h <>confdefs.h <<_ACEOF #define DARWIN $OS_IS_DARWIN -EOF +_ACEOF -cat >> confdefs.h <>confdefs.h <<_ACEOF #define RXNPATH_FONT "$RPFONT" -EOF +_ACEOF -cat >> confdefs.h <>confdefs.h <<_ACEOF #define CANTERA_ROOT "$prefix/cantera" -EOF +_ACEOF -cat >> confdefs.h <>confdefs.h <<_ACEOF #define CANTERA_DATA "$ct_datadir" -EOF +_ACEOF if test -z "$MAKE"; then MAKE='make'; fi @@ -910,7 +1614,7 @@ if test "$ENABLE_THERMO" = "y"; then KERNEL=$KERNEL' 'thermo; fi if test "$ENABLE_KINETICS" = "y"; then KERNEL=$KERNEL' 'kinetics; fi if test "$ENABLE_CK" = "y" -then +then BUILD_CK=1 NEED_CKREADER=1 fi @@ -954,9 +1658,9 @@ fi if test "$ENABLE_TPX" = "y" then KERNEL=$KERNEL' 'tpx NEED_TPX=1 -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define INCL_PURE_FLUIDS 1 -EOF +_ACEOF fi @@ -992,7 +1696,7 @@ fi -LOCAL_LIBS= +LOCAL_LIBS= if test -n "$INCL_USER_CODE" then LOCAL_LIBS=$LOCAL_LIBS' '-luser @@ -1078,9 +1782,10 @@ fi +# AC_SUBST(F77FLAGS) BUILD_CLIB=1 -# +# # Python Interface # BUILD_PYTHON=0 @@ -1092,98 +1797,106 @@ fi WIN_PYTHON_CMD=python if test $BUILD_PYTHON -gt 0; then -if test -z "$PYTHON_CMD"; then +if test -z "$PYTHON_CMD"; then for ac_prog in python2 python do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1102: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PYTHON_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PYTHON_CMD" in - /*) + case $PYTHON_CMD in + [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON_CMD="$PYTHON_CMD" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PYTHON_CMD="$PYTHON_CMD" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PYTHON_CMD="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + 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_CMD="$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_CMD="$ac_cv_path_PYTHON_CMD" +PYTHON_CMD=$ac_cv_path_PYTHON_CMD + if test -n "$PYTHON_CMD"; then - echo "$ac_t""$PYTHON_CMD" 1>&6 + echo "$as_me:$LINENO: result: $PYTHON_CMD" >&5 +echo "${ECHO_T}$PYTHON_CMD" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$PYTHON_CMD" && break + test -n "$PYTHON_CMD" && break done test -n "$PYTHON_CMD" || PYTHON_CMD=""none"" if test "x$OS_IS_WIN" = "x1"; then for ac_prog in python do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1144: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_WIN_PYTHON_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_WIN_PYTHON_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$WIN_PYTHON_CMD" in - /*) + case $WIN_PYTHON_CMD in + [\\/]* | ?:[\\/]*) ac_cv_path_WIN_PYTHON_CMD="$WIN_PYTHON_CMD" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_WIN_PYTHON_CMD="$WIN_PYTHON_CMD" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_WIN_PYTHON_CMD="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + 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_WIN_PYTHON_CMD="$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 -WIN_PYTHON_CMD="$ac_cv_path_WIN_PYTHON_CMD" +WIN_PYTHON_CMD=$ac_cv_path_WIN_PYTHON_CMD + if test -n "$WIN_PYTHON_CMD"; then - echo "$ac_t""$WIN_PYTHON_CMD" 1>&6 + echo "$as_me:$LINENO: result: $WIN_PYTHON_CMD" >&5 +echo "${ECHO_T}$WIN_PYTHON_CMD" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$WIN_PYTHON_CMD" && break + test -n "$WIN_PYTHON_CMD" && break done test -n "$WIN_PYTHON_CMD" || WIN_PYTHON_CMD=""none"" WIN_PYTHON_CMD=`cygpath -a -w "$WIN_PYTHON_CMD" | sed 's/\\\/\\//g'` echo "Windows Python command: $WIN_PYTHON_CMD" - fi + fi else echo "Python command preset to $PYTHON_CMD" fi if test "$PYTHON_CMD" = "none"; then - echo + echo echo "********************************************************************" echo "Configuration error. Python is required to build Cantera, but it" echo "cannot be found. Set environment variable PYTHON_CMD to the full path to" @@ -1198,57 +1911,61 @@ fi if test "x$OS_IS_WIN" = "x1"; then -cat >> confdefs.h <>confdefs.h <<_ACEOF #define PYTHON_EXE "$WIN_PYTHON_CMD" -EOF +_ACEOF else -cat >> confdefs.h <>confdefs.h <<_ACEOF #define PYTHON_EXE "$PYTHON_CMD" -EOF +_ACEOF fi -# +# # Matlab Interface # BUILD_MATLAB=0 -if test "$BUILD_MATLAB_TOOLBOX" != "n"; then +if test "$BUILD_MATLAB_TOOLBOX" != "n"; then if test -z "$MATLAB_CMD"; then # Extract the first word of "matlab", so it can be a program name with args. set dummy matlab; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1222: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MATLAB_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MATLAB_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MATLAB_CMD" in - /*) + case $MATLAB_CMD in + [\\/]* | ?:[\\/]*) ac_cv_path_MATLAB_CMD="$MATLAB_CMD" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_MATLAB_CMD="$MATLAB_CMD" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_MATLAB_CMD="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + 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_MATLAB_CMD="$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 + test -z "$ac_cv_path_MATLAB_CMD" && ac_cv_path_MATLAB_CMD=""none"" ;; esac fi -MATLAB_CMD="$ac_cv_path_MATLAB_CMD" +MATLAB_CMD=$ac_cv_path_MATLAB_CMD + if test -n "$MATLAB_CMD"; then - echo "$ac_t""$MATLAB_CMD" 1>&6 + echo "$as_me:$LINENO: result: $MATLAB_CMD" >&5 +echo "${ECHO_T}$MATLAB_CMD" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test "$MATLAB_CMD" != "none"; then BUILD_MATLAB=1; BUILD_CLIB=1; fi @@ -1259,7 +1976,7 @@ fi if test "x$OS_IS_WIN" = "x1"; then MATLAB_CMD=`cygpath -a -w "$MATLAB_CMD" | sed 's/\\\/\\//g'` echo "Windows MATLAB command: ${MATLAB_CMD}" -fi +fi @@ -1277,60 +1994,73 @@ export_name=$target # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1286: checking for a BSD compatible install" >&5 +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 eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done - IFS="$ac_save_IFS" + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + 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" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +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_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -1340,135 +2070,421 @@ CXX=cl.exe CC=cl.exe else -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1349: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CXX" && break -done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1381: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext << EOF - -#line 1392 "configure" -#include "confdefs.h" - -int main(){return(0);} -EOF -if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +done +done -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1423: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1428: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 else - cat > conftest.C <&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C++ compiler default output" >&5 +echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 +echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 - -if test $ac_cv_prog_gxx = yes; then - GXX=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - GXX= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1456: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" + CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" @@ -1482,215 +2498,535 @@ else CXXFLAGS= fi fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1490: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +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" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + 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 - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1520: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + 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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +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 $# -gt 0; then + 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 - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1571: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +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" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac + + 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 - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done + fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1603: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1614 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - 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 "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1650: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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); } + +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.c <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - GCC= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1678: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +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 - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -1704,183 +3040,479 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#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; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo $ac_n "checking for ability to precompile headers""... $ac_c" 1>&6 -echo "configure:1711: checking for ability to precompile headers" >&5 +echo "$as_me:$LINENO: checking for ability to precompile headers" >&5 +echo $ECHO_N "checking for ability to precompile headers... $ECHO_C" >&6 if test -n "$GCC"; then msg=`rm -f *h.gch; $CXX testpch.h &> /dev/null` - if test -f testpch.h.gch; then + if test -f testpch.h.gch; then precompile_headers=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PCH 1 -EOF +_ACEOF fi fi -echo "$ac_t""${precompile_headers}" 1>&6 +echo "$as_me:$LINENO: result: ${precompile_headers}" >&5 +echo "${ECHO_T}${precompile_headers}" >&6 has_sstream=no -echo $ac_n "checking for sstream""... $ac_c" 1>&6 -echo "configure:1727: checking for sstream" >&5 +echo "$as_me:$LINENO: checking for sstream" >&5 +echo $ECHO_N "checking for sstream... $ECHO_C" >&6 cat >> testsstream.cpp << EOF #include main() {} EOF msg=`${CXX} -c testsstream.cpp &> /dev/null` - if test -f testsstream.o; then + if test -f testsstream.o; then has_sstream=yes rm testsstream.o - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAS_SSTREAM 1 -EOF +_ACEOF fi rm -f testsstream.cpp -echo "$ac_t""${has_sstream}" 1>&6 +echo "$as_me:$LINENO: result: ${has_sstream}" >&5 +echo "${ECHO_T}${has_sstream}" >&6 #--------------------------------- # Fortran #--------------------------------- -if test -z "$F77"; then - for ac_prog in g77 f77 f2c -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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1755: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_F77="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -F77="$ac_cv_prog_F77" -if test -n "$F77"; then - echo "$ac_t""$F77" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$F77" && break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; } +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1788: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5 - -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_f77_cross - -cat > conftest.$ac_ext << EOF - - program conftest - end - -EOF -if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_f77_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_f77_cross=no - else - ac_cv_prog_f77_cross=yes + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_f77_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +done +done -echo "$ac_t""$ac_cv_prog_f77_works" 1>&6 -if test $ac_cv_prog_f77_works = no; then - { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1827: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6 -cross_compiling=$ac_cv_prog_f77_cross - -echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6 -echo "configure:1832: checking whether we are using GNU Fortran 77" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 else - cat > conftest.fpp <&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:3395:" \ + "checking for Fortran 77 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); } + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_g77=yes -else - ac_cv_prog_g77=no -fi -fi -echo "$ac_t""$ac_cv_prog_g77" 1>&6 - -if test $ac_cv_prog_g77 = yes; then - G77=yes - ac_test_FFLAGS="${FFLAGS+set}" - ac_save_FFLAGS="$FFLAGS" - FFLAGS= - echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6 -echo "configure:1856: checking whether $F77 accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - cat > conftest.f << EOF - program conftest - end -EOF -if test -z "`$F77 -g -c conftest.f 2>&1`"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else - ac_cv_prog_f77_g=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_f77_g" 1>&6 - if test "$ac_test_FFLAGS" = set; then - FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_f77_g = yes; then +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # if G77 is defined, then add a flag to turn off adding a second underscore @@ -1889,284 +3521,308 @@ if test -n "$G77"; then FFLAGS=$FFLAGS' -fno-second-underscore' fi -echo $ac_n "checking for Fortran 77 libraries""... $ac_c" 1>&6 -echo "configure:1894: checking for Fortran 77 libraries" >&5 - -if eval "test \"`echo '$''{'ac_cv_flibs'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 +echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_v+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo " END" > conftest.f -foutput=`${F77} -v -o conftest conftest.f 2>&1` -xlf_p=`echo $foutput | grep xlfentry` -if test -n "$xlf_p"; then - foutput=`echo $foutput | sed 's/,/ /g'` + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran 77 compiler in order to get +# "verbose" output that we can then parse for the Fortran 77 linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_verb" +(eval echo $as_me:3572: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -f conftest* +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +# If we are using xlf then replace all the commas with spaces. +if echo $ac_f77_v_output | grep xlfentry >/dev/null 2>&1; then + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` fi -ld_run_path=`echo $foutput | \ - sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` -case "$ld_run_path" in - /*) - if test "$ac_cv_prog_gcc" = yes; then - ld_run_path="-Xlinker -R -Xlinker $ld_run_path" - else - ld_run_path="-R $ld_run_path" - fi - ;; - *) - ld_run_path= - ;; -esac -flibs= -lflags= -want_arg= -for arg in $foutput; do - old_want_arg=$want_arg - want_arg= - if test -n "$old_want_arg"; then - case "$arg" in - -*) - old_want_arg= - ;; - esac - fi - case "$old_want_arg" in - '') - case $arg in - /*.a) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - lflags="$lflags $arg" - fi - ;; - -bI:*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - if test "$ac_cv_prog_gcc" = yes; then - lflags="$lflags -Xlinker $arg" - else - lflags="$lflags $arg" - fi - fi - ;; - -lang* | -lcrt0.o | -lc | -lgcc) - arg= - ;; - -[lLR]) - want_arg=$arg - arg= - ;; - -[lLR]*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - case "$arg" in - -lkernel32) - case "$canonical_host_type" in - *-*-cygwin*) - arg= - ;; - *) - lflags="$lflags $arg" - ;; - esac - ;; - -lm) - ;; - *) - lflags="$lflags $arg" - ;; - esac - fi - ;; - -u) - want_arg=$arg - arg= - ;; - -Y) - want_arg=$arg - arg= - ;; - *) - arg= - ;; - esac - ;; - -[lLR]) - arg="$old_want_arg $arg" - ;; - -u) - arg="-u $arg" - ;; - -Y) - arg=`echo $arg | sed -e 's%^P,%%'` - SAVE_IFS=$IFS - IFS=: - list= - for elt in $arg; do - list="$list -L$elt" - done - IFS=$SAVE_IFS - arg="$list" - ;; - esac - if test -n "$arg"; then - flibs="$flibs $arg" - fi + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +# If we are using Cray Fortran then delete quotes. +# Use "\"" instead of '"' for font-lock-mode. +# FIXME: a more general fix for quoted arguments with spaces? +if echo $ac_f77_v_output | grep cft90 >/dev/null 2>&1; then + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` +fi + # look for -l* and *.a constructs in the output + for ac_arg in $ac_f77_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_f77_v=$ac_verb + break 2 ;; + esac + done done -if test -n "$ld_run_path"; then - flibs_result="$ld_run_path $flibs" -else - flibs_result="$flibs" +if test -z "$ac_cv_prog_f77_v"; then + { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 +echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -ac_cv_flibs="$flibs_result" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 +echo "$as_me:$LINENO: checking for Fortran 77 libraries" >&5 +echo $ECHO_N "checking for Fortran 77 libraries... $ECHO_C" >&6 +if test "${ac_cv_flibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$FLIBS" != "x"; then + ac_cv_flibs="$FLIBS" # Let the user override the test. +else + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran 77 compiler in order to get +# "verbose" output that we can then parse for the Fortran 77 linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_cv_prog_f77_v" +(eval echo $as_me:3652: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -f conftest* +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +# If we are using xlf then replace all the commas with spaces. +if echo $ac_f77_v_output | grep xlfentry >/dev/null 2>&1; then + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` fi +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +# If we are using Cray Fortran then delete quotes. +# Use "\"" instead of '"' for font-lock-mode. +# FIXME: a more general fix for quoted arguments with spaces? +if echo $ac_f77_v_output | grep cft90 >/dev/null 2>&1; then + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` +fi + +ac_cv_flibs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f77_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_flibs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_flibs="$ac_cv_flibs $ac_arg" +fi + + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_flibs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_flibs="$ac_cv_flibs -Xlinker $ac_link_opt" + done +else + ac_cv_flibs="$ac_cv_flibs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt0.o | -lc | -lgcc | -libmil | -LANG:=*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_flibs="$ac_cv_flibs $ac_arg" + ;; + -[LRuY]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_flibs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_flibs="$ac_cv_flibs $ac_j" +fi + + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_flibs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_flibs="$ac_cv_flibs $ac_arg" +fi + + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`echo $ac_f77_v_output | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_flibs="$ac_cv_flibs -Xlinker $ac_link_opt" + done +else + ac_cv_flibs="$ac_cv_flibs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$FLIBS" = "x" + +fi +echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 +echo "${ECHO_T}$ac_cv_flibs" >&6 FLIBS="$ac_cv_flibs" -echo "$ac_t""$FLIBS" 1>&6 + +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 case $ac_sys_system in Darwin*) FLIBS='-lg2c -lgcc'; SHARED_CTLIB=0;; esac -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:2054: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:2060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2078: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2111: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2142: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi -fi - -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT fi @@ -2185,12 +3841,11 @@ if test -z "$F77_EXT"; then F77_EXT=f; fi -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX_EXT"; then CXX_EXT=cpp; fi @@ -2210,23 +3865,23 @@ math_libs='-lrecipes -lcvode -lctmath' if test "$LAPACK_FTN_TRAILING_UNDERSCORE" = "y" -then cat >> confdefs.h <<\EOF +then cat >>confdefs.h <<\_ACEOF #define LAPACK_FTN_TRAILING_UNDERSCORE 1 -EOF +_ACEOF fi if test "$LAPACK_FTN_STRING_LEN_AT_END" = "y" -then cat >> confdefs.h <<\EOF +then cat >>confdefs.h <<\_ACEOF #define LAPACK_FTN_STRING_LEN_AT_END 1 -EOF +_ACEOF fi if test "$LAPACK_NAMES" = "lower" -then cat >> confdefs.h <<\EOF +then cat >>confdefs.h <<\_ACEOF #define LAPACK_NAMES_LOWERCASE 1 -EOF +_ACEOF fi @@ -2237,8 +3892,8 @@ fi # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -echo $ac_n "checking SO""... $ac_c" 1>&6 -echo "configure:2242: checking SO" >&5 +echo "$as_me:$LINENO: checking SO" >&5 +echo $ECHO_N "checking SO... $ECHO_C" >&6 if test -z "$SO" then case $ac_sys_system in @@ -2248,521 +3903,1190 @@ then *) SO=.so;; esac fi -echo "$ac_t""$SO" 1>&6 +echo "$as_me:$LINENO: result: $SO" >&5 +echo "${ECHO_T}$SO" >&6 -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -trap '' 1 2 15 + ac_config_files="$ac_config_files ../Cantera/Makefile ../Cantera/src/Makefile ../Cantera/src/zeroD/Makefile ../Cantera/src/oneD/Makefile ../Cantera/src/converters/Makefile ../Cantera/src/transport/Makefile ../Cantera/clib/src/Makefile ../Cantera/fortran/src/Makefile ../Cantera/fortran/f77demos/f77demos.mak ../Cantera/fortran/f77demos/isentropic.dsp ../Cantera/matlab/Makefile ../Cantera/matlab/setup_matlab.py ../Cantera/matlab/setup_winmatlab.py ../Cantera/python/Makefile ../Cantera/python/setup.py ../Cantera/cxx/Makefile ../Cantera/cxx/src/Makefile ../Cantera/cxx/demos/Makefile ../Cantera/user/Makefile ../Cantera/python/src/Makefile ../ext/lapack/Makefile ../ext/blas/Makefile ../ext/cvode/Makefile ../ext/math/Makefile ../ext/tpx/Makefile ../ext/Makefile ../ext/recipes/Makefile ../examples/Makefile ../examples/cxx/Makefile ../Makefile ../tools/Makefile ../tools/src/Makefile ../tools/src/sample.mak ../tools/src/finish_install.py ../tools/src/package4mac ../tools/templates/f77/demo.mak ../tools/templates/f90/demo.mak ../tools/templates/cxx/demo.mak ../tools/testtools/Makefile ../data/inputs/Makefile ../test_problems/Makefile ../test_problems/cxx_ex/Makefile ../test_problems/silane_equil/Makefile ../test_problems/surfkin/Makefile ../test_problems/diamondSurf/Makefile ../test_problems/ck2cti_test/runtest ../test_problems/ck2cti_test/Makefile ../test_problems/python/Makefile" -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# 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[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. +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 + + + : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $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. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -trap 'rm -fr `echo "../Cantera/Makefile \ - ../Cantera/src/Makefile \ - ../Cantera/src/zeroD/Makefile \ - ../Cantera/src/oneD/Makefile \ - ../Cantera/src/converters/Makefile \ - ../Cantera/src/transport/Makefile \ - ../Cantera/clib/src/Makefile \ - ../Cantera/fortran/src/Makefile \ - ../Cantera/fortran/f77demos/f77demos.mak \ - ../Cantera/fortran/f77demos/isentropic.dsp \ - ../Cantera/matlab/Makefile \ - ../Cantera/matlab/setup_matlab.py \ - ../Cantera/matlab/setup_winmatlab.py \ - ../Cantera/python/Makefile \ - ../Cantera/python/setup.py \ - ../Cantera/cxx/Makefile \ - ../Cantera/cxx/src/Makefile \ - ../Cantera/cxx/demos/Makefile \ - ../Cantera/user/Makefile \ - ../Cantera/python/src/Makefile \ - ../ext/lapack/Makefile \ - ../ext/blas/Makefile \ - ../ext/cvode/Makefile \ - ../ext/math/Makefile \ - ../ext/tpx/Makefile \ - ../ext/Makefile \ - ../ext/recipes/Makefile \ - ../examples/Makefile \ - ../examples/cxx/Makefile \ - ../Makefile \ - ../tools/Makefile \ - ../tools/src/Makefile \ - ../tools/src/sample.mak \ - ../tools/src/finish_install.py \ - ../tools/src/package4mac \ - ../tools/templates/f77/demo.mak \ - ../tools/templates/cxx/demo.mak \ - ../tools/testtools/Makefile \ - ../data/inputs/Makefile \ - ../test_problems/Makefile \ - ../test_problems/cxx_ex/Makefile \ - ../test_problems/silane_equil/Makefile \ - ../test_problems/surfkin/Makefile \ - ../test_problems/diamondSurf/Makefile \ - ../test_problems/ck2cti_test/runtest \ - ../test_problems/ck2cti_test/Makefile \ - ../test_problems/python/Makefile \ - ../config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CVF_LIBDIR@%$CVF_LIBDIR%g -s%@local_inst@%$local_inst%g -s%@local_python_inst@%$local_python_inst%g -s%@python_prefix@%$python_prefix%g -s%@ctversion@%$ctversion%g -s%@homedir@%$homedir%g -s%@ct_libdir@%$ct_libdir%g -s%@ct_incdir@%$ct_incdir%g -s%@ct_incroot@%$ct_incroot%g -s%@ct_bindir@%$ct_bindir%g -s%@ct_datadir@%$ct_datadir%g -s%@ct_demodir@%$ct_demodir%g -s%@ct_templdir@%$ct_templdir%g -s%@ct_mandir@%$ct_mandir%g -s%@ct_tutdir@%$ct_tutdir%g -s%@ct_docdir@%$ct_docdir%g -s%@ct_dir@%$ct_dir%g -s%@COMPACT_INSTALL@%$COMPACT_INSTALL%g -s%@CANTERA_LIBDIR@%$CANTERA_LIBDIR%g -s%@CANTERA_INCDIR@%$CANTERA_INCDIR%g -s%@CT_TOOLS_BIN@%$CT_TOOLS_BIN%g -s%@CANTERA_BINDIR@%$CANTERA_BINDIR%g -s%@CANTERA_EXAMPLES_DIR@%$CANTERA_EXAMPLES_DIR%g -s%@CANTERA_DATADIR@%$CANTERA_DATADIR%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@username@%$username%g -s%@ctroot@%$ctroot%g -s%@buildinc@%$buildinc%g -s%@buildlib@%$buildlib%g -s%@buildbin@%$buildbin%g -s%@MAKE@%$MAKE%g -s%@ARCHIVE@%$ARCHIVE%g -s%@DO_RANLIB@%$DO_RANLIB%g -s%@RANLIB@%$RANLIB%g -s%@SOEXT@%$SOEXT%g -s%@SHARED@%$SHARED%g -s%@PIC@%$PIC%g -s%@LCXX_FLAGS@%$LCXX_FLAGS%g -s%@LCXX_END_LIBS@%$LCXX_END_LIBS%g -s%@USERDIR@%$USERDIR%g -s%@INCL_USER_CODE@%$INCL_USER_CODE%g -s%@KERNEL@%$KERNEL%g -s%@BUILD_CK@%$BUILD_CK%g -s%@LIB_DIR@%$LIB_DIR%g -s%@build_lapack@%$build_lapack%g -s%@build_blas@%$build_blas%g -s%@BLAS_LAPACK_LIBS@%$BLAS_LAPACK_LIBS%g -s%@BLAS_LAPACK_DIR@%$BLAS_LAPACK_DIR%g -s%@LOCAL_LIB_DIRS@%$LOCAL_LIB_DIRS%g -s%@LOCAL_LIBS@%$LOCAL_LIBS%g -s%@CANTERA_PARTICLES_DIR@%$CANTERA_PARTICLES_DIR%g -s%@BUILD_PARTICLES@%$BUILD_PARTICLES%g -s%@CT_SHARED_LIB@%$CT_SHARED_LIB%g -s%@BUILD_F90@%$BUILD_F90%g -s%@F90@%$F90%g -s%@F77FLAGS@%$F77FLAGS%g -s%@PYTHON_CMD@%$PYTHON_CMD%g -s%@WIN_PYTHON_CMD@%$WIN_PYTHON_CMD%g -s%@BUILD_PYTHON@%$BUILD_PYTHON%g -s%@MATLAB_CMD@%$MATLAB_CMD%g -s%@BUILD_MATLAB@%$BUILD_MATLAB%g -s%@BUILD_CLIB@%$BUILD_CLIB%g -s%@export_name@%$export_name%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CXX@%$CXX%g -s%@CC@%$CC%g -s%@F77@%$F77%g -s%@FLIBS@%$FLIBS%g -s%@OBJEXT@%$OBJEXT%g -s%@EXEEXT@%$EXEEXT%g -s%@precompile_headers@%$precompile_headers%g -s%@CXX_DEPENDS@%$CXX_DEPENDS%g -s%@OS_IS_DARWIN@%$OS_IS_DARWIN%g -s%@OS_IS_WIN@%$OS_IS_WIN%g -s%@OS_IS_CYGWIN@%$OS_IS_CYGWIN%g -s%@SHARED_CTLIB@%$SHARED_CTLIB%g -s%@mex_ext@%$mex_ext%g -s%@F77_EXT@%$F77_EXT%g -s%@CXX_EXT@%$CXX_EXT%g -s%@OBJ_EXT@%$OBJ_EXT%g -s%@EXE_EXT@%$EXE_EXT%g -s%@local_math_libs@%$local_math_libs%g -s%@math_libs@%$math_libs%g -s%@SO@%$SO%g -s%@LDSHARED@%$LDSHARED%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# 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_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # 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" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# 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 -EOF -cat >> $CONFIG_STATUS </dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -CONFIG_FILES=\${CONFIG_FILES-"../Cantera/Makefile \ - ../Cantera/src/Makefile \ - ../Cantera/src/zeroD/Makefile \ - ../Cantera/src/oneD/Makefile \ - ../Cantera/src/converters/Makefile \ - ../Cantera/src/transport/Makefile \ - ../Cantera/clib/src/Makefile \ - ../Cantera/fortran/src/Makefile \ - ../Cantera/fortran/f77demos/f77demos.mak \ - ../Cantera/fortran/f77demos/isentropic.dsp \ - ../Cantera/matlab/Makefile \ - ../Cantera/matlab/setup_matlab.py \ - ../Cantera/matlab/setup_winmatlab.py \ - ../Cantera/python/Makefile \ - ../Cantera/python/setup.py \ - ../Cantera/cxx/Makefile \ - ../Cantera/cxx/src/Makefile \ - ../Cantera/cxx/demos/Makefile \ - ../Cantera/user/Makefile \ - ../Cantera/python/src/Makefile \ - ../ext/lapack/Makefile \ - ../ext/blas/Makefile \ - ../ext/cvode/Makefile \ - ../ext/math/Makefile \ - ../ext/tpx/Makefile \ - ../ext/Makefile \ - ../ext/recipes/Makefile \ - ../examples/Makefile \ - ../examples/cxx/Makefile \ - ../Makefile \ - ../tools/Makefile \ - ../tools/src/Makefile \ - ../tools/src/sample.mak \ - ../tools/src/finish_install.py \ - ../tools/src/package4mac \ - ../tools/templates/f77/demo.mak \ - ../tools/templates/cxx/demo.mak \ - ../tools/testtools/Makefile \ - ../data/inputs/Makefile \ - ../test_problems/Makefile \ - ../test_problems/cxx_ex/Makefile \ - ../test_problems/silane_equil/Makefile \ - ../test_problems/surfkin/Makefile \ - ../test_problems/diamondSurf/Makefile \ - ../test_problems/ck2cti_test/runtest \ - ../test_problems/ck2cti_test/Makefile \ - ../test_problems/python/Makefile \ - "} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# 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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$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 - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # 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; }; } - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + # 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 - ac_dir_suffix= ac_dots= + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +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 +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "../Cantera/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/Makefile" ;; + "../Cantera/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/src/Makefile" ;; + "../Cantera/src/zeroD/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/src/zeroD/Makefile" ;; + "../Cantera/src/oneD/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/src/oneD/Makefile" ;; + "../Cantera/src/converters/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/src/converters/Makefile" ;; + "../Cantera/src/transport/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/src/transport/Makefile" ;; + "../Cantera/clib/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/clib/src/Makefile" ;; + "../Cantera/fortran/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/fortran/src/Makefile" ;; + "../Cantera/fortran/f77demos/f77demos.mak" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/fortran/f77demos/f77demos.mak" ;; + "../Cantera/fortran/f77demos/isentropic.dsp" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/fortran/f77demos/isentropic.dsp" ;; + "../Cantera/matlab/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/matlab/Makefile" ;; + "../Cantera/matlab/setup_matlab.py" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/matlab/setup_matlab.py" ;; + "../Cantera/matlab/setup_winmatlab.py" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/matlab/setup_winmatlab.py" ;; + "../Cantera/python/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/python/Makefile" ;; + "../Cantera/python/setup.py" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/python/setup.py" ;; + "../Cantera/cxx/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/cxx/Makefile" ;; + "../Cantera/cxx/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/cxx/src/Makefile" ;; + "../Cantera/cxx/demos/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/cxx/demos/Makefile" ;; + "../Cantera/user/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/user/Makefile" ;; + "../Cantera/python/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Cantera/python/src/Makefile" ;; + "../ext/lapack/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/lapack/Makefile" ;; + "../ext/blas/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/blas/Makefile" ;; + "../ext/cvode/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/cvode/Makefile" ;; + "../ext/math/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/math/Makefile" ;; + "../ext/tpx/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/tpx/Makefile" ;; + "../ext/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/Makefile" ;; + "../ext/recipes/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../ext/recipes/Makefile" ;; + "../examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/Makefile" ;; + "../examples/cxx/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../examples/cxx/Makefile" ;; + "../Makefile" ) CONFIG_FILES="$CONFIG_FILES ../Makefile" ;; + "../tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../tools/Makefile" ;; + "../tools/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/Makefile" ;; + "../tools/src/sample.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/sample.mak" ;; + "../tools/src/finish_install.py" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/finish_install.py" ;; + "../tools/src/package4mac" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/package4mac" ;; + "../tools/templates/f77/demo.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/templates/f77/demo.mak" ;; + "../tools/templates/f90/demo.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/templates/f90/demo.mak" ;; + "../tools/templates/cxx/demo.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/templates/cxx/demo.mak" ;; + "../tools/testtools/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../tools/testtools/Makefile" ;; + "../data/inputs/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../data/inputs/Makefile" ;; + "../test_problems/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/Makefile" ;; + "../test_problems/cxx_ex/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/cxx_ex/Makefile" ;; + "../test_problems/silane_equil/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/silane_equil/Makefile" ;; + "../test_problems/surfkin/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/surfkin/Makefile" ;; + "../test_problems/diamondSurf/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/diamondSurf/Makefile" ;; + "../test_problems/ck2cti_test/runtest" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/ck2cti_test/runtest" ;; + "../test_problems/ck2cti_test/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/ck2cti_test/Makefile" ;; + "../test_problems/python/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/python/Makefile" ;; + "../config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ../config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +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,@CVF_LIBDIR@,$CVF_LIBDIR,;t t +s,@local_inst@,$local_inst,;t t +s,@local_python_inst@,$local_python_inst,;t t +s,@python_prefix@,$python_prefix,;t t +s,@ctversion@,$ctversion,;t t +s,@homedir@,$homedir,;t t +s,@ct_libdir@,$ct_libdir,;t t +s,@ct_incdir@,$ct_incdir,;t t +s,@ct_incroot@,$ct_incroot,;t t +s,@ct_bindir@,$ct_bindir,;t t +s,@ct_datadir@,$ct_datadir,;t t +s,@ct_demodir@,$ct_demodir,;t t +s,@ct_templdir@,$ct_templdir,;t t +s,@ct_mandir@,$ct_mandir,;t t +s,@ct_tutdir@,$ct_tutdir,;t t +s,@ct_docdir@,$ct_docdir,;t t +s,@ct_dir@,$ct_dir,;t t +s,@COMPACT_INSTALL@,$COMPACT_INSTALL,;t t +s,@CANTERA_LIBDIR@,$CANTERA_LIBDIR,;t t +s,@CANTERA_INCDIR@,$CANTERA_INCDIR,;t t +s,@CT_TOOLS_BIN@,$CT_TOOLS_BIN,;t t +s,@CANTERA_BINDIR@,$CANTERA_BINDIR,;t t +s,@CANTERA_EXAMPLES_DIR@,$CANTERA_EXAMPLES_DIR,;t t +s,@CANTERA_DATADIR@,$CANTERA_DATADIR,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@username@,$username,;t t +s,@ctroot@,$ctroot,;t t +s,@buildinc@,$buildinc,;t t +s,@buildlib@,$buildlib,;t t +s,@buildbin@,$buildbin,;t t +s,@MAKE@,$MAKE,;t t +s,@ARCHIVE@,$ARCHIVE,;t t +s,@DO_RANLIB@,$DO_RANLIB,;t t +s,@RANLIB@,$RANLIB,;t t +s,@SOEXT@,$SOEXT,;t t +s,@SHARED@,$SHARED,;t t +s,@PIC@,$PIC,;t t +s,@LCXX_FLAGS@,$LCXX_FLAGS,;t t +s,@LCXX_END_LIBS@,$LCXX_END_LIBS,;t t +s,@USERDIR@,$USERDIR,;t t +s,@INCL_USER_CODE@,$INCL_USER_CODE,;t t +s,@KERNEL@,$KERNEL,;t t +s,@BUILD_CK@,$BUILD_CK,;t t +s,@LIB_DIR@,$LIB_DIR,;t t +s,@build_lapack@,$build_lapack,;t t +s,@build_blas@,$build_blas,;t t +s,@BLAS_LAPACK_LIBS@,$BLAS_LAPACK_LIBS,;t t +s,@BLAS_LAPACK_DIR@,$BLAS_LAPACK_DIR,;t t +s,@LOCAL_LIB_DIRS@,$LOCAL_LIB_DIRS,;t t +s,@LOCAL_LIBS@,$LOCAL_LIBS,;t t +s,@CANTERA_PARTICLES_DIR@,$CANTERA_PARTICLES_DIR,;t t +s,@BUILD_PARTICLES@,$BUILD_PARTICLES,;t t +s,@CT_SHARED_LIB@,$CT_SHARED_LIB,;t t +s,@BUILD_F90@,$BUILD_F90,;t t +s,@F90@,$F90,;t t +s,@F90FLAGS@,$F90FLAGS,;t t +s,@PYTHON_CMD@,$PYTHON_CMD,;t t +s,@WIN_PYTHON_CMD@,$WIN_PYTHON_CMD,;t t +s,@BUILD_PYTHON@,$BUILD_PYTHON,;t t +s,@MATLAB_CMD@,$MATLAB_CMD,;t t +s,@BUILD_MATLAB@,$BUILD_MATLAB,;t t +s,@BUILD_CLIB@,$BUILD_CLIB,;t t +s,@export_name@,$export_name,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@FLIBS@,$FLIBS,;t t +s,@precompile_headers@,$precompile_headers,;t t +s,@CXX_DEPENDS@,$CXX_DEPENDS,;t t +s,@OS_IS_DARWIN@,$OS_IS_DARWIN,;t t +s,@OS_IS_WIN@,$OS_IS_WIN,;t t +s,@OS_IS_CYGWIN@,$OS_IS_CYGWIN,;t t +s,@SHARED_CTLIB@,$SHARED_CTLIB,;t t +s,@mex_ext@,$mex_ext,;t t +s,@F77_EXT@,$F77_EXT,;t t +s,@CXX_EXT@,$CXX_EXT,;t t +s,@OBJ_EXT@,$OBJ_EXT,;t t +s,@EXE_EXT@,$EXE_EXT,;t t +s,@local_math_libs@,$local_math_libs,;t t +s,@math_libs@,$math_libs,;t t +s,@SO@,$SO,;t t +s,@LDSHARED@,$LDSHARED,;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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@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 - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +# +# 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='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +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='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +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 - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.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 - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. 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.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# 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.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +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 : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # 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 conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals + 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.vals +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +# 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 - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi -fi; done + 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; }; }; } -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - +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 + # ) if test "x${OS_IS_WIN}" = "x1"; then cp -f ../config.h ../Cantera/src @@ -2778,7 +5102,7 @@ else echo "Now start Visual Studio, open workspace 'win32/cantera.dsw'," echo "and build project 'all'. When this finishes, come back here and " echo "type 'make win' to make the Python and/or MATLAB interfaces." -fi -echo +fi +echo # $Log: configure.in,v diff --git a/config/configure.in b/config/configure.in index 6433aaf0e..182a3a6ec 100755 --- a/config/configure.in +++ b/config/configure.in @@ -441,7 +441,8 @@ if test "x$BUILD_F90_INTERFACE" = "xy"; then fi AC_SUBST(BUILD_F90) AC_SUBST(F90) -AC_SUBST(F77FLAGS) +AC_SUBST(F90FLAGS) +# AC_SUBST(F77FLAGS) BUILD_CLIB=1 # @@ -566,7 +567,7 @@ fi dnl Checks for libraries. AC_F77_LIBRARY_LDFLAGS() case $ac_sys_system in - Darwin*) FLIBS='-lg2c -lgcc'; SHARED_CTLIB=0;; + Darwin*) FLIBS='-lstdc++ -lg2c'; SHARED_CTLIB=0;; esac @@ -685,6 +686,7 @@ AC_OUTPUT(../Cantera/Makefile \ ../tools/src/finish_install.py \ ../tools/src/package4mac \ ../tools/templates/f77/demo.mak \ + ../tools/templates/f90/demo.mak \ ../tools/templates/cxx/demo.mak \ ../tools/testtools/Makefile \ ../data/inputs/Makefile \ diff --git a/configure b/configure index a6dac9516..eaaccadf7 100755 --- a/configure +++ b/configure @@ -116,7 +116,13 @@ BUILD_MATLAB_TOOLBOX=${BUILD_MATLAB_TOOLBOX:="y"} # A Fortran 90/95 compiler is required. # UNDER DEVELOPMENT - UNSTABLE!! -BUILD_F90_INTERFACE=${BUILD_F90_INTERFACE:="n"} +BUILD_F90_INTERFACE=${BUILD_F90_INTERFACE:="y"} + +# The Fortran 90/95 compiler +F90=${F90:=f95} + +# Compiler option flags for the Fortran 90/95 compiler +F90FLAGS=${F90FLAGS:='-O2'} #---------------------------------------------------------------------- @@ -258,9 +264,8 @@ SHARED=${SHARED:="-shared"} # compiler if you are building the Fortran 90 interface. F77=${F77:=g77} -F90=${F90:=f95} - -# Fortran compiler flags +# Fortran 77 compiler flags. Note that these may be specified separately +# from the options for the Fortran 90/95 compiler (if any). FFLAGS=${FFLAGS:='-O2'} # additional flags required to compile fixed-format F77 procedures @@ -324,7 +329,7 @@ export RANLIB export BLAS_LAPACK_LIBS export BLAS_LAPACK_DIR export BUILD_F90 -export BUILD_FORTRAN_90_INTERFACE +export BUILD_F90_INTERFACE export PYTHON_PACKAGE export BUILD_MATLAB_TOOLBOX #export MATLAB_CMD @@ -351,6 +356,7 @@ export F90 export F90_EXT export FFLAGS export F77FLAGS +export F90FLAGS export LAPACK_NAMES export LCXX_FLAGS export LCXX_END_LIBS diff --git a/tools/Makefile.in b/tools/Makefile.in index 684cb18ba..06008669e 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -47,6 +47,9 @@ templates-install: @INSTALL@ -m 644 templates/f77/*.cpp @ct_dir@/templates/f77 @INSTALL@ -m 644 templates/f77/*.f @ct_dir@/templates/f77 @INSTALL@ -m 644 templates/f77/*.mak @ct_dir@/templates/f77 + @INSTALL@ -d @ct_dir@/templates/f90 + @INSTALL@ -m 644 templates/f90/*.f90 @ct_dir@/templates/f90 + @INSTALL@ -m 644 templates/f90/*.mak @ct_dir@/templates/f90 @INSTALL@ -d @ct_dir@/templates/cxx @INSTALL@ -m 644 templates/cxx/*.cpp @ct_dir@/templates/cxx @INSTALL@ -m 644 templates/cxx/*.mak @ct_dir@/templates/cxx diff --git a/tools/src/finish_install.py.in b/tools/src/finish_install.py.in index b03a6a3e2..de4146ab5 100644 --- a/tools/src/finish_install.py.in +++ b/tools/src/finish_install.py.in @@ -62,6 +62,8 @@ f = open(bindir+'/ctnew','w') f.write("""#!/bin/sh if test "x$1" = "x-f77"; then cp """+templdir+"""/f77/*.* . +elif test "x$1" = "x-f90"; then +cp """+templdir+"""/f90/*.* . else cp """+templdir+"""/cxx/*.* . fi diff --git a/tools/templates/f90/demo.f90 b/tools/templates/f90/demo.f90 new file mode 100644 index 000000000..d2e02f5b7 --- /dev/null +++ b/tools/templates/f90/demo.f90 @@ -0,0 +1,96 @@ +! +! Replace this sample main program with your program +! +! This program uses functions defined in demo_ftnlib.cpp to create +! an ideal gas mixture and print some its properties. +! +! For a C++ version of this program, see ../cxx/demo.cpp. +! +program main + + call demo(100, 500) + +stop +end + +subroutine demo(maxsp, maxrxns) + use cantera + implicit none + integer, intent(in) :: maxsp + integer, intent(in) :: maxrxns + + type(phase_t) gas + double precision q(MAXRXNS), qf(MAXRXNS), qr(MAXRXNS) + double precision diff(MAXSP) + character*80 eq + character*20 name + double precision :: t, p, dnu, dlam + integer :: i, irxns, nsp, k + +write(*,*) +write(*,*) '******** Fortran 90 Test Program ********' + +gas = importPhase('h2o2.cti','ohmech') + +t = 1200.0 +p = 101325.0 + +call setState_TPX(gas, t, p, 'H2:1, O2:1, AR:2') + +write(*,*) 'Initial state properties:' +write(*,10) temperature(gas), pressure(gas), density(gas), & + enthalpy_mole(gas), entropy_mole(gas), cp_mole(gas) + +! compute the equilibrium state holding the specifi! +! enthalpy and pressure constant +call equilibrate(gas, HP) + +write(*,*) 'Equilibrium state properties:' +write(*,10) temperature(gas), pressure(gas), density(gas), & + enthalpy_mole(gas), entropy_mole(gas), cp_mole(gas) + +10 format(//'Temperature: ',g14.5,' K'/ & + 'Pressure: ',g14.5,' Pa'/ & + 'Density: ',g14.5,' kg/m3'/ & + 'Molar Enthalpy:',g14.5,' J/kmol'/ & + 'Molar Entropy: ',g14.5,' J/kmol-K'/ & + 'Molar cp: ',g14.5,' J/kmol-K'//) + + +! Reaction information +irxns = nReactions(gas) + +! forward and reverse rates of progress should be equal +! in equilibrium states +call getFwdRatesOfProgress(gas, qf) +call getRevRatesOfProgress(gas, qr) + +! net rates of progress should be zero in equilibrium states +call getNetRatesOfProgress(gas, q) + +! for each reaction, print the equation and the rates of progress +do i = 1,irxns + call getReactionString(gas, i,eq) + write(*,20) eq,qf(i),qr(i),q(i) +20 format(a27,3e14.5,' kmol/m3/s') +end do + +! Transport properties +dnu = viscosity(gas) +dlam = thermalConductivity(gas) +call getMixDiffCoeffs(gas, diff) + +write(*,30) dnu, dlam +30 format(//'Viscosity: ',g14.5,' Pa-s'/ & + 'Thermal conductivity: ',g14.5,' W/m/K'/) + +write(*,*) 'Species Diffusion Coefficient' +nsp = nSpecies(gas) +do k = 1, nsp + call getSpeciesName(gas, k, name) + write(*,40) name, diff(k) +40 format(' ',a20,e14.5,' m2/s') +end do + +stop +end subroutine demo diff --git a/tools/templates/f90/demo.mak.in b/tools/templates/f90/demo.mak.in new file mode 100644 index 000000000..e0d5d8a96 --- /dev/null +++ b/tools/templates/f90/demo.mak.in @@ -0,0 +1,94 @@ +#!/bin/sh + +# This Makefile builds a Fortran 90 application that uses Cantera. By +# default, the main program file is 'demo.f90,' which prints out some +# properties of a reacting gas mixture. + +# To build program 'demo', simply type 'make', or 'make -f ' if this file is named something other than 'Makefile.' + +# Once you have verified that the demo runs, edit this file to replace +# object file 'demo.o' with your own object file or files. + + +#------------------------ edit this block --------------------------------- + +# the name of the executable program to be created +PROG_NAME = demo + +# the object files to be linked together. +OBJS = demo.o + +# additional flags to be passed to the linker. If your program +# requires other external libraries, put them here +LINK_OPTIONS = @LCXX_FLAGS@ + +#--------------------------------------------------------------------------- +# You probably don't need to edit anything below. + +# the C++ compiler +CXX = @CXX@ + +# C++ compile flags +CXX_FLAGS = @CXXFLAGS@ + +# external libraries +EXT_LIBS = -lfct -lclib @LOCAL_LIBS@ -lctcxx -lstdc++ @FLIBS@ + +# the Fortran 90/95 compiler +F90 = @F90@ + +# Fortran compile flags +FORT_FLAGS = @F90FLAGS@ + +# the directory where the Cantera libraries are located +CANTERA_LIBDIR=@ct_libdir@ + +# the directory where Cantera include files may be found. +CANTERA_INCDIR=@ct_incroot@ + +# the directory where Cantera Fortran 90 modules may be found. +CANTERA_MODULE_DIR=@ct_incroot@/cantera + +# flags passed to the C++ compiler/linker for the linking step +LCXXFLAGS = -L$(CANTERA_LIBDIR) + +# how to compile C++ source files to object files +%.o : %.cpp + $(CXX) -c $< -I$(CANTERA_INCDIR) $(CXX_FLAGS) + +# how to compile Fortran 90/95 source files to object files +%.o : %.f90 + $(F90) -c $< -I$(CANTERA_MODULE_DIR) $(FORT_FLAGS) + +PROGRAM = $(PROG_NAME)$(EXE_EXT) + +DEPENDS = $(OBJS:.o=.d) + +all: $(PROGRAM) + +$(PROGRAM): $(OBJS) + $(F90) -o $(PROGRAM) $(OBJS) $(LCXXFLAGS) $(CANTERA_LIBS) $(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ + +%.d : %.cpp + g++ -MM -I$(CANTERA_INCDIR) $*.cpp > $*.d + +clean: + $(RM) $(OBJS) $(PROGRAM) + +depends: $(DEPENDS) + cat *.d > .depends + $(RM) $(DEPENDS) + +TAGS: + etags *.h *.cpp + +ifeq ($(wildcard .depends), .depends) +include .depends +endif + + + + + +