/[ascend]/trunk/ascend/utilities/config.h.in
ViewVC logotype

Contents of /trunk/ascend/utilities/config.h.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2029 - (show annotations) (download)
Thu Apr 30 09:19:48 2009 UTC (16 years ago) by jpye
File size: 9320 byte(s)
Fixed a few problems with ABSOUTE_PATHS that emerged during packaging.
Updated .spec file.
Forced use of ABSOLUTE_PATHS in deb package.
1 /*
2 This file will be processed by SCons and output as config.h.
3 Don't edit this file unless it's named 'config.h.in' unless
4 it doesn't bother you that your changes will be IGNORED!
5
6 DUAL SUPPORT FOR BOTH AUTOTOOLS AND SCONS
7
8 When I add a new flag to SCons, I will use the form (replace \ by /):
9
10 \* #define FLAGNAME @FLAGNAME@ *\
11
12 Using SCons, I can uncomment these lines using text-substitution.
13 If you want to add support for these flags in your autotools build
14 you just need to uncomment these lines; no changes to the SCons build
15 will be necessary (as it will also hunt for @FLAGNAME@ in its
16 text-subst.
17
18 @NOTE
19 This file should NEVER contain any #include statements! It is important
20 that the configuration can be determined without any other headers being
21 loaded and muddying the waters.
22 @ENDNOTE
23 */
24 #ifndef ASC_CONFIG_H
25 #define ASC_CONFIG_H
26
27 /**
28 Turn off the use of signals completely if you want. Signals are used to
29 interrupt solvers, catch floating point errors (but check that you have the
30 C99 FPE behaviour working correctly if this applied) and also to catch
31 segmentation faults (no sure how well that's implemented.
32
33 Concerns over strange behaviour in mixed-language environments such as
34 Python and/or Tcl make avoiding use of traps often quite a good idea.
35 */
36 #ifndef ASC_SIGNAL_TRAPS
37 /* #define ASC_SIGNAL_TRAPS @ASC_SIGNAL_TRAPS@ */
38 #endif
39
40 /**
41 If signal handlers (<signal.h>) on this platform need to be reset after
42 each 'catch', the ASC_RESETNEEDED macro should be set true.
43 */
44 #ifndef ASC_RESETNEEDED
45 /* #define ASC_RESETNEEDED @ASC_RESETNEEDED@ */
46 #endif
47
48 /**
49 If we have C99 FPE (floating point error) routines available on this
50 platform/compiler.
51 */
52 #ifndef HAVE_C99FPE
53 /* #define HAVE_C99FPE @HAVE_C99FPE@ */
54 #endif
55
56 /**
57 If we have IEEE math library include 'isnan' etc.
58 */
59 #ifndef HAVE_IEEE
60 /* #define HAVE_IEEE @HAVE_IEEE@ */
61 #endif
62
63 /**
64 Prefix for 'external libraries' loaded using the 'extlib' importhandler
65 */
66 #define ASC_EXTLIBPREFIX "@EXTLIB_PREFIX@"
67
68 /**
69 Suffix for shared libraries
70 */
71 #define ASC_EXTLIBSUFFIX "@EXTLIB_SUFFIX@"
72
73 /**
74 Prefix and suffix for standard system libraries on this platform
75 */
76 #define ASC_SHLIBPREFIX "@SHLIBPREFIX@"
77 #define ASC_SHLIBSUFFIX "@SHLIBSUFFIX@"
78
79 /*
80 FIXME changes are being made to streamline the following...
81
82 This variable determines how ASCEND goes about finding all its stuff at runtime,
83 assuming the ASCENDDIST environment variable is *not* present.
84
85 ASCENDDIST is where Python, Tcl/Tk and model scripts, as well as graphics etc are
86 kept in the filesystem. Normally it is expected that ASCEND should be able to
87 know or work out this location itself.
88
89 If ASC_ABSOLUTE_PATHS is defined, ASCEND will used a fixed absolute path to locate
90 its data files. This is the standard Red Hat and Debian system, in which
91 binaries are typically located in /usr/bin but related non-exe files are located
92 in /usr/share/appname/. See ASC_DATADIR in this case.
93
94 If not defined, ASCEND will locate its data files using a relative path based on
95 the location of the running executable. See ASC_DISTDIR_REL_BIN. This is the
96 'application folder' style made popular on early Macs, and also favoured by CMU.
97
98 For a discussion of this, see
99 http://linux.slashdot.org/article.pl?sid=04/04/03/174249
100
101 At present, the only place this has any effect is in the Tcl/Tk
102 interface, in Driver.c's choices for default values of non-specified
103 environment variables. @TODO migrate this to Python as well.
104
105 SCons will uncomment the #define line if required.
106 Doing it this (hacky) way so as not to mess up autoconf.
107
108 Note: do not use ASC_ABSOLUTE_PATHS on Windows. Absolute paths mess up the
109 ability of the installer to relocate files at install-time.
110
111 For Tcl/Tk the following #defines can be needed:
112 ASCENDDIST_DEFAULT
113 ASCENDTK_DEFAULT
114 ASCENDLIBRARY_DEFAULT
115 ASCENDSOLVERS_DEFAULT
116
117 ASC_ABSOLUTE_PATHS
118 ASC_DIST_REL_BIN
119 ASC_TK_REL_DIST
120 ASC_LIBRARY_REL_DIST
121 ASC_SOLVERS_REL_DIST
122
123 Then, using these, in the case of relative paths, we choose:
124
125 ASCENDROOT = $PROGDIR/@ASC_DIST_REL_BIN@
126 ASCENDTK = $ASCENDROOT/@ASC_TK_REL_DIST@
127 ASCENDLIBRARY = $ASCENDROOT/@ASC_LIBRARY_REL_DIST@
128 ASCENDSOLVERS = $ASCENDROOT/@ASC_SOLVERS_ROL_DIST@
129 */
130 #define ASC_ABSOLUTE_PATHS @ASC_ABSOLUTE_PATHS@
131 #if ASC_ABSOLUTE_PATHS
132 # define ASCENDDIST_DEFAULT "@ASCENDDIST_DEFAULT@"
133 # define ASCENDTK_DEFAULT "@ASCENDTK_DEFAULT@"
134 # define ASCENDLIBRARY_DEFAULT "@ASCENDLIBRARY_DEFAULT@"
135 # define ASCENDSOLVERS_DEFAULT "@ASCENDSOLVERS_DEFAULT@"
136 #else
137 # define ASC_DIST_REL_BIN "@ASC_DIST_REL_BIN@"
138 # define ASC_TK_REL_DIST "@ASC_TK_REL_DIST@"
139 # define ASC_LIBRARY_REL_DIST "@ASC_LIBRARY_REL_DIST@"
140 # define ASC_SOLVERS_REL_DIST "@ASC_SOLVERS_REL_DIST@"
141 #endif
142
143 /*
144 Whether to use xterm colours when writing 'error.h' output, eg
145 'ERROR' in red, etc. If not defined, colour will never be used.
146 If defined, colour will be used any time the the TERM environment
147 variable is set to 'xterm' or 'msys'. MSYS uses the 'rxvt' console,
148 which knows about xterm colour codes.
149
150 SCons will uncomment the #define line if required.
151 Doing it this (hacky) way so as not to mess up autoconf.
152 */
153 #ifndef ASC_XTERM_COLORS
154 /* #define ASC_XTERM_COLORS @ASC_XTERM_COLORS@ */
155 #endif
156
157 /*
158 Whether to do use testing malloc. Required for some of the CUnit
159 tests to work fully.
160
161 SCons will uncomment the #define line if required.
162 Doing it this (hacky) way so as not to mess up autoconf.
163 */
164 #ifndef MALLOC_DEBUG
165 /* #define MALLOC_DEBUG @MALLOC_DEBUG@ */
166 #endif
167
168 /*
169 Whether the dmalloc library was detected. Should permit much reduced
170 complexity in ascMalloc.c, hopefully.
171
172 SCons will uncomment the #define line if required.
173 Doing it this (hacky) way so as not to mess up autoconf.
174 */
175 #ifndef ASC_WITH_DMALLOC
176 /* #define ASC_WITH_DMALLOC @ASC_WITH_DMALLOC@ */
177 #endif
178
179 /*-----------------------------------------------------------------------
180 IDA
181 */
182
183 /*
184 Whether to compile with support for the IDA DAE solver.
185
186 Note that this option is automatically configured based on the value of
187 WITH_SOLVERS in the SCons options.
188
189 SCons will uncomment the #define line if required.
190 Doing it this (hacky) way so as not to mess up autoconf.
191 */
192 #ifndef ASC_WITH_IDA
193 /* #define ASC_WITH_IDA @ASC_WITH_IDA@ */
194 #endif
195
196 /*-----------------------------------------------------------------------
197 TRON
198 */
199
200 /*
201 This is the name of the TRON .so or DLL. On Windows
202 it's called 'copopt3' but on linux it seems to be called
203 'consub3.so'.
204 */
205 #define ASC_TRON_LIB "@ASC_TRON_LIB@"
206
207 /*
208 This is the name of the optional environment variable which will
209 be used for the value of the searchpath for the TRON DLL/SO.
210 */
211 #define ASC_TRON_ENVVAR "@ASC_TRON_ENVVAR@"
212
213 /*
214 This is the default *fallback* searchpath that will be used when hunting
215 for TRON at runtime
216
217 Searchpath for TRON DLL/SO. This is in platform-specific
218 form (paths with ';' separator in Windows, ':' separator on Linux).
219 */
220 #define ASC_TRON_DLPATH "@ASC_TRON_DLPATH@"
221
222 /*-------------------------------------------------------------------------
223 LSODE
224 */
225
226 /*
227 Whether to compile with support for the LSODE integration engine.
228 Note that you will usually need to manually specify the location of your
229 'libg2c.a' in the link step, see F2C_* Scons options.
230
231 Note that this option is automatically configured based on the value of
232 WITH_SOLVERS in the SCons options.
233
234 SCons will uncomment the #define line if required.
235 Doing it this (hacky) way so as not to mess up autoconf.
236 */
237 #ifndef ASC_WITH_LSODE
238 /* #define ASC_WITH_LSODE @ASC_WITH_LSODE@ */
239 #endif
240
241 /*--------------------------------------------------------------------------
242 MATRIX MARKET EXPORT
243 */
244
245 /*
246 Whether to provide export functions using the Matrix Market format
247 (from Integrator, perhaps elsewhere)
248 */
249 #ifndef ASC_WITH_MMIO
250 /* #define ASC_WITH_MMIO @ASC_WITH_MMIO@ */
251 #endif
252
253 /*--------------------------------------------------------------------------
254 UFSPARSE sparse matrix library
255 */
256
257 /*
258 Whether to provide additional matrix functionality from the UFSPARSE
259 library (CXSparse in particular)
260 */
261 #ifndef ASC_WITH_UFSPARSE
262 /* #define ASC_WITH_UFSPARSE @ASC_WITH_UFSPARSE@ */
263 #endif
264
265 /*--------------------------------------------------------------------------
266 ENV VAR
267 */
268
269 /*
270 The following are the environment variables ASCEND requires.
271 If the user does not have the ASC_ENV_DIST set in his or her
272 environment, a default value is set based on the directory where the
273 ascend binary lives. The other environment variables will be set
274 to default values keyed off of ASC_ENV_DIST. See the function
275 CheckEnvironmentVars later in this file for the details.
276 */
277 #define ASC_ENV_DIST "ASCENDDIST"
278 #define ASC_ENV_TK "ASCENDTK"
279 #define ASC_ENV_BITMAPS "ASCENDBITMAPS"
280 #define ASC_ENV_LIBRARY "ASCENDLIBRARY"
281
282 /**
283 The name of the environment variable containing a list' of paths
284 to search when trying to open a module. The list is in the style
285 of the native OS: colon-separated on UNIX and semicolon separated
286 under Windows.
287 */
288 #define ASC_ENV_SOLVERS "ASCENDSOLVERS"
289
290 /*
291 default values of the ASCENDLIBRARY and ASCENDSOLVERS variables
292 that are used if the vars aren't present in the environment.
293 */
294 #define ASC_DEFAULT_ASCENDLIBRARY "@DEFAULT_ASCENDLIBRARY@"
295 #define ASC_DEFAULT_ASCENDSOLVERS "@DEFAULT_ASCENDSOLVERS@"
296
297
298 #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22