README
1Tcl UNIX README
2---------------
3
4RCS: @(#) $Id: README,v 1.24.2.3 2007/09/20 17:55:46 das Exp $
5
6This is the directory where you configure, compile, test, and install
7UNIX versions of Tcl. This directory also contains source files for Tcl
8that are specific to UNIX. Some of the files in this directory are
9used on the PC or Mac platform too, but they all depend on UNIX
10(POSIX/ANSI C) interfaces and some of them only make sense under UNIX.
11
12Updated forms of the information found in this file is available at:
13 http://www.tcl.tk/doc/howto/compile.html#unix
14
15For information on platforms where Tcl is known to compile, along
16with any porting notes for getting it to work on those platforms, see:
17 http://www.tcl.tk/software/tcltk/platforms.html
18
19The rest of this file contains instructions on how to do this. The
20release should compile and run either "out of the box" or with trivial
21changes on any UNIX-like system that approximates POSIX, BSD, or System
22V. We know that it runs on workstations from Sun, H-P, DEC, IBM, and
23SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for
24a PC running Windows, see the README file in the directory ../win. To
25compile for Max OS X, see the README in the directory ../macosx. To
26compile for a classic Macintosh, see the README file in the directory ../mac.
27
28How To Compile And Install Tcl:
29-------------------------------
30
31(a) If you have already compiled Tcl once in this directory and are now
32 preparing to compile again in the same directory but for a different
33 platform, or if you have applied patches, type "make distclean" to
34 discard all the configuration information computed previously.
35
36(b) If you need to reconfigure because you changed any of the .in or
37 .m4 files, you will need to run autoconf to create a new
38 ./configure script. Most users will NOT need to do this since
39 a configure script is already provided.
40
41 (in the tcl/unix directory)
42 autoconf
43
44(c) Type "./configure". This runs a configuration script created by GNU
45 autoconf, which configures Tcl for your system and creates a
46 Makefile. The configure script allows you to customize the Tcl
47 configuration for your site; for details on how you can do this,
48 type "./configure -help" or refer to the autoconf documentation (not
49 included here). Tcl's "configure" supports the following special
50 switches in addition to the standard ones:
51 --enable-threads If this switch is set, Tcl will compile
52 itself with multithreading support.
53 --disable-load If this switch is specified then Tcl will
54 configure itself not to allow dynamic loading,
55 even if your system appears to support it.
56 Normally you can leave this switch out and
57 Tcl will build itself for dynamic loading
58 if your system supports it.
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
62 is the default on platforms where we know
63 how to 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
68 can specify the value "mem" to include
69 TCL_MEM_DEBUG memory debugging, "compile"
70 to include TCL_COMPILE_DEBUG debugging, or
71 "all" 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-compression=PROG
85 Compress the manpages using PROG.
86 --enable-dtrace Enable tcl DTrace provider (if DTrace is
87 available on the platform), c.f. tclDTrace.d
88 for descriptions of the probes made available,
89 see http://wiki.tcl.tk/DTrace for more details.
90 Mac OS X only:
91 --enable-framework package Tcl as a framework.
92 --disable-corefoundation disable use of CoreFoundation API and revert to
93 standard select based notifier, required when
94 using naked fork (i.e. not followed by execve).
95
96 Note: by default gcc will be used if it can be located on the PATH.
97 if you want to use cc instead of gcc, set the CC environment variable
98 to "cc" before running configure. It is not safe to edit the
99 Makefile to use gcc after configure is run. Also note that
100 you should use the same compiler when building extensions.
101
102 Note: be sure to use only absolute path names (those starting with "/")
103 in the --prefix and --exec-prefix options.
104
105(d) Type "make". This will create a library archive called
106 "libtcl<version>.a" or "libtcl<version>.so" and an interpreter
107 application called "tclsh" that allows you to type Tcl commands
108 interactively or execute script files.
109
110(e) If the make fails then you'll have to personalize the Makefile
111 for your site or possibly modify the distribution in other ways.
112 First check the porting Web page above to see if there are hints
113 for compiling on your system. If you need to modify Makefile,
114 are comments at the beginning of it that describe the things you
115 might want to change and how to change them.
116
117(f) Type "make install" to install Tcl binaries and script files in
118 standard places. You'll need write permission on the installation
119 directories to do this. The installation directories are
120 determined by the "configure" script and may be specified with
121 the --prefix and --exec-prefix options to "configure". See the
122 Makefile for information on what directories were chosen; you
123 can override these choices by modifying the "prefix" and
124 "exec_prefix" variables in the Makefile.
125
126(g) At this point you can play with Tcl by running "make shell"
127 and typing Tcl commands at the prompt.
128
129If you have trouble compiling Tcl, see the URL noted above about working
130platforms. It contains information that people have provided about changes
131they had to make to compile Tcl in various environments. We're also
132interested in hearing how to change the configuration setup so that Tcl
133compiles on additional platforms "out of the box".
134
135Test suite
136----------
137
138There is a relatively complete test suite for all of the Tcl core in
139the subdirectory "tests". To use it just type "make test" in this
140directory. You should then see a printout of the test files processed.
141If any errors occur, you'll see a much more substantial printout for
142each error. See the README file in the "tests" directory for more
143information on the test suite. Note: don't run the tests as superuser:
144this will cause several of them to fail. If a test is failing
145consistently, please send us a bug report with as much detail as you
146can manage. Please use the online database at
147 http://tcl.sourceforge.net/
148
149The Tcl test suite is very sensitive to proper implementation of
150ANSI C library procedures such as sprintf and sscanf. If the test
151suite generates errors, most likely they are due to non-conformance
152of your system's ANSI C library; such problems are unlikely to
153affect any real applications so it's probably safe to ignore them.
154