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