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.0-20-g0e8a11


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-20-g0e8a11c
Date: Sun, 20 Feb 2011 21:03:27 +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=0e8a11c49a0ccc8d76807133e9abf82f8e14d1ec

The branch, stable-2.0 has been updated
       via  0e8a11c49a0ccc8d76807133e9abf82f8e14d1ec (commit)
       via  097a793b2225039980c2b6309661cb23326903f1 (commit)
      from  f244cc515447f8fb7d2f10038e88636cf9cf5068 (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 0e8a11c49a0ccc8d76807133e9abf82f8e14d1ec
Author: Andy Wingo <address@hidden>
Date:   Sun Feb 20 22:08:27 2011 +0100

    update examples in manual to use PKG_CHECK_MODULES
    
    * doc/ref/autoconf.texi (Using Autoconf Macros): Switch example to use
      PKG_CHECK_MODULES.
    * doc/ref/libguile-linking.texi (A Sample Guile Main Program): Likewise,
      and change from configure.in to configure.ac, and recommend
      autoreconf.

commit 097a793b2225039980c2b6309661cb23326903f1
Author: Andy Wingo <address@hidden>
Date:   Sun Feb 20 21:43:19 2011 +0100

    pkg-config instead of guile-config in manuals
    
    * doc/ref/api-options.texi (Build Config):
    * doc/ref/libguile-linking.texi (Linking Programs With Guile):
      (A Sample Guile Main Program):
    * doc/ref/libguile-smobs.texi (The Complete Example): Use pkg-config in
      the examples instead of guile-config.

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

Summary of changes:
 doc/ref/api-options.texi      |   13 ++++---
 doc/ref/autoconf.texi         |   16 ++++----
 doc/ref/libguile-linking.texi |   77 ++++++++++++++++++++++++-----------------
 doc/ref/libguile-smobs.texi   |    8 ++--
 4 files changed, 64 insertions(+), 50 deletions(-)

diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi
index 4813864..6f7568b 100644
--- a/doc/ref/api-options.texi
+++ b/doc/ref/api-options.texi
@@ -171,13 +171,14 @@ guileversion, libguileinterface, buildstamp
 @end table
 
 Values are all strings.  The value for @code{LIBS} is typically found
-also as a part of "guile-config link" output.  The value for
+also as a part of @code{pkg-config --libs
address@hidden output.  The value for
 @code{guileversion} has form X.Y.Z, and should be the same as returned
-by @code{(version)}.  The value for @code{libguileinterface} is
-libtool compatible and has form CURRENT:REVISION:AGE
-(@pxref{Versioning,, Library interface versions, libtool, GNU
-Libtool}).  The value for @code{buildstamp} is the output of the
-command @samp{date -u +'%Y-%m-%d %T'} (UTC).
+by @code{(version)}.  The value for @code{libguileinterface} is libtool
+compatible and has form CURRENT:REVISION:AGE (@pxref{Versioning,,
+Library interface versions, libtool, GNU Libtool}).  The value for
address@hidden is the output of the command @samp{date -u +'%Y-%m-%d
+%T'} (UTC).
 
 In the source, @code{%guile-build-info} is initialized from
 libguile/libpath.h, which is completely generated, so deleting this file
diff --git a/doc/ref/autoconf.texi b/doc/ref/autoconf.texi
index 1e334c0..6edee54 100644
--- a/doc/ref/autoconf.texi
+++ b/doc/ref/autoconf.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -97,25 +97,25 @@ 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 @code{GUILE_FLAGS} to set the
-vars @code{GUILE_CFLAGS} and @code{GUILE_LDFLAGS}, which are automatically
-substituted in the Makefile.
+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.
 
 @example
 In configure.ac:
 
-  GUILE_FLAGS
+  PKG_CHECK_MODULES([GUILE], address@hidden)
 
 In Makefile.in:
 
   GUILE_CFLAGS  = @@GUILE_CFLAGS@@
-  GUILE_LDFLAGS = @@GUILE_LDFLAGS@@
+  GUILE_LIBS = @@GUILE_LIBS@@
 
   myprog.o: myprog.c
           $(CC) -o $@ $(GUILE_CFLAGS) $<
   myprog: myprog.o
-          $(CC) -o $@ $< $(GUILE_LDFLAGS)
+          $(CC) -o $@ $< $(GUILE_LIBS)
 @end example
 
 The second example is for a package of Guile Scheme modules that uses an
diff --git a/doc/ref/libguile-linking.texi b/doc/ref/libguile-linking.texi
index b6a8855..3a90208 100644
--- a/doc/ref/libguile-linking.texi
+++ b/doc/ref/libguile-linking.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -16,16 +16,24 @@ 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}.
 
-On most systems, you should not need to tell the compiler and linker
-explicitly where they can find @file{libguile.h} and @file{libguile}.
-When Guile has been installed in a peculiar way, or when you are on a
-peculiar system, things might not be so easy and you might need to pass
-additional @code{-I} or @code{-L} options to the compiler.  Guile
-provides the utility program @code{guile-config} to help you find the
-right values for these options.  You would typically run
address@hidden during the configuration phase of your program and
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.
+
 @menu
 * Guile Initialization Functions::  What to call first.
 * A Sample Guile Main Program::  Sources and makefiles.
@@ -98,17 +106,17 @@ ready, it invokes @code{inner_main}, which calls 
@code{scm_shell} to
 process the command-line arguments in the usual way.
 
 Here is a Makefile which you can use to compile the above program.  It
-uses @code{guile-config} to learn about the necessary compiler and
+uses @code{pkg-config} to learn about the necessary compiler and
 linker flags.
 @example
 # Use GCC, if you have it installed.
 CC=gcc
 
 # Tell the C compiler where to find <libguile.h>
-CFLAGS=`guile-config compile`
+CFLAGS=`pkg-config --cflags address@hidden
 
 # Tell the linker what libraries to use and where to find them.
-LIBS=`guile-config link`
+LIBS=`pkg-config --libs address@hidden
 
 simple-guile: simple-guile.o
         address@hidden@} simple-guile.o address@hidden@} -o simple-guile
@@ -120,13 +128,11 @@ simple-guile.o: simple-guile.c
 If you are using the GNU Autoconf package to make your application more
 portable, Autoconf will settle many of the details in the Makefile above
 automatically, making it much simpler and more portable; we recommend
-using Autoconf with Guile.  Guile also provides the @code{GUILE_FLAGS}
-macro for autoconf that performs all necessary checks.  Here is a
address@hidden file for @code{simple-guile} that uses this macro.
-Autoconf can use this file as a template to generate a @code{configure}
-script.  In order for Autoconf to find the @code{GUILE_FLAGS} macro, you
-will need to run @code{aclocal} first (@pxref{Invoking aclocal,,,
-automake, GNU Automake}).
+using Autoconf with Guile.  Here is a @file{configure.ac} file for
address@hidden that uses the standard @code{PKG_CHECK_MODULES}
+macro to check for Guile.  Autoconf will process this file into a
address@hidden script.  We recommend invoking Autoconf via the
address@hidden utility.
 
 @example
 AC_INIT(simple-guile.c)
@@ -135,19 +141,21 @@ AC_INIT(simple-guile.c)
 AC_PROG_CC
 
 # Check for Guile
-GUILE_FLAGS
+PKG_CHECK_MODULES([GUILE], address@hidden)
 
 # Generate a Makefile, based on the results.
 AC_OUTPUT(Makefile)
 @end example
 
+Run @code{autoreconf -vif} to generate @code{configure}.
+
 Here is a @code{Makefile.in} template, from which the @code{configure}
 script produces a Makefile customized for the host system:
 @example
 # The configure script fills in these values.
 CC=@@CC@@
 CFLAGS=@@GUILE_CFLAGS@@
-LIBS=@@GUILE_LDFLAGS@@
+LIBS=@@GUILE_LIBS@@
 
 simple-guile: simple-guile.o
         address@hidden@} simple-guile.o address@hidden@} -o simple-guile
@@ -156,23 +164,28 @@ simple-guile.o: simple-guile.c
 @end example
 
 The developer should use Autoconf to generate the @file{configure}
-script from the @file{configure.in} template, and distribute
+script from the @file{configure.ac} template, and distribute
 @file{configure} with the application.  Here's how a user might go about
 building the application:
 
 @example
 $ ls
-Makefile.in     configure*      configure.in    simple-guile.c
+Makefile.in     configure*      configure.ac    simple-guile.c
 $ ./configure
-creating cache ./config.cache
-checking for gcc... (cached) gcc
-checking whether the C compiler (gcc  ) works... yes
-checking whether the C compiler (gcc  ) is a cross-compiler... no
-checking whether we are using GNU C... (cached) yes
-checking whether gcc accepts -g... (cached) yes
-checking for Guile... yes
-creating ./config.status
-creating Makefile
+checking for gcc... ccache gcc
+checking whether the C compiler works... yes
+checking for C compiler default output file name... a.out
+checking for suffix of executables... 
+checking whether we are cross compiling... no
+checking for suffix of object files... o
+checking whether we are using the GNU C compiler... yes
+checking whether ccache gcc accepts -g... yes
+checking for ccache gcc option to accept ISO C89... none needed
+checking for pkg-config... /usr/bin/pkg-config
+checking pkg-config is at least version 0.9.0... yes
+checking for GUILE... yes
+configure: creating ./config.status
+config.status: creating Makefile
 $ make
 [...]
 $ ./simple-guile
diff --git a/doc/ref/libguile-smobs.texi b/doc/ref/libguile-smobs.texi
index c6581a1..eb938f0 100644
--- a/doc/ref/libguile-smobs.texi
+++ b/doc/ref/libguile-smobs.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 
2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -686,9 +686,9 @@ Here is a sample build and interaction with the code from 
the
 
 @example
 zwingli:example-smob$ make CC=gcc
-gcc `guile-config compile`   -c image-type.c -o image-type.o
-gcc `guile-config compile`   -c myguile.c -o myguile.o
-gcc image-type.o myguile.o `guile-config link` -o myguile
+gcc `pkg-config --cflags address@hidden -c image-type.c -o image-type.o
+gcc `pkg-config --cflags address@hidden -c myguile.c -o myguile.o
+gcc image-type.o myguile.o `pkg-config --libs address@hidden -o myguile
 zwingli:example-smob$ ./myguile
 guile> make-image
 #<primitive-procedure make-image>


hooks/post-receive
-- 
GNU Guile



reply via email to

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