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 |
70bb8113 | 3 | Guile 1.6 release. If this were a Guile release, you would not see |
04873705 | 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 | ||
70bb8113 | 13 | Guile versions with an odd middle number, i.e. 1.7.* 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 | ||
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 | ||
70bb8113 | 56 | <none yet listed> |
d165aa15 RB |
57 | |
58 | Guile specific flags Accepted by Configure ================================= | |
59 | ||
60 | If you run the configure script with no arguments, it should examine | |
61 | your system and set things up appropriately. However, there are a few | |
62 | switches 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 | ||
3623a170 MV |
129 | --disable-discouraged |
130 | ||
131 | In addition to deprecated features, Guile can also contain things | |
132 | that are merely `discouraged'. It is OK to continue to use these | |
133 | features in old code, but new code should avoid them since there are | |
134 | better alternatives. | |
135 | ||
136 | There is nothing wrong with a discouraged feature per se, but they | |
137 | might have strange names, or be non-standard, for example. Avoiding | |
138 | them will make your code better. | |
139 | ||
d165aa15 RB |
140 | --disable-shared --- Do not build shared libraries. |
141 | --disable-static --- Do not build static libraries. | |
142 | ||
143 | Normally, both static and shared libraries will be built if your | |
144 | system supports them. | |
145 | ||
d165aa15 RB |
146 | --enable-debug-freelist --- Enable freelist debugging. |
147 | ||
70bb8113 MV |
148 | This enables a debugging version of scm_cell and scm_double_cell, |
149 | and also registers an extra primitive, the setter | |
d165aa15 RB |
150 | `gc-set-debug-check-freelist!'. |
151 | ||
152 | Configure with the --enable-debug-freelist option to enable the | |
153 | gc-set-debug-check-freelist! primitive, and then use: | |
154 | ||
155 | (gc-set-debug-check-freelist! #t) # turn on checking of the freelist | |
156 | (gc-set-debug-check-freelist! #f) # turn off checking | |
157 | ||
158 | Checking of the freelist forces a traversal of the freelist and a | |
159 | garbage collection before each allocation of a cell. This can slow | |
160 | down the interpreter dramatically, so the setter should be used to | |
161 | turn on this extra processing only when necessary. | |
162 | ||
d165aa15 RB |
163 | --enable-debug-malloc --- Enable malloc debugging. |
164 | ||
70bb8113 | 165 | Include code for debugging of calls to scm_malloc, scm_realloc, etc. |
d165aa15 | 166 | |
70bb8113 MV |
167 | It records the number of allocated objects of each kind. This is |
168 | useful when searching for memory leaks. | |
d165aa15 RB |
169 | |
170 | A Guile compiled with this option provides the primitive | |
171 | `malloc-stats' which returns an alist with pairs of kind and the | |
172 | number of objects of that kind. | |
173 | ||
d165aa15 RB |
174 | --enable-guile-debug --- Include internal debugging functions |
175 | --disable-arrays --- omit array and uniform array support | |
176 | --disable-posix --- omit posix interfaces | |
177 | --disable-networking --- omit networking interfaces | |
178 | --disable-regex --- omit regular expression interfaces | |
179 | ||
180 | ||
181 | Cross building Guile ===================================================== | |
182 | ||
183 | As of guile-1.5.x, the build process uses compiled C files for | |
184 | snarfing, and (indirectly, through libtool) for linking, and uses the | |
185 | guile executable for generating documentation. | |
186 | ||
187 | When cross building guile, you first need to configure, build and | |
188 | install guile for your build host. | |
189 | ||
190 | Then, you may configure guile for cross building, eg: | |
191 | ||
192 | ./configure --host=i686-pc-cygwin --disable-shared | |
193 | ||
cd9d439e KR |
194 | A C compiler for the build system is required. The default is |
195 | "PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified | |
196 | with the CC_FOR_BUILD variable in the usual way, for instance | |
d165aa15 | 197 | |
cd9d439e KR |
198 | ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc |
199 | ||
1028fcb2 KR |
200 | Guile for the build system can be specified similarly with the |
201 | GUILE_FOR_BUILD variable, it defaults to just "guile". | |
d165aa15 RB |
202 | |
203 | ||
204 | Using Guile Without Installing It ========================================= | |
205 | ||
70bb8113 MV |
206 | The top directory of the Guile sources contains a script called |
207 | "pre-inst-guile" that can be used to run the Guile that has just been | |
208 | built. | |
d165aa15 RB |
209 | |
210 | ||
211 | Installing SLIB =========================================================== | |
212 | ||
213 | In order to use SLIB from Guile you basically only need to put the | |
214 | `slib' directory _in_ one of the directories on Guile's load path. | |
215 | ||
216 | The standard installation is: | |
217 | ||
218 | 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html | |
219 | ||
220 | 2. Put it in Guile's data directory, that is the directory printed when | |
221 | you type | |
222 | ||
223 | guile-config info pkgdatadir | |
224 | ||
225 | at the shell prompt. This is normally `/usr/local/share/guile', so the | |
226 | directory will normally have full path `/usr/local/share/guile/slib'. | |
227 | ||
228 | 3. Start guile as a user with write access to the data directory and type | |
229 | ||
230 | (use-modules (ice-9 slib)) | |
231 | ||
232 | at the Guile prompt. This will generate the slibcat catalog next to | |
233 | the slib directory. | |
234 | ||
235 | SLIB's `require' is provided by the Guile module (ice-9 slib). | |
236 | ||
237 | Example: | |
238 | ||
239 | (use-modules (ice-9 slib)) | |
240 | (require 'primes) | |
241 | (prime? 7) | |
242 | ||
70bb8113 | 243 | |
394a535e MD |
244 | Guile Documentation ================================================== |
245 | ||
ea8ac9ac KR |
246 | If you've never used Scheme before, then the Guile Tutorial |
247 | (guile-tut.info) is a good starting point. The Guile Reference Manual | |
248 | (guile.info) is the primary documentation for Guile. The Goops object | |
249 | system is documented separately (goops.info). A copy of the R5RS | |
250 | Scheme specification is included too (r5rs.info). | |
251 | ||
252 | Info format versions of this documentation are installed as part of | |
253 | the normal build process. The texinfo sources are under the doc | |
254 | directory, and other formats like Postscript, PDF, DVI or HTML can be | |
255 | generated from them with Tex and Texinfo tools. | |
256 | ||
257 | The doc directory also includes an example-smob subdirectory which has | |
258 | the example code from the "Defining New Types (Smobs)" chapter of the | |
259 | reference manual. | |
394a535e | 260 | |
b5074b23 MD |
261 | The Guile WWW page is at |
262 | ||
263 | http://www.gnu.org/software/guile/guile.html | |
264 | ||
265 | It contains a link to the Guile FAQ. | |
266 | ||
cf78e9e8 JB |
267 | About This Distribution ============================================== |
268 | ||
f89a27fa | 269 | Interesting files include: |
ae8de16e | 270 | |
d165aa15 RB |
271 | - LICENSE, which contains the exact terms of the Guile license. |
272 | - COPYING, which contains the terms of the GNU General Public License. | |
273 | - INSTALL, which contains general instructions for building/installing Guile. | |
f89a27fa | 274 | - NEWS, which describes user-visible changes since the last release of Guile. |
f89a27fa | 275 | |
ae8de16e GH |
276 | Files are usually installed according to the prefix specified to |
277 | configure, /usr/local by default. Building and installing gives you: | |
278 | ||
279 | Executables, in ${prefix}/bin: | |
280 | ||
04873705 TTN |
281 | guile --- a stand-alone interpreter for Guile. With no arguments, this |
282 | is a simple interactive Scheme interpreter. It can also be used | |
283 | as an interpreter for script files; see the NEWS file for details. | |
284 | guile-config --- a Guile script which provides the information necessary | |
285 | to link your programs against the Guile library. | |
286 | guile-snarf --- a script to parse declarations in your C code for | |
287 | Scheme-visible C functions, Scheme objects to be used by C code, | |
288 | etc. | |
ae8de16e GH |
289 | |
290 | Libraries, in ${prefix}/lib. Depending on the platform and options | |
291 | given to configure, you may get shared libraries in addition | |
292 | to or instead of these static libraries: | |
0a7fcdbc | 293 | |
04873705 TTN |
294 | libguile.a --- an object library containing the Guile interpreter, |
295 | You can use Guile in your own programs by linking against this. | |
04873705 | 296 | libguilereadline.a --- an object library containing glue code for the |
70bb8113 MV |
297 | GNU readline library. |
298 | ||
04873705 | 299 | libguile-srfi-*.a --- various SRFI support libraries |
ae8de16e GH |
300 | |
301 | Header files, in ${prefix}/include: | |
302 | ||
04873705 TTN |
303 | libguile.h, guile/gh.h, libguile/*.h --- for libguile. |
304 | guile-readline/readline.h --- for guile-readline. | |
ae8de16e GH |
305 | |
306 | Support files, in ${prefix}/share/guile/<version>: | |
307 | ||
04873705 TTN |
308 | ice-9/* --- run-time support for Guile: the module system, |
309 | read-eval-print loop, some R4RS code and other infrastructure. | |
310 | oop/* --- the Guile Object-Oriented Programming System (GOOPS) | |
311 | scripts/* --- executable modules, i.e., scheme programs that can be both | |
312 | called as an executable from the shell, and loaded and used as a | |
313 | module from scheme code. See scripts/README for more info. | |
314 | srfi/* --- SRFI support modules. See srfi/README for more info. | |
ae8de16e GH |
315 | |
316 | Automake macros, in ${prefix}/share/aclocal: | |
317 | ||
04873705 | 318 | guile.m4 |
ae8de16e GH |
319 | |
320 | Documentation in Info format, in ${prefix}/info: | |
321 | ||
c08a1190 GH |
322 | guile --- Guile reference manual. |
323 | ||
324 | guile-tut --- Guile tutorial. | |
325 | ||
326 | GOOPS --- GOOPS reference manual. | |
327 | ||
328 | r5rs --- Revised(5) Report on the Algorithmic Language Scheme. | |
329 | ||
0196b30a | 330 | |
5c54da76 JB |
331 | The Guile source tree is laid out as follows: |
332 | ||
1325feea | 333 | libguile: |
cf78e9e8 JB |
334 | The Guile Scheme interpreter --- both the object library |
335 | for you to link with your programs, and the executable you can run. | |
1325feea | 336 | ice-9: Guile's module system, initialization code, and other infrastructure. |
17f8d40c JB |
337 | guile-config: |
338 | Source for the guile-config script. | |
9a3c1149 | 339 | qt: A cooperative threads package from the University of Washington, |
cf78e9e8 | 340 | which Guile can use. If you configure Guile with the |
3a629497 JB |
341 | --with-threads flag, you will need to link against the -lqt |
342 | library, found in this directory. Qt is under a separate | |
343 | copyright; see `qt/README' for more details. | |
621e8324 MV |
344 | guile-readline: |
345 | The glue code for using GNU readline with Guile. This | |
346 | will be build when configure can find a recent enough readline | |
347 | library on your system. | |
ae8de16e | 348 | doc: Documentation (see above). |
4c8980a2 | 349 | |
c11f9405 JB |
350 | Anonymous CVS Access and FTP snapshots =============================== |
351 | ||
352 | We make the developers' working Guile sources available via anonymous | |
353 | CVS, and by nightly snapshots, accessible via FTP. See the files | |
354 | `ANON-CVS' and `SNAPSHOTS' for details. | |
355 | ||
349d9c1f | 356 | If you would like to receive mail when people commit changes to the |
ee2bf8b8 MV |
357 | Guile CVS repository, you can subscribe to guile-cvs@gnu.org by the |
358 | Mailman mailing list interface at | |
349d9c1f | 359 | |
ee2bf8b8 | 360 | <http://mail.gnu.org/mailman/listinfo/guile-cvs> |
349d9c1f | 361 | |
c11f9405 | 362 | |
c484bf7f JB |
363 | Obtaining Guile ====================================================== |
364 | ||
365 | The latest official Guile release is available via anonymous FTP from | |
c484bf7f | 366 | |
b5074b23 | 367 | ftp://ftp.gnu.org/pub/gnu/guile/guile-1.4.tar.gz |
c484bf7f | 368 | |
ee2bf8b8 MV |
369 | The mailing list `guile-user@gnu.org' carries discussions, questions, |
370 | and often answers, about Guile. To subscribe, use the Mailman mailing | |
371 | list interface at <http://mail.gnu.org/mailman/listinfo/guile-user> | |
372 | Of course, please send bug reports (and fixes!) to bug-guile@gnu.org. |