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

Contents of /trunk/base/generic/utilities/config.h.in

Parent Directory Parent Directory | Revision Log Revision Log


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

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