Commit | Line | Data |
---|---|---|
04873705 | 1 | !!! This is not a Guile release; it is a source tree retrieved via |
4b824aae | 2 | Git or as a nightly snapshot at some random time after the |
4800a61a | 3 | Guile 1.8 release. If this were a Guile release, you would not see |
04873705 | 4 | this message. !!! [fixme: zonk on release] |
c299f186 | 5 | |
0f24e75b | 6 | This is a 1.9 development version of Guile, Project GNU's extension |
f2a75d81 RB |
7 | language library. Guile is an interpreter for Scheme, packaged as a |
8 | library that you can link into your applications to give them their | |
9 | own scripting language. Guile will eventually support other languages | |
10 | as well, giving users of Guile-based applications a choice of | |
11 | languages. | |
12 | ||
0f24e75b | 13 | Guile versions with an odd middle number, i.e. 1.9.* are unstable |
f2a75d81 RB |
14 | development versions. Even middle numbers indicate stable versions. |
15 | This has been the case since the 1.3.* series. | |
16 | ||
a89cafc0 | 17 | The next stable release will likely be version 2.0.0. |
7fcc90c4 | 18 | |
1e457544 | 19 | Please send bug reports to bug-guile@gnu.org. |
86f40248 | 20 | |
c52f77ef AW |
21 | See the LICENSE file for the specific terms that apply to Guile. Note |
22 | that for any copyright year range specified as YYYY-ZZZZ in this | |
23 | package, the range specifies every single year in that closed interval. | |
d165aa15 RB |
24 | |
25 | ||
26 | Additional INSTALL instructions =========================================== | |
27 | ||
28 | Generic instructions for configuring and compiling Guile can be found | |
29 | in the INSTALL file. Guile specific information and configure options | |
30 | can be found below, including instructions for installing SLIB. | |
31 | ||
a89cafc0 NJ |
32 | Guile depends on the following external libraries. |
33 | - libgmp | |
34 | - libiconv | |
35 | - libintl | |
36 | - libltdl | |
37 | - libunistring | |
cab6e6c0 | 38 | - libgc |
127f5c62 | 39 | - libffi |
18f2d5aa LC |
40 | It will also use the libreadline library if it is available. |
41 | ||
42 | There is a corresponding `--with-XXX-prefix' option for each of these | |
43 | libraries (except for libgc and libffi which use `pkg-config', see | |
44 | below) that you can use when invoking ./configure, if you have these | |
45 | libraries installed in a location other than the standard places (/usr | |
46 | and /usr/local). | |
a89cafc0 NJ |
47 | |
48 | These options are provided by the Gnulib `havelib' module, and details | |
49 | of how they work are documented in `Searching for Libraries' in the | |
50 | Gnulib manual (http://www.gnu.org/software/gnulib/manual). The extent | |
51 | to which they work on a given OS depends on whether that OS supports | |
52 | encoding full library path names in executables (aka `rpath'). Also | |
53 | note that using these options, and hence hardcoding full library path | |
54 | names (where that is supported), makes it impossible to later move the | |
55 | built executables and libraries to an installation location other than | |
56 | the one that was specified at build time. | |
57 | ||
e744e076 TTN |
58 | Another possible approach is to set CPPFLAGS and LDFLAGS on the |
59 | configure command-line, so that they include -I options for all the | |
a89cafc0 NJ |
60 | non-standard places where you have installed header files and -L |
61 | options for all the non-standard places where you have installed | |
62 | libraries. This will allow configure and make to find those headers | |
e744e076 TTN |
63 | and libraries during the build. E.g.: |
64 | ||
65 | ../configure [...] CPPFLAGS='-I/my/include' LDFLAGS='-L/my/lib' | |
66 | ||
67 | The locations found will not be hardcoded into the build executables and | |
68 | libraries, so with this approach you will probably also need to set | |
69 | LD_LIBRARY_PATH correspondingly, to allow Guile to find the necessary | |
70 | libraries again at runtime. | |
d165aa15 RB |
71 | |
72 | ||
a98dbc87 MV |
73 | Required External Packages ================================================ |
74 | ||
75 | Guile requires the following external packages: | |
76 | ||
77 | - GNU MP, at least version 4.1 | |
78 | ||
79 | GNU MP is used for bignum arithmetic. It is available from | |
cab6e6c0 | 80 | http://gmplib.org/ . |
a98dbc87 | 81 | |
cab6e6c0 | 82 | - libltdl from GNU Libtool, at least version 1.5.6 |
a98dbc87 MV |
83 | |
84 | libltdl is used for loading extensions at run-time. It is | |
cab6e6c0 | 85 | available from http://www.gnu.org/software/libtool/ . |
a98dbc87 | 86 | |
1ee2c72e LC |
87 | - GNU libunistring |
88 | ||
89 | libunistring is used for Unicode string operations, such as the | |
90 | `utf*->string' procedures. It is available from | |
91 | http://www.gnu.org/software/libunistring/ . | |
92 | ||
cab6e6c0 LC |
93 | - libgc, at least version 7.0 |
94 | ||
95 | libgc (aka. the Boehm-Demers-Weiser garbage collector) is the | |
96 | conservative garbage collector used by Guile. It is available | |
97 | from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ . | |
98 | ||
127f5c62 LC |
99 | - libffi |
100 | ||
101 | libffi provides a "foreign function interface", used by the | |
102 | `(system foreign)' module. It is available from | |
103 | http://sourceware.org/libffi/ . | |
104 | ||
ef736635 NJ |
105 | - pkg-config |
106 | ||
107 | Guile's ./configure script uses pkg-config to discover the correct | |
35b67308 AW |
108 | compile and link options for libgc and libffi. If you don't have |
109 | pkg-config installed, or you have a version of libgc that doesn't | |
110 | provide a .pc file, you can work around this by setting some | |
111 | variables as part of the configure command-line: | |
ef736635 NJ |
112 | |
113 | - PKG_CONFIG=true | |
114 | ||
115 | - BDW_GC_CFLAGS=<compile flags for picking up libgc headers> | |
116 | ||
117 | - BDW_GC_LIBS=<linker flags for picking up the libgc library> | |
118 | ||
35b67308 AW |
119 | Note that because you're bypassing all pkg-config checks, you will |
120 | also have to specify libffi flags as well: | |
121 | ||
122 | - LIBFFI_CFLAGS=<compile flags for picking up libffi headers> | |
123 | ||
124 | - LIBFFI_LIBS=<linker flags for picking up the libffi library> | |
125 | ||
a98dbc87 | 126 | |
d165aa15 RB |
127 | Special Instructions For Some Systems ===================================== |
128 | ||
129 | We would like Guile to build on all systems using the simple | |
130 | instructions above, but it seems that a few systems still need special | |
131 | treatment. If you can send us fixes for these problems, we'd be | |
132 | grateful. | |
133 | ||
70bb8113 | 134 | <none yet listed> |
d165aa15 RB |
135 | |
136 | Guile specific flags Accepted by Configure ================================= | |
137 | ||
138 | If you run the configure script with no arguments, it should examine | |
139 | your system and set things up appropriately. However, there are a few | |
140 | switches specific to Guile you may find useful in some circumstances. | |
141 | ||
4f416616 | 142 | --without-threads --- Build without thread support |
d165aa15 | 143 | |
70bb8113 | 144 | Build a Guile executable and library that supports multi-threading. |
d165aa15 | 145 | |
70bb8113 MV |
146 | The default is to enable threading support when your operating |
147 | system offsers 'POSIX threads'. When you do not want threading, use | |
148 | `--without-threads'. | |
d165aa15 RB |
149 | |
150 | --enable-deprecated=LEVEL | |
151 | ||
152 | Guile may contain features that are `deprecated'. When a feature is | |
3623a170 MV |
153 | deprecated, it means that it is still there, but that there is a |
154 | better way of achieving the same thing, and we'd rather have you use | |
155 | this better way. This allows us to eventually remove the old | |
156 | implementation and helps to keep Guile reasonably clean of historic | |
157 | baggage. | |
158 | ||
d165aa15 RB |
159 | See the file NEWS for a list of features that are currently |
160 | deprecated. Each entry will also tell you what you should replace | |
161 | your code with. | |
162 | ||
163 | To give you some help with this process, and to encourage (OK, | |
164 | nudge) people to switch to the newer methods, Guile can emit | |
165 | warnings or errors when you use a deprecated feature. There is | |
166 | quite a range of possibilities, from being completely silent to | |
167 | giving errors at link time. What exactly happens is determined both | |
168 | by the value of the `--enable-deprecated' configuration option when | |
169 | Guile was built, and by the GUILE_WARN_DEPRECATED environment | |
170 | variable. | |
171 | ||
172 | It works like this: | |
173 | ||
174 | When Guile has been configured with `--enable-deprecated=no' (or, | |
175 | equivalently, with `--disable-deprecated') then all deprecated | |
176 | features are omitted from Guile. You will get "undefined | |
177 | reference", "variable unbound" or similar errors when you try to | |
178 | use them. | |
179 | ||
180 | When `--enable-deprecated=LEVEL' has been specified (for LEVEL not | |
181 | "no"), LEVEL will be used as the default value of the environment | |
182 | variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to | |
183 | "summary" and "shutup" is changed to "no", however. | |
184 | ||
185 | When GUILE_WARN_DEPRECATED has the value "no", nothing special | |
186 | will happen when a deprecated feature is used. | |
187 | ||
188 | When GUILE_WARN_DEPRECATED has the value "summary", and a | |
189 | deprecated feature has been used, Guile will print this message at | |
190 | exit: | |
191 | ||
192 | Some deprecated features have been used. Set the environment | |
193 | variable GUILE_WARN_DEPRECATED to "detailed" and rerun the | |
194 | program to get more information. Set it to "no" to suppress | |
195 | this message. | |
196 | ||
197 | When GUILE_WARN_DEPRECATED has the value "detailed", a detailed | |
198 | warning is emitted immediatly for the first use of a deprecated | |
199 | feature. | |
200 | ||
201 | The default is `--enable-deprecated=yes'. | |
202 | ||
8f305401 MV |
203 | In addition to setting GUILE_WARN_DEPRECATED in the environment, you |
204 | can also use (debug-enable 'warn-deprecated) and (debug-disable | |
205 | 'warn-deprecated) to enable and disable the detailed messaged at run | |
206 | time. | |
207 | ||
1435c7dc AW |
208 | Additionally, if your toolchain is new enough, you will receive |
209 | warnings at link time if you have a Guile extension that uses | |
210 | deprecated functions provided by Guile. | |
3623a170 | 211 | |
d165aa15 RB |
212 | --disable-shared --- Do not build shared libraries. |
213 | --disable-static --- Do not build static libraries. | |
214 | ||
215 | Normally, both static and shared libraries will be built if your | |
216 | system supports them. | |
217 | ||
d165aa15 RB |
218 | --enable-debug-freelist --- Enable freelist debugging. |
219 | ||
70bb8113 MV |
220 | This enables a debugging version of scm_cell and scm_double_cell, |
221 | and also registers an extra primitive, the setter | |
d165aa15 RB |
222 | `gc-set-debug-check-freelist!'. |
223 | ||
224 | Configure with the --enable-debug-freelist option to enable the | |
225 | gc-set-debug-check-freelist! primitive, and then use: | |
226 | ||
227 | (gc-set-debug-check-freelist! #t) # turn on checking of the freelist | |
228 | (gc-set-debug-check-freelist! #f) # turn off checking | |
229 | ||
230 | Checking of the freelist forces a traversal of the freelist and a | |
231 | garbage collection before each allocation of a cell. This can slow | |
232 | down the interpreter dramatically, so the setter should be used to | |
233 | turn on this extra processing only when necessary. | |
234 | ||
d165aa15 RB |
235 | --enable-debug-malloc --- Enable malloc debugging. |
236 | ||
70bb8113 | 237 | Include code for debugging of calls to scm_malloc, scm_realloc, etc. |
d165aa15 | 238 | |
70bb8113 MV |
239 | It records the number of allocated objects of each kind. This is |
240 | useful when searching for memory leaks. | |
d165aa15 RB |
241 | |
242 | A Guile compiled with this option provides the primitive | |
243 | `malloc-stats' which returns an alist with pairs of kind and the | |
244 | number of objects of that kind. | |
245 | ||
d165aa15 | 246 | --enable-guile-debug --- Include internal debugging functions |
d165aa15 RB |
247 | --disable-posix --- omit posix interfaces |
248 | --disable-networking --- omit networking interfaces | |
249 | --disable-regex --- omit regular expression interfaces | |
250 | ||
251 | ||
252 | Cross building Guile ===================================================== | |
253 | ||
254 | As of guile-1.5.x, the build process uses compiled C files for | |
255 | snarfing, and (indirectly, through libtool) for linking, and uses the | |
256 | guile executable for generating documentation. | |
257 | ||
258 | When cross building guile, you first need to configure, build and | |
259 | install guile for your build host. | |
260 | ||
261 | Then, you may configure guile for cross building, eg: | |
262 | ||
263 | ./configure --host=i686-pc-cygwin --disable-shared | |
264 | ||
cd9d439e KR |
265 | A C compiler for the build system is required. The default is |
266 | "PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified | |
267 | with the CC_FOR_BUILD variable in the usual way, for instance | |
d165aa15 | 268 | |
cd9d439e KR |
269 | ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc |
270 | ||
1028fcb2 KR |
271 | Guile for the build system can be specified similarly with the |
272 | GUILE_FOR_BUILD variable, it defaults to just "guile". | |
d165aa15 RB |
273 | |
274 | ||
275 | Using Guile Without Installing It ========================================= | |
276 | ||
0b6d8fdc AW |
277 | The "meta/" subdirectory of the Guile sources contains a script called |
278 | "guile" that can be used to run the Guile that has just been built. Note | |
279 | that this is not the same "guile" as the one that is installed; this | |
280 | "guile" is a wrapper script that sets up the environment appropriately, | |
281 | then invokes the Guile binary. | |
282 | ||
4ea9429e AW |
283 | You may also build external packages against an uninstalled Guile build |
284 | tree. The "uninstalled-env" script in the "meta/" subdirectory will set | |
285 | up an environment with a path including "meta/", a modified dynamic | |
286 | linker path, a modified PKG_CONFIG_PATH, etc. | |
0b6d8fdc AW |
287 | |
288 | For example, you can enter this environment via invoking | |
289 | ||
290 | meta/uninstalled-env bash | |
291 | ||
292 | Within that shell, other packages should be able to build against | |
293 | uninstalled Guile. | |
d165aa15 RB |
294 | |
295 | ||
296 | Installing SLIB =========================================================== | |
297 | ||
298 | In order to use SLIB from Guile you basically only need to put the | |
299 | `slib' directory _in_ one of the directories on Guile's load path. | |
300 | ||
301 | The standard installation is: | |
302 | ||
303 | 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html | |
304 | ||
305 | 2. Put it in Guile's data directory, that is the directory printed when | |
306 | you type | |
307 | ||
308 | guile-config info pkgdatadir | |
309 | ||
310 | at the shell prompt. This is normally `/usr/local/share/guile', so the | |
311 | directory will normally have full path `/usr/local/share/guile/slib'. | |
312 | ||
313 | 3. Start guile as a user with write access to the data directory and type | |
314 | ||
315 | (use-modules (ice-9 slib)) | |
316 | ||
317 | at the Guile prompt. This will generate the slibcat catalog next to | |
318 | the slib directory. | |
319 | ||
320 | SLIB's `require' is provided by the Guile module (ice-9 slib). | |
321 | ||
322 | Example: | |
323 | ||
324 | (use-modules (ice-9 slib)) | |
325 | (require 'primes) | |
326 | (prime? 7) | |
327 | ||
70bb8113 | 328 | |
394a535e MD |
329 | Guile Documentation ================================================== |
330 | ||
c52f77ef AW |
331 | The Guile Reference Manual (guile.info) is the primary documentation for |
332 | Guile. A copy of the R5RS Scheme specification is included too | |
333 | (r5rs.info). | |
ea8ac9ac KR |
334 | |
335 | Info format versions of this documentation are installed as part of | |
336 | the normal build process. The texinfo sources are under the doc | |
337 | directory, and other formats like Postscript, PDF, DVI or HTML can be | |
338 | generated from them with Tex and Texinfo tools. | |
339 | ||
340 | The doc directory also includes an example-smob subdirectory which has | |
341 | the example code from the "Defining New Types (Smobs)" chapter of the | |
342 | reference manual. | |
394a535e | 343 | |
b5074b23 MD |
344 | The Guile WWW page is at |
345 | ||
346 | http://www.gnu.org/software/guile/guile.html | |
347 | ||
348 | It contains a link to the Guile FAQ. | |
349 | ||
cf78e9e8 JB |
350 | About This Distribution ============================================== |
351 | ||
f89a27fa | 352 | Interesting files include: |
ae8de16e | 353 | |
d165aa15 | 354 | - LICENSE, which contains the exact terms of the Guile license. |
53befeb7 | 355 | - COPYING.LESSER, which contains the terms of the GNU Lesser General Public License. |
d165aa15 RB |
356 | - COPYING, which contains the terms of the GNU General Public License. |
357 | - INSTALL, which contains general instructions for building/installing Guile. | |
f89a27fa | 358 | - NEWS, which describes user-visible changes since the last release of Guile. |
f89a27fa | 359 | |
ae8de16e GH |
360 | Files are usually installed according to the prefix specified to |
361 | configure, /usr/local by default. Building and installing gives you: | |
362 | ||
363 | Executables, in ${prefix}/bin: | |
364 | ||
04873705 TTN |
365 | guile --- a stand-alone interpreter for Guile. With no arguments, this |
366 | is a simple interactive Scheme interpreter. It can also be used | |
367 | as an interpreter for script files; see the NEWS file for details. | |
368 | guile-config --- a Guile script which provides the information necessary | |
369 | to link your programs against the Guile library. | |
370 | guile-snarf --- a script to parse declarations in your C code for | |
371 | Scheme-visible C functions, Scheme objects to be used by C code, | |
372 | etc. | |
ae8de16e GH |
373 | |
374 | Libraries, in ${prefix}/lib. Depending on the platform and options | |
375 | given to configure, you may get shared libraries in addition | |
376 | to or instead of these static libraries: | |
0a7fcdbc | 377 | |
04873705 TTN |
378 | libguile.a --- an object library containing the Guile interpreter, |
379 | You can use Guile in your own programs by linking against this. | |
04873705 | 380 | libguilereadline.a --- an object library containing glue code for the |
70bb8113 MV |
381 | GNU readline library. |
382 | ||
04873705 | 383 | libguile-srfi-*.a --- various SRFI support libraries |
ae8de16e GH |
384 | |
385 | Header files, in ${prefix}/include: | |
386 | ||
04873705 TTN |
387 | libguile.h, guile/gh.h, libguile/*.h --- for libguile. |
388 | guile-readline/readline.h --- for guile-readline. | |
ae8de16e GH |
389 | |
390 | Support files, in ${prefix}/share/guile/<version>: | |
391 | ||
04873705 TTN |
392 | ice-9/* --- run-time support for Guile: the module system, |
393 | read-eval-print loop, some R4RS code and other infrastructure. | |
394 | oop/* --- the Guile Object-Oriented Programming System (GOOPS) | |
395 | scripts/* --- executable modules, i.e., scheme programs that can be both | |
396 | called as an executable from the shell, and loaded and used as a | |
397 | module from scheme code. See scripts/README for more info. | |
398 | srfi/* --- SRFI support modules. See srfi/README for more info. | |
ae8de16e GH |
399 | |
400 | Automake macros, in ${prefix}/share/aclocal: | |
401 | ||
04873705 | 402 | guile.m4 |
ae8de16e GH |
403 | |
404 | Documentation in Info format, in ${prefix}/info: | |
405 | ||
c08a1190 GH |
406 | guile --- Guile reference manual. |
407 | ||
408 | guile-tut --- Guile tutorial. | |
409 | ||
410 | GOOPS --- GOOPS reference manual. | |
411 | ||
412 | r5rs --- Revised(5) Report on the Algorithmic Language Scheme. | |
413 | ||
0196b30a | 414 | |
5c54da76 JB |
415 | The Guile source tree is laid out as follows: |
416 | ||
1325feea | 417 | libguile: |
cf78e9e8 JB |
418 | The Guile Scheme interpreter --- both the object library |
419 | for you to link with your programs, and the executable you can run. | |
1325feea | 420 | ice-9: Guile's module system, initialization code, and other infrastructure. |
17f8d40c JB |
421 | guile-config: |
422 | Source for the guile-config script. | |
621e8324 MV |
423 | guile-readline: |
424 | The glue code for using GNU readline with Guile. This | |
425 | will be build when configure can find a recent enough readline | |
426 | library on your system. | |
ae8de16e | 427 | doc: Documentation (see above). |
4c8980a2 | 428 | |
4b824aae | 429 | Git Repository Access ================================================ |
c11f9405 | 430 | |
4b824aae LC |
431 | Guile's source code is stored in a Git repository at Savannah. Anyone |
432 | can access it using `git-clone' from one of the following URLs: | |
c11f9405 | 433 | |
4b824aae LC |
434 | git://git.sv.gnu.org/guile.git |
435 | http://git.sv.gnu.org/r/guile.git | |
349d9c1f | 436 | |
4b824aae LC |
437 | Developers with a Savannah SSH account can also access it from: |
438 | ||
439 | ssh://git.sv.gnu.org/srv/git/guile.git | |
440 | ||
441 | The repository can also be browsed on-line at the following address: | |
442 | ||
443 | http://git.sv.gnu.org/gitweb/?p=guile.git | |
444 | ||
445 | For more information on Git, please see: | |
446 | ||
447 | http://git.or.cz/ | |
448 | ||
449 | Please send problem reports to <bug-guile@gnu.org>. |