(SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
[bpt/guile.git] / README
CommitLineData
04873705 1!!! This is not a Guile release; it is a source tree retrieved via
c299f186 2anonymous CVS or as a nightly snapshot at some random time after the
70bb8113 3Guile 1.6 release. If this were a Guile release, you would not see
04873705 4this message. !!! [fixme: zonk on release]
c299f186 5
ab4cd34b 6This is a 1.7 development version of Guile, Project GNU's extension
f2a75d81
RB
7language library. Guile is an interpreter for Scheme, packaged as a
8library that you can link into your applications to give them their
9own scripting language. Guile will eventually support other languages
10as well, giving users of Guile-based applications a choice of
11languages.
12
70bb8113 13Guile versions with an odd middle number, i.e. 1.7.* are unstable
f2a75d81
RB
14development versions. Even middle numbers indicate stable versions.
15This has been the case since the 1.3.* series.
16
ab4cd34b 17The next stable release will be version 1.8.0.
7fcc90c4 18
e1b6c710 19Please send bug reports to bug-guile@gnu.org.
86f40248 20
d165aa15
RB
21See the LICENSE file for the specific terms that apply to Guile.
22
23
24Additional INSTALL instructions ===========================================
25
26Generic instructions for configuring and compiling Guile can be found
27in the INSTALL file. Guile specific information and configure options
28can be found below, including instructions for installing SLIB.
29
30Guile can use a number of external packages such as `readline' when
31they are available. Guile expects to be able to find these packages
32in the default compiler setup, it does not try to make any special
33arrangements itself. For example, for the `readline' package, Guile
34expects to be able to find the include file <readline/readline.h>,
35without passing any special `-I' options to the compiler.
36
37If you installed an external package, and you used the --prefix
38installation option to install it somewhere else than /usr/local, you
39must arrange for your compiler to find it by default. If that
40compiler is gcc, one convenient way of making such arrangements is to
41use the --with-local-prefix option during installation, naming the
42same directory as you used in the --prefix option of the package. In
43particular, it is not good enough to use the same --prefix option when
44you install gcc and the package; you need to use the
45--with-local-prefix option as well. See the gcc documentation for
46more details.
47
48
49Special Instructions For Some Systems =====================================
50
51We would like Guile to build on all systems using the simple
52instructions above, but it seems that a few systems still need special
53treatment. If you can send us fixes for these problems, we'd be
54grateful.
55
70bb8113 56 <none yet listed>
d165aa15
RB
57
58Guile specific flags Accepted by Configure =================================
59
60If you run the configure script with no arguments, it should examine
61your system and set things up appropriately. However, there are a few
62switches specific to Guile you may find useful in some circumstances.
63
64--with-threads --- Build with thread support
65
70bb8113 66 Build a Guile executable and library that supports multi-threading.
d165aa15 67
70bb8113
MV
68 The default is to enable threading support when your operating
69 system offsers 'POSIX threads'. When you do not want threading, use
70 `--without-threads'.
d165aa15
RB
71
72--enable-deprecated=LEVEL
73
74 Guile may contain features that are `deprecated'. When a feature is
3623a170
MV
75 deprecated, it means that it is still there, but that there is a
76 better way of achieving the same thing, and we'd rather have you use
77 this better way. This allows us to eventually remove the old
78 implementation and helps to keep Guile reasonably clean of historic
79 baggage.
80
81 Deprecated features are considered harmful; using them is likely a
82 bug. See below for the related notion of `discouraged' features,
70bb8113 83 which are OK but have fallen out of favor.
d165aa15
RB
84
85 See the file NEWS for a list of features that are currently
86 deprecated. Each entry will also tell you what you should replace
87 your code with.
88
89 To give you some help with this process, and to encourage (OK,
90 nudge) people to switch to the newer methods, Guile can emit
91 warnings or errors when you use a deprecated feature. There is
92 quite a range of possibilities, from being completely silent to
93 giving errors at link time. What exactly happens is determined both
94 by the value of the `--enable-deprecated' configuration option when
95 Guile was built, and by the GUILE_WARN_DEPRECATED environment
96 variable.
97
98 It works like this:
99
100 When Guile has been configured with `--enable-deprecated=no' (or,
101 equivalently, with `--disable-deprecated') then all deprecated
102 features are omitted from Guile. You will get "undefined
103 reference", "variable unbound" or similar errors when you try to
104 use them.
105
106 When `--enable-deprecated=LEVEL' has been specified (for LEVEL not
107 "no"), LEVEL will be used as the default value of the environment
108 variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to
109 "summary" and "shutup" is changed to "no", however.
110
111 When GUILE_WARN_DEPRECATED has the value "no", nothing special
112 will happen when a deprecated feature is used.
113
114 When GUILE_WARN_DEPRECATED has the value "summary", and a
115 deprecated feature has been used, Guile will print this message at
116 exit:
117
118 Some deprecated features have been used. Set the environment
119 variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
120 program to get more information. Set it to "no" to suppress
121 this message.
122
123 When GUILE_WARN_DEPRECATED has the value "detailed", a detailed
124 warning is emitted immediatly for the first use of a deprecated
125 feature.
126
127 The default is `--enable-deprecated=yes'.
128
8f305401
MV
129 In addition to setting GUILE_WARN_DEPRECATED in the environment, you
130 can also use (debug-enable 'warn-deprecated) and (debug-disable
131 'warn-deprecated) to enable and disable the detailed messaged at run
132 time.
133
3623a170
MV
134--disable-discouraged
135
136 In addition to deprecated features, Guile can also contain things
137 that are merely `discouraged'. It is OK to continue to use these
138 features in old code, but new code should avoid them since there are
139 better alternatives.
140
141 There is nothing wrong with a discouraged feature per se, but they
142 might have strange names, or be non-standard, for example. Avoiding
143 them will make your code better.
144
d165aa15
RB
145--disable-shared --- Do not build shared libraries.
146--disable-static --- Do not build static libraries.
147
148 Normally, both static and shared libraries will be built if your
149 system supports them.
150
d165aa15
RB
151--enable-debug-freelist --- Enable freelist debugging.
152
70bb8113
MV
153 This enables a debugging version of scm_cell and scm_double_cell,
154 and also registers an extra primitive, the setter
d165aa15
RB
155 `gc-set-debug-check-freelist!'.
156
157 Configure with the --enable-debug-freelist option to enable the
158 gc-set-debug-check-freelist! primitive, and then use:
159
160 (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
161 (gc-set-debug-check-freelist! #f) # turn off checking
162
163 Checking of the freelist forces a traversal of the freelist and a
164 garbage collection before each allocation of a cell. This can slow
165 down the interpreter dramatically, so the setter should be used to
166 turn on this extra processing only when necessary.
167
d165aa15
RB
168--enable-debug-malloc --- Enable malloc debugging.
169
70bb8113 170 Include code for debugging of calls to scm_malloc, scm_realloc, etc.
d165aa15 171
70bb8113
MV
172 It records the number of allocated objects of each kind. This is
173 useful when searching for memory leaks.
d165aa15
RB
174
175 A Guile compiled with this option provides the primitive
176 `malloc-stats' which returns an alist with pairs of kind and the
177 number of objects of that kind.
178
d165aa15
RB
179--enable-guile-debug --- Include internal debugging functions
180--disable-arrays --- omit array and uniform array support
181--disable-posix --- omit posix interfaces
182--disable-networking --- omit networking interfaces
183--disable-regex --- omit regular expression interfaces
184
185
186Cross building Guile =====================================================
187
188As of guile-1.5.x, the build process uses compiled C files for
189snarfing, and (indirectly, through libtool) for linking, and uses the
190guile executable for generating documentation.
191
192When cross building guile, you first need to configure, build and
193install guile for your build host.
194
195Then, you may configure guile for cross building, eg:
196
197 ./configure --host=i686-pc-cygwin --disable-shared
198
cd9d439e
KR
199A C compiler for the build system is required. The default is
200"PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified
201with the CC_FOR_BUILD variable in the usual way, for instance
d165aa15 202
cd9d439e
KR
203 ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc
204
1028fcb2
KR
205Guile for the build system can be specified similarly with the
206GUILE_FOR_BUILD variable, it defaults to just "guile".
d165aa15
RB
207
208
209Using Guile Without Installing It =========================================
210
70bb8113
MV
211The top directory of the Guile sources contains a script called
212"pre-inst-guile" that can be used to run the Guile that has just been
213built.
d165aa15
RB
214
215
216Installing SLIB ===========================================================
217
218In order to use SLIB from Guile you basically only need to put the
219`slib' directory _in_ one of the directories on Guile's load path.
220
221The standard installation is:
222
223 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
224
225 2. Put it in Guile's data directory, that is the directory printed when
226 you type
227
228 guile-config info pkgdatadir
229
230 at the shell prompt. This is normally `/usr/local/share/guile', so the
231 directory will normally have full path `/usr/local/share/guile/slib'.
232
233 3. Start guile as a user with write access to the data directory and type
234
235 (use-modules (ice-9 slib))
236
237 at the Guile prompt. This will generate the slibcat catalog next to
238 the slib directory.
239
240SLIB's `require' is provided by the Guile module (ice-9 slib).
241
242Example:
243
244 (use-modules (ice-9 slib))
245 (require 'primes)
246 (prime? 7)
247
70bb8113 248
394a535e
MD
249Guile Documentation ==================================================
250
ea8ac9ac
KR
251If you've never used Scheme before, then the Guile Tutorial
252(guile-tut.info) is a good starting point. The Guile Reference Manual
253(guile.info) is the primary documentation for Guile. The Goops object
254system is documented separately (goops.info). A copy of the R5RS
255Scheme specification is included too (r5rs.info).
256
257Info format versions of this documentation are installed as part of
258the normal build process. The texinfo sources are under the doc
259directory, and other formats like Postscript, PDF, DVI or HTML can be
260generated from them with Tex and Texinfo tools.
261
262The doc directory also includes an example-smob subdirectory which has
263the example code from the "Defining New Types (Smobs)" chapter of the
264reference manual.
394a535e 265
b5074b23
MD
266The Guile WWW page is at
267
268 http://www.gnu.org/software/guile/guile.html
269
270It contains a link to the Guile FAQ.
271
cf78e9e8
JB
272About This Distribution ==============================================
273
f89a27fa 274Interesting files include:
ae8de16e 275
d165aa15
RB
276- LICENSE, which contains the exact terms of the Guile license.
277- COPYING, which contains the terms of the GNU General Public License.
278- INSTALL, which contains general instructions for building/installing Guile.
f89a27fa 279- NEWS, which describes user-visible changes since the last release of Guile.
f89a27fa 280
ae8de16e
GH
281Files are usually installed according to the prefix specified to
282configure, /usr/local by default. Building and installing gives you:
283
284Executables, in ${prefix}/bin:
285
04873705
TTN
286 guile --- a stand-alone interpreter for Guile. With no arguments, this
287 is a simple interactive Scheme interpreter. It can also be used
288 as an interpreter for script files; see the NEWS file for details.
289 guile-config --- a Guile script which provides the information necessary
290 to link your programs against the Guile library.
291 guile-snarf --- a script to parse declarations in your C code for
292 Scheme-visible C functions, Scheme objects to be used by C code,
293 etc.
ae8de16e
GH
294
295Libraries, in ${prefix}/lib. Depending on the platform and options
296 given to configure, you may get shared libraries in addition
297 to or instead of these static libraries:
0a7fcdbc 298
04873705
TTN
299 libguile.a --- an object library containing the Guile interpreter,
300 You can use Guile in your own programs by linking against this.
04873705 301 libguilereadline.a --- an object library containing glue code for the
70bb8113
MV
302 GNU readline library.
303
04873705 304 libguile-srfi-*.a --- various SRFI support libraries
ae8de16e
GH
305
306Header files, in ${prefix}/include:
307
04873705
TTN
308 libguile.h, guile/gh.h, libguile/*.h --- for libguile.
309 guile-readline/readline.h --- for guile-readline.
ae8de16e
GH
310
311Support files, in ${prefix}/share/guile/<version>:
312
04873705
TTN
313 ice-9/* --- run-time support for Guile: the module system,
314 read-eval-print loop, some R4RS code and other infrastructure.
315 oop/* --- the Guile Object-Oriented Programming System (GOOPS)
316 scripts/* --- executable modules, i.e., scheme programs that can be both
317 called as an executable from the shell, and loaded and used as a
318 module from scheme code. See scripts/README for more info.
319 srfi/* --- SRFI support modules. See srfi/README for more info.
ae8de16e
GH
320
321Automake macros, in ${prefix}/share/aclocal:
322
04873705 323 guile.m4
ae8de16e
GH
324
325Documentation in Info format, in ${prefix}/info:
326
c08a1190
GH
327 guile --- Guile reference manual.
328
329 guile-tut --- Guile tutorial.
330
331 GOOPS --- GOOPS reference manual.
332
333 r5rs --- Revised(5) Report on the Algorithmic Language Scheme.
334
0196b30a 335
5c54da76
JB
336The Guile source tree is laid out as follows:
337
1325feea 338libguile:
cf78e9e8
JB
339 The Guile Scheme interpreter --- both the object library
340 for you to link with your programs, and the executable you can run.
1325feea 341ice-9: Guile's module system, initialization code, and other infrastructure.
17f8d40c
JB
342guile-config:
343 Source for the guile-config script.
9a3c1149 344qt: A cooperative threads package from the University of Washington,
cf78e9e8 345 which Guile can use. If you configure Guile with the
3a629497
JB
346 --with-threads flag, you will need to link against the -lqt
347 library, found in this directory. Qt is under a separate
348 copyright; see `qt/README' for more details.
621e8324
MV
349guile-readline:
350 The glue code for using GNU readline with Guile. This
351 will be build when configure can find a recent enough readline
352 library on your system.
ae8de16e 353doc: Documentation (see above).
4c8980a2 354
c11f9405
JB
355Anonymous CVS Access and FTP snapshots ===============================
356
357We make the developers' working Guile sources available via anonymous
358CVS, and by nightly snapshots, accessible via FTP. See the files
359`ANON-CVS' and `SNAPSHOTS' for details.
360
349d9c1f 361If you would like to receive mail when people commit changes to the
ee2bf8b8
MV
362Guile CVS repository, you can subscribe to guile-cvs@gnu.org by the
363Mailman mailing list interface at
349d9c1f 364
ee2bf8b8 365 <http://mail.gnu.org/mailman/listinfo/guile-cvs>
349d9c1f 366
c11f9405 367
c484bf7f
JB
368Obtaining Guile ======================================================
369
370The latest official Guile release is available via anonymous FTP from
c484bf7f 371
b5074b23 372ftp://ftp.gnu.org/pub/gnu/guile/guile-1.4.tar.gz
c484bf7f 373
ee2bf8b8
MV
374The mailing list `guile-user@gnu.org' carries discussions, questions,
375and often answers, about Guile. To subscribe, use the Mailman mailing
376list interface at <http://mail.gnu.org/mailman/listinfo/guile-user>
377Of course, please send bug reports (and fixes!) to bug-guile@gnu.org.