| [25] | 1 | Tcl UNIX README | 
|---|
 | 2 | --------------- | 
|---|
 | 3 |  | 
|---|
 | 4 | RCS: @(#) $Id: README,v 1.31 2008/02/12 10:07:19 dkf Exp $ | 
|---|
 | 5 |  | 
|---|
 | 6 | This is the directory where you configure, compile, test, and install UNIX | 
|---|
 | 7 | versions of Tcl. This directory also contains source files for Tcl that are | 
|---|
 | 8 | specific to UNIX. Some of the files in this directory are used on the PC or | 
|---|
 | 9 | MacOSX platform too, but they all depend on UNIX (POSIX/ANSI C) interfaces and | 
|---|
 | 10 | some of them only make sense under UNIX. | 
|---|
 | 11 |  | 
|---|
 | 12 | Updated forms of the information found in this file is available at: | 
|---|
 | 13 |         http://www.tcl.tk/doc/howto/compile.html#unix | 
|---|
 | 14 |  | 
|---|
 | 15 | For information on platforms where Tcl is known to compile, along with any | 
|---|
 | 16 | porting notes for getting it to work on those platforms, see: | 
|---|
 | 17 |         http://www.tcl.tk/software/tcltk/platforms.html | 
|---|
 | 18 |  | 
|---|
 | 19 | The rest of this file contains instructions on how to do this. The release | 
|---|
 | 20 | should compile and run either "out of the box" or with trivial changes on any | 
|---|
 | 21 | UNIX-like system that approximates POSIX, BSD, or System V. We know that it | 
|---|
 | 22 | runs on workstations from Sun, H-P, DEC, IBM, and SGI, as well as PCs running | 
|---|
 | 23 | Linux, BSDI, and SCO UNIX. To compile for a PC running Windows, see the README | 
|---|
 | 24 | file in the directory ../win. To compile for MacOSX, see the README file in | 
|---|
 | 25 | the directory ../macosx. | 
|---|
 | 26 |  | 
|---|
 | 27 | How To Compile And Install Tcl: | 
|---|
 | 28 | ------------------------------- | 
|---|
 | 29 |  | 
|---|
 | 30 | (a) If you have already compiled Tcl once in this directory and are now | 
|---|
 | 31 |     preparing to compile again in the same directory but for a different | 
|---|
 | 32 |     platform, or if you have applied patches, type "make distclean" to discard | 
|---|
 | 33 |     all the configuration information computed previously. | 
|---|
 | 34 |  | 
|---|
 | 35 | (b) If you need to reconfigure because you changed any of the .in or .m4 | 
|---|
 | 36 |     files, you will need to run autoconf to create a new ./configure script. | 
|---|
 | 37 |     Most users will NOT need to do this since a configure script is already | 
|---|
 | 38 |     provided. | 
|---|
 | 39 |  | 
|---|
 | 40 |     (in the tcl/unix directory) | 
|---|
 | 41 |     autoconf | 
|---|
 | 42 |  | 
|---|
 | 43 | (c) Type "./configure". This runs a configuration script created by GNU | 
|---|
 | 44 |     autoconf, which configures Tcl for your system and creates a Makefile. The | 
|---|
 | 45 |     configure script allows you to customize the Tcl configuration for your | 
|---|
 | 46 |     site; for details on how you can do this, type "./configure --help" or | 
|---|
 | 47 |     refer to the autoconf documentation (not included here). Tcl's "configure" | 
|---|
 | 48 |     supports the following special switches in addition to the standard ones: | 
|---|
 | 49 |  | 
|---|
 | 50 |         --enable-threads        If this switch is set, Tcl will compile itself | 
|---|
 | 51 |                                 with multithreading support. | 
|---|
 | 52 |         --disable-load          If this switch is specified then Tcl will | 
|---|
 | 53 |                                 configure itself not to allow dynamic loading, | 
|---|
 | 54 |                                 even if your system appears to support it. | 
|---|
 | 55 |                                 Normally you can leave this switch out and Tcl | 
|---|
 | 56 |                                 will build itself for dynamic loading if your | 
|---|
 | 57 |                                 system supports it. | 
|---|
 | 58 |         --disable-dll-unloading Disables support for the [unload] command even | 
|---|
 | 59 |                                 on platforms that can support it. Meaningless | 
|---|
 | 60 |                                 when Tcl is compiled with --disable-load. | 
|---|
 | 61 |         --enable-shared         If this switch is specified, Tcl will compile | 
|---|
 | 62 |                                 itself as a shared library if it can figure | 
|---|
 | 63 |                                 out how to do that on this platform. This is | 
|---|
 | 64 |                                 the default on platforms where we know how to | 
|---|
 | 65 |                                 build shared libraries. | 
|---|
 | 66 |         --disable-shared        If this switch is specified, Tcl will compile | 
|---|
 | 67 |                                 itself as a static library. | 
|---|
 | 68 |         --enable-symbols        Build with debugging symbols. By default | 
|---|
 | 69 |                                 standard debugging symbols are used. You can | 
|---|
 | 70 |                                 specify the value "mem" to include | 
|---|
 | 71 |                                 TCL_MEM_DEBUG memory debugging, "compile" to | 
|---|
 | 72 |                                 include TCL_COMPILE_DEBUG debugging, or "all" | 
|---|
 | 73 |                                 to enable all internal debugging. | 
|---|
 | 74 |         --disable-symbols       Build without debugging symbols | 
|---|
 | 75 |         --enable-64bit          Enable 64bit support (where applicable) | 
|---|
 | 76 |         --disable-64bit         Disable 64bit support (where applicable) | 
|---|
 | 77 |         --enable-64bit-vis      Enable 64bit Sparc VIS support | 
|---|
 | 78 |         --disable-64bit-vis     Disable 64bit Sparc VIS support | 
|---|
 | 79 |         --enable-langinfo       Allows use of modern nl_langinfo check for | 
|---|
 | 80 |                                 better localization support. This is on by | 
|---|
 | 81 |                                 default on platforms where nl_langinfo is | 
|---|
 | 82 |                                 found. | 
|---|
 | 83 |         --disable-langinfo      Specifically disables use of nl_langinfo. | 
|---|
 | 84 |         --enable-man-symlinks   Use symlinks for linking the manpages that | 
|---|
 | 85 |                                 should be reachable under several names. | 
|---|
 | 86 |         --enable-man-suffix[=STRING] | 
|---|
 | 87 |                                 Append STRING to the names of installed manual | 
|---|
 | 88 |                                 pages (prior to applying compression, if that | 
|---|
 | 89 |                                 is also enabled). If STRING is omitted, | 
|---|
 | 90 |                                 defaults to 'tcl'. | 
|---|
 | 91 |         --enable-man-compression=PROG | 
|---|
 | 92 |                                 Compress the manpages using PROG. | 
|---|
 | 93 |         --enable-dtrace         Enable tcl DTrace provider (if DTrace is | 
|---|
 | 94 |                                 available on the platform), c.f. tclDTrace.d | 
|---|
 | 95 |                                 for descriptions of the probes made available, | 
|---|
 | 96 |                                 see http://wiki.tcl.tk/DTrace for more details | 
|---|
 | 97 |         --with-encoding=ENCODING Specifies the encoding for compile-time | 
|---|
 | 98 |                                 configuration values. Defaults to iso8859-1, | 
|---|
 | 99 |                                 which is also sufficient for ASCII. | 
|---|
 | 100 |         --with-tzdata=FLAG      Specifies whether to install timezone data. By | 
|---|
 | 101 |                                 default, the configure script tries to detect | 
|---|
 | 102 |                                 whether a usable timezone database is present | 
|---|
 | 103 |                                 on the system already. | 
|---|
 | 104 |  | 
|---|
 | 105 |     Mac OS X only (i.e. completely unsupported on other platforms): | 
|---|
 | 106 |  | 
|---|
 | 107 |         --enable-framework      Package Tcl as a framework. | 
|---|
 | 108 |         --disable-corefoundation Disable use of CoreFoundation API and revert | 
|---|
 | 109 |                                 to standard select based notifier, required | 
|---|
 | 110 |                                 when using naked fork (i.e. not followed by | 
|---|
 | 111 |                                 execve). | 
|---|
 | 112 |  | 
|---|
 | 113 |     Note: by default gcc will be used if it can be located on the PATH. If you | 
|---|
 | 114 |     want to use cc instead of gcc, set the CC environment variable to "cc" | 
|---|
 | 115 |     before running configure. It is not safe to edit the Makefile to use gcc | 
|---|
 | 116 |     after configure is run. Also note that you should use the same compiler | 
|---|
 | 117 |     when building extensions. | 
|---|
 | 118 |  | 
|---|
 | 119 |     Note: be sure to use only absolute path names (those starting with "/") in | 
|---|
 | 120 |     the --prefix and --exec-prefix options. | 
|---|
 | 121 |  | 
|---|
 | 122 | (d) Type "make". This will create a library archive called "libtcl<version>.a" | 
|---|
 | 123 |     or "libtcl<version>.so" and an interpreter application called "tclsh" that | 
|---|
 | 124 |     allows you to type Tcl commands interactively or execute script files. It | 
|---|
 | 125 |     will also create a stub library archive "libtclstub<version>.a" that | 
|---|
 | 126 |     developers may link against other C code to produce loadable extensions | 
|---|
 | 127 |     for Tcl. | 
|---|
 | 128 |  | 
|---|
 | 129 | (e) If the make fails then you'll have to personalize the Makefile for your | 
|---|
 | 130 |     site or possibly modify the distribution in other ways. First check the | 
|---|
 | 131 |     porting Web page above to see if there are hints for compiling on your | 
|---|
 | 132 |     system. If you need to modify Makefile, there are comments at the | 
|---|
 | 133 |     beginning of it that describe the things you might want to change and how | 
|---|
 | 134 |     to change them. | 
|---|
 | 135 |  | 
|---|
 | 136 | (f) Type "make install" to install Tcl binaries and script files in standard | 
|---|
 | 137 |     places. You'll need write permission on the installation directories to do | 
|---|
 | 138 |     this. The installation directories are determined by the "configure" | 
|---|
 | 139 |     script and may be specified with the standard --prefix and --exec-prefix | 
|---|
 | 140 |     options to "configure". See the Makefile for information on what | 
|---|
 | 141 |     directories were chosen; you can override these choices by modifying the | 
|---|
 | 142 |     "prefix" and "exec_prefix" variables in the Makefile. The installed | 
|---|
 | 143 |     binaries have embedded within them path values relative to the install | 
|---|
 | 144 |     directory. If you change your mind about where Tcl should be installed, | 
|---|
 | 145 |     start this procedure over again from step (a) so that the path embedded in | 
|---|
 | 146 |     the binaries agrees with the install location. | 
|---|
 | 147 |  | 
|---|
 | 148 | (g) At this point you can play with Tcl by running the installed "tclsh" | 
|---|
 | 149 |     executable, or via the "make shell" target, and typing Tcl commands at the | 
|---|
 | 150 |     interactive prompt. | 
|---|
 | 151 |  | 
|---|
 | 152 | If you have trouble compiling Tcl, see the URL noted above about working | 
|---|
 | 153 | platforms. It contains information that people have provided about changes | 
|---|
 | 154 | they had to make to compile Tcl in various environments. We're also interested | 
|---|
 | 155 | in hearing how to change the configuration setup so that Tcl compiles on | 
|---|
 | 156 | additional platforms "out of the box". | 
|---|
 | 157 |  | 
|---|
 | 158 | Test suite | 
|---|
 | 159 | ---------- | 
|---|
 | 160 |  | 
|---|
 | 161 | There is a relatively complete test suite for all of the Tcl core in the | 
|---|
 | 162 | subdirectory "tests". To use it just type "make test" in this directory. You | 
|---|
 | 163 | should then see a printout of the test files processed. If any errors occur, | 
|---|
 | 164 | you'll see a much more substantial printout for each error. See the README | 
|---|
 | 165 | file in the "tests" directory for more information on the test suite. Note: | 
|---|
 | 166 | don't run the tests as superuser: this will cause several of them to fail. If | 
|---|
 | 167 | a test is failing consistently, please send us a bug report with as much | 
|---|
 | 168 | detail as you can manage. Please use the online database at | 
|---|
 | 169 |         http://tcl.sourceforge.net/ | 
|---|
 | 170 |  | 
|---|
 | 171 | The Tcl test suite is very sensitive to proper implementation of ANSI C | 
|---|
 | 172 | library procedures such as sprintf and sscanf. If the test suite generates | 
|---|
 | 173 | errors, most likely they are due to non-conformance of your system's ANSI C | 
|---|
 | 174 | library; such problems are unlikely to affect any real applications so it's | 
|---|
 | 175 | probably safe to ignore them. | 
|---|