* Makefile.am (ice9_sources): Removed getopt-gnu-style.scm.
[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.
10
11
12 Special Instructions For Some Systems =====================================
13
14 We would like Guile to build on all systems using the simple
15 instructions above, but it seems that a few systems still need special
16 treatment. If you can send us fixes for these problems, we'd be
17 grateful.
18
19 SunOS 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:
22 ./configure --disable-shared
23 For more information on `--disable-shared', see below, "Flags
24 Accepted by Configure".
25
26 HP/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
32 NetBSD: 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.)"
35
36 Flags Accepted by Configure ===============================================
37
38 If you run the configure script with no arguments, it should examine
39 your system and set things up appropriately. However, there are a few
40 switches specific to Guile you may find useful in some circumstances.
41
42 --enable-maintainer-mode --- If you have automake, autoconf, and
43 libtool installed on your system, this switch causes configure to
44 generate Makefiles which know how to automatically regenerate
45 configure scripts, makefiles, and headers, when they are out of date.
46 The README file says which versions of those tools you will need.
47
48 --with-threads --- Build a Guile executable and library that supports
49 cooperative threading. If you use this switch, Guile will also build
50 and install the QuickThreads non-preemptive threading library,
51 libqthreads, which you will need to link into your programs after
52 libguile. When you use `guile-config', you will pick up all
53 neccessary linker flags automatically.
54
55 Cooperative threads are not yet thoroughly tested; once they are, they
56 will be enabled by default. The interaction with blocking I/O is
57 pretty ad hoc at the moment. In our experience, bugs in the thread
58 support do not affect you if you don't actually use threads.
59
60 --with-modules --- Guile can dynamically load `plugin modules' during
61 runtime, using facilities provided by libtool. Not all platforms
62 support this, however. On these platforms, you can statically link
63 the plugin modules into libguile when Guile itself is build. XXX -
64 how does one specify the modules?
65
66 --disable-shared --- Do not build shared libraries. Normally, Guile
67 will build shared libraries if your system supports them. Guile
68 always builds static libraries.
69
70
71 Using Guile Without Installing It =========================================
72
73 If you want to run Guile without installing it, set the environment
74 variable `GUILE_LOAD_PATH' to a colon-separated list of directories,
75 including the directory containing this INSTALL file. If you used a
76 separate build directory, you'll need to include the build directory
77 in the path as well.
78
79 For example, suppose the Guile distribution unpacked into a directory
80 called `/home/jimb/guile-snap' (so the full name of this INSTALL file
81 would be `/home/jimb/guile-snap/INSTALL'). Then you might say, if
82 you're using Bash or any other Bourne shell variant,
83
84 export GUILE_LOAD_PATH=/home/jimb/guile-snap
85
86 or if you're using CSH or one of its variants:
87
88 setenv GUILE_LOAD_PATH /home/jimb/guile-snap
89
90
91 Generic Instructions for Building Auto-Configured Packages ================
92
93 To compile this package:
94
95 1. Configure the package for your system. In the directory that this
96 file is in, type `./configure'. If you're using `csh' on an old
97 version of System V, you might need to type `sh configure' instead to
98 prevent `csh' from trying to execute `configure' itself.
99
100 The `configure' shell script attempts to guess correct values for
101 various system-dependent variables used during compilation, and
102 creates the Makefile(s) (one in each subdirectory of the source
103 directory). In some packages it creates a C header file containing
104 system-dependent definitions. It also creates a file `config.status'
105 that you can run in the future to recreate the current configuration.
106 Running `configure' takes a minute or two.
107
108 To compile the package in a different directory from the one
109 containing the source code, you must use GNU make. `cd' to the
110 directory where you want the object files and executables to go and
111 run `configure' with the option `--srcdir=DIR', where DIR is the
112 directory that contains the source code. Using this option is
113 actually unnecessary if the source code is in the parent directory of
114 the one in which you are compiling; `configure' automatically checks
115 for the source code in `..' if it does not find it in the current
116 directory.
117
118 By default, `make install' will install the package's files in
119 /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
120 an installation prefix other than /usr/local by giving `configure' the
121 option `--prefix=PATH'. Alternately, you can do so by changing the
122 `prefix' variable in the Makefile that `configure' creates (the
123 Makefile in the top-level directory, if the package contains
124 subdirectories).
125
126 You can specify separate installation prefixes for machine-specific
127 files and machine-independent files. If you give `configure' the
128 option `--exec_prefix=PATH', the package will use PATH as the prefix
129 for installing programs and libraries. Normally, all files are
130 installed using the same prefix.
131
132 `configure' ignores any other arguments that you give it.
133
134 If your system requires unusual options for compilation or linking
135 that `configure' doesn't know about, you can give `configure' initial
136 values for some variables by setting them in the environment. In
137 Bourne-compatible shells, you can do that on the command line like
138 this:
139 CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
140
141 The `make' variables that you might want to override with environment
142 variables when running `configure' are:
143
144 (For these variables, any value given in the environment overrides the
145 value that `configure' would choose:)
146 CC C compiler program.
147 Default is `cc', or `gcc' if `gcc' is in your PATH.
148 INSTALL Program to use to install files.
149 Default is `install' if you have it, `cp' otherwise.
150 INCLUDEDIR Directory for `configure' to search for include files.
151 Default is /usr/include.
152
153 (For these variables, any value given in the environment is added to
154 the value that `configure' chooses:)
155 DEFS Configuration options, in the form '-Dfoo -Dbar ...'
156 LIBS Libraries to link with, in the form '-lfoo -lbar ...'
157
158 If you need to do unusual things to compile the package, we encourage
159 you to teach `configure' how to do them and mail the diffs to the
160 address given in the README so we can include them in the next
161 release.
162
163 2. Type `make' to compile the package.
164
165 3. Type `make install' to install programs, data files, and
166 documentation.
167
168 4. You can remove the program binaries and object files from the
169 source directory by typing `make clean'. To also remove the
170 Makefile(s), the header file containing system-dependent definitions
171 (if the package uses one), and `config.status' (all the files that
172 `configure' created), type `make distclean'.
173
174 The file `configure.in' is used as a template to create `configure' by
175 a program called `autoconf'. You will only need it if you want to
176 regenerate `configure' using a newer version of `autoconf'.