Next: , Previous: GNU configure and make, Up: GNU configure and make


2.2.1 Making scmlit

The SCM distribution Makefile contains rules for making scmlit, a “bare-bones” version of SCM sufficient for running build. build is a Scheme program used to compile (or create scripts to compile) full featured versions of SCM (see Building SCM). To create scmlit, run ‘make scmlit in the scm/ directory.

Makefiles are not portable to the majority of platforms. If you need to compile SCM without ‘scmlit’, there are several ways to proceed:

Finding SLIB

If you didn't create scmlit using ‘make scmlit’, then you must create a file named scm/require.scm. For most installations, scm/require.scm can just be copied from scm/requires.scm, which is part of the SCM distribution.

If, when executing ‘scmlit’ or ‘scm’, you get a message like:

     ERROR: "LOAD couldn't find file " "/usr/local/src/scm/require"

then create a file require.scm in the SCM implementation-vicinity (this is the same directory as where the file Init5e7.scm is). require.scm should have the contents:

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

where the pathname string /usr/local/lib/slib/ is to be replaced by the pathname into which you unzipped (or installed) SLIB.

Alternatively, you can set the (shell) environment variable SCHEME_LIBRARY_PATH to the pathname of the SLIB directory (see SCHEME_LIBRARY_PATH). If set, this environment variable overrides scm/require.scm.

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)))