README 14 KB

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