mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
106 lines
5.5 KiB
Plaintext
106 lines
5.5 KiB
Plaintext
|
This is the directory where you configure, compile, test, and install
|
||
|
UNIX versions of Tcl. This directory also contains source files for Tcl
|
||
|
that are specific to UNIX. Some of the files in this directory are
|
||
|
used on the PC or Mac platform too, but they all depend on UNIX
|
||
|
(POSIX/ANSI C) interfaces and some of them only make sense under UNIX.
|
||
|
|
||
|
The rest of this file contains instructions on how to do this. The
|
||
|
release should compile and run either "out of the box" or with trivial
|
||
|
changes on any UNIX-like system that approximates POSIX, BSD, or System
|
||
|
V. We know that it runs on workstations from Sun, H-P, DEC, IBM, and
|
||
|
SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for
|
||
|
a PC running Windows, see the README file in the directory ../win. To
|
||
|
compile for a Macintosh, see the README file in the directory ../mac.
|
||
|
|
||
|
SCCS: @(#) README 1.10 96/04/17 11:40:24
|
||
|
|
||
|
How To Compile And Install Tcl:
|
||
|
-------------------------------
|
||
|
|
||
|
(a) Check for patches as described in ../README.
|
||
|
|
||
|
(b) Type "./configure". This runs a configuration script created by GNU
|
||
|
autoconf, which configures Tcl for your system and creates a
|
||
|
Makefile. The configure script allows you to customize the Tcl
|
||
|
configuration for your site; for details on how you can do this,
|
||
|
type "./configure -help" or refer to the autoconf documentation (not
|
||
|
included here). Tcl's "configure" supports the following special
|
||
|
switches in addition to the standard ones:
|
||
|
--enable-gcc If this switch is set, Tcl will configure
|
||
|
itself to use gcc if it is available on your
|
||
|
system. Note: it is not safe to modify the
|
||
|
Makefile to use gcc after autoconf is run;
|
||
|
if you do this, then information related to
|
||
|
dynamic linking will be incorrect.
|
||
|
--disable-load If this switch is specified then Tcl will
|
||
|
configure itself not to allow dynamic loading,
|
||
|
even if your system appears to support it.
|
||
|
Normally you can leave this switch out and
|
||
|
Tcl will build itself for dynamic loading
|
||
|
if your system supports it.
|
||
|
--enable-shared If this switch is specified, Tcl will compile
|
||
|
itself as a shared library if it can figure
|
||
|
out how to do that on this platform.
|
||
|
Note: be sure to use only absolute path names (those starting with "/")
|
||
|
in the --prefix and --exec_prefix options.
|
||
|
|
||
|
(c) Type "make". This will create a library archive called "libtcl.a"
|
||
|
or "libtcl.so" and an interpreter application called "tclsh" that
|
||
|
allows you to type Tcl commands interactively or execute script files.
|
||
|
|
||
|
(d) If the make fails then you'll have to personalize the Makefile
|
||
|
for your site or possibly modify the distribution in other ways.
|
||
|
First check the file "porting.notes" to see if there are hints
|
||
|
for compiling on your system. Then look at the porting Web page
|
||
|
described later in this file. If you need to modify Makefile, there
|
||
|
are comments at the beginning of it that describe the things you
|
||
|
might want to change and how to change them.
|
||
|
|
||
|
(e) Type "make install" to install Tcl binaries and script files in
|
||
|
standard places. You'll need write permission on the installation
|
||
|
directories to do this. The installation directories are
|
||
|
determined by the "configure" script and may be specified with
|
||
|
the --prefix and --exec_prefix options to "configure". See the
|
||
|
Makefile for information on what directories were chosen; you
|
||
|
can override these choices by modifying the "prefix" and
|
||
|
"exec_prefix" variables in the Makefile.
|
||
|
|
||
|
(f) At this point you can play with Tcl by invoking the "tclsh"
|
||
|
program and typing Tcl commands. However, if you haven't installed
|
||
|
Tcl then you'll first need to set your TCL_LIBRARY variable to
|
||
|
hold the full path name of the "library" subdirectory. Note that
|
||
|
the installed versions of tclsh, libtcl.a, and libtcl.so have a
|
||
|
version number in their names, such as "tclsh7.5" or "libtcl7.5.so";
|
||
|
to use the installed versions, either specify the version number
|
||
|
or create a symbolic link (e.g. from "tclsh" to "tclsh7.5").
|
||
|
|
||
|
If you have trouble compiling Tcl, read through the file" porting.notes".
|
||
|
It contains information that people have provided about changes they had
|
||
|
to make to compile Tcl in various environments. Or, check out the
|
||
|
following Web URL:
|
||
|
http://www.sunlabs.com/cgi-bin/tcl/info.4.1
|
||
|
This is an on-line database of porting information. We make no guarantees
|
||
|
that this information is accurate, complete, or up-to-date, but you may
|
||
|
find it useful. If you get Tcl running on a new configuration, we would
|
||
|
be happy to receive new information to add to "porting.notes". You can
|
||
|
also make a new entry into the on-line Web database. We're also interested
|
||
|
in hearing how to change the configuration setup so that Tcl compiles out
|
||
|
of the box on more platforms.
|
||
|
|
||
|
Test suite
|
||
|
----------
|
||
|
|
||
|
There is a relatively complete test suite for all of the Tcl core in
|
||
|
the subdirectory "tests". To use it just type "make test" in this
|
||
|
directory. You should then see a printout of the test files processed.
|
||
|
If any errors occur, you'll see a much more substantial printout for
|
||
|
each error. See the README file in the "tests" directory for more
|
||
|
information on the test suite. Note: don't run the tests as superuser:
|
||
|
this will cause several of them to fail.
|
||
|
|
||
|
The Tcl test suite is very sensitive to proper implementation of
|
||
|
ANSI C library procedures such as sprintf and sscanf. If the test
|
||
|
suite generates errors, most likely they are due to non-conformance
|
||
|
of your system's ANSI C library; such problems are unlikely to
|
||
|
affect any real applications so it's probably safe to ignore them.
|