Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git] / doc / ref / tour.texi
index 9d378da..3e61269 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2010
+@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -59,7 +59,7 @@ script is simply a file of Scheme code with some extra information at
 the beginning which tells the operating system how to invoke Guile, and
 then tells Guile how to handle the Scheme code.
 
-Here is a trivial Guile script, for more details @xref{Guile Scripting}.
+Here is a trivial Guile script.  @xref{Guile Scripting}, for more details.
 
 @example
 #!/usr/local/bin/guile -s
@@ -115,7 +115,7 @@ can be compiled and linked like this:
 
 @example
 $ gcc -o simple-guile simple-guile.c \
-    `pkg-config --cflags --libs guile-2.0`
+    `pkg-config --cflags --libs guile-@value{EFFECTIVE-VERSION}`
 @end example
 
 When it is run, it behaves just like the @code{guile} program except
@@ -136,8 +136,8 @@ You can link Guile into your program and make Scheme available to the
 users of your program.  You can also link your library into Guile and
 make its functionality available to all users of Guile.
 
-A library that is linked into Guile is called an @dfn{extensions}, but
-it really just is an ordinary object library.
+A library that is linked into Guile is called an @dfn{extension}, but it
+really just is an ordinary object library.
 
 The following example shows how to write a simple extension for Guile
 that makes the @code{j0} function available to Scheme code.
@@ -163,7 +163,8 @@ This C source file needs to be compiled into a shared library.  Here is
 how to do it on GNU/Linux:
 
 @smallexample
-gcc -shared -o libguile-bessel.so -fPIC bessel.c
+gcc `pkg-config --cflags guile-@value{EFFECTIVE-VERSION}` \
+  -shared -o libguile-bessel.so -fPIC bessel.c
 @end smallexample
 
 For creating shared libraries portably, we recommend the use of GNU
@@ -180,6 +181,9 @@ scheme@@(guile-user)> (j0 2)
 $1 = 0.223890779141236
 @end smallexample
 
+For more on how to install your extension, @pxref{Installing Site
+Packages}.
+
 
 @node Using the Guile Module System
 @subsection Using the Guile Module System
@@ -234,7 +238,7 @@ in a location where Guile can automatically find it.  The following
 session shows a simple example.
 
 @smallexample
-$ cat /usr/local/share/guile/foo/bar.scm
+$ cat /usr/local/share/guile/site/foo/bar.scm
 
 (define-module (foo bar)
   #:export (frob))
@@ -247,6 +251,10 @@ scheme@@(guile-user)> (frob 12)
 $1 = 24
 @end smallexample
 
+For more on how to install your module, @pxref{Installing Site
+Packages}.
+
+
 @node Putting Extensions into Modules
 @subsubsection Putting Extensions into Modules
 
@@ -257,14 +265,14 @@ You do this by writing a small Scheme file that defines the module and
 call @code{load-extension} directly in the body of the module.
 
 @smallexample
-$ cat /usr/local/share/guile/math/bessel.scm
+$ cat /usr/local/share/guile/site/math/bessel.scm
 
 (define-module (math bessel)
   #:export (j0))
 
 (load-extension "libguile-bessel" "init_bessel")
 
-$ file /usr/local/lib/libguile-bessel.so
+$ file /usr/local/lib/guile/@value{EFFECTIVE-VERSION}/extensions/libguile-bessel.so
 @dots{} ELF 32-bit LSB shared object @dots{}
 $ guile
 scheme@@(guile-user)> (use-modules (math bessel))
@@ -357,7 +365,7 @@ If you built Guile yourself, the build configuration that you used:
 
 @example
 $ ./config.status --config
-'--enable-error-on-warning' '--disable-deprecated' '--prefix=/opt/guile' '--libdir=/opt/guile/lib64' 'CC=ccache gcc'
+'--enable-error-on-warning' '--disable-deprecated'...
 @end example
 
 @item