d62fc98462bd3279bedbadf92542d7a6c0e781ba
[bpt/guile.git] / INSTALL
1 Brief Installation Instructions ===========================================
2
3 To build Guile on unix, there are two basic steps:
4
5 1. Type "./configure", to configure the package for your system.
6 2. Type "make", to build the package.
7
8 Generic instructions for configuring and compiling GNU distributions
9 are included below. For Guile, you might type the commands below.
10 Their 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
17
18
19 What You Get ==============================================================
20
21 The `configure' script examines your system, and adapts Guile to
22 compile and run on it.
23
24 The `make' command builds several things:
25 - An executable file `guile/guile', which is an interactive shell for
26 talking with the Guile Scheme interpreter.
27 - An object library `libguile/.libs/libguile.a', containing the Guile Scheme
28 interpreter, ready to be linked into your programs.
29
30 To install Guile, type `make install'. This installs the executable
31 and libraries mentioned above, as well as Guile's header files and
32 Scheme libraries.
33
34 Make also builds shared libraries, on systems that support them.
35 Because of the nature of shared libraries, before linking against
36 them, you should probably install them; `make install' takes care of
37 this.
38
39
40 Flags Accepted by Configure ===============================================
41
42 If you run the configure script with no arguments, it should examine
43 your system and set things up appropriately. However, there are a few
44 switches specific to Guile you may find useful in some circumstances.
45
46 --enable-maintainer-mode --- If you have automake, autoconf, and
47 libtool installed on your system, this switch causes configure to
48 generate Makefiles which know how to automatically regenerate
49 configure scripts, makefiles, and headers, when they are out of date.
50 The README file says which versions of those tools you will need.
51
52 --with-threads --- Build a Guile executable and library that supports
53 cooperative threading. If you use this switch, Guile will also build
54 and install the QuickThreads non-preemptive threading library,
55 libqt.a, which you will need to link into your programs after
56 libguile.a. That is, you should pass the switches -lguile -qt to your
57 linker. Coop threads are not yet thoroughly tested; once they are,
58 they will be enabled by default.
59
60 --enable-dynamic-linking --- Build a Guile executable and library that
61 supports dynamic linking, on systems that support it. This feature is
62 not yet thoroughly tested; once it is, it will be enabled by default.
63
64 --disable-shared --- Do not build shared libraries. Normally, Guile
65 will build shared libraries if your system supports them. Guile
66 always builds static libraries.
67
68
69 Using Guile Without Installing It =========================================
70
71 If you want to run Guile without installing it, set the environment
72 variable `SCHEME_LOAD_PATH' to a colon-separated list of directories,
73 including the directory containing this INSTALL file. For example, if
74 you unpacked Guile so that the full filename of this file is
75 `/home/jimb/guile-snap/INSTALL', then you might say
76
77 export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-snap
78
79 if you're using Bash or any other Bourne shell variant, or
80
81 setenv SCHEME_LOAD_PATH /home/jimb/my-scheme:/home/jimb/guile-snap
82
83 if you're using CSH or one of its variants.
84
85
86 Generic Instructions for Building Auto-Configured Packages ================
87
88 To compile this package:
89
90 1. Configure the package for your system. In the directory that this
91 file is in, type `./configure'. If you're using `csh' on an old
92 version of System V, you might need to type `sh configure' instead to
93 prevent `csh' from trying to execute `configure' itself.
94
95 The `configure' shell script attempts to guess correct values for
96 various system-dependent variables used during compilation, and
97 creates the Makefile(s) (one in each subdirectory of the source
98 directory). In some packages it creates a C header file containing
99 system-dependent definitions. It also creates a file `config.status'
100 that you can run in the future to recreate the current configuration.
101 Running `configure' takes a minute or two.
102
103 To compile the package in a different directory from the one
104 containing the source code, you must use GNU make. `cd' to the
105 directory where you want the object files and executables to go and
106 run `configure' with the option `--srcdir=DIR', where DIR is the
107 directory that contains the source code. Using this option is
108 actually unnecessary if the source code is in the parent directory of
109 the one in which you are compiling; `configure' automatically checks
110 for the source code in `..' if it does not find it in the current
111 directory.
112
113 By default, `make install' will install the package's files in
114 /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
115 an installation prefix other than /usr/local by giving `configure' the
116 option `--prefix=PATH'. Alternately, you can do so by changing the
117 `prefix' variable in the Makefile that `configure' creates (the
118 Makefile in the top-level directory, if the package contains
119 subdirectories).
120
121 You can specify separate installation prefixes for machine-specific
122 files and machine-independent files. If you give `configure' the
123 option `--exec_prefix=PATH', the package will use PATH as the prefix
124 for installing programs and libraries. Normally, all files are
125 installed using the same prefix.
126
127 `configure' ignores any other arguments that you give it.
128
129 If your system requires unusual options for compilation or linking
130 that `configure' doesn't know about, you can give `configure' initial
131 values for some variables by setting them in the environment. In
132 Bourne-compatible shells, you can do that on the command line like
133 this:
134 CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
135
136 The `make' variables that you might want to override with environment
137 variables when running `configure' are:
138
139 (For these variables, any value given in the environment overrides the
140 value that `configure' would choose:)
141 CC C compiler program.
142 Default is `cc', or `gcc' if `gcc' is in your PATH.
143 INSTALL Program to use to install files.
144 Default is `install' if you have it, `cp' otherwise.
145 INCLUDEDIR Directory for `configure' to search for include files.
146 Default is /usr/include.
147
148 (For these variables, any value given in the environment is added to
149 the value that `configure' chooses:)
150 DEFS Configuration options, in the form '-Dfoo -Dbar ...'
151 LIBS Libraries to link with, in the form '-lfoo -lbar ...'
152
153 If you need to do unusual things to compile the package, we encourage
154 you to teach `configure' how to do them and mail the diffs to the
155 address given in the README so we can include them in the next
156 release.
157
158 2. Type `make' to compile the package.
159
160 3. Type `make install' to install programs, data files, and
161 documentation.
162
163 4. You can remove the program binaries and object files from the
164 source directory by typing `make clean'. To also remove the
165 Makefile(s), the header file containing system-dependent definitions
166 (if the package uses one), and `config.status' (all the files that
167 `configure' created), type `make distclean'.
168
169 The file `configure.in' is used as a template to create `configure' by
170 a program called `autoconf'. You will only need it if you want to
171 regenerate `configure' using a newer version of `autoconf'.