README 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. This is version 1.8.8 of Guile, Project GNU's extension language
  2. library. Guile is an interpreter for Scheme, packaged as a library
  3. that you can link into your applications to give them their own
  4. scripting language. Guile will eventually support other languages as
  5. well, giving users of Guile-based applications a choice of languages.
  6. Please send bug reports to bug-guile@gnu.org.
  7. See the LICENSE file for the specific terms that apply to Guile.
  8. Additional INSTALL instructions ===========================================
  9. Generic instructions for configuring and compiling Guile can be found
  10. in the INSTALL file. Guile specific information and configure options
  11. can be found below, including instructions for installing SLIB.
  12. Guile requires a few external packages and can optionally use a number
  13. of external packages such as `readline' when they are available.
  14. Guile expects to be able to find these packages in the default
  15. compiler setup, it does not try to make any special arrangements
  16. itself. For example, for the `readline' package, Guile expects to be
  17. able to find the include file <readline/readline.h>, without passing
  18. any special `-I' options to the compiler.
  19. If you installed an external package, and you used the --prefix
  20. installation option to install it somewhere else than /usr/local, you
  21. must arrange for your compiler to find it by default. If that
  22. compiler is gcc, one convenient way of making such arrangements is to
  23. use the --with-local-prefix option during installation, naming the
  24. same directory as you used in the --prefix option of the package. In
  25. particular, it is not good enough to use the same --prefix option when
  26. you install gcc and the package; you need to use the
  27. --with-local-prefix option as well. See the gcc documentation for
  28. more details.
  29. Required External Packages ================================================
  30. Guile requires the following external packages:
  31. - GNU MP, at least version 4.1
  32. GNU MP is used for bignum arithmetic. It is available from
  33. http://gmplib.org/
  34. - libltdl from libtool, at least from libtool version 1.5.6
  35. libltdl is used for loading extensions at run-time. It is
  36. available from http://www.gnu.org/software/libtool/
  37. Guile specific flags Accepted by Configure =================================
  38. If you run the configure script with no arguments, it should examine
  39. your system and set things up appropriately. However, there are a few
  40. switches specific to Guile you may find useful in some circumstances.
  41. --without-threads --- Build without thread support
  42. Build a Guile executable and library that supports multi-threading.
  43. The default is to enable threading support when your operating
  44. system offsers 'POSIX threads'. When you do not want threading, use
  45. `--without-threads'.
  46. --enable-deprecated=LEVEL
  47. Guile may contain features that are `deprecated'. When a feature is
  48. deprecated, it means that it is still there, but that there is a
  49. better way of achieving the same thing, and we'd rather have you use
  50. this better way. This allows us to eventually remove the old
  51. implementation and helps to keep Guile reasonably clean of historic
  52. baggage.
  53. Deprecated features are considered harmful; using them is likely a
  54. bug. See below for the related notion of `discouraged' features,
  55. which are OK but have fallen out of favor.
  56. See the file NEWS for a list of features that are currently
  57. deprecated. Each entry will also tell you what you should replace
  58. your code with.
  59. To give you some help with this process, and to encourage (OK,
  60. nudge) people to switch to the newer methods, Guile can emit
  61. warnings or errors when you use a deprecated feature. There is
  62. quite a range of possibilities, from being completely silent to
  63. giving errors at link time. What exactly happens is determined both
  64. by the value of the `--enable-deprecated' configuration option when
  65. Guile was built, and by the GUILE_WARN_DEPRECATED environment
  66. variable.
  67. It works like this:
  68. When Guile has been configured with `--enable-deprecated=no' (or,
  69. equivalently, with `--disable-deprecated') then all deprecated
  70. features are omitted from Guile. You will get "undefined
  71. reference", "variable unbound" or similar errors when you try to
  72. use them.
  73. When `--enable-deprecated=LEVEL' has been specified (for LEVEL not
  74. "no"), LEVEL will be used as the default value of the environment
  75. variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to
  76. "summary" and "shutup" is changed to "no", however.
  77. When GUILE_WARN_DEPRECATED has the value "no", nothing special
  78. will happen when a deprecated feature is used.
  79. When GUILE_WARN_DEPRECATED has the value "summary", and a
  80. deprecated feature has been used, Guile will print this message at
  81. exit:
  82. Some deprecated features have been used. Set the environment
  83. variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
  84. program to get more information. Set it to "no" to suppress
  85. this message.
  86. When GUILE_WARN_DEPRECATED has the value "detailed", a detailed
  87. warning is emitted immediatly for the first use of a deprecated
  88. feature.
  89. The default is `--enable-deprecated=yes'.
  90. In addition to setting GUILE_WARN_DEPRECATED in the environment, you
  91. can also use (debug-enable 'warn-deprecated) and (debug-disable
  92. 'warn-deprecated) to enable and disable the detailed messaged at run
  93. time.
  94. --disable-discouraged
  95. In addition to deprecated features, Guile can also contain things
  96. that are merely `discouraged'. It is OK to continue to use these
  97. features in old code, but new code should avoid them since there are
  98. better alternatives.
  99. There is nothing wrong with a discouraged feature per se, but they
  100. might have strange names, or be non-standard, for example. Avoiding
  101. them will make your code better.
  102. --disable-shared --- Do not build shared libraries.
  103. --disable-static --- Do not build static libraries.
  104. Normally, both static and shared libraries will be built if your
  105. system supports them.
  106. --enable-debug-freelist --- Enable freelist debugging.
  107. This enables a debugging version of scm_cell and scm_double_cell,
  108. and also registers an extra primitive, the setter
  109. `gc-set-debug-check-freelist!'.
  110. Configure with the --enable-debug-freelist option to enable the
  111. gc-set-debug-check-freelist! primitive, and then use:
  112. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  113. (gc-set-debug-check-freelist! #f) # turn off checking
  114. Checking of the freelist forces a traversal of the freelist and a
  115. garbage collection before each allocation of a cell. This can slow
  116. down the interpreter dramatically, so the setter should be used to
  117. turn on this extra processing only when necessary.
  118. --enable-debug-malloc --- Enable malloc debugging.
  119. Include code for debugging of calls to scm_malloc, scm_realloc, etc.
  120. It records the number of allocated objects of each kind. This is
  121. useful when searching for memory leaks.
  122. A Guile compiled with this option provides the primitive
  123. `malloc-stats' which returns an alist with pairs of kind and the
  124. number of objects of that kind.
  125. --enable-guile-debug --- Include internal debugging functions
  126. --disable-posix --- omit posix interfaces
  127. --disable-networking --- omit networking interfaces
  128. --disable-regex --- omit regular expression interfaces
  129. Cross building Guile =====================================================
  130. Guile can be cross-compiled for Windows using the i586-mingw32msvc
  131. cross-compiler. To do this, you first need to cross-build Guile's
  132. prerequisites - GNU MP and libtool/libltdl (as described above) - and
  133. then cross-build Guile itself.
  134. For each of these steps, configure using an invocation like this:
  135. CPPFLAGS=-I/usr/local/i586-mingw32msvc/include \
  136. LDFLAGS=-L/usr/local/i586-mingw32msvc/lib \
  137. GUILE_FOR_BUILD=/usr/local/bin/guile \
  138. ./configure --prefix=/usr/local/i586-mingw32msvc --host=i586-mingw32msvc
  139. Then run `make' - which should complete without any errors - and `sudo
  140. make install'. (`make check' doesn't work when cross-compiling,
  141. because the built DLLs and program cannot be run on GNU/Linux.)
  142. The `GUILE_FOR_BUILD=...' setting is needed because some later steps
  143. of the build process use Guile itself. In the non-cross-compiling
  144. case this is the version of Guile that has just been built. When
  145. cross-compiling, you have to set GUILE_FOR_BUILD to tell the build
  146. where it can find a native version of Guile, to use for these steps.
  147. Cross-compiling for other hosts may also work, using the following
  148. instructions; but this has not been recently tested.
  149. To configure Guile for cross building, for example for Cygwin:
  150. ./configure --host=i686-pc-cygwin --disable-shared
  151. A C compiler for the build system is required. The default is
  152. "PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified
  153. with the CC_FOR_BUILD variable in the usual way, for instance
  154. ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc
  155. Guile for the build system can be specified similarly with the
  156. GUILE_FOR_BUILD variable, it defaults to just "guile".
  157. Using Guile Without Installing It =========================================
  158. The top directory of the Guile sources contains a script called
  159. "pre-inst-guile" that can be used to run the Guile that has just been
  160. built.
  161. Installing SLIB ===========================================================
  162. In order to use SLIB from Guile you basically only need to put the
  163. `slib' directory _in_ one of the directories on Guile's load path.
  164. The standard installation is:
  165. 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
  166. 2. Put it in Guile's data directory, that is the directory printed when
  167. you type
  168. guile-config info pkgdatadir
  169. at the shell prompt. This is normally `/usr/local/share/guile', so the
  170. directory will normally have full path `/usr/local/share/guile/slib'.
  171. 3. Start guile as a user with write access to the data directory and type
  172. (use-modules (ice-9 slib))
  173. at the Guile prompt. This will generate the slibcat catalog next to
  174. the slib directory.
  175. SLIB's `require' is provided by the Guile module (ice-9 slib).
  176. Example:
  177. (use-modules (ice-9 slib))
  178. (require 'primes)
  179. (prime? 7)
  180. Guile Documentation ==================================================
  181. If you've never used Scheme before, then the Guile Tutorial
  182. (guile-tut.info) is a good starting point. The Guile Reference Manual
  183. (guile.info) is the primary documentation for Guile. The Goops object
  184. system is documented separately (goops.info). A copy of the R5RS
  185. Scheme specification is included too (r5rs.info).
  186. Info format versions of this documentation are installed as part of
  187. the normal build process. The texinfo sources are under the doc
  188. directory, and other formats like Postscript, PDF, DVI or HTML can be
  189. generated from them with Tex and Texinfo tools.
  190. The doc directory also includes an example-smob subdirectory which has
  191. the example code from the "Defining New Types (Smobs)" chapter of the
  192. reference manual.
  193. The Guile WWW page is at
  194. http://www.gnu.org/software/guile/guile.html
  195. It contains a link to the Guile FAQ.
  196. About This Distribution ==============================================
  197. Interesting files include:
  198. - LICENSE, which contains the exact terms of the Guile license.
  199. - COPYING, which contains the terms of the GNU General Public License.
  200. - INSTALL, which contains general instructions for building/installing Guile.
  201. - NEWS, which describes user-visible changes since the last release of Guile.
  202. Files are usually installed according to the prefix specified to
  203. configure, /usr/local by default. Building and installing gives you:
  204. Executables, in ${prefix}/bin:
  205. guile --- a stand-alone interpreter for Guile. With no arguments, this
  206. is a simple interactive Scheme interpreter. It can also be used
  207. as an interpreter for script files; see the NEWS file for details.
  208. guile-config --- a Guile script which provides the information necessary
  209. to link your programs against the Guile library.
  210. guile-snarf --- a script to parse declarations in your C code for
  211. Scheme-visible C functions, Scheme objects to be used by C code,
  212. etc.
  213. Libraries, in ${prefix}/lib. Depending on the platform and options
  214. given to configure, you may get shared libraries in addition
  215. to or instead of these static libraries:
  216. libguile.a --- an object library containing the Guile interpreter,
  217. You can use Guile in your own programs by linking against this.
  218. libguilereadline.a --- an object library containing glue code for the
  219. GNU readline library.
  220. libguile-srfi-*.a --- various SRFI support libraries
  221. Header files, in ${prefix}/include:
  222. libguile.h, guile/gh.h, libguile/*.h --- for libguile.
  223. guile-readline/readline.h --- for guile-readline.
  224. Support files, in ${prefix}/share/guile/<version>:
  225. ice-9/* --- run-time support for Guile: the module system,
  226. read-eval-print loop, some R4RS code and other infrastructure.
  227. oop/* --- the Guile Object-Oriented Programming System (GOOPS)
  228. scripts/* --- executable modules, i.e., scheme programs that can be both
  229. called as an executable from the shell, and loaded and used as a
  230. module from scheme code. See scripts/README for more info.
  231. srfi/* --- SRFI support modules. See srfi/README for more info.
  232. Automake macros, in ${prefix}/share/aclocal:
  233. guile.m4
  234. Documentation in Info format, in ${prefix}/info:
  235. guile --- Guile reference manual.
  236. guile-tut --- Guile tutorial.
  237. GOOPS --- GOOPS reference manual.
  238. r5rs --- Revised(5) Report on the Algorithmic Language Scheme.
  239. The Guile source tree is laid out as follows:
  240. libguile:
  241. The Guile Scheme interpreter --- both the object library
  242. for you to link with your programs, and the executable you can run.
  243. ice-9: Guile's module system, initialization code, and other infrastructure.
  244. guile-config:
  245. Source for the guile-config script.
  246. guile-readline:
  247. The glue code for using GNU readline with Guile. This
  248. will be build when configure can find a recent enough readline
  249. library on your system.
  250. doc: Documentation (see above).
  251. Git Repository Access ================================================
  252. Guile's source code is stored in a Git repository at Savannah. Anyone
  253. can access it using `git-clone' from one of the following URLs:
  254. git://git.sv.gnu.org/guile.git
  255. http://git.sv.gnu.org/r/guile.git
  256. Developers with a Savannah SSH account can also access it from:
  257. ssh://git.sv.gnu.org/srv/git/guile.git
  258. The repository can also be browsed on-line at the following address:
  259. http://git.sv.gnu.org/gitweb/?p=guile.git
  260. For more information on Git, please see:
  261. http://git.or.cz/
  262. Please send problem reports to <bug-guile@gnu.org>.