Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.

Next: , Up: Programming in C   [Contents][Index]


5.1 Parallel Installations

Guile provides strong API and ABI stability guarantees during stable series, so that if a user writes a program against Guile version 2.2.3, it will be compatible with some future version 2.2.7. We say in this case that 2.2 is the effective version, composed of the major and minor versions, in this case 2 and 2.

Users may install multiple effective versions of Guile, with each version’s headers, libraries, and Scheme files under their own directories. This provides the necessary stability guarantee for users, while also allowing Guile developers to evolve the language and its implementation.

However, parallel installability does have a down-side, in that users need to know which version of Guile to ask for, when they build against Guile. Guile solves this problem by installing a file to be read by the pkg-config utility, a tool to query installed packages by name. Guile encodes the version into its pkg-config name, so that users can ask for guile-2.0 or guile-2.2, as appropriate.

For effective version 2.2, for example, you would invoke pkg-config --cflags --libs guile-2.2 to get the compilation and linking flags necessary to link to version 2.2 of Guile. You would typically run pkg-config during the configuration phase of your program and use the obtained information in the Makefile.

Guile’s pkg-config file, guile-2.2.pc, defines additional useful variables:

sitedir

The default directory where Guile looks for Scheme source and compiled files (see %site-dir). Run pkg-config guile-2.2 --variable=sitedir to see its value. See GUILE_SITE_DIR, for more on how to use it from Autoconf.

extensiondir

The default directory where Guile looks for extensions—i.e., shared libraries providing additional features (see Modules and Extensions). Run pkg-config guile-2.2 --variable=extensiondir to see its value.

guile
guild

The absolute file name of the guile and guild commands3. Run pkg-config guile-2.2 --variable=guile or --variable=guild to see their value.

These variables allow users to deal with program name transformations that may be specified when configuring Guile with --program-transform-name, --program-suffix, or --program-prefix (see Transformation Options in GNU Autoconf Manual).

See the pkg-config man page, for more information, or its web site, http://pkg-config.freedesktop.org/. See Autoconf Support, for more on checking for Guile from within a configure.ac file.


Footnotes

(3)

The guile and guild variables defined starting from Guile version 2.0.12.


Next: , Up: Programming in C   [Contents][Index]