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 shared libraries |
65 |
*/ |
66 |
#define ASC_SHLIBPREFIX "@SHLIBPREFIX@" |
67 |
|
68 |
/** |
69 |
Suffix for shared libraries |
70 |
*/ |
71 |
#define ASC_SHLIBSUFFIX "@SHLIBSUFFIX@" |
72 |
|
73 |
/* |
74 |
This variable determines how ASCEND goes about finding all its stuff at runtime, |
75 |
assuming the ASCENDDIST environment variable is *not* present. |
76 |
|
77 |
ASCENDDIST is where Python, Tcl/Tk and model scripts, as well as graphics etc are |
78 |
kept in the filesystem. Normally it is expected that ASCEND should be able to |
79 |
know or work out this location itself. |
80 |
|
81 |
If ASC_ABSOLUTE_PATHS is defined, ASCEND will used a fixed absolute path to locate |
82 |
its data files. This is the standard Red Hat and Debian system, in which |
83 |
binaries are typically located in /usr/bin but related non-exe files are located |
84 |
in /usr/share/appname/. See ASC_DATADIR in this case. |
85 |
|
86 |
If not defined, ASCEND will locate its data files using a relative path based on |
87 |
the location of the running executable. See ASC_DISTDIR_REL_BIN. This is the |
88 |
'application folder' style made popular on early Macs, and also favoured by CMU. |
89 |
|
90 |
For a discussion of this, see |
91 |
http://linux.slashdot.org/article.pl?sid=04/04/03/174249 |
92 |
|
93 |
At present, the only place this has any effect is in the Tcl/Tk |
94 |
interface, in Driver.c's choices for default values of non-specified |
95 |
environment variables. @TODO migrate this to Python as well. |
96 |
|
97 |
SCons will uncomment the #define line if required. |
98 |
Doing it this (hacky) way so as not to mess up autoconf. |
99 |
|
100 |
Note: do not use ASC_ABSOLUTE_PATHS on Windows. Absolute paths mess up the |
101 |
ability of the installer to relocate files at install-time. |
102 |
*/ |
103 |
#ifndef ASC_ABSOLUTE_PATHS |
104 |
/* #define ASC_ABSOLUTE_PATHS @ASC_ABSOLUTE_PATHS@ */ |
105 |
#endif |
106 |
|
107 |
/* |
108 |
See ASC_ABSOLUTE_PATHS above. ASC_DATADIR is the default value of ASCCENDDIST |
109 |
in the case of ASC_ABSOLUTE_PATHS. |
110 |
*/ |
111 |
#define ASC_DATADIR "@INSTALL_ASCDATA@" |
112 |
|
113 |
/* |
114 |
See ASC_ABSOLUTE_PATHS above. In the case of relative paths, ASCENDDIST is |
115 |
derived from ASC_DISTDIR_REL_BIN: this path is suffixed to the name of |
116 |
the directory in which the currently-running executable is located. Depending |
117 |
on how you are installing ASCEND, sensible values are likely to be |
118 |
either '..' or '../share/ascend'. |
119 |
|
120 |
Only applies when ASC_ABSOLUTE_PATHS is *not* defined. |
121 |
*/ |
122 |
#define ASC_DISTDIR_REL_BIN "@ASC_DISTDIR_REL_BIN@" |
123 |
|
124 |
/* |
125 |
This is the default location of the tcl/tk scripts. Environment |
126 |
variables (dollar sign followed by uppercase letters) |
127 |
will be expanded at runtime, so a good value for example is |
128 |
|
129 |
$ASCENDDIST/TK |
130 |
*/ |
131 |
#define ASC_ENV_TK_DEFAULT "@ASC_ENV_TK_DEFAULT@" |
132 |
|
133 |
|
134 |
/* |
135 |
Whether to use xterm colours when writing 'error.h' output, eg |
136 |
'ERROR' in red, etc. If not defined, colour will never be used. |
137 |
If defined, colour will be used any time the the TERM environment |
138 |
variable is set to 'xterm' or 'msys'. MSYS uses the 'rxvt' console, |
139 |
which knows about xterm colour codes. |
140 |
|
141 |
SCons will uncomment the #define line if required. |
142 |
Doing it this (hacky) way so as not to mess up autoconf. |
143 |
*/ |
144 |
#ifndef ASC_XTERM_COLORS |
145 |
/* #define ASC_XTERM_COLORS @ASC_XTERM_COLORS@ */ |
146 |
#endif |
147 |
|
148 |
/* |
149 |
Whether to do use testing malloc. Required for some of the CUnit |
150 |
tests to work fully. |
151 |
|
152 |
SCons will uncomment the #define line if required. |
153 |
Doing it this (hacky) way so as not to mess up autoconf. |
154 |
*/ |
155 |
#ifndef MALLOC_DEBUG |
156 |
/* #define MALLOC_DEBUG @MALLOC_DEBUG@ */ |
157 |
#endif |
158 |
|
159 |
/* |
160 |
Whether the dmalloc library was detected. Should permit much reduced |
161 |
complexity in ascMalloc.c, hopefully. |
162 |
|
163 |
SCons will uncomment the #define line if required. |
164 |
Doing it this (hacky) way so as not to mess up autoconf. |
165 |
*/ |
166 |
#ifndef ASC_WITH_DMALLOC |
167 |
/* #define ASC_WITH_DMALLOC @ASC_WITH_DMALLOC@ */ |
168 |
#endif |
169 |
|
170 |
/*----------------------------------------------------------------------- |
171 |
IDA |
172 |
*/ |
173 |
|
174 |
/* |
175 |
Whether to compile with support for the IDA DAE solver. |
176 |
|
177 |
Note that this option is automatically configured based on the value of |
178 |
WITH_SOLVERS in the SCons options. |
179 |
|
180 |
SCons will uncomment the #define line if required. |
181 |
Doing it this (hacky) way so as not to mess up autoconf. |
182 |
*/ |
183 |
#ifndef ASC_WITH_IDA |
184 |
/* #define ASC_WITH_IDA @ASC_WITH_IDA@ */ |
185 |
#endif |
186 |
|
187 |
/*----------------------------------------------------------------------- |
188 |
CONOPT |
189 |
*/ |
190 |
|
191 |
/* |
192 |
Whether to compile with support for the CONOPT solver. |
193 |
|
194 |
Note that this option is automatically configured based on the value of |
195 |
WITH_SOLVERS in the SCons options. |
196 |
|
197 |
SCons will uncomment the #define line if required. |
198 |
Doing it this (hacky) way so as not to mess up autoconf. |
199 |
*/ |
200 |
#ifndef ASC_WITH_CONOPT |
201 |
/* #define ASC_WITH_CONOPT @ASC_WITH_CONOPT@ */ |
202 |
#endif |
203 |
|
204 |
/* |
205 |
This is the name of the CONOPT .so or DLL. On Windows |
206 |
it's called 'copopt3' but on linux it seems to be called |
207 |
'consub3.so'. |
208 |
*/ |
209 |
#define ASC_CONOPT_LIB "@ASC_CONOPT_LIB@" |
210 |
|
211 |
/* |
212 |
This is the name of the optional environment variable which will |
213 |
be used for the value of the searchpath for the CONOPT DLL/SO. |
214 |
*/ |
215 |
#define ASC_CONOPT_ENVVAR "@ASC_CONOPT_ENVVAR@" |
216 |
|
217 |
/* |
218 |
This is the default *fallback* searchpath that will be used when hunting |
219 |
for CONOPT at runtime |
220 |
|
221 |
Searchpath for CONOPT DLL/SO. This is in platform-specific |
222 |
form (paths with ';' separator in Windows, ':' separator on Linux). |
223 |
*/ |
224 |
#define ASC_CONOPT_DLPATH "@ASC_CONOPT_DLPATH@" |
225 |
|
226 |
/*----------------------------------------------------------------------- |
227 |
TRON |
228 |
*/ |
229 |
|
230 |
/* |
231 |
This is the name of the TRON .so or DLL. On Windows |
232 |
it's called 'copopt3' but on linux it seems to be called |
233 |
'consub3.so'. |
234 |
*/ |
235 |
#define ASC_TRON_LIB "@ASC_TRON_LIB@" |
236 |
|
237 |
/* |
238 |
This is the name of the optional environment variable which will |
239 |
be used for the value of the searchpath for the TRON DLL/SO. |
240 |
*/ |
241 |
#define ASC_TRON_ENVVAR "@ASC_TRON_ENVVAR@" |
242 |
|
243 |
/* |
244 |
This is the default *fallback* searchpath that will be used when hunting |
245 |
for TRON at runtime |
246 |
|
247 |
Searchpath for TRON DLL/SO. This is in platform-specific |
248 |
form (paths with ';' separator in Windows, ':' separator on Linux). |
249 |
*/ |
250 |
#define ASC_TRON_DLPATH "@ASC_TRON_DLPATH@" |
251 |
|
252 |
/*------------------------------------------------------------------------- |
253 |
LSODE |
254 |
*/ |
255 |
|
256 |
/* |
257 |
Whether to compile with support for the LSODE integration engine. |
258 |
Note that you will usually need to manually specify the location of your |
259 |
'libg2c.a' in the link step, see F2C_* Scons options. |
260 |
|
261 |
Note that this option is automatically configured based on the value of |
262 |
WITH_SOLVERS in the SCons options. |
263 |
|
264 |
SCons will uncomment the #define line if required. |
265 |
Doing it this (hacky) way so as not to mess up autoconf. |
266 |
*/ |
267 |
#ifndef ASC_WITH_LSODE |
268 |
/* #define ASC_WITH_LSODE @ASC_WITH_LSODE@ */ |
269 |
#endif |
270 |
|
271 |
/*-------------------------------------------------------------------------- |
272 |
MATRIX MARKET EXPORT |
273 |
*/ |
274 |
|
275 |
/* |
276 |
Whether to provide export functions using the Matrix Market format |
277 |
(from Integrator, perhaps elsewhere) |
278 |
*/ |
279 |
#ifndef ASC_WITH_MMIO |
280 |
/* #define ASC_WITH_MMIO @ASC_WITH_MMIO@ */ |
281 |
#endif |
282 |
|
283 |
/*-------------------------------------------------------------------------- |
284 |
UFSPARSE sparse matrix library |
285 |
*/ |
286 |
|
287 |
/* |
288 |
Whether to provide additional matrix functionality from the UFSPARSE |
289 |
library (CXSparse in particular) |
290 |
*/ |
291 |
#ifndef ASC_WITH_UFSPARSE |
292 |
/* #define ASC_WITH_UFSPARSE @ASC_WITH_UFSPARSE@ */ |
293 |
#endif |
294 |
|
295 |
/*-------------------------------------------------------------------------- |
296 |
ENV VAR |
297 |
*/ |
298 |
|
299 |
/* |
300 |
The following are the environment variables ASCEND requires. |
301 |
If the user does not have the ASC_ENV_DIST set in his or her |
302 |
environment, a default value is set based on the directory where the |
303 |
ascend binary lives. The other environment variables will be set |
304 |
to default values keyed off of ASC_ENV_DIST. See the function |
305 |
CheckEnvironmentVars later in this file for the details. |
306 |
*/ |
307 |
#define ASC_ENV_DIST "ASCENDDIST" |
308 |
#define ASC_ENV_TK "ASCENDTK" |
309 |
#define ASC_ENV_BITMAPS "ASCENDBITMAPS" |
310 |
#define ASC_ENV_LIBRARY "ASCENDLIBRARY" |
311 |
|
312 |
/** |
313 |
The name of the environment variable containing a list' of paths |
314 |
to search when trying to open a module. The list is in the style |
315 |
of the native OS: colon-separated on UNIX and semicolon separated |
316 |
under Windows. |
317 |
*/ |
318 |
#define ASC_ENV_SOLVERS "ASCENDSOLVERS" |
319 |
|
320 |
/* |
321 |
default values of the ASCENDLIBRARY and ASCENDSOLVERS variables |
322 |
that are used if the vars aren't present in the environment. |
323 |
*/ |
324 |
#define ASC_DEFAULT_ASCENDLIBRARY "@DEFAULT_ASCENDLIBRARY@" |
325 |
#define ASC_DEFAULT_ASCENDSOLVERS "@DEFAULT_ASCENDSOLVERS@" |
326 |
|
327 |
|
328 |
#endif |