Commit | Line | Data |
---|---|---|
d32df132 AW |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Guile Reference Manual. | |
5fac1a7a | 3 | @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2010, 2011, |
12dfe656 | 4 | @c 2013-2014 Free Software Foundation, Inc. |
d32df132 AW |
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 | |
f88e9510 AW |
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. | |
d32df132 AW |
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 | ||
fe4ea685 LC |
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. | |
5fac1a7a LC |
58 | |
59 | @item guile | |
60 | @itemx guild | |
61 | @cindex program name transformations, dealing with | |
62 | The absolute file name of the @command{guile} and @command{guild} | |
63 | commands@footnote{The @code{guile} and @code{guild} variables defined | |
64 | starting from Guile version 2.0.12.}. Run @command{pkg-config | |
65 | guile-@value{EFFECTIVE-VERSION} --variable=guile} or | |
66 | @code{--variable=guild} to see their value. | |
67 | ||
68 | These variables allow users to deal with program name transformations | |
69 | that may be specified when configuring Guile with | |
70 | @code{--program-transform-name}, @code{--program-suffix}, or | |
71 | @code{--program-prefix} (@pxref{Transformation Options,,, autoconf, GNU | |
72 | Autoconf Manual}). | |
fe4ea685 LC |
73 | @end table |
74 | ||
75 | @noindent | |
d32df132 AW |
76 | See the @code{pkg-config} man page, for more information, or its web |
77 | site, @url{http://pkg-config.freedesktop.org/}. | |
d32df132 AW |
78 | @xref{Autoconf Support}, for more on checking for Guile from within a |
79 | @code{configure.ac} file. | |
80 | ||
81 | ||
82 | @c Local Variables: | |
83 | @c TeX-master: "guile.texi" | |
84 | @c End: |