* simpos.h: prototype for scm_primitive_exit.
[bpt/guile.git] / INSTALL
CommitLineData
6dad9cd3
JB
1Brief Installation Instructions ===========================================
2
30d14d55 3To build Guile on unix, there are two basic steps:
0196b30a 4
6dad9cd3
JB
5 1. Type "./configure", to configure the package for your system.
6 2. Type "make", to build the package.
0196b30a
JB
7
8Generic instructions for configuring and compiling GNU distributions
6dad9cd3
JB
9are included below. For Guile, you might type the commands below.
10Their voluminous output is not shown.
11
12 $ tar xvfz guile-970416.tar.gz # unpack the sources
13 $ cd guile-970416
14 $ ./configure # adapt Guile to your system
15 $ make # compile Guile
16 $ make install # install in the usual places
0196b30a 17
7e2c0c8d
JB
18(Note: under SunOS 4.1 and HP/UX, you may need to say:
19 ./configure --disable-shared
20Guile's shared library support for that system seems to be confused, but
21hey; shared libraries are confusing.)
6dad9cd3
JB
22
23What You Get ==============================================================
30d14d55
JB
24
25The `configure' script examines your system, and adapts Guile to
26compile and run on it.
27
28The `make' command builds several things:
29- An executable file `guile/guile', which is an interactive shell for
30 talking with the Guile Scheme interpreter.
6dad9cd3 31- An object library `libguile/.libs/libguile.a', containing the Guile Scheme
30d14d55 32 interpreter, ready to be linked into your programs.
30d14d55
JB
33
34To install Guile, type `make install'. This installs the executable
35and libraries mentioned above, as well as Guile's header files and
36Scheme libraries.
37
6dad9cd3
JB
38Make also builds shared libraries, on systems that support them.
39Because of the nature of shared libraries, before linking against
40them, you should probably install them; `make install' takes care of
41this.
42
43
44Flags Accepted by Configure ===============================================
45
46If you run the configure script with no arguments, it should examine
47your system and set things up appropriately. However, there are a few
48switches specific to Guile you may find useful in some circumstances.
49
50--enable-maintainer-mode --- If you have automake, autoconf, and
51libtool installed on your system, this switch causes configure to
52generate Makefiles which know how to automatically regenerate
53configure scripts, makefiles, and headers, when they are out of date.
54The README file says which versions of those tools you will need.
55
56--with-threads --- Build a Guile executable and library that supports
57cooperative threading. If you use this switch, Guile will also build
58and install the QuickThreads non-preemptive threading library,
59libqt.a, which you will need to link into your programs after
60libguile.a. That is, you should pass the switches -lguile -qt to your
873b9044
JB
61linker.
62
63Coop threads are not yet thoroughly tested; once they are, they will
64be enabled by default. The interaction with blocking I/O is pretty ad
65hoc at the moment. In our experience, bugs in the thread support do
66not affect you if you don't actually use threads.
6dad9cd3 67
16b28a02
JB
68At the moment, threads are known not to work with the NetBSD 1.2
69assembler.
70
c30f75e8
JB
71--enable-dynamic-linking --- Build a Guile executable and library
72providing Scheme functions which can load a shared library and
73initialize it, perhaps thereby adding new functions to Guile. This
74feature is not yet thoroughly tested; once it is, it will be enabled
75by default. This option has no effect on systems that do not support
76shared libraries.
6dad9cd3
JB
77
78--disable-shared --- Do not build shared libraries. Normally, Guile
79will build shared libraries if your system supports them. Guile
80always builds static libraries.
81
82
83Using Guile Without Installing It =========================================
84
30d14d55
JB
85If you want to run Guile without installing it, set the environment
86variable `SCHEME_LOAD_PATH' to a colon-separated list of directories,
bacf83f0
JB
87including the directory containing this INSTALL file. If you used a
88separate build directory, you'll need to include the build directory
89in the path as well.
30d14d55 90
bacf83f0
JB
91For example, suppose the Guile distribution unpacked into a directory
92called `/home/jimb/guile-snap' (so the full name of this file would be
93`/home/jimb/guile-snap/INSTALL'). Then you might say:
94
95 export SCHEME_LOAD_PATH=/home/jimb/guile-snap
0196b30a 96
30d14d55 97if you're using Bash or any other Bourne shell variant, or
0196b30a 98
bacf83f0 99 setenv SCHEME_LOAD_PATH /home/jimb/guile-snap
0196b30a 100
30d14d55 101if you're using CSH or one of its variants.
0196b30a 102
bacf83f0
JB
103If you built Guile in a separate directory from the source tree, then
104you'll need to include your build directory in the SCHEME_LOAD_PATH as
105well. For example, if you built in a subdirectory of the source tree
106called `pentium', you might say:
107
108 export SCHEME_LOAD_PATH=/home/jimb/guile-snap:/home/jimb/guile-snap/pentium
109
0196b30a 110
f335e5f7
JB
111Building a Statically Linked Guile ========================================
112
113Sometimes it's useful to build a statically-linked version of the
114Guile executable. It's helpful in debugging, and for producing
115stand-alone executables for distribution to machines you don't
116control.
117
118To do this, set the LDFLAGS environment variable to `-static' before
119you configure, or before you run the `make' command to build the
120executable.
121
122
6dad9cd3 123Generic Instructions for Building Auto-Configured Packages ================
0196b30a
JB
124
125To compile this package:
126
1271. Configure the package for your system. In the directory that this
128file is in, type `./configure'. If you're using `csh' on an old
129version of System V, you might need to type `sh configure' instead to
130prevent `csh' from trying to execute `configure' itself.
131
132The `configure' shell script attempts to guess correct values for
133various system-dependent variables used during compilation, and
134creates the Makefile(s) (one in each subdirectory of the source
135directory). In some packages it creates a C header file containing
136system-dependent definitions. It also creates a file `config.status'
137that you can run in the future to recreate the current configuration.
138Running `configure' takes a minute or two.
139
140To compile the package in a different directory from the one
141containing the source code, you must use GNU make. `cd' to the
142directory where you want the object files and executables to go and
143run `configure' with the option `--srcdir=DIR', where DIR is the
144directory that contains the source code. Using this option is
145actually unnecessary if the source code is in the parent directory of
146the one in which you are compiling; `configure' automatically checks
147for the source code in `..' if it does not find it in the current
148directory.
149
150By default, `make install' will install the package's files in
151/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
152an installation prefix other than /usr/local by giving `configure' the
153option `--prefix=PATH'. Alternately, you can do so by changing the
154`prefix' variable in the Makefile that `configure' creates (the
155Makefile in the top-level directory, if the package contains
156subdirectories).
157
158You can specify separate installation prefixes for machine-specific
159files and machine-independent files. If you give `configure' the
160option `--exec_prefix=PATH', the package will use PATH as the prefix
161for installing programs and libraries. Normally, all files are
162installed using the same prefix.
163
164`configure' ignores any other arguments that you give it.
165
166If your system requires unusual options for compilation or linking
167that `configure' doesn't know about, you can give `configure' initial
168values for some variables by setting them in the environment. In
169Bourne-compatible shells, you can do that on the command line like
170this:
171 CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
172
173The `make' variables that you might want to override with environment
174variables when running `configure' are:
175
176(For these variables, any value given in the environment overrides the
177value that `configure' would choose:)
178CC C compiler program.
179 Default is `cc', or `gcc' if `gcc' is in your PATH.
180INSTALL Program to use to install files.
181 Default is `install' if you have it, `cp' otherwise.
182INCLUDEDIR Directory for `configure' to search for include files.
183 Default is /usr/include.
184
185(For these variables, any value given in the environment is added to
186the value that `configure' chooses:)
187DEFS Configuration options, in the form '-Dfoo -Dbar ...'
188LIBS Libraries to link with, in the form '-lfoo -lbar ...'
189
190If you need to do unusual things to compile the package, we encourage
191you to teach `configure' how to do them and mail the diffs to the
192address given in the README so we can include them in the next
193release.
194
1952. Type `make' to compile the package.
196
1973. Type `make install' to install programs, data files, and
198documentation.
199
2004. You can remove the program binaries and object files from the
201source directory by typing `make clean'. To also remove the
202Makefile(s), the header file containing system-dependent definitions
203(if the package uses one), and `config.status' (all the files that
204`configure' created), type `make distclean'.
205
206The file `configure.in' is used as a template to create `configure' by
207a program called `autoconf'. You will only need it if you want to
208regenerate `configure' using a newer version of `autoconf'.