/[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 2354 - (show annotations) (download)
Sat Jan 8 12:13:27 2011 UTC (9 years, 7 months ago) by jpye
File size: 10764 byte(s)
Working on detection of Lex 'yylex_destroy' capability.
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 Size of some data types on the present platform, determined by SCons at
29 compile time...
30
31 Ben: The following bits of stuff could be rationalized when we are ready
32 to require a conformant c99 compiler with intptr_t support. unfortunately,
33 it is for some reason optional in 7.18.1.4 of iso C TC2 2005 draft to have
34 intptr_t.
35 */
36 #define SIZEOF_VOID_P @SIZEOF_VOID_P@
37 #define SIZEOF_INT @SIZEOF_INT@
38 #define SIZEOF_LONG @SIZEOF_LONG@
39 #define SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
40
41 /* now typedef some stuff based on these... */
42
43 #if ( SIZEOF_VOID_P == SIZEOF_INT )
44 typedef int GLint; /**< int fits in gl_lists exactly */
45 typedef unsigned int UGLint; /**< uint fits in gl_lists exactly */
46 #define GL_INT_MAX INT_MAX
47 #elif (SIZEOF_VOID_P == SIZEOF_LONG )
48 typedef long GLint; /**< int fits in gl_lists exactly */
49 typedef unsigned long UGLint; /**< int fits in gl_lists exactly */
50 #define GL_INT_MAX LONG_MAX
51 #elif ( SIZEOF_VOID_P == SIZEOF_LONG_LONG )
52 typedef long long GLint; /**< int fits in gl_lists exactly */
53 typedef unsigned long long UGLint; /**< int fits in gl_lists exactly */
54 #define GL_INT_MAX LLONG_MAX
55 #else
56 typedef int GLint; /**< warnings may result, but should all be safe if void* is bigger than int. */
57 typedef unsigned int UGLint;
58 #endif
59
60
61 /**
62 Turn off the use of signals completely if you want. Signals are used to
63 interrupt solvers, catch floating point errors (but check that you have the
64 C99 FPE behaviour working correctly if this applied) and also to catch
65 segmentation faults (no sure how well that's implemented.
66
67 Concerns over strange behaviour in mixed-language environments such as
68 Python and/or Tcl make avoiding use of traps often quite a good idea.
69 */
70 #ifndef ASC_SIGNAL_TRAPS
71 /* #define ASC_SIGNAL_TRAPS @ASC_SIGNAL_TRAPS@ */
72 #endif
73
74 /**
75 If signal handlers (<signal.h>) on this platform need to be reset after
76 each 'catch', the ASC_RESETNEEDED macro should be set true.
77 */
78 #ifndef ASC_RESETNEEDED
79 /* #define ASC_RESETNEEDED @ASC_RESETNEEDED@ */
80 #endif
81
82 /**
83 If we have C99 FPE (floating point error) routines available on this
84 platform/compiler.
85 */
86 #ifndef HAVE_C99FPE
87 /* #define HAVE_C99FPE @HAVE_C99FPE@ */
88 #endif
89
90 /**
91 If we have IEEE math library include 'isnan' etc.
92 */
93 #ifndef HAVE_IEEE
94 /* #define HAVE_IEEE @HAVE_IEEE@ */
95 #endif
96
97 /**
98 Prefix for 'external libraries' loaded using the 'extlib' importhandler
99 */
100 #define ASC_EXTLIBPREFIX "@EXTLIB_PREFIX@"
101
102 /**
103 Suffix for shared libraries
104 */
105 #define ASC_EXTLIBSUFFIX "@EXTLIB_SUFFIX@"
106
107 /**
108 Prefix and suffix for standard system libraries on this platform
109 */
110 #define ASC_SHLIBPREFIX "@SHLIBPREFIX@"
111 #define ASC_SHLIBSUFFIX "@SHLIBSUFFIX@"
112
113 /*
114 FIXME changes are being made to streamline the following...
115
116 This variable determines how ASCEND goes about finding all its stuff at runtime,
117 assuming the ASCENDDIST environment variable is *not* present.
118
119 ASCENDDIST is where Python, Tcl/Tk and model scripts, as well as graphics etc are
120 kept in the filesystem. Normally it is expected that ASCEND should be able to
121 know or work out this location itself.
122
123 If ASC_ABSOLUTE_PATHS is defined, ASCEND will used a fixed absolute path to locate
124 its data files. This is the standard Red Hat and Debian system, in which
125 binaries are typically located in /usr/bin but related non-exe files are located
126 in /usr/share/appname/. See ASC_DATADIR in this case.
127
128 If not defined, ASCEND will locate its data files using a relative path based on
129 the location of the running executable. See ASC_DISTDIR_REL_BIN. This is the
130 'application folder' style made popular on early Macs, and also favoured by CMU.
131
132 For a discussion of this, see
133 http://linux.slashdot.org/article.pl?sid=04/04/03/174249
134
135 At present, the only place this has any effect is in the Tcl/Tk
136 interface, in Driver.c's choices for default values of non-specified
137 environment variables. @TODO migrate this to Python as well.
138
139 SCons will uncomment the #define line if required.
140 Doing it this (hacky) way so as not to mess up autoconf.
141
142 Note: do not use ASC_ABSOLUTE_PATHS on Windows. Absolute paths mess up the
143 ability of the installer to relocate files at install-time.
144
145 For Tcl/Tk the following #defines can be needed:
146 ASCENDDIST_DEFAULT
147 ASCENDTK_DEFAULT
148 ASCENDLIBRARY_DEFAULT
149 ASCENDSOLVERS_DEFAULT
150
151 ASC_ABSOLUTE_PATHS
152 ASC_DIST_REL_BIN
153 ASC_TK_REL_DIST
154 ASC_LIBRARY_REL_DIST
155 ASC_SOLVERS_REL_DIST
156
157 Then, using these, in the case of relative paths, we choose:
158
159 ASCENDROOT = $PROGDIR/@ASC_DIST_REL_BIN@
160 ASCENDTK = $ASCENDROOT/@ASC_TK_REL_DIST@
161 ASCENDLIBRARY = $ASCENDROOT/@ASC_LIBRARY_REL_DIST@
162 ASCENDSOLVERS = $ASCENDROOT/@ASC_SOLVERS_ROL_DIST@
163 */
164 #define ASC_ABSOLUTE_PATHS @ASC_ABSOLUTE_PATHS@
165 #if ASC_ABSOLUTE_PATHS
166 # define ASCENDDIST_DEFAULT "@ASCENDDIST_DEFAULT@"
167 # define ASCENDTK_DEFAULT "@ASCENDTK_DEFAULT@"
168 # define ASCENDLIBRARY_DEFAULT "@ASCENDLIBRARY_DEFAULT@"
169 # define ASCENDSOLVERS_DEFAULT "@ASCENDSOLVERS_DEFAULT@"
170 #else
171 # define ASC_DIST_REL_BIN "@ASC_DIST_REL_BIN@"
172 # define ASC_TK_REL_DIST "@ASC_TK_REL_DIST@"
173 # define ASC_LIBRARY_REL_DIST "@ASC_LIBRARY_REL_DIST@"
174 # define ASC_SOLVERS_REL_DIST "@ASC_SOLVERS_REL_DIST@"
175 #endif
176
177 /*
178 Whether to use xterm colours when writing 'error.h' output, eg
179 'ERROR' in red, etc. If not defined, colour will never be used.
180 If defined, colour will be used any time the the TERM environment
181 variable is set to 'xterm' or 'msys'. MSYS uses the 'rxvt' console,
182 which knows about xterm colour codes.
183
184 SCons will uncomment the #define line if required.
185 Doing it this (hacky) way so as not to mess up autoconf.
186 */
187 #ifndef ASC_XTERM_COLORS
188 /* #define ASC_XTERM_COLORS @ASC_XTERM_COLORS@ */
189 #endif
190
191 /*
192 Whether to do use testing malloc. Required for some of the CUnit
193 tests to work fully.
194
195 SCons will uncomment the #define line if required.
196 Doing it this (hacky) way so as not to mess up autoconf.
197 */
198 #ifndef MALLOC_DEBUG
199 /* #define MALLOC_DEBUG @MALLOC_DEBUG@ */
200 #endif
201
202 /*
203 Whether the dmalloc library was detected. Should permit much reduced
204 complexity in ascMalloc.c, hopefully.
205
206 SCons will uncomment the #define line if required.
207 Doing it this (hacky) way so as not to mess up autoconf.
208 */
209 #ifndef ASC_WITH_DMALLOC
210 /* #define ASC_WITH_DMALLOC @ASC_WITH_DMALLOC@ */
211 #endif
212
213 /*-----------------------------------------------------------------------
214 IDA
215 */
216
217 /*
218 Whether to compile with support for the IDA DAE solver.
219
220 Note that this option is automatically configured based on the value of
221 WITH_SOLVERS in the SCons options.
222
223 SCons will uncomment the #define line if required.
224 Doing it this (hacky) way so as not to mess up autoconf.
225 */
226 #ifndef ASC_WITH_IDA
227 /* #define ASC_WITH_IDA @ASC_WITH_IDA@ */
228 #endif
229
230 /*-----------------------------------------------------------------------
231 TRON
232 */
233
234 /*
235 This is the name of the TRON .so or DLL. On Windows
236 it's called 'copopt3' but on linux it seems to be called
237 'consub3.so'.
238 */
239 #define ASC_TRON_LIB "@ASC_TRON_LIB@"
240
241 /*
242 This is the name of the optional environment variable which will
243 be used for the value of the searchpath for the TRON DLL/SO.
244 */
245 #define ASC_TRON_ENVVAR "@ASC_TRON_ENVVAR@"
246
247 /*
248 This is the default *fallback* searchpath that will be used when hunting
249 for TRON at runtime
250
251 Searchpath for TRON DLL/SO. This is in platform-specific
252 form (paths with ';' separator in Windows, ':' separator on Linux).
253 */
254 #define ASC_TRON_DLPATH "@ASC_TRON_DLPATH@"
255
256 /*-------------------------------------------------------------------------
257 LSODE
258 */
259
260 /*
261 Whether to compile with support for the LSODE integration engine.
262 Note that you will usually need to manually specify the location of your
263 'libg2c.a' in the link step, see F2C_* Scons options.
264
265 Note that this option is automatically configured based on the value of
266 WITH_SOLVERS in the SCons options.
267
268 SCons will uncomment the #define line if required.
269 Doing it this (hacky) way so as not to mess up autoconf.
270 */
271 #ifndef ASC_WITH_LSODE
272 /* #define ASC_WITH_LSODE @ASC_WITH_LSODE@ */
273 #endif
274
275 /*--------------------------------------------------------------------------
276 MATRIX MARKET EXPORT
277 */
278
279 /*
280 Whether to provide export functions using the Matrix Market format
281 (from Integrator, perhaps elsewhere)
282 */
283 #ifndef ASC_WITH_MMIO
284 /* #define ASC_WITH_MMIO @ASC_WITH_MMIO@ */
285 #endif
286
287 /*--------------------------------------------------------------------------
288 UFSPARSE sparse matrix library
289 */
290
291 /*
292 Whether to provide additional matrix functionality from the UFSPARSE
293 library (CXSparse in particular)
294 */
295 #ifndef ASC_WITH_UFSPARSE
296 /* #define ASC_WITH_UFSPARSE @ASC_WITH_UFSPARSE@ */
297 #endif
298
299 /*--------------------------------------------------------------------------
300 ENV VAR
301 */
302
303 /*
304 The following are the environment variables ASCEND requires.
305 If the user does not have the ASC_ENV_DIST set in his or her
306 environment, a default value is set based on the directory where the
307 ascend binary lives. The other environment variables will be set
308 to default values keyed off of ASC_ENV_DIST. See the function
309 CheckEnvironmentVars later in this file for the details.
310 */
311 #define ASC_ENV_DIST "ASCENDDIST"
312 #define ASC_ENV_TK "ASCENDTK"
313 #define ASC_ENV_BITMAPS "ASCENDBITMAPS"
314 #define ASC_ENV_LIBRARY "ASCENDLIBRARY"
315
316 /**
317 The name of the environment variable containing a list' of paths
318 to search when trying to open a module. The list is in the style
319 of the native OS: colon-separated on UNIX and semicolon separated
320 under Windows.
321 */
322 #define ASC_ENV_SOLVERS "ASCENDSOLVERS"
323
324 /*
325 default values of the ASCENDLIBRARY and ASCENDSOLVERS variables
326 that are used if the vars aren't present in the environment.
327 */
328 #define ASC_DEFAULT_ASCENDLIBRARY "@DEFAULT_ASCENDLIBRARY@"
329 #define ASC_DEFAULT_ASCENDSOLVERS "@DEFAULT_ASCENDSOLVERS@"
330
331 /*------------------------------------------------------------------------------
332 LEX
333 */
334
335 #ifndef ASC_HAVE_LEXDESTROY
336 /* #define ASC_HAVE_LEXDESTROY @ASC_HAVE_LEXDESTROY@ */
337 #endif
338
339 #endif

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