*** empty log message ***
[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
9f75bc05 9are included below.
6dad9cd3 10
0196b30a 11
9f75bc05
JB
12Special Instructions For Some Systems =====================================
13
14We would like Guile to build on all systems using the simple
15instructions above, but it seems that a few systems still need special
16treatment. If you can send us fixes for these problems, we'd be
17grateful.
18
19SunOS 4.1: Guile's shared library support seems to be confused, but
20 hey; shared libraries are confusing. You may need to configure
21 Guile with a command like:
7e2c0c8d 22 ./configure --disable-shared
9f75bc05
JB
23 For more information on `--disable-shared', see below, "Flags
24 Accepted by Configure".
25
26HP/UX: GCC 2.7.2 (and maybe other versions) have trouble creating
27 shared libraries if they depend on any non-shared libraries. GCC
28 seems to have other problems as well. To work around this, we
29 suggest you configure Guile to use the system's C compiler:
30 CC=cc ./configure
31
bd0a8b65
JB
32NetBSD: Perry Metzger says, "Guile will build under NetBSD only using
33 gmake -- the native make will not work. (gmake is in our package
34 system, so this will not be a problem when we packagize 1.3.)"
6dad9cd3 35
6dad9cd3
JB
36Flags Accepted by Configure ===============================================
37
38If you run the configure script with no arguments, it should examine
39your system and set things up appropriately. However, there are a few
40switches specific to Guile you may find useful in some circumstances.
41
42--enable-maintainer-mode --- If you have automake, autoconf, and
43libtool installed on your system, this switch causes configure to
44generate Makefiles which know how to automatically regenerate
45configure scripts, makefiles, and headers, when they are out of date.
46The README file says which versions of those tools you will need.
47
48--with-threads --- Build a Guile executable and library that supports
49cooperative threading. If you use this switch, Guile will also build
50and install the QuickThreads non-preemptive threading library,
6d2bd56d
MV
51libqthreads, which you will need to link into your programs after
52libguile. When you use `guile-config', you will pick up all
53neccessary linker flags automatically.
873b9044 54
18f468f8
JB
55Cooperative threads are not yet thoroughly tested; once they are, they
56will be enabled by default. The interaction with blocking I/O is
57pretty ad hoc at the moment. In our experience, bugs in the thread
58support do not affect you if you don't actually use threads.
6dad9cd3 59
6d2bd56d
MV
60--with-modules --- Guile can dynamically load `plugin modules' during
61runtime, using facilities provided by libtool. Not all platforms
62support this, however. On these platforms, you can statically link
63the plugin modules into libguile when Guile itself is build. XXX -
64how does one specify the modules?
6dad9cd3
JB
65
66--disable-shared --- Do not build shared libraries. Normally, Guile
67will build shared libraries if your system supports them. Guile
68always builds static libraries.
69
69fc343a
MD
70--enable-debug-freelist --- Enable freelist debugging.
71
72This enables a debugging version of SCM_NEWCELL(), and also registers
73an extra primitive, the setter `gc-set-debug-check-freelist!'.
74
75Configure with the --enable-debug-freelist option to enable
76the gc-set-debug-check-freelist! primitive, and then use:
77
78(gc-set-debug-check-freelist! #t) # turn on checking of the freelist
79(gc-set-debug-check-freelist! #f) # turn off checking
80
81Checking of the freelist forces a traversal of the freelist and
82a garbage collection before each allocation of a cell. This can
83slow down the interpreter dramatically, so the setter should be used to
84turn on this extra processing only when necessary.
85
86--enable-debug-malloc --- Enable malloc debugging.
87
88Include code for debugging of calls to scm_must_malloc/realloc/free.
89
90Checks that
91
921. objects freed by scm_must_free has been mallocated by scm_must_malloc
932. objects reallocated by scm_must_realloc has been allocated by
94 scm_must_malloc
953. reallocated objects are reallocated with the same what string
96
97But, most importantly, it records the number of allocated objects of
98each kind. This is useful when searching for memory leaks.
99
100A Guile compiled with this option provides the primitive
101`malloc-stats' which returns an alist with pairs of kind and the
102number of objects of that kind.
103
104--disable-arrays --- omit array and uniform array support
105--disable-posix --- omit posix interfaces
106--disable-networking --- omit networking interfaces
107--disable-regex --- omit regular expression interfaces
6dad9cd3
JB
108
109Using Guile Without Installing It =========================================
110
30d14d55 111If you want to run Guile without installing it, set the environment
cf591c72 112variable `GUILE_LOAD_PATH' to a colon-separated list of directories,
bacf83f0
JB
113including the directory containing this INSTALL file. If you used a
114separate build directory, you'll need to include the build directory
115in the path as well.
30d14d55 116
bacf83f0 117For example, suppose the Guile distribution unpacked into a directory
18f468f8
JB
118called `/home/jimb/guile-snap' (so the full name of this INSTALL file
119would be `/home/jimb/guile-snap/INSTALL'). Then you might say, if
120you're using Bash or any other Bourne shell variant,
bacf83f0 121
cf591c72 122 export GUILE_LOAD_PATH=/home/jimb/guile-snap
0196b30a 123
18f468f8 124or if you're using CSH or one of its variants:
0196b30a 125
cf591c72 126 setenv GUILE_LOAD_PATH /home/jimb/guile-snap
0196b30a 127
0196b30a 128
6dad9cd3 129Generic Instructions for Building Auto-Configured Packages ================
0196b30a
JB
130
131To compile this package:
132
1331. Configure the package for your system. In the directory that this
134file is in, type `./configure'. If you're using `csh' on an old
135version of System V, you might need to type `sh configure' instead to
136prevent `csh' from trying to execute `configure' itself.
137
138The `configure' shell script attempts to guess correct values for
139various system-dependent variables used during compilation, and
140creates the Makefile(s) (one in each subdirectory of the source
141directory). In some packages it creates a C header file containing
142system-dependent definitions. It also creates a file `config.status'
143that you can run in the future to recreate the current configuration.
144Running `configure' takes a minute or two.
145
146To compile the package in a different directory from the one
147containing the source code, you must use GNU make. `cd' to the
148directory where you want the object files and executables to go and
149run `configure' with the option `--srcdir=DIR', where DIR is the
150directory that contains the source code. Using this option is
151actually unnecessary if the source code is in the parent directory of
152the one in which you are compiling; `configure' automatically checks
153for the source code in `..' if it does not find it in the current
154directory.
155
156By default, `make install' will install the package's files in
157/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
158an installation prefix other than /usr/local by giving `configure' the
159option `--prefix=PATH'. Alternately, you can do so by changing the
160`prefix' variable in the Makefile that `configure' creates (the
161Makefile in the top-level directory, if the package contains
162subdirectories).
163
164You can specify separate installation prefixes for machine-specific
165files and machine-independent files. If you give `configure' the
166option `--exec_prefix=PATH', the package will use PATH as the prefix
167for installing programs and libraries. Normally, all files are
168installed using the same prefix.
169
170`configure' ignores any other arguments that you give it.
171
172If your system requires unusual options for compilation or linking
173that `configure' doesn't know about, you can give `configure' initial
174values for some variables by setting them in the environment. In
175Bourne-compatible shells, you can do that on the command line like
176this:
177 CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
178
179The `make' variables that you might want to override with environment
180variables when running `configure' are:
181
182(For these variables, any value given in the environment overrides the
183value that `configure' would choose:)
184CC C compiler program.
185 Default is `cc', or `gcc' if `gcc' is in your PATH.
186INSTALL Program to use to install files.
187 Default is `install' if you have it, `cp' otherwise.
188INCLUDEDIR Directory for `configure' to search for include files.
189 Default is /usr/include.
190
191(For these variables, any value given in the environment is added to
192the value that `configure' chooses:)
193DEFS Configuration options, in the form '-Dfoo -Dbar ...'
194LIBS Libraries to link with, in the form '-lfoo -lbar ...'
195
196If you need to do unusual things to compile the package, we encourage
197you to teach `configure' how to do them and mail the diffs to the
198address given in the README so we can include them in the next
199release.
200
2012. Type `make' to compile the package.
202
2033. Type `make install' to install programs, data files, and
204documentation.
205
2064. You can remove the program binaries and object files from the
207source directory by typing `make clean'. To also remove the
208Makefile(s), the header file containing system-dependent definitions
209(if the package uses one), and `config.status' (all the files that
210`configure' created), type `make distclean'.
211
212The file `configure.in' is used as a template to create `configure' by
213a program called `autoconf'. You will only need it if you want to
214regenerate `configure' using a newer version of `autoconf'.