PREV UP NEXT SCM

2.2: SLIB

[SLIB] is a portable Scheme library meant to provide compatibility and utility functions for all standard Scheme implementations. Although SLIB is not neccessary to run SCM, I strongly suggest you obtain and install it. Bug reports about running SCM without SLIB have very low priority. SLIB is available from the same sites as SCM:

Unpack SLIB (`tar xzf slib2b3.tar.gz' or `unzip -ao slib2b3.zip') in an appropriate directory for your system; both tar and unzip will create the directory `slib'.

Then create a file `require.scm' in the SCM implementation-vicinity (this is the same directory as where the file `Init.scm' is installed). `require.scm' should have the contents:

(define (library-vicinity) "/usr/local/lib/slib/")
(load (in-vicinity (library-vicinity) "require"))

where the pathname string `/usr/local/lib/slib/' is to be replaced by the pathname into which you installed SLIB. Absolute pathnames are recommended here; if you use a relative pathname, SLIB can get confused when the working directory is changed (see chmod). The way to specify a relative pathname is to append it to the implementation-vicinity, which is absolute:

(define library-vicinity
  (let ((lv (string-append (implementation-vicinity) "../slib/")))
    (lambda () lv)))
(load (in-vicinity (library-vicinity) "require"))

Alternatively, you can set the (shell) environment variable SCHEME_LIBRARY_PATH to the pathname of the SLIB directory (see SCHEME_LIBRARY_PATH). If set, the environment variable overrides `require.scm'. Again, absolute pathnames are recommended.