tclPkgConfig.c

Go to the documentation of this file.
00001 /*
00002  * tclPkgConfig.c --
00003  *
00004  *      This file contains the configuration information to embed into the tcl
00005  *      binary library.
00006  *
00007  * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
00008  *
00009  * See the file "license.terms" for information on usage and redistribution of
00010  * this file, and for a DISCLAIMER OF ALL WARRANTIES.
00011  *
00012  * RCS: @(#) $Id: tclPkgConfig.c,v 1.4 2005/11/07 15:14:09 dkf Exp $
00013  */
00014 
00015 /* Note, the definitions in this module are influenced by the following C
00016  * preprocessor macros:
00017  *
00018  * OSCMa  = shortcut for "old style configuration macro activates"
00019  * NSCMdt = shortcut for "new style configuration macro declares that"
00020  *
00021  * - TCL_THREADS                OSCMa compilation as threaded core.
00022  * - TCL_MEM_DEBUG              OSCMa memory debugging.
00023  * - TCL_COMPILE_DEBUG          OSCMa debugging of bytecode compiler.
00024  * - TCL_COMPILE_STATS          OSCMa bytecode compiler statistics.
00025  *
00026  * - TCL_CFG_DO64BIT            NSCMdt tcl is compiled for a 64bit system.
00027  * - TCL_CFG_DEBUG              NSCMdt tcl is compiled with symbol info on.
00028  * - TCL_CFG_OPTIMIZED          NSCMdt tcl is compiled with cc optimizations on
00029  * - TCL_CFG_PROFILED           NSCMdt tcl is compiled with profiling info.
00030  *
00031  * - CFG_RUNTIME_*              Paths to various stuff at runtime.
00032  * - CFG_INSTALL_*              Paths to various stuff at installation time.
00033  *
00034  * - TCL_CFGVAL_ENCODING        string containing the encoding used for the
00035  *                              configuration values.
00036  */
00037 
00038 #include "tclInt.h"
00039 
00040 /*
00041  * Use C preprocessor statements to define the various values for the embedded
00042  * configuration information.
00043  */
00044 
00045 #ifdef TCL_THREADS
00046 #  define  CFG_THREADED         "1"
00047 #else
00048 #  define  CFG_THREADED         "0"
00049 #endif
00050 
00051 #ifdef TCL_MEM_DEBUG
00052 #  define CFG_MEMDEBUG          "1"
00053 #else
00054 #  define CFG_MEMDEBUG          "0"
00055 #endif
00056 
00057 #ifdef TCL_COMPILE_DEBUG
00058 #  define CFG_COMPILE_DEBUG     "1"
00059 #else
00060 #  define CFG_COMPILE_DEBUG     "0"
00061 #endif
00062 
00063 #ifdef TCL_COMPILE_STATS
00064 #  define CFG_COMPILE_STATS     "1"
00065 #else
00066 #  define CFG_COMPILE_STATS     "0"
00067 #endif
00068 
00069 #ifdef TCL_CFG_DO64BIT
00070 #  define CFG_64                "1"
00071 #else
00072 #  define CFG_64                "0"
00073 #endif
00074 
00075 #ifdef TCL_CFG_DEBUG
00076 #  define CFG_DEBUG             "1"
00077 #else
00078 #  define CFG_DEBUG             "0"
00079 #endif
00080 
00081 #ifdef TCL_CFG_OPTIMIZED
00082 #  define CFG_OPTIMIZED         "1"
00083 #else
00084 #  define CFG_OPTIMIZED         "0"
00085 #endif
00086 
00087 #ifdef TCL_CFG_PROFILED
00088 #  define CFG_PROFILED          "1"
00089 #else
00090 #  define CFG_PROFILED          "0"
00091 #endif
00092 
00093 static Tcl_Config cfg[] = {
00094     {"debug",                   CFG_DEBUG},
00095     {"threaded",                CFG_THREADED},
00096     {"profiled",                CFG_PROFILED},
00097     {"64bit",                   CFG_64},
00098     {"optimized",               CFG_OPTIMIZED},
00099     {"mem_debug",               CFG_MEMDEBUG},
00100     {"compile_debug",           CFG_COMPILE_DEBUG},
00101     {"compile_stats",           CFG_COMPILE_STATS},
00102 
00103     /* Runtime paths to various stuff */
00104 
00105     {"libdir,runtime",          CFG_RUNTIME_LIBDIR},
00106     {"bindir,runtime",          CFG_RUNTIME_BINDIR},
00107     {"scriptdir,runtime",       CFG_RUNTIME_SCRDIR},
00108     {"includedir,runtime",      CFG_RUNTIME_INCDIR},
00109     {"docdir,runtime",          CFG_RUNTIME_DOCDIR},
00110 
00111     /* Installation paths to various stuff */
00112 
00113     {"libdir,install",          CFG_INSTALL_LIBDIR},
00114     {"bindir,install",          CFG_INSTALL_BINDIR},
00115     {"scriptdir,install",       CFG_INSTALL_SCRDIR},
00116     {"includedir,install",      CFG_INSTALL_INCDIR},
00117     {"docdir,install",          CFG_INSTALL_DOCDIR},
00118 
00119     /* Last entry, closes the array */
00120     {NULL, NULL}
00121 };
00122 
00123 void
00124 TclInitEmbeddedConfigurationInformation(
00125     Tcl_Interp* interp)         /* Interpreter the configuration command is
00126                                  * registered in. */
00127 {
00128     Tcl_RegisterConfig(interp, "tcl", cfg, TCL_CFGVAL_ENCODING);
00129 }
00130 
00131 /*
00132  * Local Variables:
00133  * mode: c
00134  * c-basic-offset: 4
00135  * fill-column: 78
00136  * End:
00137  */



Generated on Wed Mar 12 12:18:20 2008 by  doxygen 1.5.1