sl@0: Tcl UNIX README sl@0: --------------- sl@0: sl@0: RCS: @(#) $Id: README,v 1.24.2.2 2005/12/03 00:35:44 das Exp $ sl@0: sl@0: This is the directory where you configure, compile, test, and install sl@0: UNIX versions of Tcl. This directory also contains source files for Tcl sl@0: that are specific to UNIX. Some of the files in this directory are sl@0: used on the PC or Mac platform too, but they all depend on UNIX sl@0: (POSIX/ANSI C) interfaces and some of them only make sense under UNIX. sl@0: sl@0: Updated forms of the information found in this file is available at: sl@0: http://www.tcl.tk/doc/howto/compile.html#unix sl@0: sl@0: For information on platforms where Tcl is known to compile, along sl@0: with any porting notes for getting it to work on those platforms, see: sl@0: http://www.tcl.tk/software/tcltk/platforms.html sl@0: sl@0: The rest of this file contains instructions on how to do this. The sl@0: release should compile and run either "out of the box" or with trivial sl@0: changes on any UNIX-like system that approximates POSIX, BSD, or System sl@0: V. We know that it runs on workstations from Sun, H-P, DEC, IBM, and sl@0: SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for sl@0: a PC running Windows, see the README file in the directory ../win. To sl@0: compile for Max OS X, see the README in the directory ../macosx. To sl@0: compile for a classic Macintosh, see the README file in the directory ../mac. sl@0: sl@0: How To Compile And Install Tcl: sl@0: ------------------------------- sl@0: sl@0: (a) If you have already compiled Tcl once in this directory and are now sl@0: preparing to compile again in the same directory but for a different sl@0: platform, or if you have applied patches, type "make distclean" to sl@0: discard all the configuration information computed previously. sl@0: sl@0: (b) If you need to reconfigure because you changed any of the .in or sl@0: .m4 files, you will need to run autoconf to create a new sl@0: ./configure script. Most users will NOT need to do this since sl@0: a configure script is already provided. sl@0: sl@0: (in the tcl/unix directory) sl@0: autoconf sl@0: sl@0: (c) Type "./configure". This runs a configuration script created by GNU sl@0: autoconf, which configures Tcl for your system and creates a sl@0: Makefile. The configure script allows you to customize the Tcl sl@0: configuration for your site; for details on how you can do this, sl@0: type "./configure -help" or refer to the autoconf documentation (not sl@0: included here). Tcl's "configure" supports the following special sl@0: switches in addition to the standard ones: sl@0: --enable-threads If this switch is set, Tcl will compile sl@0: itself with multithreading support. sl@0: --disable-load If this switch is specified then Tcl will sl@0: configure itself not to allow dynamic loading, sl@0: even if your system appears to support it. sl@0: Normally you can leave this switch out and sl@0: Tcl will build itself for dynamic loading sl@0: if your system supports it. sl@0: --enable-shared If this switch is specified, Tcl will compile sl@0: itself as a shared library if it can figure sl@0: out how to do that on this platform. This sl@0: is the default on platforms where we know sl@0: how to build shared libraries. sl@0: --disable-shared If this switch is specified, Tcl will compile sl@0: itself as a static library. sl@0: --enable-symbols build with debugging symbols. By default sl@0: standard debugging symbols are used. You sl@0: can specify the value "mem" to include sl@0: TCL_MEM_DEBUG memory debugging, "compile" sl@0: to include TCL_COMPILE_DEBUG debugging, or sl@0: "all" to enable all internal debugging. sl@0: --disable-symbols build without debugging symbols sl@0: --enable-64bit enable 64bit support (where applicable) sl@0: --disable-64bit disable 64bit support (where applicable) sl@0: --enable-64bit-vis enable 64bit Sparc VIS support sl@0: --disable-64bit-vis disable 64bit Sparc VIS support sl@0: --enable-langinfo Allows use of modern nl_langinfo check for sl@0: better localization support. This is on by sl@0: default on platforms where nl_langinfo is sl@0: found. sl@0: --disable-langinfo Specifically disables use of nl_langinfo. sl@0: --enable-man-symlinks Use symlinks for linking the manpages that sl@0: should be reachable under several names. sl@0: --enable-man-compression=PROG sl@0: Compress the manpages using PROG. sl@0: Mac OS X only: sl@0: --enable-framework package Tcl as a framework. sl@0: --disable-corefoundation disable use of CoreFoundation API and revert to sl@0: standard select based notifier, required when sl@0: using naked fork (i.e. not followed by execve). sl@0: sl@0: Note: by default gcc will be used if it can be located on the PATH. sl@0: if you want to use cc instead of gcc, set the CC environment variable sl@0: to "cc" before running configure. It is not safe to edit the sl@0: Makefile to use gcc after configure is run. Also note that sl@0: you should use the same compiler when building extensions. sl@0: sl@0: Note: be sure to use only absolute path names (those starting with "/") sl@0: in the --prefix and --exec-prefix options. sl@0: sl@0: (d) Type "make". This will create a library archive called sl@0: "libtcl.a" or "libtcl.so" and an interpreter sl@0: application called "tclsh" that allows you to type Tcl commands sl@0: interactively or execute script files. sl@0: sl@0: (e) If the make fails then you'll have to personalize the Makefile sl@0: for your site or possibly modify the distribution in other ways. sl@0: First check the porting Web page above to see if there are hints sl@0: for compiling on your system. If you need to modify Makefile, sl@0: are comments at the beginning of it that describe the things you sl@0: might want to change and how to change them. sl@0: sl@0: (f) Type "make install" to install Tcl binaries and script files in sl@0: standard places. You'll need write permission on the installation sl@0: directories to do this. The installation directories are sl@0: determined by the "configure" script and may be specified with sl@0: the --prefix and --exec-prefix options to "configure". See the sl@0: Makefile for information on what directories were chosen; you sl@0: can override these choices by modifying the "prefix" and sl@0: "exec_prefix" variables in the Makefile. sl@0: sl@0: (g) At this point you can play with Tcl by running "make shell" sl@0: and typing Tcl commands at the prompt. sl@0: sl@0: If you have trouble compiling Tcl, see the URL noted above about working sl@0: platforms. It contains information that people have provided about changes sl@0: they had to make to compile Tcl in various environments. We're also sl@0: interested in hearing how to change the configuration setup so that Tcl sl@0: compiles on additional platforms "out of the box". sl@0: sl@0: Test suite sl@0: ---------- sl@0: sl@0: There is a relatively complete test suite for all of the Tcl core in sl@0: the subdirectory "tests". To use it just type "make test" in this sl@0: directory. You should then see a printout of the test files processed. sl@0: If any errors occur, you'll see a much more substantial printout for sl@0: each error. See the README file in the "tests" directory for more sl@0: information on the test suite. Note: don't run the tests as superuser: sl@0: this will cause several of them to fail. If a test is failing sl@0: consistently, please send us a bug report with as much detail as you sl@0: can manage. Please use the online database at sl@0: http://tcl.sourceforge.net/ sl@0: sl@0: The Tcl test suite is very sensitive to proper implementation of sl@0: ANSI C library procedures such as sprintf and sscanf. If the test sl@0: suite generates errors, most likely they are due to non-conformance sl@0: of your system's ANSI C library; such problems are unlikely to sl@0: affect any real applications so it's probably safe to ignore them.