guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-165-g02f91


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-165-g02f9189
Date: Wed, 12 Oct 2011 15:12:48 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=02f91898deb058768d09c2f8b6278d4ec3ee7252

The branch, stable-2.0 has been updated
       via  02f91898deb058768d09c2f8b6278d4ec3ee7252 (commit)
       via  24cc7832a61350f4557b6382e71940ca3c9ab060 (commit)
       via  067df233c451a68a84dc69b4a6f4d16eac837542 (commit)
       via  d32df1325dfe5f550cf1262dc7e90ba86b526a7c (commit)
       via  b09179d0eb0919920d4784b45af06c2f74b10c2d (commit)
       via  ec81143964d4eeb6237f2fdfa6b37757aa96c08f (commit)
      from  30fcf30fcfa758ff6f480fc63559c1f5d074cfea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 02f91898deb058768d09c2f8b6278d4ec3ee7252
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 17:12:14 2011 +0200

    update NEWS for 2.0.3
    
    * NEWS: Update.

commit 24cc7832a61350f4557b6382e71940ca3c9ab060
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 16:20:51 2011 +0200

    add "Installing Site Packages"
    
    * doc/ref/scheme-using.texi (Installing Site Packages): Add a new
      section about where to install .scm, .go, and .so files.
    
    * doc/ref/tour.texi: Reference it here.
    * doc/ref/guile.texi: Add new section.

commit 067df233c451a68a84dc69b4a6f4d16eac837542
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 13:07:50 2011 +0200

    update tour.texi for site modules and extensions
    
    * doc/ref/tour.texi (Putting Extensions into Modules)
      (Writing new Modules): In the examples, show the files as being in the
      "site" dirs.

commit d32df1325dfe5f550cf1262dc7e90ba86b526a7c
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 13:07:30 2011 +0200

    manual: reorganize autoconf, pkg-config info
    
    * doc/ref/libguile-parallel.texi: New file, documenting parallel
      installation and the use of pkg-config.
    
    * doc/ref/libguile-linking.texi: Adapt.
    
    * doc/ref/libguile-autoconf.texi: Rename from autoconf.texi.  Lower
      sections, and integrate in the "Programming in C" chapter.
    
    * doc/ref/guile.texi: Adapt.

commit b09179d0eb0919920d4784b45af06c2f74b10c2d
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 11:51:33 2011 +0200

    remove documentation on autofrisk foo
    
    * doc/ref/autoconf.texi: Remove documentation on autofrisk facility,
      given that we do not ship those macros, and to my knowledge, never
      have.

commit ec81143964d4eeb6237f2fdfa6b37757aa96c08f
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 12 11:24:58 2011 +0200

    add (web client) docs
    
    * doc/ref/web.texi (Web Client): New doc section.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                           |   98 ++++++++++++++
 doc/ref/autoconf.texi          |  272 ----------------------------------------
 doc/ref/guile.texi             |   10 +-
 doc/ref/libguile-autoconf.texi |  151 ++++++++++++++++++++++
 doc/ref/libguile-linking.texi  |   26 ++---
 doc/ref/libguile-parallel.texi |   48 +++++++
 doc/ref/scheme-using.texi      |   58 +++++++++
 doc/ref/tour.texi              |   13 ++-
 doc/ref/web.texi               |   39 ++++++-
 9 files changed, 417 insertions(+), 298 deletions(-)
 delete mode 100644 doc/ref/autoconf.texi
 create mode 100644 doc/ref/libguile-autoconf.texi
 create mode 100644 doc/ref/libguile-parallel.texi

diff --git a/NEWS b/NEWS
index f5760cf..36820de 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,104 @@ See the end for copying conditions.
 Please send Guile bug reports to address@hidden
 
 
+Changes in 2.0.3 (since 2.0.2):
+
+* Speed improvements
+
+** Guile has a new optimizer, `peval'.
+
+`Peval' is a partial evaluator that performs constant folding, dead code
+elimination, copy propagation, and inlining.  By default it runs on
+every piece of code that Guile compiles, to fold computations that can
+happen at compile-time, so they don't have to happen at runtime.
+
+If we did our job right, the only impact you would see would be your
+programs getting faster.  But if you notice slowdowns or bloated code,
+please send a mail to address@hidden with details.
+
+Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
+peval and its implementation.
+
+You can see what peval does on a given piece of code by running the new
+`,optimize' REPL meta-command, and comparing it to the output of
+`,expand'.  See "Compile Commands" in the manual, for more.
+
+** Fewer calls to `stat'.
+
+Guile now stats only the .go file and the .scm file when loading a fresh
+compiled file.
+
+* Notable changes
+
+** New module: `(web client)', a simple synchronous web client.
+
+See "Web Client" in the manual, for more.
+
+** Users can now install compiled `.go' files.
+
+See "Installing Site Packages" in the manual.
+
+** Remove Front-Cover and Back-Cover text from the manual.
+    
+The manual is still under the GNU Free Documentation License, but no
+longer has any invariant sections.
+
+** More helpful `guild help'.
+    
+`guild' is Guile's multi-tool, for use in shell scripting.  Now it has a
+nicer interface for querying the set of existing commands, and getting
+help on those commands.  Try it out and see!
+
+** New macro: `define-syntax-rule'
+
+`define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
+one clause.  See "Syntax Rules" in the manual, for more.
+
+** The `,time' REPL meta-command now has more precision.
+
+The output of this command now has microsecond precision, instead of
+10-millisecond precision.
+
+** `(ice-9 match)' can now match records.
+    
+See "Pattern Matching" in the manual, for more on matching records.
+
+** New module: `(language tree-il debug)'.
+
+This module provides a tree-il verifier.  This is useful for people that
+generate tree-il, usually as part of a language compiler.
+
+** New functions: `scm_is_exact', `scm_is_inexact'.
+    
+These provide a nice C interface for Scheme's `exact?' and `inexact?',
+respectively.
+
+* Bugs fixed
+
+See the git log (or the ChangeLog) for more details on these bugs.
+
+** Fix order of importing modules and resolving duplicates handlers.
+** Fix a number of bugs involving extended (merged) generics.
+** Fix invocation of merge-generics duplicate handler.
+** Fix write beyond array end in arrays.c.
+** Fix read beyond end of hashtable size array in hashtab.c.
+** (web http): Locale-independent parsing and serialization of dates.
+** Ensure presence of Host header in HTTP/1.1 requests.
+** Fix take-right and drop-right for improper lists.
+** Fix leak in get_current_locale().
+** Fix recursive define-inlinable expansions.
+** Check that srfi-1 procedure arguments are procedures.
+** Fix r6rs `map' for multiple returns.
+** Fix scm_tmpfile leak on POSIX platforms.
+** Fix a couple of leaks (objcode->bytecode, make-boot-program).
+** Fix guile-lib back-compatibility for module-stexi-documentation.
+** Fix --listen option to allow other ports.
+** Fix scm_to_latin1_stringn for substrings.
+** Fix compilation of untyped arrays of rank not 1.
+** Fix unparse-tree-il of <dynset>.
+** Fix reading of #||||#.
+
+
 Changes in 2.0.2 (since 2.0.1):
 
 * Notable changes
diff --git a/doc/ref/autoconf.texi b/doc/ref/autoconf.texi
deleted file mode 100644
index 33aab7c..0000000
--- a/doc/ref/autoconf.texi
+++ /dev/null
@@ -1,272 +0,0 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2011
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
-
address@hidden
address@hidden Autoconf Support
address@hidden Autoconf Support
-
-When Guile is installed, a pkg-config description file and a set of
-Autoconf macros is installed.  This chapter documents pkg-config and
-Autoconf support, as well as the high-level guile-tool Autofrisk.
-
address@hidden
-* Autoconf Background::         Why use autoconf?
-* Autoconf Macros::             The GUILE_* macros.
-* Using Autoconf Macros::       How to use them, plus examples.
-* Autofrisk::                   AUTOFRISK_CHECKS and AUTOFRISK_SUMMARY.
-* Using Autofrisk::             Example modules.af files.
address@hidden menu
-
-
address@hidden Autoconf Background
address@hidden Autoconf Background
-
-As explained in the @cite{GNU Autoconf Manual}, any package needs
-configuration at build-time (@pxref{Top, ,Introduction,autoconf,The GNU
-Autoconf Manual}).  If your package uses Guile (or uses a package that
-in turn uses Guile), you probably need to know what specific Guile
-features are available and details about them.
-
-The way to do this is to write feature tests and arrange for their execution
-by the @file{configure} script, typically by adding the tests to
address@hidden, and running @code{autoconf} to create @file{configure}.
-Users of your package then run @file{configure} in the normal way.
-
-Macros are a way to make common feature tests easy to express.
-Autoconf provides a wide range of macros 
-(@pxref{Existing Tests,,,autoconf,The GNU Autoconf Manual}), 
-and Guile installation provides Guile-specific tests in the areas of:
-program detection, compilation flags reporting, and Scheme module
-checks.
-
-
address@hidden Autoconf Macros
address@hidden Autoconf Macros
-
address@hidden pkg-config
address@hidden autoconf
-
-GNU Guile provides a @dfn{pkg-config} description file, which contains
-all the information necessary to compile and link C applications that
-use Guile.  The @code{pkg-config} program is able to read this file
-and provide this information to application programmers; it can be
-obtained at @url{http://pkg-config.freedesktop.org/}.
-
-The following command lines give respectively the C compilation and link
-flags needed to build Guile-using programs:
-
address@hidden
-pkg-config address@hidden --cflags
-pkg-config address@hidden --libs
address@hidden example
-
-To ease use of pkg-config with Autoconf, pkg-config comes with a
-convenient Autoconf macro.  The following example looks for Guile and
-sets the @code{GUILE_CFLAGS} and @code{GUILE_LIBS} variables
-accordingly, or prints an error and exits if Guile was not found:
-
address@hidden PKG_CHECK_MODULES
-
address@hidden
-PKG_CHECK_MODULES([GUILE], address@hidden)
address@hidden example
-
-Guile comes with additional Autoconf macros providing more information,
-installed as @address@hidden/share/aclocal/guile.m4}.  Their names
-all begin with @code{GUILE_}.
-
address@hidden see Makefile.am
address@hidden autoconf-macros.texi
-
-
address@hidden Using Autoconf Macros
address@hidden Using Autoconf Macros
-
-Using the autoconf macros is straightforward: Add the macro "calls" (actually
-instantiations) to @file{configure.ac}, run @code{aclocal}, and finally,
-run @code{autoconf}.  If your system doesn't have guile.m4 installed, place
-the desired macro definitions (@code{AC_DEFUN} forms) in @file{acinclude.m4},
-and @code{aclocal} will do the right thing.
-
-Some of the macros can be used inside normal shell constructs: @code{if foo ;
-then GUILE_BAZ ; fi}, but this is not guaranteed.  It's probably a good idea
-to instantiate macros at top-level.
-
-We now include two examples, one simple and one complicated.
-
-The first example is for a package that uses libguile, and thus needs to
-know how to compile and link against it.  So we use
address@hidden to set the vars @code{GUILE_CFLAGS} and
address@hidden, which are automatically substituted in the Makefile.
-
address@hidden
-In configure.ac:
-
-  PKG_CHECK_MODULES([GUILE], address@hidden)
-
-In Makefile.in:
-
-  GUILE_CFLAGS  = @@GUILE_CFLAGS@@
-  GUILE_LIBS = @@GUILE_LIBS@@
-
-  myprog.o: myprog.c
-          $(CC) -o $@ $(GUILE_CFLAGS) $<
-  myprog: myprog.o
-          $(CC) -o $@ $< $(GUILE_LIBS)
address@hidden example
-
-The second example is for a package of Guile Scheme modules that uses an
-external program and other Guile Scheme modules (some might call this a "pure
-scheme" package).  So we use the @code{GUILE_SITE_DIR} macro, a regular
address@hidden macro, and the @code{GUILE_MODULE_AVAILABLE} macro.
-
address@hidden
-In configure.ac:
-
-  GUILE_SITE_DIR
-
-  probably_wont_work=""
-
-  # pgtype pgtable
-  GUILE_MODULE_AVAILABLE(have_guile_pg, (database postgres))
-  test $have_guile_pg = no &&
-      probably_wont_work="(my pgtype) (my pgtable) $probably_wont_work"
-
-  # gpgutils
-  AC_PATH_PROG(GNUPG,gpg)
-  test x"$GNUPG" = x &&
-      probably_wont_work="(my gpgutils) $probably_wont_work"
-
-  if test ! "$probably_wont_work" = "" ; then
-      p="         ***"
-      echo
-      echo "$p"
-      echo "$p NOTE:"
-      echo "$p The following modules probably won't work:"
-      echo "$p   $probably_wont_work"
-      echo "$p They can be installed anyway, and will work if their"
-      echo "$p dependencies are installed later.  Please see README."
-      echo "$p"
-      echo
-  fi
-
-In Makefile.in:
-
-  instdir = @@GUILE_SITE@@/my
-
-  install:
-        $(INSTALL) my/*.scm $(instdir)
address@hidden example
-
-
address@hidden Autofrisk
address@hidden Autofrisk
-
-The @dfn{guild autofrisk} command looks for the file @file{modules.af}
-in the current directory and writes out @file{modules.af.m4} containing
-autoconf definitions for @code{AUTOFRISK_CHECKS} and
address@hidden  @xref{Autoconf Background}, and @xref{Using
-Autoconf Macros}, for more info.
-
-The modules.af file consists of a series of configuration forms (Scheme
-lists), which have one of the following formats:
-
address@hidden
-  (files-glob PATTERN ...)                      ;; required
-  (non-critical-external MODULE ...)            ;; optional
-  (non-critical-internal MODULE ...)            ;; optional
-  (programs (MODULE PROG ...) ...)              ;; optional
-  (pww-varname VARNAME)                         ;; optional
address@hidden example
-
address@hidden is a string that may contain "*" and "?" characters to be
-expanded into filenames.  @var{module} is a list of symbols naming a module,
-such as `(srfi srfi-1)'.  @var{varname} is a shell-safe name to use instead of
address@hidden, the default.  This var is passed to `AC_SUBST'.
address@hidden is a string that names a program, such as "gpg".
-
-Autofrisk expands the @code{files-glob} pattern(s) into a list of files, scans
-each file's module definition form(s), and constructs a module dependency
-graph wherein modules defined by @code{define-module} are considered
address@hidden and the remaining, @dfn{external}.  For each external module
-that has an internal dependency, Autofrisk emits a
address@hidden check (@pxref{Autoconf Macros}), which altogether
-form the body of @code{AUTOFRISK_CHECKS}.
-
address@hidden causes the @file{configure} script to exit with
-an error message if the specified module is not available; it enforces a
-strong dependency.  You can temper dependency strength by using the
address@hidden and @code{non-critical-internal} configuration
-forms in modules.af.  For graph edges that touch such non-critical modules,
-Autofrisk uses @code{GUILE_MODULE_AVAILABLE}, and arranges for
address@hidden to display a warning if they are not found.
-
-The shell code resulting from the expansion of @code{AUTOFRISK_CHECKS} and
address@hidden uses the shell variable @code{probably_wont_work} to
-collect the names of unfound non-critical modules.  If this bothers you, use
-configuration form @code{(pww-name foo)} in modules.af.
-
-Although Autofrisk does not detect when a module uses a program (for example,
-in a @code{system} call), it can generate @code{AC_PATH_PROG} forms anyway if
-you use the @code{programs} configuration form in modules.af.  These are
-collected into @code{AUTOCONF_CHECKS}.
-
address@hidden Autofrisk}, for some modules.af examples.
-
-
address@hidden Using Autofrisk
address@hidden Using Autofrisk
-
-Using Autofrisk (@pxref{Autofrisk}) involves writing @file{modules.af} and
-adding two macro calls to @file{configure.in}.  Here is an example of the
-latter:
-
address@hidden
-AUTOFRISK_CHECKS
-AUTOFRISK_SUMMARY
address@hidden example
-
-Here is an adaptation of the second "GUILE_*" example (@pxref{Using Autoconf
-Macros}) that does basically the same thing.
-
address@hidden
-(files-glob "my/*.scm")
-(non-critical-external (database postgres))
-(programs ((my gpgutils) "gpg"))        ;; (my gpgutils) uses "gpg"
address@hidden example
-
-If the SRFI modules (@pxref{SRFI Support}) were a separate package, we could
-use @code{guild frisk} to find out its dependencies:
-
address@hidden
-$ guild frisk srfi/*.scm
-13 files, 18 modules (13 internal, 5 external), 9 edges
-
-x (ice-9 and-let-star)
-                        regular        (srfi srfi-2)
-x (ice-9 syncase)
-                        regular        (srfi srfi-11)
-x (ice-9 rdelim)
-                        regular        (srfi srfi-10)
-x (ice-9 receive)
-                        regular        (srfi srfi-8)
-                        regular        (srfi srfi-1)
-x (ice-9 session)
-                        regular        (srfi srfi-1)
address@hidden example
-
-Then, we could use the following modules.af to help configure it:
-
address@hidden
-(files-glob "srfi/*.scm")
-(non-critical-external          ;; relatively recent
-  (ice-9 rdelim)
-  (ice-9 receive)
-  (ice-9 and-let-star))
-(pww-varname not_fully_supported)
address@hidden example
-
address@hidden autoconf.texi ends here
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index 9581f0c..6b6d8b2 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -182,8 +182,6 @@ x
 
 * Guile Implementation::
 
-* Autoconf Support::
-
 Appendices
 
 * GNU Free Documentation License::  The license of this manual.
@@ -229,6 +227,7 @@ on that make up Guile's application programming interface 
(API), see
 * Using Guile Interactively::   Guile's REPL features.
 * Using Guile in Emacs::        Guile and Emacs.
 * Using Guile Tools::           A guild of scheming wizards.
+* Installing Site Packages::    Installing Scheme code.
 @end menu
 
 @include scheme-intro.texi
@@ -264,20 +263,25 @@ etc. that make up Guile's application programming 
interface (API),
 @xref{API Reference}.
 
 @menu
+* Parallel Installations::      Finding the right Guile.
 * Linking Programs With Guile:: More precisely, with the libguile library.
 * Linking Guile with Libraries::  To extend Guile itself. 
 * General Libguile Concepts::   General concepts for using libguile.
 * Defining New Types (Smobs)::  Adding new types to Guile.
 * Function Snarfing::           A way to define new functions.
 * Programming Overview::        An overview of Guile programming.
+* Autoconf Support::            Putting m4 to good use.
 @end menu
 
address@hidden libguile-parallel.texi
 @include libguile-linking.texi
 @include libguile-extensions.texi
 @include libguile-concepts.texi
 @include libguile-smobs.texi
 @include libguile-snarf.texi
 @include libguile-program.texi
address@hidden libguile-autoconf.texi
+
 
 @node API Reference
 @chapter API Reference
@@ -426,8 +430,6 @@ merely familiar with Scheme to being a real hacker.
 @include vm.texi
 @include compiler.texi
 
address@hidden autoconf.texi
-
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 
diff --git a/doc/ref/libguile-autoconf.texi b/doc/ref/libguile-autoconf.texi
new file mode 100644
index 0000000..b4a9f40
--- /dev/null
+++ b/doc/ref/libguile-autoconf.texi
@@ -0,0 +1,151 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2011
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
+
address@hidden
address@hidden Autoconf Support
address@hidden Autoconf Support
+
+Autoconf, a part of the GNU build system, makes it easy for users to
+build your package.  This section documents Guile's Autoconf support.
+
address@hidden
+* Autoconf Background::         Why use autoconf?
+* Autoconf Macros::             The GUILE_* macros.
+* Using Autoconf Macros::       How to use them, plus examples.
address@hidden menu
+
+
address@hidden Autoconf Background
address@hidden Autoconf Background
+
+As explained in the @cite{GNU Autoconf Manual}, any package needs
+configuration at build-time (@pxref{Top, ,Introduction,autoconf,The GNU
+Autoconf Manual}).  If your package uses Guile (or uses a package that
+in turn uses Guile), you probably need to know what specific Guile
+features are available and details about them.
+
+The way to do this is to write feature tests and arrange for their execution
+by the @file{configure} script, typically by adding the tests to
address@hidden, and running @code{autoconf} to create @file{configure}.
+Users of your package then run @file{configure} in the normal way.
+
+Macros are a way to make common feature tests easy to express.
+Autoconf provides a wide range of macros 
+(@pxref{Existing Tests,,,autoconf,The GNU Autoconf Manual}), 
+and Guile installation provides Guile-specific tests in the areas of:
+program detection, compilation flags reporting, and Scheme module
+checks.
+
+
address@hidden Autoconf Macros
address@hidden Autoconf Macros
+
+As mentioned earlier in this chapter, Guile supports parallel
+installation, and uses @code{pkg-config} to let the user choose which
+version of Guile they are interested in.  @code{pkg-config} has its own
+set of Autoconf macros that are probably installed on most every
+development system.  The most useful of these macros is
address@hidden
+
address@hidden PKG_CHECK_MODULES
+
address@hidden
+PKG_CHECK_MODULES([GUILE], address@hidden)
address@hidden example
+
+This example looks for Guile and sets the @code{GUILE_CFLAGS} and
address@hidden variables accordingly, or prints an error and exits if
+Guile was not found.
+
+Guile comes with additional Autoconf macros providing more information,
+installed as @address@hidden/share/aclocal/guile.m4}.  Their names
+all begin with @code{GUILE_}.
+
address@hidden see Makefile.am
address@hidden autoconf-macros.texi
+
+
address@hidden Using Autoconf Macros
address@hidden Using Autoconf Macros
+
+Using the autoconf macros is straightforward: Add the macro "calls" (actually
+instantiations) to @file{configure.ac}, run @code{aclocal}, and finally,
+run @code{autoconf}.  If your system doesn't have guile.m4 installed, place
+the desired macro definitions (@code{AC_DEFUN} forms) in @file{acinclude.m4},
+and @code{aclocal} will do the right thing.
+
+Some of the macros can be used inside normal shell constructs: @code{if foo ;
+then GUILE_BAZ ; fi}, but this is not guaranteed.  It's probably a good idea
+to instantiate macros at top-level.
+
+We now include two examples, one simple and one complicated.
+
+The first example is for a package that uses libguile, and thus needs to
+know how to compile and link against it.  So we use
address@hidden to set the vars @code{GUILE_CFLAGS} and
address@hidden, which are automatically substituted in the Makefile.
+
address@hidden
+In configure.ac:
+
+  PKG_CHECK_MODULES([GUILE], address@hidden)
+
+In Makefile.in:
+
+  GUILE_CFLAGS  = @@GUILE_CFLAGS@@
+  GUILE_LIBS = @@GUILE_LIBS@@
+
+  myprog.o: myprog.c
+          $(CC) -o $@ $(GUILE_CFLAGS) $<
+  myprog: myprog.o
+          $(CC) -o $@ $< $(GUILE_LIBS)
address@hidden example
+
+The second example is for a package of Guile Scheme modules that uses an
+external program and other Guile Scheme modules (some might call this a "pure
+scheme" package).  So we use the @code{GUILE_SITE_DIR} macro, a regular
address@hidden macro, and the @code{GUILE_MODULE_AVAILABLE} macro.
+
address@hidden
+In configure.ac:
+
+  GUILE_SITE_DIR
+
+  probably_wont_work=""
+
+  # pgtype pgtable
+  GUILE_MODULE_AVAILABLE(have_guile_pg, (database postgres))
+  test $have_guile_pg = no &&
+      probably_wont_work="(my pgtype) (my pgtable) $probably_wont_work"
+
+  # gpgutils
+  AC_PATH_PROG(GNUPG,gpg)
+  test x"$GNUPG" = x &&
+      probably_wont_work="(my gpgutils) $probably_wont_work"
+
+  if test ! "$probably_wont_work" = "" ; then
+      p="         ***"
+      echo
+      echo "$p"
+      echo "$p NOTE:"
+      echo "$p The following modules probably won't work:"
+      echo "$p   $probably_wont_work"
+      echo "$p They can be installed anyway, and will work if their"
+      echo "$p dependencies are installed later.  Please see README."
+      echo "$p"
+      echo
+  fi
+
+In Makefile.in:
+
+  instdir = @@GUILE_SITE@@/my
+
+  install:
+        $(INSTALL) my/*.scm $(instdir)
address@hidden example
+
+
address@hidden autoconf.texi ends here
diff --git a/doc/ref/libguile-linking.texi b/doc/ref/libguile-linking.texi
index 3a90208..de90768 100644
--- a/doc/ref/libguile-linking.texi
+++ b/doc/ref/libguile-linking.texi
@@ -16,23 +16,15 @@ head of any C source file that uses identifiers described 
in this
 manual.  Once you've compiled your source files, you need to link them
 against the Guile object code library, @code{libguile}.
 
address@hidden<libguile.h>} is not in the default search path for headers,
-because Guile supports parallel installation of multiple versions of
-Guile, with each version's headers under their own directories.  This is
-to allow development against, say, both Guile 2.0 and 2.2.
-
-To compile code that includes @code{<libguile.h>}, or links to
address@hidden, you need to select the effective version you are
-interested in, and then ask @code{pkg-config} for the compilation flags
-or linking instructions.  For effective version
address@hidden, for example, you would invoke
address@hidden --cflags --libs address@hidden to get
-the compilation and linking flags necessary to link to version
address@hidden of Guile.  You would typically run
address@hidden during the configuration phase of your program and
-use the obtained information in the Makefile.
-
-See the @code{pkg-config} man page, for more information.
+As noted in the previous section, @code{<libguile.h>} is not in the
+default search path for headers.  The following command lines give
+respectively the C compilation and link flags needed to build programs
+using Guile @value{EFFECTIVE-VERSION}:
+
address@hidden
+pkg-config address@hidden --cflags
+pkg-config address@hidden --libs
address@hidden example
 
 @menu
 * Guile Initialization Functions::  What to call first.
diff --git a/doc/ref/libguile-parallel.texi b/doc/ref/libguile-parallel.texi
new file mode 100644
index 0000000..09c60f5
--- /dev/null
+++ b/doc/ref/libguile-parallel.texi
@@ -0,0 +1,48 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010, 2011
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
+
address@hidden Parallel Installations
address@hidden Parallel Installations
+
address@hidden pkg-config
address@hidden effective version
+
+Guile provides strong API and ABI stability guarantees during stable
+series, so that if a user writes a program against Guile version 2.0.3,
+it will be compatible with some future version 2.0.7.  We say in this
+case that 2.0 is the @dfn{effective version}, composed of the major and
+minor versions, in this case 2 and 0.
+
+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
address@hidden utility, a tool to query installed packages by name.
+Guile encodes the version into its pkg-config name, so that users can
+ask for @code{guile-2.0} or @code{guile-2.2}, as appropriate.
+
+For effective version @value{EFFECTIVE-VERSION}, for example, you would
+invoke @code{pkg-config --cflags --libs address@hidden
+to get the compilation and linking flags necessary to link to version
address@hidden of Guile.  You would typically run
address@hidden during the configuration phase of your program and use
+the obtained information in the Makefile.
+
+See the @code{pkg-config} man page, for more information, or its web
+site, @url{http://pkg-config.freedesktop.org/}.
+
address@hidden Support}, for more on checking for Guile from within a
address@hidden file.
+
+
address@hidden Local Variables:
address@hidden TeX-master: "guile.texi"
address@hidden End:
diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi
index 2713fab..73e1a5d 100644
--- a/doc/ref/scheme-using.texi
+++ b/doc/ref/scheme-using.texi
@@ -732,6 +732,64 @@ using a CPAN-like system.
 A complete list of guild scripts can be had by invoking @code{guild
 list}, or simply @code{guild}.
 
+
address@hidden Installing Site Packages
address@hidden Installing Site Packages
+
address@hidden site
address@hidden site path
address@hidden load path
address@hidden %site-dir
+
+At some point, you will probably want to share your code with other
+people.  To do so effectively, it is important to follow a set of common
+conventions, to make it easy for the user to install and use your
+package.
+
+The first thing to do is to install your Scheme files where Guile can
+find them.  When Guile goes to find a Scheme file, it will search a
address@hidden path} to find the file: first in Guile's own path, then in
+paths for @dfn{site packages}.  A site package is any Scheme code that
+is installed and not part of Guile itself.  @xref{Loading}, for more on
+load paths.
+
+There are several site paths, for historical reasons, but the one that
+should generally be used can be obtained by invoking the
address@hidden procedure.  @xref{Build Config}.  If Guile
address@hidden is installed on your system in @code{/usr/},
+then @code{(%site-dir)} will be
address@hidden/usr/share/guile/site/@value{EFFECTIVE-VERSION}}.  Scheme files
+should be installed there.
+
+If you do not install compiled @code{.go} files, Guile will compile your
+modules and programs when they are first used, and cache them in the
+user's home directory.  @xref{Compilation}, for more on
+auto-compilation.  However, it is better to compile the files before
+they are installed, and to just copy the files to a place that Guile can
+find them.
+
+As with Scheme files, Guile searches a path to find compiled @code{.go}
+files, the @code{%load-compiled-path}.  By default, this path has two
+entries: a path for Guile's files, and a path for site packages.  You
+should install your @code{.go} files into the latter.  Currently there
+is no procedure to get at this path, which is probably a bug.  As in the
+previous example, if Guile @value{EFFECTIVE-VERSION} is installed on
+your system in @code{/usr/}, then the place to put compiled files for
+site packages will be
address@hidden/usr/lib/guile/@value{EFFECTIVE-VERSION}/site-ccache}.
+
+Note that a @code{.go} file will only be loaded in preference to a
address@hidden file if it is newer.  For that reason, you should install
+your Scheme files first, and your compiled files second.
+
+Finally, although this section is only about Scheme, sometimes you need
+to install C extensions too.  Shared libraries should be installed in
+the @dfn{extensions dir}.  This value can be had from the build config
+(@pxref{Build Config}).  Again, if Guile @value{EFFECTIVE-VERSION} is
+installed on your system in @code{/usr/}, then the extensions dir will
+be @code{/usr/lib/guile/@value{EFFECTIVE-VERSION}/extensions}.
+
+
 @c Local Variables:
 @c TeX-master: "guile.texi"
 @c End:
diff --git a/doc/ref/tour.texi b/doc/ref/tour.texi
index c6949eb..3e61269 100644
--- a/doc/ref/tour.texi
+++ b/doc/ref/tour.texi
@@ -181,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
@@ -235,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))
@@ -248,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
 
@@ -258,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))
diff --git a/doc/ref/web.texi b/doc/ref/web.texi
index 46d4cfb..63b6f3f 100644
--- a/doc/ref/web.texi
+++ b/doc/ref/web.texi
@@ -39,6 +39,7 @@ back.
 * HTTP Headers::                How Guile represents specific header values.
 * Requests::                    HTTP requests.
 * Responses::                   HTTP responses.
+* Web Client::                  Accessing web resources over HTTP.
 * Web Server::                  Serving HTTP to the internet.
 * Web Examples::                How to use this thing.
 @end menu
@@ -303,8 +304,8 @@ types by providing a number of low-level parsers and 
unparsers for
 elements of the HTTP protocol.
 
 If you are want to skip the low-level details for now and move on to web
-pages, @pxref{Web Server}.  Otherwise, load the HTTP module, and read
-on.
+pages, @pxref{Web Client}, and @pxref{Web Server}.  Otherwise, load the
+HTTP module, and read on.
 
 @example
 (use-modules (web http))
@@ -1281,6 +1282,40 @@ Return the given response header, or @var{default} if 
none was present.
 @end deffn
 
 
address@hidden Web Client
address@hidden Web Client
+
address@hidden(web client)} provides a simple, synchronous HTTP client, built on
+the lower-level HTTP, request, and response modules.
+
address@hidden {Scheme Procedure} open-socket-for-uri uri
address@hidden deffn
+
address@hidden {Scheme Procedure} http-get uri [#:port=(open-socket-for-uri 
uri)] [#:version='(1 . 1)] [#:keep-alive?=#f] [#:extra-headers='()] 
[#:decode-body=#t]
+Connect to the server corresponding to @var{uri} and ask for the
+resource, using the @code{GET} method.  If you already have a port open,
+pass it as @var{port}.  The port will be closed at the end of the
+request unless @var{keep-alive?} is true.  Any extra headers in the
+alist @var{extra-headers} will be added to the request.
+
+If @var{decode-body?} is true, as is the default, the body of the
+response will be decoded to string, if it is a textual content-type.
+Otherwise it will be returned as a bytevector.
address@hidden deffn
+
address@hidden is useful for making one-off requests to web sites.  If
+you are writing a web spider or some other client that needs to handle a
+number of requests in parallel, it's better to build an event-driven URL
+fetcher, similar in structure to the web server (@pxref{Web Server}).
+
+Another option, good but not as performant, would be to use threads,
+possibly via par-map or futures.
+
+More helper procedures for the other common HTTP verbs would be a good
+addition to this module.  Send your code to
address@hidden@@gnu.org}.
+
+
 @node Web Server
 @subsection Web Server
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]