Merge commit '8cf2a7ba7432d68b9a055d29f18117be70375af9'
[bpt/guile.git] / doc / ref / libguile-parallel.texi
1 @c -*-texinfo-*-
2 @c This is part of the GNU Guile Reference Manual.
3 @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2010, 2011, 2013
4 @c Free Software Foundation, Inc.
5 @c See the file guile.texi for copying conditions.
6
7 @node Parallel Installations
8 @section Parallel Installations
9
10 @cindex pkg-config
11 @cindex effective version
12
13 Guile provides strong API and ABI stability guarantees during stable
14 series, so that if a user writes a program against Guile version 2.2.3,
15 it will be compatible with some future version 2.2.7. We say in this
16 case that 2.2 is the @dfn{effective version}, composed of the major and
17 minor versions, in this case 2 and 2.
18
19 Users may install multiple effective versions of Guile, with each
20 version's headers, libraries, and Scheme files under their own
21 directories. This provides the necessary stability guarantee for users,
22 while also allowing Guile developers to evolve the language and its
23 implementation.
24
25 However, parallel installability does have a down-side, in that users
26 need to know which version of Guile to ask for, when they build against
27 Guile. Guile solves this problem by installing a file to be read by the
28 @code{pkg-config} utility, a tool to query installed packages by name.
29 Guile encodes the version into its pkg-config name, so that users can
30 ask for @code{guile-2.0} or @code{guile-2.2}, as appropriate.
31
32 For effective version @value{EFFECTIVE-VERSION}, for example, you would
33 invoke @code{pkg-config --cflags --libs guile-@value{EFFECTIVE-VERSION}}
34 to get the compilation and linking flags necessary to link to version
35 @value{EFFECTIVE-VERSION} of Guile. You would typically run
36 @code{pkg-config} during the configuration phase of your program and use
37 the obtained information in the Makefile.
38
39 Guile's @code{pkg-config} file,
40 @file{guile-@value{EFFECTIVE-VERSION}.pc}, defines additional useful
41 variables:
42
43 @table @code
44 @item sitedir
45 @cindex @code{sitedir}
46 The default directory where Guile looks for Scheme source and compiled
47 files (@pxref{Installing Site Packages, %site-dir}). Run
48 @command{pkg-config guile-@value{EFFECTIVE-VERSION} --variable=sitedir}
49 to see its value. @xref{Autoconf Macros, GUILE_SITE_DIR}, for more on
50 how to use it from Autoconf.
51
52 @item extensiondir
53 @cindex @code{extensiondir}
54 The default directory where Guile looks for extensions---i.e., shared
55 libraries providing additional features (@pxref{Modules and
56 Extensions}). Run @command{pkg-config guile-@value{EFFECTIVE-VERSION}
57 --variable=extensiondir} to see its value.
58 @end table
59
60 @noindent
61 See the @code{pkg-config} man page, for more information, or its web
62 site, @url{http://pkg-config.freedesktop.org/}.
63 @xref{Autoconf Support}, for more on checking for Guile from within a
64 @code{configure.ac} file.
65
66
67 @c Local Variables:
68 @c TeX-master: "guile.texi"
69 @c End: