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