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