The directory and file structure of a TEA package is basically: $exec_prefix / \ lib bin | | PACKAGEx.y (dependent .dll files on Windows) | pkgIndex.tcl (.so|.dll files) The main dynamic (.so or .dll) library file gets installed in the versioned PACKAGE directory, which is OK on all platforms because it will be directly referenced with by 'load' in the pkgIndex.tcl file. Dependent DLL files on Windows must go in the bin directory (or other directory on the user's PATH) in order for them to be found. ---- '''Q:''' What are the steps one needs to take if one has some C and Tcl code that currently can be loaded as a Tcl extension, if they want to restructure the code to be TEA2 compliant? '''A:''' The easiest way is to grab a copy of the sampleextension module from the Tcl CVS repository [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcl/sampleextension/], and edit ''Makefile.in'' and ''configure.in'' according to the instructions therein. You'll also need GNU autoconf (and GNU m4, and perhaps a few other dependencies). Run ''autoconf'' to generate a ''configure'' shell script from ''configure.in'', and distribute it with your package. If you're familiar with autoconf and make, you might want to write your own configure.in and Makefile.in instead -- the sampleextension Makefile imposes some requirements on the directory layout that might not match your current source setup. tcl.m4 -- the file containing the TEA autoconf macros -- is extremely well commented and fairly easy to follow. I can't say the same for the sampleextension Makefile.in, though :-( '''Q:''' How does one determine that a package is TEA2 compliant? '''A:''' Ask [Jeff Hobbs] to try building it. If it works for him, the package is compliant :-) But seriously: To be "TEA compliant" ideally means that you use the latest TEA spec, which is part of the sample extension in cvs in the Tcl SF project. However, it essentially means that your extension will compile with 'configure ; make' on any platform (including Windows), and that these have a standard set of options and targets (like recognizing --with-tcl, --enable-threads, --enable-symbols for configure and install-libraries and install-binaries targets for make). [http://groups.google.com/groups?as_umsgid=3D8F638D.3060806%40ActiveState.com] ---- '''Q:''' What are the recommended tools needed to build a Tcl extension packaged using TEA2? '''A:''' 1. The source for the extension. 1. An appropriately installed C compiler '''Q:''' What are the recommended steps required to build a Tcl extension packaged using TEA2? '''A:''' 1. Download and extract the source code (for the sake of this example, assume the extension is sample_tea2) into a directory . For the sake of the following information, assume the directory structure looks like this: /usr/source /tcl /tk /sample_tea2 /sample_tea2 1. change directory into extension directory (ex. cd sample_tea2) 1. read the README, INSTALL, or other seemingly relevant documentation, to determine whether there are dependencies that need to be met before continuing. ---- See also [TEA]. ---- [[ [Category Porting] | [Category Package] | ]]