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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 628 - (hide annotations) (download)
Wed May 24 01:45:02 2006 UTC (18 years, 6 months ago) by johnpye
File size: 4021 byte(s)
Fixed up standard paths stuff to use 'INSTALL_ASCDATA' as the place where tcltk/python/models etc
will live. The confusion here came from the fact that I was taking 'INSTALL_SHARE' to be be assumed
to mean 'the location of /usr/share' -- hence the resulting '$INSTALL_SHARE/ascend' that was bothering
Ben. The 'INSTALL_ASCDATA' fixes this, and behaves as he will like, I hope.

Also note that I have switched the default situation in config.h.in to use relative paths by default,
which is the preferred CMU way. SCons builds will default to absolute paths on non-Windows systems.
1 johnpye 596 // This file will be processed by SCons and output as config.h.
2     // Don't edit this file unless it's named 'config.h.in' unless
3     // it doesn't bother you that your changes will be IGNORED!
4 johnpye 542
5 johnpye 596 #ifndef ASC_CONFIG_H
6     #define ASC_CONFIG_H
7    
8     #define ASC_DEFAULTPATH "@DEFAULT_ASCENDLIBRARY@"
9    
10     /*
11 johnpye 628 This variable determines how ASCEND goes about finding all its stuff at runtime,
12     assuming the ASCENDDIST environment variable is *not* present.
13 johnpye 589
14 johnpye 628 ASCENDDIST is where Python, Tcl/Tk and model scripts, as well as graphics etc are
15     kept in the filesystem. Normally it is expected that ASCEND should be able to
16     know or work out this location itself.
17 johnpye 589
18 johnpye 628 If ASC_ABSOLUTE_PATHS is defined, ASCEND will used a fixed absolute path to locate
19     its data files. This is the standard Red Hat and Debian system, in which
20     binaries are typically located in /usr/bin but related non-exe files are located
21     in /usr/share/appname/. See ASC_DATADIR in this case.
22 johnpye 589
23 johnpye 628 If not defined, ASCEND will locate its data files using a relative path based on
24     the location of the running executable. See ASC_DISTDIR_REL_BIN. This is the
25     'application folder' style made popular on early Macs, and also favoured by CMU.
26 johnpye 596
27     For a discussion of this, see
28     http://linux.slashdot.org/article.pl?sid=04/04/03/174249
29    
30     At present, the only place this has any effect is in the Tcl/Tk
31     interface, in Driver.c's choices for default values of non-specified
32 johnpye 628 environment variables. @TODO migrate this to Python as well.
33 johnpye 605
34 johnpye 628 SCons will replace 'ifdef ASC_ABSOLUTE_PATHS' with 'if 1', depending on
35     configuration. It is assumed that Autotools users will be happy to use the
36     relative paths mode.
37    
38     Note: do not use ASC_ABSOLUTE_PATHS on Windows. Absolute paths mess up the
39     ability of the installer to relocate files at install-time.
40 johnpye 596 */
41 johnpye 628 #ifdef ASC_ABSOLUTE_PATHS
42     # define ASC_ABSOLUTE_PATHS
43 johnpye 605 #endif
44 johnpye 596
45     /*
46 johnpye 628 See ASC_ABSOLUTE_PATHS above. ASC_DATADIR is the default value of ASCCENDDIST
47     in the case of ASC_ABSOLUTE_PATHS.
48     */
49     #define ASC_DATADIR "@INSTALL_ASCDATA@"
50 johnpye 594
51 johnpye 628 /*
52     See ASC_ABSOLUTE_PATHS above. In the case of relative paths, ASCENDDIST is
53     derived from ASC_DISTDIR_REL_BIN: this path is suffixed to the name of
54     the directory in which the currently-running executable is located. Depending
55     on how you are installing ASCEND, sensible values are likely to be
56     either '..' or '../share/ascend'.
57    
58     Only applies when ASC_ABSOLUTE_PATHS is *not* defined.
59     */
60     #define ASC_DISTDIR_REL_BIN "@ASC_DISTDIR_REL_BIN@"
61    
62     /*
63     This is the default location of the tcl/tk scripts. Environment
64     variables (dollar sign followed by uppercase letters)
65     will be expanded at runtime, so a good value for example is
66    
67 johnpye 596 $ASCENDDIST/TK
68     */
69 johnpye 589 #define ASC_ENV_TK_DEFAULT "@ASC_ENV_TK_DEFAULT@"
70 johnpye 594
71 johnpye 596
72     /*
73 johnpye 594 Whether to use xterm colours when writing 'error.h' output, eg
74     'ERROR' in red, etc. If not defined, colour will never be used.
75     If defined, colour will be used any time the the TERM environment
76     variable is set to 'xterm' or 'msys'. MSYS uses the 'rxvt' console,
77     which knows about xterm colour codes.
78 johnpye 595
79 johnpye 597 SCons will replace 'ifdef ASC_XTERM_COLORS' with 'if 1' if required.
80     Doing it this (hacky) way so as not to mess up autoconf.
81 johnpye 594 */
82 johnpye 597 #ifdef ASC_XTERM_COLORS
83     # define ASC_XTERM_COLORS
84     #endif
85 johnpye 594
86 johnpye 552 /*
87 johnpye 597 Whether to do use testing malloc. Required for some of the CUnit
88     tests to work fully.
89 johnpye 598
90     SCons will replace 'ifdef MALLOC_DEBUG' with 'if 1' if required.
91     Doing it this (hacky) way so as not to mess up autoconf.
92 johnpye 597 */
93 johnpye 598 #ifdef MALLOC_DEBUG
94 johnpye 597 # define MALLOC_DEBUG
95     #endif
96    
97     /*
98 johnpye 586 The following are the environment variables ASCEND requires.
99     If the user does not have the ASC_ENV_DIST set in his or her
100     environment, a default value is set based on the directory where the
101     ascend binary lives. The other environment variables will be set
102     to default values keyed off of ASC_ENV_DIST. See the function
103     CheckEnvironmentVars later in this file for the details.
104 johnpye 552 */
105 johnpye 586 #define ASC_ENV_DIST "ASCENDDIST"
106     #define ASC_ENV_TK "ASCENDTK"
107     #define ASC_ENV_BITMAPS "ASCENDBITMAPS"
108 johnpye 596 #define ASC_ENV_LIBRARY "ASCENDLIBRARY"
109     #endif

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