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 | ||
1028fcb2 KR |
225 | Guile for the build system can be specified similarly with the |
226 | GUILE_FOR_BUILD variable, it defaults to just "guile". | |
d165aa15 RB |
227 | |
228 | ||
229 | Using Guile Without Installing It ========================================= | |
230 | ||
231 | If you want to run Guile without installing it, set the environment | |
232 | variable `GUILE_LOAD_PATH' to a colon-separated list of directories, | |
233 | including the directory containing this INSTALL file. If you used a | |
234 | separate build directory, you'll need to include the build directory | |
235 | in the path as well. | |
236 | ||
237 | For example, suppose the Guile distribution unpacked into a directory | |
238 | called `/home/jimb/guile-snap' (so the full name of this INSTALL file | |
239 | would be `/home/jimb/guile-snap/INSTALL'). Then you might say, if | |
240 | you're using Bash or any other Bourne shell variant, | |
241 | ||
242 | export GUILE_LOAD_PATH=/home/jimb/guile-snap | |
243 | ||
244 | or if you're using CSH or one of its variants: | |
245 | ||
246 | setenv GUILE_LOAD_PATH /home/jimb/guile-snap | |
247 | ||
248 | You will additionally need to set your `LTDL_LIBRARY_PATH' environment | |
249 | variable to the directory in which the compiled SRFI support modules | |
250 | are created if you want to use the modules for SRFI-4, SRFI-13 or | |
251 | SRFI-14 support. Similar to the example above, this will be, | |
252 | ||
253 | export LTDL_LIBRARY_PATH=/home/jimb/guile-snap/srfi/.libs | |
254 | ||
255 | or if you're using CSH or one of its variants: | |
256 | ||
257 | setenv LTDL_LIBRARY_PATH /home/jimb/guile-snap/srfi/.libs | |
258 | ||
259 | ||
260 | Installing SLIB =========================================================== | |
261 | ||
262 | In order to use SLIB from Guile you basically only need to put the | |
263 | `slib' directory _in_ one of the directories on Guile's load path. | |
264 | ||
265 | The standard installation is: | |
266 | ||
267 | 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html | |
268 | ||
269 | 2. Put it in Guile's data directory, that is the directory printed when | |
270 | you type | |
271 | ||
272 | guile-config info pkgdatadir | |
273 | ||
274 | at the shell prompt. This is normally `/usr/local/share/guile', so the | |
275 | directory will normally have full path `/usr/local/share/guile/slib'. | |
276 | ||
277 | 3. Start guile as a user with write access to the data directory and type | |
278 | ||
279 | (use-modules (ice-9 slib)) | |
280 | ||
281 | at the Guile prompt. This will generate the slibcat catalog next to | |
282 | the slib directory. | |
283 | ||
284 | SLIB's `require' is provided by the Guile module (ice-9 slib). | |
285 | ||
286 | Example: | |
287 | ||
288 | (use-modules (ice-9 slib)) | |
289 | (require 'primes) | |
290 | (prime? 7) | |
291 | ||
394a535e MD |
292 | Guile Documentation ================================================== |
293 | ||
ea8ac9ac KR |
294 | If you've never used Scheme before, then the Guile Tutorial |
295 | (guile-tut.info) is a good starting point. The Guile Reference Manual | |
296 | (guile.info) is the primary documentation for Guile. The Goops object | |
297 | system is documented separately (goops.info). A copy of the R5RS | |
298 | Scheme specification is included too (r5rs.info). | |
299 | ||
300 | Info format versions of this documentation are installed as part of | |
301 | the normal build process. The texinfo sources are under the doc | |
302 | directory, and other formats like Postscript, PDF, DVI or HTML can be | |
303 | generated from them with Tex and Texinfo tools. | |
304 | ||
305 | The doc directory also includes an example-smob subdirectory which has | |
306 | the example code from the "Defining New Types (Smobs)" chapter of the | |
307 | reference manual. | |
394a535e | 308 | |
b5074b23 MD |
309 | The Guile WWW page is at |
310 | ||
311 | http://www.gnu.org/software/guile/guile.html | |
312 | ||
313 | It contains a link to the Guile FAQ. | |
314 | ||
cf78e9e8 JB |
315 | About This Distribution ============================================== |
316 | ||
f89a27fa | 317 | Interesting files include: |
ae8de16e | 318 | |
d165aa15 RB |
319 | - LICENSE, which contains the exact terms of the Guile license. |
320 | - COPYING, which contains the terms of the GNU General Public License. | |
321 | - INSTALL, which contains general instructions for building/installing Guile. | |
f89a27fa | 322 | - NEWS, which describes user-visible changes since the last release of Guile. |
f89a27fa | 323 | |
ae8de16e GH |
324 | Files are usually installed according to the prefix specified to |
325 | configure, /usr/local by default. Building and installing gives you: | |
326 | ||
327 | Executables, in ${prefix}/bin: | |
328 | ||
04873705 TTN |
329 | guile --- a stand-alone interpreter for Guile. With no arguments, this |
330 | is a simple interactive Scheme interpreter. It can also be used | |
331 | as an interpreter for script files; see the NEWS file for details. | |
332 | guile-config --- a Guile script which provides the information necessary | |
333 | to link your programs against the Guile library. | |
334 | guile-snarf --- a script to parse declarations in your C code for | |
335 | Scheme-visible C functions, Scheme objects to be used by C code, | |
336 | etc. | |
337 | guile-tools --- a wrapper to invoke the executable modules in | |
338 | subdirectory `scripts' (also installed). | |
ae8de16e GH |
339 | |
340 | Libraries, in ${prefix}/lib. Depending on the platform and options | |
341 | given to configure, you may get shared libraries in addition | |
342 | to or instead of these static libraries: | |
0a7fcdbc | 343 | |
04873705 TTN |
344 | libguile.a --- an object library containing the Guile interpreter, |
345 | You can use Guile in your own programs by linking against this. | |
346 | libqthreads.a --- an object library containing the QuickThreads | |
347 | primitives. If you enabled thread support when you configured | |
348 | Guile, you will need to link your code against this too. | |
349 | libguilereadline.a --- an object library containing glue code for the | |
350 | GNU readline library. See NEWS for instructions on how to enable | |
351 | readline for your personal use. | |
352 | libguile-srfi-*.a --- various SRFI support libraries | |
ae8de16e GH |
353 | |
354 | Header files, in ${prefix}/include: | |
355 | ||
04873705 TTN |
356 | libguile.h, guile/gh.h, libguile/*.h --- for libguile. |
357 | guile-readline/readline.h --- for guile-readline. | |
ae8de16e GH |
358 | |
359 | Support files, in ${prefix}/share/guile/<version>: | |
360 | ||
04873705 TTN |
361 | ice-9/* --- run-time support for Guile: the module system, |
362 | read-eval-print loop, some R4RS code and other infrastructure. | |
363 | oop/* --- the Guile Object-Oriented Programming System (GOOPS) | |
364 | scripts/* --- executable modules, i.e., scheme programs that can be both | |
365 | called as an executable from the shell, and loaded and used as a | |
366 | module from scheme code. See scripts/README for more info. | |
367 | srfi/* --- SRFI support modules. See srfi/README for more info. | |
ae8de16e GH |
368 | |
369 | Automake macros, in ${prefix}/share/aclocal: | |
370 | ||
04873705 | 371 | guile.m4 |
ae8de16e GH |
372 | |
373 | Documentation in Info format, in ${prefix}/info: | |
374 | ||
c08a1190 GH |
375 | guile --- Guile reference manual. |
376 | ||
377 | guile-tut --- Guile tutorial. | |
378 | ||
379 | GOOPS --- GOOPS reference manual. | |
380 | ||
381 | r5rs --- Revised(5) Report on the Algorithmic Language Scheme. | |
382 | ||
0196b30a | 383 | |
5c54da76 JB |
384 | The Guile source tree is laid out as follows: |
385 | ||
1325feea | 386 | libguile: |
cf78e9e8 JB |
387 | The Guile Scheme interpreter --- both the object library |
388 | for you to link with your programs, and the executable you can run. | |
1325feea | 389 | ice-9: Guile's module system, initialization code, and other infrastructure. |
17f8d40c JB |
390 | guile-config: |
391 | Source for the guile-config script. | |
9a3c1149 | 392 | qt: A cooperative threads package from the University of Washington, |
cf78e9e8 | 393 | which Guile can use. If you configure Guile with the |
3a629497 JB |
394 | --with-threads flag, you will need to link against the -lqt |
395 | library, found in this directory. Qt is under a separate | |
396 | copyright; see `qt/README' for more details. | |
621e8324 MV |
397 | guile-readline: |
398 | The glue code for using GNU readline with Guile. This | |
399 | will be build when configure can find a recent enough readline | |
400 | library on your system. | |
ae8de16e | 401 | doc: Documentation (see above). |
4c8980a2 | 402 | |
c11f9405 JB |
403 | Anonymous CVS Access and FTP snapshots =============================== |
404 | ||
405 | We make the developers' working Guile sources available via anonymous | |
406 | CVS, and by nightly snapshots, accessible via FTP. See the files | |
407 | `ANON-CVS' and `SNAPSHOTS' for details. | |
408 | ||
349d9c1f | 409 | If you would like to receive mail when people commit changes to the |
ee2bf8b8 MV |
410 | Guile CVS repository, you can subscribe to guile-cvs@gnu.org by the |
411 | Mailman mailing list interface at | |
349d9c1f | 412 | |
ee2bf8b8 | 413 | <http://mail.gnu.org/mailman/listinfo/guile-cvs> |
349d9c1f | 414 | |
c11f9405 | 415 | |
c484bf7f JB |
416 | Obtaining Guile ====================================================== |
417 | ||
418 | The latest official Guile release is available via anonymous FTP from | |
c484bf7f | 419 | |
b5074b23 | 420 | ftp://ftp.gnu.org/pub/gnu/guile/guile-1.4.tar.gz |
c484bf7f | 421 | |
ee2bf8b8 MV |
422 | The mailing list `guile-user@gnu.org' carries discussions, questions, |
423 | and often answers, about Guile. To subscribe, use the Mailman mailing | |
424 | list interface at <http://mail.gnu.org/mailman/listinfo/guile-user> | |
425 | Of course, please send bug reports (and fixes!) to bug-guile@gnu.org. |