Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/generic/tclPkgConfig.c @ 63

Last change on this file since 63 was 25, checked in by landauf, 17 years ago

added tcl to libs

File size: 3.4 KB
Line 
1/*
2 * tclPkgConfig.c --
3 *
4 *      This file contains the configuration information to embed into the tcl
5 *      binary library.
6 *
7 * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
8 *
9 * See the file "license.terms" for information on usage and redistribution of
10 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 *
12 * RCS: @(#) $Id: tclPkgConfig.c,v 1.4 2005/11/07 15:14:09 dkf Exp $
13 */
14
15/* Note, the definitions in this module are influenced by the following C
16 * preprocessor macros:
17 *
18 * OSCMa  = shortcut for "old style configuration macro activates"
19 * NSCMdt = shortcut for "new style configuration macro declares that"
20 *
21 * - TCL_THREADS                OSCMa compilation as threaded core.
22 * - TCL_MEM_DEBUG              OSCMa memory debugging.
23 * - TCL_COMPILE_DEBUG          OSCMa debugging of bytecode compiler.
24 * - TCL_COMPILE_STATS          OSCMa bytecode compiler statistics.
25 *
26 * - TCL_CFG_DO64BIT            NSCMdt tcl is compiled for a 64bit system.
27 * - TCL_CFG_DEBUG              NSCMdt tcl is compiled with symbol info on.
28 * - TCL_CFG_OPTIMIZED          NSCMdt tcl is compiled with cc optimizations on
29 * - TCL_CFG_PROFILED           NSCMdt tcl is compiled with profiling info.
30 *
31 * - CFG_RUNTIME_*              Paths to various stuff at runtime.
32 * - CFG_INSTALL_*              Paths to various stuff at installation time.
33 *
34 * - TCL_CFGVAL_ENCODING        string containing the encoding used for the
35 *                              configuration values.
36 */
37
38#include "tclInt.h"
39
40/*
41 * Use C preprocessor statements to define the various values for the embedded
42 * configuration information.
43 */
44
45#ifdef TCL_THREADS
46#  define  CFG_THREADED         "1"
47#else
48#  define  CFG_THREADED         "0"
49#endif
50
51#ifdef TCL_MEM_DEBUG
52#  define CFG_MEMDEBUG          "1"
53#else
54#  define CFG_MEMDEBUG          "0"
55#endif
56
57#ifdef TCL_COMPILE_DEBUG
58#  define CFG_COMPILE_DEBUG     "1"
59#else
60#  define CFG_COMPILE_DEBUG     "0"
61#endif
62
63#ifdef TCL_COMPILE_STATS
64#  define CFG_COMPILE_STATS     "1"
65#else
66#  define CFG_COMPILE_STATS     "0"
67#endif
68
69#ifdef TCL_CFG_DO64BIT
70#  define CFG_64                "1"
71#else
72#  define CFG_64                "0"
73#endif
74
75#ifdef TCL_CFG_DEBUG
76#  define CFG_DEBUG             "1"
77#else
78#  define CFG_DEBUG             "0"
79#endif
80
81#ifdef TCL_CFG_OPTIMIZED
82#  define CFG_OPTIMIZED         "1"
83#else
84#  define CFG_OPTIMIZED         "0"
85#endif
86
87#ifdef TCL_CFG_PROFILED
88#  define CFG_PROFILED          "1"
89#else
90#  define CFG_PROFILED          "0"
91#endif
92
93static Tcl_Config cfg[] = {
94    {"debug",                   CFG_DEBUG},
95    {"threaded",                CFG_THREADED},
96    {"profiled",                CFG_PROFILED},
97    {"64bit",                   CFG_64},
98    {"optimized",               CFG_OPTIMIZED},
99    {"mem_debug",               CFG_MEMDEBUG},
100    {"compile_debug",           CFG_COMPILE_DEBUG},
101    {"compile_stats",           CFG_COMPILE_STATS},
102
103    /* Runtime paths to various stuff */
104
105    {"libdir,runtime",          CFG_RUNTIME_LIBDIR},
106    {"bindir,runtime",          CFG_RUNTIME_BINDIR},
107    {"scriptdir,runtime",       CFG_RUNTIME_SCRDIR},
108    {"includedir,runtime",      CFG_RUNTIME_INCDIR},
109    {"docdir,runtime",          CFG_RUNTIME_DOCDIR},
110
111    /* Installation paths to various stuff */
112
113    {"libdir,install",          CFG_INSTALL_LIBDIR},
114    {"bindir,install",          CFG_INSTALL_BINDIR},
115    {"scriptdir,install",       CFG_INSTALL_SCRDIR},
116    {"includedir,install",      CFG_INSTALL_INCDIR},
117    {"docdir,install",          CFG_INSTALL_DOCDIR},
118
119    /* Last entry, closes the array */
120    {NULL, NULL}
121};
122
123void
124TclInitEmbeddedConfigurationInformation(
125    Tcl_Interp* interp)         /* Interpreter the configuration command is
126                                 * registered in. */
127{
128    Tcl_RegisterConfig(interp, "tcl", cfg, TCL_CFGVAL_ENCODING);
129}
130
131/*
132 * Local Variables:
133 * mode: c
134 * c-basic-offset: 4
135 * fill-column: 78
136 * End:
137 */
Note: See TracBrowser for help on using the repository browser.