libguile-parallel.texi 3.4 KB

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