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