From bc0cd996020021bd49bf7b5c3e9edf71aef44e3e Mon Sep 17 00:00:00 2001 From: Nicholas Malaya Date: Mon, 6 Feb 2012 23:38:42 +0000 Subject: [PATCH] [cantera]: setting some options at configure time --- Cantera/src/thermo/Makefile.am | 6 ++--- config.h.in | 28 ++++++++++++++++++++--- configure.ac | 27 +++++++++++++++++++--- test_problems/Makefile.am | 2 +- test_problems/mixGasTransport/Makefile.am | 2 +- test_problems/mixGasTransport/Makefile.in | 2 +- 6 files changed, 55 insertions(+), 12 deletions(-) diff --git a/Cantera/src/thermo/Makefile.am b/Cantera/src/thermo/Makefile.am index 8d5de3928..217268a09 100644 --- a/Cantera/src/thermo/Makefile.am +++ b/Cantera/src/thermo/Makefile.am @@ -20,7 +20,7 @@ h_sources = State.h Elements.h Constituents.h Phase.h mix_defs.h \ IdealSolidSolnPhase.h StoichSubstanceSSTP.h \ SingleSpeciesTP.h MineralEQ3.h PseudoBinaryVPSSTP.h \ MargulesVPSSTP.h StoichSubstance.h electrolytes.h \ - PureFluidPhase.h + PureFluidPhase.h LatticeSolidPhase.h cc_sources = State.cpp Elements.cpp Constituents.cpp Phase.cpp \ ThermoPhase.cpp IdealGasPhase.cpp ConstDensityThermo.cpp \ @@ -38,10 +38,10 @@ cc_sources = State.cpp Elements.cpp Constituents.cpp Phase.cpp \ GibbsExcessVPSSTP.cpp LatticePhase.cpp IdealMolalSoln.cpp \ HMWSoln.cpp HMWSoln_input.cpp WaterSSTP.cpp \ MetalSHEelectrons.cpp \ - IdealSolidSolnPhase.cpp \ + IdealSolidSolnPhase.cpp LatticeSolidPhase.cpp \ SingleSpeciesTP.cpp MineralEQ3.cpp \ PseudoBinaryVPSSTP.cpp MargulesVPSSTP.cpp \ - StoichSubstanceSSTP.cpp PureFluidPhase.cpp + StoichSubstanceSSTP.cpp PureFluidPhase.cpp StoichSubstance.cpp AM_CPPFLAGS = -I../base AM_CXXFLAGS = $(AM_CPPFLAGS) diff --git a/config.h.in b/config.h.in index 304c1711e..c0218cee4 100755 --- a/config.h.in +++ b/config.h.in @@ -51,9 +51,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to add string to end of lapack functions */ +#undef LAPACK_FTN_STRING_LEN_AT_END + /* Define to add underscore after fortran functions */ #undef LAPACK_FTN_TRAILING_UNDERSCORE +/* Define to lapack functions lowercase */ +#undef LAPACK_NAMES_LOWERCASE + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -86,7 +92,23 @@ #undef VERSION -typedef double doublereal; // Fortran double precision -typedef int integer; // Fortran integer -typedef int ftnlen; // Fortran hidden string length type +typedef double doublereal; // Fortran double precision +typedef int integer; // Fortran integer +typedef int ftnlen; // Fortran hidden string length type + +#define STRING_LEN_AT_END +#define STORE_MOLE_FRACTIONS + +#define INCL_PURE_FLUIDS 1 +#define WITH_PURE_FLUIDS 1 + +#define WITH_LATTICE_SOLID 1 +#define WITH_METAL 1 +#define WITH_STOICH_SUBSTANCE 1 +#define WITH_IDEAL_SOLUTIONS 1 +#define WITH_ELECTROLYTES 1 +#define HAS_SSTREAM 1 + +#define CANTERA_DATA "/usr/local/cantera/data" + diff --git a/configure.ac b/configure.ac index 4bd11998e..024bdaeca 100644 --- a/configure.ac +++ b/configure.ac @@ -32,12 +32,32 @@ AC_DEFINE([LAPACK_FTN_TRAILING_UNDERSCORE],1,[Define to add underscore after for LAPACK_FTN_TRAILING_UNDERSCORE=1 AC_DEFINE([FTN_TRAILING_UNDERSCORE],1,[Define to add underscore after fortran functions]) FTN_TRAILING_UNDERSCORE=1 +AC_DEFINE([LAPACK_NAMES_LOWERCASE],1,[Define to lapack functions lowercase]) +LAPACK_NAMES_LOWERCASE 1 +AC_DEFINE([LAPACK_FTN_STRING_LEN_AT_END],1,[Define to add string to end of lapack functions]) +LAPACK_FTN_STRING_LEN_AT_END=1 AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t]) AH_BOTTOM([ -typedef double doublereal; // Fortran double precision -typedef int integer; // Fortran integer -typedef int ftnlen; // Fortran hidden string length type +typedef double doublereal; // Fortran double precision +typedef int integer; // Fortran integer +typedef int ftnlen; // Fortran hidden string length type + +#define STRING_LEN_AT_END +#define STORE_MOLE_FRACTIONS + +#define INCL_PURE_FLUIDS 1 +#define WITH_PURE_FLUIDS 1 + +#define WITH_LATTICE_SOLID 1 +#define WITH_METAL 1 +#define WITH_STOICH_SUBSTANCE 1 +#define WITH_IDEAL_SOLUTIONS 1 +#define WITH_ELECTROLYTES 1 +#define HAS_SSTREAM 1 + +#define CANTERA_DATA "/usr/local/cantera/data" + ]) # ------------------------------ @@ -72,6 +92,7 @@ DX_INIT_DOXYGEN(cantera, doxygen/cantera.dox, docs) AC_OUTPUT(Makefile \ test_problems/Makefile \ + test_problems/mixGasTransport/Makefile \ test_problems/ChemEquil_gri_matrix/Makefile \ test_problems/cathermo/Makefile \ test_problems/cathermo/DH_graph_1/Makefile \ diff --git a/test_problems/Makefile.am b/test_problems/Makefile.am index 02df28646..a35597aae 100644 --- a/test_problems/Makefile.am +++ b/test_problems/Makefile.am @@ -5,7 +5,7 @@ ChemEquil_ionizedGas ChemEquil_red1 CpJump \ mixGasTransport multiGasTransport printUtilUnitTest -SUBDIRS = cathermo ChemEquil_gri_matrix +SUBDIRS = cathermo mixGasTransport ChemEquil_gri_matrix # # would be good to add: # diff --git a/test_problems/mixGasTransport/Makefile.am b/test_problems/mixGasTransport/Makefile.am index 6dffa7547..1d99d54bd 100644 --- a/test_problems/mixGasTransport/Makefile.am +++ b/test_problems/mixGasTransport/Makefile.am @@ -1,6 +1,6 @@ cc_sources = mixGasTransport.cpp -INC = -I. -I$(top_builddir)/build/include/ +INC = -I. -I$(top_builddir)/build/include/ -g AM_CPPFLAGS = $(INC) AM_CXXFLAGS = $(AM_CPPFLAGS) diff --git a/test_problems/mixGasTransport/Makefile.in b/test_problems/mixGasTransport/Makefile.in index 8c01007a3..e5267822b 100644 --- a/test_problems/mixGasTransport/Makefile.in +++ b/test_problems/mixGasTransport/Makefile.in @@ -226,7 +226,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ cc_sources = mixGasTransport.cpp -INC = -I. -I$(top_builddir)/build/include/ +INC = -I. -I$(top_builddir)/build/include/ -g AM_CPPFLAGS = $(INC) AM_CXXFLAGS = $(AM_CPPFLAGS) LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport \