TIP #203: Create tclConfig.sh-Equivalent in Tcl

Title:Create tclConfig.sh-Equivalent in Tcl
Version:$Revision: 1.11 $
Authors: Colin McCormack <coldstore at users dot sourceforge dot net>
Don Porter <dgp at users dot sf dot net>
Colin McCormack <colin at sharedtech dot dyndns dot org>
Created:Thursday, 17 June 2004
Discussions To:http://mini.net/tcl/tclConfig.sh
Keywords:configuration, installation


This proposal requires the registration of information about the built process, currently stored in tclConfig.sh, by means of the Tcl_RegisterConfig mechanism set out in [Tip 59].


Packages such as Critcl[1], and indeed anything written in pure tcl which tries to build extensions under Tcl need more introspection to discover the ground rules of construction in the installation in which they find themselves.

In order to facilitate such future build tools, the build information should be made available to Tcl scripts.


Every variable defined in the unix tclConfig.sh should be registered using Tcl_RegisterConfig, with the following exceptions:

Because Windows and other platforms don't have a tclConfig.sh, the following fields are desirable for hand construction: ---- Compilation: * TCL_CC # C compiler to use for compilation.

* TCL_EXTRA_CFLAGS # Extra flags to pass to cc

---- Linking:

---- Stub Support:


How about converting this proposal into a proposal listing the values found in tclConfig.sh and proposing that Tcl should pass those values into Tcl_RegisterConfig during initialization? That would make all the values available to scripts via the ::tcl::pkgconfig command. -- Good idea. Done.

Several of the assigned values in tclConfig.sh contain references to other variables - should these be reproduced verbatim, or evaluated prior to registration? I'm leaning toward verbatim storage: let the people who need the data construct an evaluation which serves their purposes because (a) the form is easy enough to evaluate, as in the parser I threw together [2], (b) there might be information in the verbatim form which needs to be preserved. Comments welcome.


Joe English points out that those parts potentially useful to a pure-tcl builder are not necessarily applicable, since the build and installation machines may/will differ substantially, and that those parts universally applicable are available via some combination of info and ::tcl::pkgconfig. Given this insight, I withdraw this TIP.


This document has been placed in the public domain.

Powered by Tcl[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]

TIP AutoGenerator - written by Donal K. Fellows