* srfi-13-14.texi: Added @bullet to various @itemize lists.
[bpt/guile.git] / INSTALL
CommitLineData
afdd97ae
MV
1Guile Installation Guide
2Copyright (c) 1996, 1997, 1998, 1999, 2000 Free software Foundation, Inc.
3
4 Permission is granted to anyone to make or distribute verbatim copies
5 of this document as received, in any medium, provided that the
6 copyright notice and permission notice are preserved,
7 and that the distributor grants the recipient permission
8 for further redistribution as permitted by this notice.
9
10 Permission is granted to distribute modified versions
11 of this document, or of portions of it,
12 under the above conditions, provided also that they
13 carry prominent notices stating who last changed them,
14 and that any new or changed statements about the activities
15 of the Free Software Foundation are approved by the Foundation.
16
17
6dad9cd3
JB
18Brief Installation Instructions ===========================================
19
30d14d55 20To build Guile on unix, there are two basic steps:
0196b30a 21
6dad9cd3
JB
22 1. Type "./configure", to configure the package for your system.
23 2. Type "make", to build the package.
0196b30a
JB
24
25Generic instructions for configuring and compiling GNU distributions
fde0a324
MD
26are included below. (For instructions how to install SLIB, the scheme
27procedure library, see below.)
6dad9cd3 28
0196b30a 29
9f75bc05
JB
30Special Instructions For Some Systems =====================================
31
32We would like Guile to build on all systems using the simple
33instructions above, but it seems that a few systems still need special
34treatment. If you can send us fixes for these problems, we'd be
35grateful.
36
37SunOS 4.1: Guile's shared library support seems to be confused, but
38 hey; shared libraries are confusing. You may need to configure
39 Guile with a command like:
7e2c0c8d 40 ./configure --disable-shared
9f75bc05
JB
41 For more information on `--disable-shared', see below, "Flags
42 Accepted by Configure".
43
44HP/UX: GCC 2.7.2 (and maybe other versions) have trouble creating
45 shared libraries if they depend on any non-shared libraries. GCC
46 seems to have other problems as well. To work around this, we
47 suggest you configure Guile to use the system's C compiler:
48 CC=cc ./configure
49
bd0a8b65
JB
50NetBSD: Perry Metzger says, "Guile will build under NetBSD only using
51 gmake -- the native make will not work. (gmake is in our package
52 system, so this will not be a problem when we packagize 1.3.)"
6dad9cd3 53
fde0a324 54
6dad9cd3
JB
55Flags Accepted by Configure ===============================================
56
57If you run the configure script with no arguments, it should examine
58your system and set things up appropriately. However, there are a few
59switches specific to Guile you may find useful in some circumstances.
60
6dad9cd3 61
6503ad7f 62--enable-maintainer-mode
873b9044 63
6503ad7f
MV
64 If you have automake, autoconf, and libtool installed on your
65 system, this switch causes configure to generate Makefiles which
66 know how to automatically regenerate configure scripts, makefiles,
67 and headers, when they are out of date. The README file says which
68 versions of those tools you will need.
6dad9cd3 69
6dad9cd3 70
6503ad7f 71--with-threads --- Build with thread support
6dad9cd3 72
6503ad7f
MV
73 Build a Guile executable and library that supports cooperative
74 threading. If you use this switch, Guile will also build and
75 install the QuickThreads non-preemptive threading library,
76 libqthreads, which you will need to link into your programs after
77 libguile. When you use `guile-config', you will pick up all
78 neccessary linker flags automatically.
69fc343a 79
6503ad7f
MV
80 Cooperative threads are not yet thoroughly tested; once they are,
81 they will be enabled by default. The interaction with blocking I/O
82 is pretty ad hoc at the moment. In our experience, bugs in the
83 thread support do not affect you if you don't actually use threads.
69fc343a 84
69fc343a 85
6503ad7f 86--with-modules --- Specify statically linked `modules'
69fc343a 87
6503ad7f
MV
88 Guile can dynamically load `plugin modules' during runtime, using
89 facilities provided by libtool. Not all platforms support this,
90 however. On these platforms, you can statically link the plugin
91 modules into libguile when Guile itself is build. XXX - how does
92 one specify the modules?
69fc343a 93
69fc343a 94
6503ad7f 95--enable-deprecated=LEVEL --- Control the inclusion of deprecated features.
69fc343a 96
6503ad7f
MV
97 You can select between different behaviours via the LEVEL argument:
98 a value of "no" will omit all deprecated features and you will get
99 "undefined reference", "variable unbound" or similar errors when you
100 try to use them. All other values will include all deprecated
101 features. The LEVEL argument is used as the default value for the
102 environment variable GUILE_WARN_DEPRECATED. See the README for
103 documentation about this.
69fc343a 104
69fc343a 105
6503ad7f 106--disable-shared --- Do not build shared libraries.
69fc343a 107
6503ad7f
MV
108 Normally, Guile will build shared libraries if your system supports
109 them. Guile always builds static libraries.
69fc343a 110
6503ad7f
MV
111
112--enable-debug-freelist --- Enable freelist debugging.
113
114 This enables a debugging version of SCM_NEWCELL(), and also
115 registers an extra primitive, the setter
116 `gc-set-debug-check-freelist!'.
117
118 Configure with the --enable-debug-freelist option to enable the
119 gc-set-debug-check-freelist! primitive, and then use:
120
121 (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
122 (gc-set-debug-check-freelist! #f) # turn off checking
123
124 Checking of the freelist forces a traversal of the freelist and a
125 garbage collection before each allocation of a cell. This can slow
126 down the interpreter dramatically, so the setter should be used to
127 turn on this extra processing only when necessary.
128
129
130--enable-debug-malloc --- Enable malloc debugging.
131
132 Include code for debugging of calls to scm_must_malloc/realloc/free.
133
134 Checks that
135
136 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
137 2. objects reallocated by scm_must_realloc has been allocated by
138 scm_must_malloc
139 3. reallocated objects are reallocated with the same what string
140
141 But, most importantly, it records the number of allocated objects of
142 each kind. This is useful when searching for memory leaks.
143
144 A Guile compiled with this option provides the primitive
145 `malloc-stats' which returns an alist with pairs of kind and the
146 number of objects of that kind.
147
148
149--enable-guile-debug --- Include internal debugging functions
150--disable-arrays --- omit array and uniform array support
151--disable-posix --- omit posix interfaces
152--disable-networking --- omit networking interfaces
153--disable-regex --- omit regular expression interfaces
6dad9cd3 154
fde0a324 155
6dad9cd3
JB
156Using Guile Without Installing It =========================================
157
30d14d55 158If you want to run Guile without installing it, set the environment
cf591c72 159variable `GUILE_LOAD_PATH' to a colon-separated list of directories,
bacf83f0
JB
160including the directory containing this INSTALL file. If you used a
161separate build directory, you'll need to include the build directory
162in the path as well.
30d14d55 163
bacf83f0 164For example, suppose the Guile distribution unpacked into a directory
18f468f8
JB
165called `/home/jimb/guile-snap' (so the full name of this INSTALL file
166would be `/home/jimb/guile-snap/INSTALL'). Then you might say, if
167you're using Bash or any other Bourne shell variant,
bacf83f0 168
cf591c72 169 export GUILE_LOAD_PATH=/home/jimb/guile-snap
0196b30a 170
18f468f8 171or if you're using CSH or one of its variants:
0196b30a 172
cf591c72 173 setenv GUILE_LOAD_PATH /home/jimb/guile-snap
0196b30a 174
0196b30a 175
fde0a324
MD
176Installing SLIB ===========================================================
177
178In order to use SLIB from Guile you basically only need to put the
179`slib' directory _in_ one of the directories on Guile's load path.
180
181The standard installation is:
182
183 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
184
185 2. Put it in Guile's data directory, that is the directory printed when
186 you type
187
188 guile-config info pkgdatadir
189
190 at the shell prompt. This is normally `/usr/local/share/guile', so the
191 directory will normally have full path `/usr/local/share/guile/slib'.
192
193 3. Start guile as a user with write access to the data directory and type
194
195 (use-modules (ice-9 slib))
196
197 at the Guile prompt. This will generate the slibcat catalog next to
198 the slib directory.
199
200SLIB's `require' is provided by the Guile module (ice-9 slib).
201
202Example:
203
204 (use-modules (ice-9 slib))
205 (require 'primes)
206 (prime? 7)
207
208
6dad9cd3 209Generic Instructions for Building Auto-Configured Packages ================
0196b30a
JB
210
211To compile this package:
212
2131. Configure the package for your system. In the directory that this
214file is in, type `./configure'. If you're using `csh' on an old
215version of System V, you might need to type `sh configure' instead to
216prevent `csh' from trying to execute `configure' itself.
217
218The `configure' shell script attempts to guess correct values for
219various system-dependent variables used during compilation, and
220creates the Makefile(s) (one in each subdirectory of the source
221directory). In some packages it creates a C header file containing
222system-dependent definitions. It also creates a file `config.status'
223that you can run in the future to recreate the current configuration.
224Running `configure' takes a minute or two.
225
226To compile the package in a different directory from the one
227containing the source code, you must use GNU make. `cd' to the
228directory where you want the object files and executables to go and
229run `configure' with the option `--srcdir=DIR', where DIR is the
230directory that contains the source code. Using this option is
231actually unnecessary if the source code is in the parent directory of
232the one in which you are compiling; `configure' automatically checks
233for the source code in `..' if it does not find it in the current
234directory.
235
236By default, `make install' will install the package's files in
237/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
238an installation prefix other than /usr/local by giving `configure' the
239option `--prefix=PATH'. Alternately, you can do so by changing the
240`prefix' variable in the Makefile that `configure' creates (the
241Makefile in the top-level directory, if the package contains
242subdirectories).
243
244You can specify separate installation prefixes for machine-specific
245files and machine-independent files. If you give `configure' the
246option `--exec_prefix=PATH', the package will use PATH as the prefix
247for installing programs and libraries. Normally, all files are
248installed using the same prefix.
249
250`configure' ignores any other arguments that you give it.
251
252If your system requires unusual options for compilation or linking
253that `configure' doesn't know about, you can give `configure' initial
254values for some variables by setting them in the environment. In
255Bourne-compatible shells, you can do that on the command line like
256this:
257 CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
258
259The `make' variables that you might want to override with environment
260variables when running `configure' are:
261
262(For these variables, any value given in the environment overrides the
263value that `configure' would choose:)
264CC C compiler program.
265 Default is `cc', or `gcc' if `gcc' is in your PATH.
266INSTALL Program to use to install files.
267 Default is `install' if you have it, `cp' otherwise.
268INCLUDEDIR Directory for `configure' to search for include files.
269 Default is /usr/include.
270
271(For these variables, any value given in the environment is added to
272the value that `configure' chooses:)
273DEFS Configuration options, in the form '-Dfoo -Dbar ...'
274LIBS Libraries to link with, in the form '-lfoo -lbar ...'
275
276If you need to do unusual things to compile the package, we encourage
277you to teach `configure' how to do them and mail the diffs to the
278address given in the README so we can include them in the next
279release.
280
2812. Type `make' to compile the package.
282
2833. Type `make install' to install programs, data files, and
284documentation.
285
2864. You can remove the program binaries and object files from the
287source directory by typing `make clean'. To also remove the
288Makefile(s), the header file containing system-dependent definitions
289(if the package uses one), and `config.status' (all the files that
290`configure' created), type `make distclean'.
291
292The file `configure.in' is used as a template to create `configure' by
293a program called `autoconf'. You will only need it if you want to
294regenerate `configure' using a newer version of `autoconf'.
afdd97ae 295