1 This is version 2.0 of Guile, Project GNU's extension language library.
2 Guile is an implementation of the Scheme programming language, packaged
3 as a library that can be linked into applications to give them their own
4 extension language. Guile supports other languages as well, giving
5 users of Guile-based applications a choice of languages.
7 Please send bug reports to bug-guile@gnu.org.
9 See the LICENSE file for the specific terms that apply to Guile. Note
10 that for any copyright year range specified as YYYY-ZZZZ in this
11 package, the range specifies every single year in that closed interval.
14 Additional INSTALL instructions ===========================================
16 Generic instructions for configuring and compiling Guile can be found
17 in the INSTALL file. Guile specific information and configure options
18 can be found below, including instructions for installing SLIB.
20 Guile depends on the following external libraries.
28 It will also use the libreadline library if it is available.
30 There is a corresponding `--with-XXX-prefix' option for each of these
31 libraries (except for libgc and libffi which use `pkg-config', see
32 below) that you can use when invoking ./configure, if you have these
33 libraries installed in a location other than the standard places (/usr
36 These options are provided by the Gnulib `havelib' module, and details
37 of how they work are documented in `Searching for Libraries' in the
38 Gnulib manual (http://www.gnu.org/software/gnulib/manual). The extent
39 to which they work on a given OS depends on whether that OS supports
40 encoding full library path names in executables (aka `rpath'). Also
41 note that using these options, and hence hardcoding full library path
42 names (where that is supported), makes it impossible to later move the
43 built executables and libraries to an installation location other than
44 the one that was specified at build time.
46 Another possible approach is to set CPPFLAGS and LDFLAGS on the
47 configure command-line, so that they include -I options for all the
48 non-standard places where you have installed header files and -L
49 options for all the non-standard places where you have installed
50 libraries. This will allow configure and make to find those headers
51 and libraries during the build. E.g.:
53 ../configure [...] CPPFLAGS='-I/my/include' LDFLAGS='-L/my/lib'
55 The locations found will not be hardcoded into the build executables and
56 libraries, so with this approach you will probably also need to set
57 LD_LIBRARY_PATH correspondingly, to allow Guile to find the necessary
58 libraries again at runtime.
61 Required External Packages ================================================
63 Guile requires the following external packages:
65 - GNU MP, at least version 4.1
67 GNU MP is used for bignum arithmetic. It is available from
70 - libltdl from GNU Libtool, at least version 1.5.6
72 libltdl is used for loading extensions at run-time. It is
73 available from http://www.gnu.org/software/libtool/ .
77 libunistring is used for Unicode string operations, such as the
78 `utf*->string' procedures. It is available from
79 http://www.gnu.org/software/libunistring/ .
81 - libgc, at least version 7.0
83 libgc (aka. the Boehm-Demers-Weiser garbage collector) is the
84 conservative garbage collector used by Guile. It is available
85 from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ .
89 libffi provides a "foreign function interface", used by the
90 `(system foreign)' module. It is available from
91 http://sourceware.org/libffi/ .
95 Guile's ./configure script uses pkg-config to discover the correct
96 compile and link options for libgc and libffi. If you don't have
97 pkg-config installed, or you have a version of libgc that doesn't
98 provide a .pc file, you can work around this by setting some
99 variables as part of the configure command-line:
103 - BDW_GC_CFLAGS=<compile flags for picking up libgc headers>
105 - BDW_GC_LIBS=<linker flags for picking up the libgc library>
107 Note that because you're bypassing all pkg-config checks, you will
108 also have to specify libffi flags as well:
110 - LIBFFI_CFLAGS=<compile flags for picking up libffi headers>
112 - LIBFFI_LIBS=<linker flags for picking up the libffi library>
115 Special Instructions For Some Systems =====================================
117 We would like Guile to build on all systems using the simple
118 instructions above, but it seems that a few systems still need special
119 treatment. If you can send us fixes for these problems, we'd be
124 Guile specific flags Accepted by Configure =================================
126 If you run the configure script with no arguments, it should examine
127 your system and set things up appropriately. However, there are a few
128 switches specific to Guile you may find useful in some circumstances.
130 --without-threads --- Build without thread support
132 Build a Guile executable and library that supports multi-threading.
134 The default is to enable threading support when your operating
135 system offsers 'POSIX threads'. When you do not want threading, use
138 --enable-deprecated=LEVEL
140 Guile may contain features that are `deprecated'. When a feature is
141 deprecated, it means that it is still there, but that there is a
142 better way of achieving the same thing, and we'd rather have you use
143 this better way. This allows us to eventually remove the old
144 implementation and helps to keep Guile reasonably clean of historic
147 See the file NEWS for a list of features that are currently
148 deprecated. Each entry will also tell you what you should replace
151 To give you some help with this process, and to encourage (OK,
152 nudge) people to switch to the newer methods, Guile can emit
153 warnings or errors when you use a deprecated feature. There is
154 quite a range of possibilities, from being completely silent to
155 giving errors at link time. What exactly happens is determined both
156 by the value of the `--enable-deprecated' configuration option when
157 Guile was built, and by the GUILE_WARN_DEPRECATED environment
162 When Guile has been configured with `--enable-deprecated=no' (or,
163 equivalently, with `--disable-deprecated') then all deprecated
164 features are omitted from Guile. You will get "undefined
165 reference", "variable unbound" or similar errors when you try to
168 When `--enable-deprecated=LEVEL' has been specified (for LEVEL not
169 "no"), LEVEL will be used as the default value of the environment
170 variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to
171 "summary" and "shutup" is changed to "no", however.
173 When GUILE_WARN_DEPRECATED has the value "no", nothing special
174 will happen when a deprecated feature is used.
176 When GUILE_WARN_DEPRECATED has the value "summary", and a
177 deprecated feature has been used, Guile will print this message at
180 Some deprecated features have been used. Set the environment
181 variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
182 program to get more information. Set it to "no" to suppress
185 When GUILE_WARN_DEPRECATED has the value "detailed", a detailed
186 warning is emitted immediatly for the first use of a deprecated
189 The default is `--enable-deprecated=yes'.
191 In addition to setting GUILE_WARN_DEPRECATED in the environment, you
192 can also use (debug-enable 'warn-deprecated) and (debug-disable
193 'warn-deprecated) to enable and disable the detailed messaged at run
196 Additionally, if your toolchain is new enough, you will receive
197 warnings at link time if you have a Guile extension that uses
198 deprecated functions provided by Guile.
200 --disable-shared --- Do not build shared libraries.
201 --disable-static --- Do not build static libraries.
203 Normally, both static and shared libraries will be built if your
204 system supports them.
206 --enable-debug-freelist --- Enable freelist debugging.
208 This enables a debugging version of scm_cell and scm_double_cell,
209 and also registers an extra primitive, the setter
210 `gc-set-debug-check-freelist!'.
212 Configure with the --enable-debug-freelist option to enable the
213 gc-set-debug-check-freelist! primitive, and then use:
215 (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
216 (gc-set-debug-check-freelist! #f) # turn off checking
218 Checking of the freelist forces a traversal of the freelist and a
219 garbage collection before each allocation of a cell. This can slow
220 down the interpreter dramatically, so the setter should be used to
221 turn on this extra processing only when necessary.
223 --enable-debug-malloc --- Enable malloc debugging.
225 Include code for debugging of calls to scm_malloc, scm_realloc, etc.
227 It records the number of allocated objects of each kind. This is
228 useful when searching for memory leaks.
230 A Guile compiled with this option provides the primitive
231 `malloc-stats' which returns an alist with pairs of kind and the
232 number of objects of that kind.
234 --enable-guile-debug --- Include internal debugging functions
235 --disable-posix --- omit posix interfaces
236 --disable-networking --- omit networking interfaces
237 --disable-regex --- omit regular expression interfaces
240 Cross building Guile =====================================================
242 As of guile-1.5.x, the build process uses compiled C files for
243 snarfing, and (indirectly, through libtool) for linking, and uses the
244 guile executable for generating documentation.
246 When cross building guile, you first need to configure, build and
247 install guile for your build host.
249 Then, you may configure guile for cross building, eg:
251 ./configure --host=i686-pc-cygwin --disable-shared
253 A C compiler for the build system is required. The default is
254 "PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified
255 with the CC_FOR_BUILD variable in the usual way, for instance
257 ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc
259 Guile for the build system can be specified similarly with the
260 GUILE_FOR_BUILD variable, it defaults to just "guile".
263 Using Guile Without Installing It =========================================
265 The "meta/" subdirectory of the Guile sources contains a script called
266 "guile" that can be used to run the Guile that has just been built. Note
267 that this is not the same "guile" as the one that is installed; this
268 "guile" is a wrapper script that sets up the environment appropriately,
269 then invokes the Guile binary.
271 You may also build external packages against an uninstalled Guile build
272 tree. The "uninstalled-env" script in the "meta/" subdirectory will set
273 up an environment with a path including "meta/", a modified dynamic
274 linker path, a modified PKG_CONFIG_PATH, etc.
276 For example, you can enter this environment via invoking
278 meta/uninstalled-env bash
280 Within that shell, other packages should be able to build against
284 Installing SLIB ===========================================================
286 In order to use SLIB from Guile you basically only need to put the
287 `slib' directory _in_ one of the directories on Guile's load path.
289 The standard installation is:
291 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
293 2. Put it in Guile's data directory, that is the directory printed when
296 guile-config info pkgdatadir
298 at the shell prompt. This is normally `/usr/local/share/guile', so the
299 directory will normally have full path `/usr/local/share/guile/slib'.
301 3. Start guile as a user with write access to the data directory and type
303 (use-modules (ice-9 slib))
305 at the Guile prompt. This will generate the slibcat catalog next to
308 SLIB's `require' is provided by the Guile module (ice-9 slib).
312 (use-modules (ice-9 slib))
317 Guile Documentation ==================================================
319 The Guile Reference Manual (guile.info) is the primary documentation for
320 Guile. A copy of the R5RS Scheme specification is included too
323 Info format versions of this documentation are installed as part of
324 the normal build process. The texinfo sources are under the doc
325 directory, and other formats like Postscript, PDF, DVI or HTML can be
326 generated from them with Tex and Texinfo tools.
328 The doc directory also includes an example-smob subdirectory which has
329 the example code from the "Defining New Types (Smobs)" chapter of the
332 The Guile WWW page is at
334 http://www.gnu.org/software/guile/guile.html
336 It contains a link to the Guile FAQ.
338 About This Distribution ==============================================
340 Interesting files include:
342 - LICENSE, which contains the exact terms of the Guile license.
343 - COPYING.LESSER, which contains the terms of the GNU Lesser General Public License.
344 - COPYING, which contains the terms of the GNU General Public License.
345 - INSTALL, which contains general instructions for building/installing Guile.
346 - NEWS, which describes user-visible changes since the last release of Guile.
348 Files are usually installed according to the prefix specified to
349 configure, /usr/local by default. Building and installing gives you:
351 Executables, in ${prefix}/bin:
353 guile --- a stand-alone interpreter for Guile. With no arguments, this
354 is a simple interactive Scheme interpreter. It can also be used
355 as an interpreter for script files; see the NEWS file for details.
356 guile-config --- a Guile script which provides the information necessary
357 to link your programs against the Guile library.
358 guile-snarf --- a script to parse declarations in your C code for
359 Scheme-visible C functions, Scheme objects to be used by C code,
362 Libraries, in ${prefix}/lib. Depending on the platform and options
363 given to configure, you may get shared libraries in addition
364 to or instead of these static libraries:
366 libguile.a --- an object library containing the Guile interpreter,
367 You can use Guile in your own programs by linking against this.
368 libguilereadline.a --- an object library containing glue code for the
369 GNU readline library.
371 libguile-srfi-*.a --- various SRFI support libraries
373 Header files, in ${prefix}/include:
375 libguile.h, guile/gh.h, libguile/*.h --- for libguile.
376 guile-readline/readline.h --- for guile-readline.
378 Support files, in ${prefix}/share/guile/<version>:
380 ice-9/* --- run-time support for Guile: the module system,
381 read-eval-print loop, some R4RS code and other infrastructure.
382 oop/* --- the Guile Object-Oriented Programming System (GOOPS)
383 scripts/* --- executable modules, i.e., scheme programs that can be both
384 called as an executable from the shell, and loaded and used as a
385 module from scheme code. See scripts/README for more info.
386 srfi/* --- SRFI support modules. See srfi/README for more info.
388 Automake macros, in ${prefix}/share/aclocal:
392 Documentation in Info format, in ${prefix}/info:
394 guile --- Guile reference manual.
396 guile-tut --- Guile tutorial.
398 GOOPS --- GOOPS reference manual.
400 r5rs --- Revised(5) Report on the Algorithmic Language Scheme.
403 The Guile source tree is laid out as follows:
406 The Guile Scheme interpreter --- both the object library
407 for you to link with your programs, and the executable you can run.
408 ice-9: Guile's module system, initialization code, and other infrastructure.
410 Source for the guile-config script.
412 The glue code for using GNU readline with Guile. This
413 will be build when configure can find a recent enough readline
414 library on your system.
415 doc: Documentation (see above).
417 Git Repository Access ================================================
419 Guile's source code is stored in a Git repository at Savannah. Anyone
420 can access it using `git-clone' from one of the following URLs:
422 git://git.sv.gnu.org/guile.git
423 http://git.sv.gnu.org/r/guile.git
425 Developers with a Savannah SSH account can also access it from:
427 ssh://git.sv.gnu.org/srv/git/guile.git
429 The repository can also be browsed on-line at the following address:
431 http://git.sv.gnu.org/gitweb/?p=guile.git
433 For more information on Git, please see:
437 Please send problem reports to <bug-guile@gnu.org>.