Next: , Previous: Examples of option use, Up: Options and Config


33.8 Installation and Configuration Data

It is often useful to have site-specific information about the current Guile installation. This chapter describes how to find out about Guile's configuration at run time.

— Scheme Procedure: version
— Scheme Procedure: major-version
— Scheme Procedure: minor-version
— C Function: scm_major_version ()
— C Function: scm_minor_version ()

Return a string describing Guile's version number, or its major or minor version numbers, respectively.

          (version) ⇒ "1.3a"
          (major-version) ⇒ "1"
          (minor-version) ⇒ "3a"
— Scheme Procedure: %package-data-dir
— C Function: scm_sys_package_data_dir ()

Return the name of the directory where Scheme packages, modules and libraries are kept. On most Unix systems, this will be /usr/local/share/guile.

— Scheme Procedure: %library-dir
— C Function: scm_sys_library_dir ()

Return the directory where the Guile Scheme library files are installed. E.g., may return "/usr/lib/guile/1.3.5".

— Scheme Procedure: %site-dir
— C Function: scm_sys_site_dir ()

Return the directory where the Guile site files are installed. E.g., may return "/usr/share/guile/site".

— Scheme Procedure: parse-path path [tail]
— C Function: scm_parse_path (path, tail) |1 |1 |0

Parse path, which is expected to be a colon-separated string, into a list and return the resulting list with tail (defaults to the empty list) appended. If path is #f, return tail.

— Scheme Procedure: search-path path filename [extensions]
— C Function: scm_search_path (path, filename, extensions) |2 |1 |0

Search path for a directory containing a file named filename. The file must be readable, and not a directory. If we find one, return its full filename; otherwise, return #f. If filename is absolute, return it unchanged. Optional third arg extensions is a list of strings; for each directory in path, we search for filename concatenated with each extension.

— Variable: %load-path

List of directories which should be searched for Scheme modules and libraries.

— Variable: %guile-build-info

Alist of information collected during the building of a particular guile program. Entries can be grouped into one of several categories: directories, env vars, and versioning info.

Briefly, here are the keys in %guile-build-info, by group:

Values are all strings. The value for LIBS is typically found also as a part of "guile-config link" output. The value for guileversion has form X.Y.Z, and should be the same as returned by version. The value for libguileinterface is libtool compatible and has form CURRENT:REVISION:AGE.

A great many other configuration variables (as set by configure during Guile build), as well as the #defined symbols from libguile/scmconfig.h, are available in the module (scripts guile-config-data). These are also accessible using the guile-config program (see guile-tools guile-config).