Version 15 of Converting your Tcl extension to TEA2

Updated 2003-07-03 15:19:27

Purpose:

Provide a developer with tips, suggestions and warnings regarding implementing a Tcl extension using the TEA 2000 guidelines.


Why bother?

See the TEA philosophy [L1 ].


Where is TEA2 documented?

See link above.


What needs to be done to move a TEA1 extension to TEA2?

The easiest thing to do is compare your current extension with the sampleextension, as the differences are not major. SC_ macros are now all TEA_, and you should actually be able to remove code from your configure.in and Makefile.in.


What needs to be done to move a non-TEA extension to TEA2?

That really depends on what you start with, but TEA2 isn't so complex that looking at the sample shouldn't be mostly (if not fully) self-explanatory. There is a wealth of TEA2 extensions out there (sampleextension, tktable, itcl, tkdnd, tclx, expect, ...) which handle just about every possible build case.


What tools are available to help with TEA2?

In a c.l.t. posting [L2 ] Donal Fellows mentioned teapot [L3 ], the TEA extension help mate a script helping to create the configure.in , aclocal.m4 and Makefile.in for a TEA2 compliant extension.

DKF - Good. Someone noticed... :^)


What do you do when TEA2 changes or is fixed? Can you update your extension automatically?

Usually all that is required is simply copying the updated tclconfig/tcl.m4 (which is really all the macros in TEA2) and rerunning autoconf for your project.


On what platforms can one use TEA2 - does it work on MacOS, MacOS X, VMS, Unix, Microsoft Windows, etc.?

All modern platforms are supported. This does not include VMS or MacOS 8/9, but TEA2 should correctly support OS X, Unix/Linux, and Windows (including 64-bit and CE).


Can it build/install into paths containing spaces?

Yes it can, but the paths have to be quoted correctly and some peculiarities may happen. To install in C:/Program Files one has to invoke configure like this:

 ./configure --prefix="C:/Program\ Files"

Configure seems to look for a site script in C:/Program\ which is obviously incorrect, but has no negative consequences if no site script is used.


On Microsoft Windows, does the Mingw 3.x based compilers work with TEA2?

The latest mingw compiler should work with TEA2 on Windows for "regular" Windows platforms. The proper SDKs and Microsoft compilers are required for Windows 64-bit and Windows/CE.


[ Category Porting | ]