summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-03-28 22:31:20 -0700
committerAndy Wingo <wingo@pobox.com>2009-03-28 22:31:20 -0700
commit9c0cd73e614e338528e1d323dedec54f3dfad1d8 (patch)
treef9b153084447d2c2d36efbdf052b331c3278fc12 /meta
parent6ecae97fb8dca2e5e26af44a649a706431c65756 (diff)
parenta5fc657043e1af9b2e79799059069f8172afb66c (diff)
downloadguile-9c0cd73e614e338528e1d323dedec54f3dfad1d8.tar.gz
Merge branch 'wingo'
Diffstat (limited to 'meta')
-rw-r--r--meta/ChangeLog-2008233
-rw-r--r--meta/Makefile.am33
-rw-r--r--meta/gdb-uninstalled-guile.in38
-rw-r--r--meta/guile-1.8-uninstalled.pc.in8
-rw-r--r--meta/guile-1.8.pc.in15
-rw-r--r--meta/guile-config.in280
-rw-r--r--meta/guile-tools.in118
-rw-r--r--meta/guile.in51
-rw-r--r--meta/guile.m4198
-rw-r--r--meta/uninstalled-env.in100
10 files changed, 1074 insertions, 0 deletions
diff --git a/meta/ChangeLog-2008 b/meta/ChangeLog-2008
new file mode 100644
index 000000000..d450f2536
--- /dev/null
+++ b/meta/ChangeLog-2008
@@ -0,0 +1,233 @@
+2008-06-02 Ludovic Courtès <ludo@gnu.org>
+
+ * guile-config.in (build-link): Show `-L' before `-lguile'.
+ Reported by Peter O'Gorman <pogma@thewrittenword.com>.
+
+2008-01-22 Neil Jerram <neil@ossau.uklinux.net>
+
+ * COPYING: Removed.
+
+2007-12-30 Mike Gran <spk121@yahoo.com>
+
+ * guile.m4: add serial number to m4
+
+2007-01-04 Kevin Ryde <user42@zip.com.au>
+
+ * Makefile.am (guile-config): Use "|" as the sed delimiter, for the
+ benefit of DOS systems where $(bindir) might include a drive letter
+ like "c:". Reported by Cesar Strauss.
+
+2006-09-19 Rob Browning <rlb@defaultvalue.org>
+
+ * guile-config.in (build-link): Restore the removal of "/usr/lib"
+ (in addition to "/usr/lib/" from any -L arguments).
+
+2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
+
+ * guile-config.in (build-link): Replaced -lguile-ltdl with -lltdl.
+
+2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * guile-config.in: remove display-separated.
+ (build-link): cleanup.
+ (build-compile): remove space between -I and path.
+
+2004-09-24 Marius Vollmer <mvo@zagadka.de>
+
+ * guile-config.in (build-link, build-compile): Include CFLAGS in
+ output. This is needed to get "-pthread" into the builds, for
+ example.
+
+ * Makefile.am (EXTRA_DIST): Removed qthreads.m4.
+
+2003-04-05 Marius Vollmer <mvo@zagadka.de>
+
+ * Changed license terms to the plain LGPL thru-out.
+
+2002-10-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * guile-config.in (build-link): Include "-lguile-ltdl" in link
+ flags.
+
+2002-07-17 Marius Vollmer <mvo@zagadka.ping.de>
+
+ * qthreads.m4: Added configuration for ARM.
+
+2002-04-26 Marius Vollmer <mvo@zagadka.ping.de>
+
+ * Makefile.am (EXTRA_DIST): Added qthreads.m4.
+ * qthreads.m4: Moved here from top directory.
+
+2002-03-12 Rob Browning <rlb@defaultvalue.org>
+
+ * guile-config.in (build-link): don't output -L/usr/lib.
+ (build-compile): don't output -I/usr/include.
+
+2002-03-03 Neil Jerram <neil@ossau.uklinux.net>
+
+ * guile.m4 (GUILE_PROGS): In docstring, change `are' to `is'.
+
+2002-01-02 Thien-Thi Nguyen <ttn@glug.org>
+
+ * guile.m4: Rewrite comments in texi.
+
+ (GUILE_FLAGS): Rewrite.
+ Thanks to Alexandre Duret-Lutz.
+
+2001-12-28 Thien-Thi Nguyen <ttn@glug.org>
+
+ * guile.m4 (GUILE_PROGS, GUILE_SITE_DIR, GUILE_CHECK,
+ GUILE_MODULE_EXPORTS, GUILE_MODULE_REQUIRED_EXPORTS): New macros.
+
+ (GUILE_MODULE_CHECK): Renamed from AC_GUILE_MODULE_CHECK.
+ Rewritten to expect `description' as a present-tense verb phrase.
+
+ (GUILE_MODULE_AVAILABLE, GUILE_MODULE_REQUIRED): Renamed likewise.
+
+2001-12-28 Thien-Thi Nguyen <ttn@glug.org>
+
+ * guile.m4: Update copyright.
+ Add index in header comments.
+
+ (AC_GUILE_MODULE_CHECK, AC_GUILE_MODULE_AVAILABLE,
+ AC_GUILE_MODULE_REQUIRED): New macros.
+
+2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
+
+ * guile-config.in, Makefile.am: Updated copyright notice.
+
+2001-05-28 Gary Houston <ghouston@arglist.com>
+
+ * Makefile.am: let guile-config depend on libguile/libpath.h,
+ so that it will be rebuilt if configure --prefix changes.
+
+2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
+
+ * guile-config.in (build-link): Really reverted the change of
+ 2001-03-05.
+
+2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * guile-config.in (build-link): Reverted the previous patch.
+
+2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
+
+ * guile-config.in (build-link): Fixed duplicate binding bug
+ reported by Ralf Mattes.
+
+2000-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * guile-config.in (build-link): Use substring instead of
+ make-shared-substring.
+
+2000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * guile-config.in (display-line-port): Make sure all output is
+ sent to the given port. Thanks to I. N. Golubev for the patch.
+
+2000-01-12 Marius Vollmer <mvo@zagadka.ping.de>
+
+ * Makefile.am (EXTRA_DIST): Added "guile.m4".
+
+1999-10-05 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * guile.m4: Moved here from top-level directory; see the ChangeLog
+ entry there.
+ * Makefile.am (aclocaldir, aclocal_DATA): New variables, ensuring
+ that guile.m4 gets installed.
+
+ * Makefile.in: Deleted from CVS repository. Run the autogen.sh
+ script to create generated files like this one.
+
+1999-09-11 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * Makefile.in: Regenerated.
+
+1998-07-29 Marius Vollmer <mvo@zagadka.ping.de>
+
+ * guile-config.in (build-link): Correct non-RnRS usage of internal
+ defines.
+
+1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * Makefile.in: Regenerated.
+
+1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * COPYING: New file.
+ * Makefile.in: Regenerated.
+
+1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * guile-config.in: Add copyright notice.
+
+1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * guile-config.in (build-link): It isn't. Revert the change.
+
+ * guile-config.in (build-link): Include a -R flag in the output
+ from link. Not sure if this is the right thing to do.
+
+1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * guile-config.in (build-compile, help-compile, usage-compile):
+ New functions to implement new subcommand.
+
+ * guile-config.in: Redo the help system, so that each subcommand
+ defines its own usage text, as well as its help text.
+
+ * guile-config.in (build-link): Include a -L option in the output
+ from `guile-config link', indicating where libguile was installed.
+ (Thanks to Greg Troxel.)
+
+1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * guile-config.in: Don't import ice-9 regex; that's not available
+ on all systems. Maybe someday we'll have our own...
+ (set-program-name!): Use basename.
+ (build-link): Use basename and stock string functions, instead of
+ string-match.
+ (Bug report from Greg Troxel --- thanks!)
+
+ * Directory renamed to guile-config from build.
+ * guile-config.in: Renamed from build-guile.in, for consistency
+ with the analogous script for GTK, called gtk-config.
+ * Makefile.am, .cvsignore: References to `build-guile' replaced
+ with `guile-config'.
+
+1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * Makefile.in: Regenerated using the last public version of
+ automake, not the hacked Cygnus version.
+
+1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * Makefile.in: Regenerated, after removing Totoro kludge.
+
+1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * Makefile.in: Rebuilt, for config changes in parent dir.
+
+1998-01-05 Tim Pierce <twp@skepsis.com>
+
+ * .cvsignore: New file.
+
+Mon Oct 6 11:45:59 1997 Jim Blandy <jimb@totoro.red-bean.com>
+
+ * build-guile.in: Try to return an appropriate exit status.
+
+ * build-guile.in: Rearranged to use a table of subcommands, and
+ include per-subcommand help.
+
+ * build-guile.in: New "info" subcommand, for easy access to Guile
+ build variables.
+
+Mon Sep 29 23:53:14 1997 Jim Blandy <jimb@totoro.red-bean.com>
+
+ * Makefile.in: Regenerated with automake 1.2c.
+
+Sat Sep 27 23:15:26 1997 Jim Blandy <jimb@totoro.red-bean.com>
+
+ * New directory --- the build-guile command, intended to help
+ people build Guile-based applications.
+ * Makefile.am, Makefile.in, build-guile.in: New files.
diff --git a/meta/Makefile.am b/meta/Makefile.am
new file mode 100644
index 000000000..76544b30d
--- /dev/null
+++ b/meta/Makefile.am
@@ -0,0 +1,33 @@
+## Process this file with Automake to create Makefile.in
+## Jim Blandy <jimb@red-bean.com> --- September 1997
+##
+## Copyright (C) 1998, 1999, 2001, 2006, 2007, 2008 Free Software Foundation, Inc.
+##
+## This file is part of GUILE.
+##
+## GUILE is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or
+## (at your option) any later version.
+##
+## GUILE is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public
+## License along with GUILE; see the file COPYING. If not, write
+## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+## Floor, Boston, MA 02110-1301 USA
+
+bin_SCRIPTS=guile-config guile-tools
+EXTRA_DIST=guile-config.in guile-tools.in guile.m4 ChangeLog-2008 \
+ guile-1.8.pc.in guile-1.8-uninstalled.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = guile-1.8.pc
+
+## FIXME: in the future there will be direct automake support for
+## doing this. When that happens, switch over.
+aclocaldir = $(datadir)/aclocal
+aclocal_DATA = guile.m4
diff --git a/meta/gdb-uninstalled-guile.in b/meta/gdb-uninstalled-guile.in
new file mode 100644
index 000000000..457ab2bd7
--- /dev/null
+++ b/meta/gdb-uninstalled-guile.in
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Copyright (C) 2002, 2006, 2008 Free Software Foundation
+#
+# This file is part of GUILE.
+#
+# GUILE is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or
+# (at your option) any later version.
+#
+# GUILE is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with GUILE; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+# Floor, Boston, MA 02110-1301 USA
+
+# Commentary:
+
+# Usage: gdb-uninstalled-guile [ARGS]
+#
+# This script runs Guile from the build tree under GDB. See
+# ./guile for more information.
+#
+# In addition to running ./gdb-uninstalled-guile, sometimes it's useful to
+# run e.g. ./check-guile -i meta/gdb-uninstalled-guile foo.test.
+
+# Code:
+
+set -e
+# env (set by configure)
+top_builddir="@top_builddir_absolute@"
+exec ${top_builddir}/uninstalled-env libtool --mode=execute \
+ gdb --args ${top_builddir}/libguile/guile "$@"
diff --git a/meta/guile-1.8-uninstalled.pc.in b/meta/guile-1.8-uninstalled.pc.in
new file mode 100644
index 000000000..50d337fd3
--- /dev/null
+++ b/meta/guile-1.8-uninstalled.pc.in
@@ -0,0 +1,8 @@
+builddir=@abs_top_builddir@
+srcdir=@abs_top_srcdir@
+
+Name: GNU Guile (uninstalled)
+Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled)
+Version: @GUILE_VERSION@
+Libs: -L${builddir}/libguile -lguile @GUILE_LIBS@
+Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@
diff --git a/meta/guile-1.8.pc.in b/meta/guile-1.8.pc.in
new file mode 100644
index 000000000..15c83d84b
--- /dev/null
+++ b/meta/guile-1.8.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+
+sitedir=@sitedir@
+libguileinterface=@LIBGUILE_INTERFACE@
+
+Name: GNU Guile
+Description: GNU's Ubiquitous Intelligent Language for Extension
+Version: @GUILE_VERSION@
+Libs: -L${libdir} -lguile @GUILE_LIBS@
+Cflags: -I${includedir} @GUILE_CFLAGS@
diff --git a/meta/guile-config.in b/meta/guile-config.in
new file mode 100644
index 000000000..b1640b629
--- /dev/null
+++ b/meta/guile-config.in
@@ -0,0 +1,280 @@
+#!/bin/sh
+bindir=`dirname $0`
+exec $bindir/guile -e main -s $0 "$@"
+!#
+;;;; guile-config --- utility for linking programs with Guile
+;;;; Jim Blandy <jim@red-bean.com> --- September 1997
+;;;;
+;;;; Copyright (C) 1998, 2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+;;;;
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Lesser General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 2.1 of the License, or (at your option) any later version.
+;;;;
+;;;; This library is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;;; Lesser General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU Lesser General Public
+;;;; License along with this library; if not, write to the Free Software
+;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+;;; TODO:
+;;; * Add some plausible structure for returning the right exit status,
+;;; just something that encourages people to do the correct thing.
+;;; * Implement the static library support. This requires that
+;;; some portion of the module system be done.
+
+(use-modules (ice-9 string-fun))
+
+
+;;;; main function, command-line processing
+
+;;; The script's entry point.
+(define (main args)
+ (set-program-name! (car args))
+ (let ((args (cdr args)))
+ (cond
+ ((null? args) (show-help '())
+ (quit 1))
+ ((assoc (car args) command-table)
+ => (lambda (row)
+ (set! subcommand-name (car args))
+ ((cadr row) (cdr args))))
+ (else (show-help '())
+ (quit 1)))))
+
+(define program-name #f)
+(define subcommand-name #f)
+(define program-version "@GUILE_VERSION@")
+
+;;; Given an executable path PATH, set program-name to something
+;;; appropriate f or use in error messages (i.e., with leading
+;;; directory names stripped).
+(define (set-program-name! path)
+ (set! program-name (basename path)))
+
+(define (show-help args)
+ (cond
+ ((null? args) (show-help-overview))
+ ((assoc (car args) command-table)
+ => (lambda (row) ((caddr row))))
+ (else
+ (show-help-overview))))
+
+(define (show-help-overview)
+ (display-line-error "Usage: ")
+ (for-each (lambda (row) ((cadddr row)))
+ command-table))
+
+(define (usage-help)
+ (let ((dle display-line-error)
+ (p program-name))
+ (dle " " p " --help - show usage info (this message)")
+ (dle " " p " --help SUBCOMMAND - show help for SUBCOMMAND")))
+
+(define (show-version args)
+ (display-line-error program-name " - Guile version " program-version))
+
+(define (help-version)
+ (let ((dle display-line-error))
+ (dle "Usage: " program-name " --version")
+ (dle "Show the version of this script. This is also the version of")
+ (dle "Guile this script was installed with.")))
+
+(define (usage-version)
+ (display-line-error
+ " " program-name " --version - show installed script and Guile version"))
+
+
+;;;; the "link" subcommand
+
+;;; Write a set of linker flags to standard output to include the
+;;; libraries that libguile needs to link against.
+;;;
+;;; In the long run, we want to derive these flags from Guile module
+;;; declarations files that are installed along the load path. For
+;;; now, we're just going to reach into Guile's configuration info and
+;;; hack it out.
+(define (build-link args)
+
+ ;; If PATH has the form FOO/libBAR.a, return the substring
+ ;; BAR, otherwise return #f.
+ (define (match-lib path)
+ (let* ((base (basename path))
+ (len (string-length base)))
+ (if (and (> len 5)
+ (string=? (substring base 0 3) "lib")
+ (string=? (substring base (- len 2)) ".a"))
+ (substring base 3 (- len 2))
+ #f)))
+
+ (if (> (length args) 0)
+ (error
+ (string-append program-name
+ " link: arguments to subcommand not yet implemented")))
+
+ (let ((libdir (get-build-info 'libdir))
+ (other-flags
+ (let loop ((libs
+ ;; Get the string of linker flags we used to build
+ ;; Guile, and break it up into a list.
+ (separate-fields-discarding-char #\space
+ (get-build-info 'LIBS)
+ list)))
+
+ (cond
+ ((null? libs) '())
+
+ ;; Turn any "FOO/libBAR.a" elements into "-lBAR".
+ ((match-lib (car libs))
+ => (lambda (bar)
+ (cons (string-append "-l" bar)
+ (loop (cdr libs)))))
+
+ ;; Remove any empty strings that may have seeped in there.
+ ((string=? (car libs) "") (loop (cdr libs)))
+
+ (else (cons (car libs) (loop (cdr libs))))))))
+
+ ;; Include libguile itself in the list, along with the directory
+ ;; it was installed in, but do *not* add /usr/lib since that may
+ ;; prevent other programs from specifying non-/usr/lib versions
+ ;; via their foo-config scripts. If *any* app puts -L/usr/lib in
+ ;; the output of its foo-config script then it may prevent the use
+ ;; a non-/usr/lib install of anything that also has a /usr/lib
+ ;; install. For now we hard-code /usr/lib, but later maybe we can
+ ;; do something more dynamic (i.e. what do we need.
+
+ ;; Display the flags, separated by spaces.
+ (display (string-join
+ (list
+ (get-build-info 'CFLAGS)
+ (if (or (string=? libdir "/usr/lib")
+ (string=? libdir "/usr/lib/"))
+ ""
+ (string-append "-L" (get-build-info 'libdir)))
+ "-lguile -lltdl"
+ (string-join other-flags)
+
+ )))
+ (newline)))
+
+
+(define (help-link)
+ (let ((dle display-line-error))
+ (dle "Usage: " program-name " link")
+ (dle "Print linker flags for building the `guile' executable.")
+ (dle "Print the linker command-line flags necessary to link against")
+ (dle "the Guile library, and any other libraries it requires.")))
+
+(define (usage-link)
+ (display-line-error
+ " " program-name " link - print libraries to link with"))
+
+
+
+;;;; The "compile" subcommand
+
+(define (build-compile args)
+ (if (> (length args) 0)
+ (error
+ (string-append program-name
+ " compile: no arguments expected")))
+
+ ;; See gcc manual wrt fixincludes. Search for "Use of
+ ;; `-I/usr/include' may cause trouble." For now we hard-code this.
+ ;; Later maybe we can do something more dynamic.
+ (display
+ (string-append
+ (if (not (string=? (get-build-info 'includedir) "/usr/include"))
+ (string-append "-I" (get-build-info 'includedir) " ")
+ " ")
+
+ (get-build-info 'CFLAGS)
+ "\n"
+ )))
+
+(define (help-compile)
+ (let ((dle display-line-error))
+ (dle "Usage: " program-name " compile")
+ (dle "Print C compiler flags for compiling code that uses Guile.")
+ (dle "This includes any `-I' flags needed to find Guile's header files.")))
+
+(define (usage-compile)
+ (display-line-error
+ " " program-name " compile - print C compiler flags to compile with"))
+
+
+;;;; The "info" subcommand
+
+(define (build-info args)
+ (cond
+ ((null? args) (show-all-vars))
+ ((null? (cdr args)) (show-var (car args)))
+ (else (display-line-error "Usage: " program-name " info [VAR]")
+ (quit 2))))
+
+(define (show-all-vars)
+ (for-each (lambda (binding)
+ (display-line (car binding) " = " (cdr binding)))
+ %guile-build-info))
+
+(define (show-var var)
+ (display (get-build-info (string->symbol var)))
+ (newline))
+
+(define (help-info)
+ (let ((d display-line-error))
+ (d "Usage: " program-name " info [VAR]")
+ (d "Display the value of the Makefile variable VAR used when Guile")
+ (d "was built. If VAR is omitted, display all Makefile variables.")
+ (d "Use this command to find out where Guile was installed,")
+ (d "where it will look for Scheme code at run-time, and so on.")))
+
+(define (usage-info)
+ (display-line-error
+ " " program-name " info [VAR] - print Guile build directories"))
+
+
+;;;; trivial utilities
+
+(define (get-build-info name)
+ (let ((val (assq name %guile-build-info)))
+ (if (not (pair? val))
+ (begin
+ (display-line-error
+ program-name " " subcommand-name ": no such build-info: " name)
+ (quit 2)))
+ (cdr val)))
+
+(define (display-line . args)
+ (apply display-line-port (current-output-port) args))
+
+(define (display-line-error . args)
+ (apply display-line-port (current-error-port) args))
+
+(define (display-line-port port . args)
+ (for-each (lambda (arg) (display arg port))
+ args)
+ (newline port))
+
+
+;;;; the command table
+
+;;; We define this down here, so Guile builds the list after all the
+;;; functions have been defined.
+(define command-table
+ (list
+ (list "--version" show-version help-version usage-version)
+ (list "--help" show-help show-help-overview usage-help)
+ (list "link" build-link help-link usage-link)
+ (list "compile" build-compile help-compile usage-compile)
+ (list "info" build-info help-info usage-info)))
+
+
+;;; Local Variables:
+;;; mode: scheme
+;;; End:
diff --git a/meta/guile-tools.in b/meta/guile-tools.in
new file mode 100644
index 000000000..68db26887
--- /dev/null
+++ b/meta/guile-tools.in
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Copyright (C) 2001, 2003, 2006, 2008 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+# Usage: See `help' func below.
+#
+# TODO
+# - handle pre-install invocation
+# - "full" option processing (but see comment below)
+#
+# Author: Thien-Thi Nguyen
+
+help ()
+{
+ cat <<EOF
+Usage: guile-tools --version
+ guile-tools --help
+ guile-tools [OPTION] PROGRAM [ARGS]
+
+If PROGRAM is "list" or omitted, display contents of scripts dir, otherwise
+PROGRAM is run w/ ARGS. Options (only one of which may be used at a time):
+ --scriptsdir DIR -- Look in DIR for scripts
+ --guileversion VERS -- Look in $pkgdatadir/VERS/scripts for scripts
+ --source -- Display PROGRAM source (ignore ARGS) to stdout
+
+Default scripts dir: $default_scriptsdir
+EOF
+}
+
+prefix="@prefix@"
+datarootdir="@datarootdir@"
+pkgdatadir="@datadir@/@PACKAGE@"
+guileversion="@GUILE_EFFECTIVE_VERSION@"
+default_scriptsdir=$pkgdatadir/$guileversion/scripts
+
+top_srcdir="@top_srcdir_absolute@"
+top_builddir="@top_builddir_absolute@"
+
+# pre-install invocation frob
+mydir=$(cd $(dirname $0) && pwd)
+if [ "$mydir" = "$top_builddir/meta" ] ; then
+ default_scriptsdir=$top_srcdir/scripts
+fi
+
+# option processing -- basically, you can override either the script dir
+# completely, or just the guile version. we choose implementation simplicity
+# over orthogonality.
+
+case x"$1" in
+x--version)
+ echo $0 $guileversion
+ exit 0
+ ;;
+x--help)
+ help
+ exit 0
+ ;;
+esac
+
+if [ x"$1" = x--scriptsdir ] ; then
+ user_scriptsdir=$2
+ shift
+ shift
+elif [ x"$1" = x--guileversion ] ; then
+ user_scriptsdir=$pkgdatadir/$2/scripts
+ shift
+ shift
+fi
+
+scriptsdir=${user_scriptsdir-$default_scriptsdir}
+
+if [ ! -d $scriptsdir ] ; then
+ echo $0: no such directory: $scriptsdir
+ exit 1
+fi
+
+if [ x"$1" = x -o x"$1" = xlist ] ; then
+ ls $scriptsdir
+ exit 0
+fi
+
+if [ x"$1" = x--source ] ; then
+ if [ x"$2" = x ] ; then echo $0: need to specify program ; exit 1 ; fi
+ if [ -x $scriptsdir/$2 ] ; then
+ cat $scriptsdir/$2
+ exit 0
+ else
+ echo $0: no such program: $2
+ exit 1
+ fi
+fi
+
+program=$scriptsdir/$1
+shift
+
+if [ -x $program ] ; then
+ exec $program "$@"
+else
+ echo $0: no such program: $program
+ exit 1
+fi
+
+# guile-tools ends here
diff --git a/meta/guile.in b/meta/guile.in
new file mode 100644
index 000000000..d7bc893e6
--- /dev/null
+++ b/meta/guile.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Copyright (C) 2002, 2006, 2008 Free Software Foundation
+#
+# This file is part of GUILE.
+#
+# GUILE is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or
+# (at your option) any later version.
+#
+# GUILE is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with GUILE; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+# Floor, Boston, MA 02110-1301 USA
+
+# Commentary:
+
+# Usage: guile [ARGS]
+#
+# This script arranges for the environment to support, and eventaully execs,
+# the uninstalled binary guile executable located somewhere under libguile/,
+# passing ARGS to it. In the process, env var GUILE is clobbered, and the
+# following env vars are modified (but not clobbered):
+# GUILE_LOAD_PATH
+# LTDL_LIBRARY_PATH
+#
+# This script can be used as a drop-in replacement for $bindir/guile;
+# if there is a discrepency in behavior, that's a bug.
+
+# Code:
+
+# env (set by configure)
+top_builddir="@top_builddir_absolute@"
+
+# set GUILE (clobber)
+GUILE=${top_builddir}/libguile/guile
+export GUILE
+
+# do it
+exec ${top_builddir}/meta/uninstalled-env $GUILE "$@"
+
+# never reached
+exit 1
+
+# guile ends here
diff --git a/meta/guile.m4 b/meta/guile.m4
new file mode 100644
index 000000000..bcded2bdc
--- /dev/null
+++ b/meta/guile.m4
@@ -0,0 +1,198 @@
+## Autoconf macros for working with Guile.
+##
+## Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# serial 9
+
+## Index
+## -----
+##
+## GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
+## GUILE_FLAGS -- set flags for compiling and linking with Guile
+## GUILE_SITE_DIR -- find path to Guile "site" directory
+## GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
+## GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
+## GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
+## GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable
+## GUILE_MODULE_EXPORTS -- check if a module exports a variable
+## GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable
+
+## Code
+## ----
+
+## NOTE: Comments preceding an AC_DEFUN (starting from "Usage:") are massaged
+## into doc/ref/autoconf-macros.texi (see Makefile.am in that directory).
+
+# GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
+#
+# Usage: GUILE_PROGS
+#
+# This macro looks for programs @code{guile}, @code{guile-config} and
+# @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and
+# @var{GUILE_TOOLS}, to their paths, respectively. If either of the first two
+# is not found, signal error.
+#
+# The variables are marked for substitution, as by @code{AC_SUBST}.
+#
+AC_DEFUN([GUILE_PROGS],
+ [AC_PATH_PROG(GUILE,guile)
+ if test "$GUILE" = "" ; then
+ AC_MSG_ERROR([guile required but not found])
+ fi
+ AC_SUBST(GUILE)
+ AC_PATH_PROG(GUILE_CONFIG,guile-config)
+ if test "$GUILE_CONFIG" = "" ; then
+ AC_MSG_ERROR([guile-config required but not found])
+ fi
+ AC_SUBST(GUILE_CONFIG)
+ AC_PATH_PROG(GUILE_TOOLS,guile-tools)
+ AC_SUBST(GUILE_TOOLS)
+ ])
+
+# GUILE_FLAGS -- set flags for compiling and linking with Guile
+#
+# Usage: GUILE_FLAGS
+#
+# This macro runs the @code{guile-config} script, installed with Guile, to
+# find out where Guile's header files and libraries are installed. It sets
+# two variables, @var{GUILE_CFLAGS} and @var{GUILE_LDFLAGS}.
+#
+# @var{GUILE_CFLAGS}: flags to pass to a C or C++ compiler to build code that
+# uses Guile header files. This is almost always just a @code{-I} flag.
+#
+# @var{GUILE_LDFLAGS}: flags to pass to the linker to link a program against
+# Guile. This includes @code{-lguile} for the Guile library itself, any
+# libraries that Guile itself requires (like -lqthreads), and so on. It may
+# also include a @code{-L} flag to tell the compiler where to find the
+# libraries.
+#
+# The variables are marked for substitution, as by @code{AC_SUBST}.
+#
+AC_DEFUN([GUILE_FLAGS],
+ [AC_REQUIRE([GUILE_PROGS])dnl
+ AC_MSG_CHECKING([libguile compile flags])
+ GUILE_CFLAGS="`$GUILE_CONFIG compile`"
+ AC_MSG_RESULT([$GUILE_CFLAGS])
+ AC_MSG_CHECKING([libguile link flags])
+ GUILE_LDFLAGS="`$GUILE_CONFIG link`"
+ AC_MSG_RESULT([$GUILE_LDFLAGS])
+ AC_SUBST(GUILE_CFLAGS)
+ AC_SUBST(GUILE_LDFLAGS)
+ ])
+
+# GUILE_SITE_DIR -- find path to Guile "site" directory
+#
+# Usage: GUILE_SITE_DIR
+#
+# This looks for Guile's "site" directory, usually something like
+# PREFIX/share/guile/site, and sets var @var{GUILE_SITE} to the path.
+# Note that the var name is different from the macro name.
+#
+# The variable is marked for substitution, as by @code{AC_SUBST}.
+#
+AC_DEFUN([GUILE_SITE_DIR],
+ [AC_REQUIRE([GUILE_PROGS])dnl
+ AC_MSG_CHECKING(for Guile site directory)
+ GUILE_SITE=`[$GUILE_CONFIG] info pkgdatadir`/site
+ AC_MSG_RESULT($GUILE_SITE)
+ AC_SUBST(GUILE_SITE)
+ ])
+
+# GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
+#
+# Usage: GUILE_CHECK_RETVAL(var,check)
+#
+# @var{var} is a shell variable name to be set to the return value.
+# @var{check} is a Guile Scheme expression, evaluated with "$GUILE -c", and
+# returning either 0 or non-#f to indicate the check passed.
+# Non-0 number or #f indicates failure.
+# Avoid using the character "#" since that confuses autoconf.
+#
+AC_DEFUN([GUILE_CHECK],
+ [AC_REQUIRE([GUILE_PROGS])
+ $GUILE -c "$2" > /dev/null 2>&1
+ $1=$?
+ ])
+
+# GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
+#
+# Usage: GUILE_MODULE_CHECK(var,module,featuretest,description)
+#
+# @var{var} is a shell variable name to be set to "yes" or "no".
+# @var{module} is a list of symbols, like: (ice-9 common-list).
+# @var{featuretest} is an expression acceptable to GUILE_CHECK, q.v.
+# @var{description} is a present-tense verb phrase (passed to AC_MSG_CHECKING).
+#
+AC_DEFUN([GUILE_MODULE_CHECK],
+ [AC_MSG_CHECKING([if $2 $4])
+ GUILE_CHECK($1,(use-modules $2) (exit ((lambda () $3))))
+ if test "$$1" = "0" ; then $1=yes ; else $1=no ; fi
+ AC_MSG_RESULT($$1)
+ ])
+
+# GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
+#
+# Usage: GUILE_MODULE_AVAILABLE(var,module)
+#
+# @var{var} is a shell variable name to be set to "yes" or "no".
+# @var{module} is a list of symbols, like: (ice-9 common-list).
+#
+AC_DEFUN([GUILE_MODULE_AVAILABLE],
+ [GUILE_MODULE_CHECK($1,$2,0,is available)
+ ])
+
+# GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable
+#
+# Usage: GUILE_MODULE_REQUIRED(symlist)
+#
+# @var{symlist} is a list of symbols, WITHOUT surrounding parens,
+# like: ice-9 common-list.
+#
+AC_DEFUN([GUILE_MODULE_REQUIRED],
+ [GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1))
+ if test "$ac_guile_module_required" = "no" ; then
+ AC_MSG_ERROR([required guile module not found: ($1)])
+ fi
+ ])
+
+# GUILE_MODULE_EXPORTS -- check if a module exports a variable
+#
+# Usage: GUILE_MODULE_EXPORTS(var,module,modvar)
+#
+# @var{var} is a shell variable to be set to "yes" or "no".
+# @var{module} is a list of symbols, like: (ice-9 common-list).
+# @var{modvar} is the Guile Scheme variable to check.
+#
+AC_DEFUN([GUILE_MODULE_EXPORTS],
+ [GUILE_MODULE_CHECK($1,$2,$3,exports `$3')
+ ])
+
+# GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable
+#
+# Usage: GUILE_MODULE_REQUIRED_EXPORT(module,modvar)
+#
+# @var{module} is a list of symbols, like: (ice-9 common-list).
+# @var{modvar} is the Guile Scheme variable to check.
+#
+AC_DEFUN([GUILE_MODULE_REQUIRED_EXPORT],
+ [GUILE_MODULE_EXPORTS(guile_module_required_export,$1,$2)
+ if test "$guile_module_required_export" = "no" ; then
+ AC_MSG_ERROR([module $1 does not export $2; required])
+ fi
+ ])
+
+## guile.m4 ends here
diff --git a/meta/uninstalled-env.in b/meta/uninstalled-env.in
new file mode 100644
index 000000000..fa8285d94
--- /dev/null
+++ b/meta/uninstalled-env.in
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Copyright (C) 2003, 2006, 2008 Free Software Foundation
+#
+# This file is part of GUILE.
+#
+# This script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# NOTE: If you update this file, please update uninstalled.in as
+# well, if appropriate.
+
+# Usage: uninstalled-env [ARGS]
+
+# This script arranges for the environment to support running Guile
+# from the build tree. The following env vars are modified (but not
+# clobbered): GUILE_LOAD_PATH, LTDL_LIBRARY_PATH, and PATH.
+
+# Example: uninstalled-env guile -c '(display "hello\n")'
+# Example: ../../uninstalled-env ./guile-test-foo
+
+# config
+subdirs_with_ltlibs="srfi guile-readline libguile" # maintain me
+
+# env (set by configure)
+top_srcdir="@top_srcdir_absolute@"
+top_builddir="@top_builddir_absolute@"
+
+[ x"$top_srcdir" = x -o ! -d "$top_srcdir" -o \
+ x"$top_builddir" = x -o ! -d "$top_builddir" ] && {
+ echo $0: bad environment
+ echo top_srcdir=$top_srcdir
+ echo top_builddir=$top_builddir
+ exit 1
+}
+
+if [ x"$GUILE_LOAD_PATH" = x ]
+then
+ if test "${top_srcdir}" != "${top_builddir}"; then
+ GUILE_LOAD_PATH="${top_builddir}/guile-readline:${top_srcdir}/guile-readline:${top_builddir}:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module"
+ else
+ GUILE_LOAD_PATH="${top_srcdir}/guile-readline:${top_srcdir}:${top_srcdir}/module:${top_srcdir}/module"
+ fi
+else
+ for d in "${top_srcdir}" "${top_srcdir}/guile-readline" \
+ "${top_srcdir}/module" "${top_builddir}/module"
+ do
+ # This hair prevents double inclusion.
+ # The ":" prevents prefix aliasing.
+ case x"$GUILE_LOAD_PATH" in
+ x*${d}:*) ;;
+ *) GUILE_LOAD_PATH="${d}:$GUILE_LOAD_PATH" ;;
+ esac
+ done
+fi
+export GUILE_LOAD_PATH
+
+# Don't look in installed dirs for guile modules
+if ( env | grep -v -q -E '^GUILE_SYSTEM_PATH=' ); then
+ export GUILE_SYSTEM_PATH=
+fi
+
+# handle LTDL_LIBRARY_PATH (no clobber)
+ltdl_prefix=""
+dyld_prefix=""
+for dir in $subdirs_with_ltlibs ; do
+ ltdl_prefix="${top_builddir}/${dir}:${ltdl_prefix}"
+ dyld_prefix="${top_builddir}/${dir}/.libs:${dyld_prefix}"
+done
+LTDL_LIBRARY_PATH="${ltdl_prefix}$LTDL_LIBRARY_PATH"
+export LTDL_LIBRARY_PATH
+DYLD_LIBRARY_PATH="${dyld_prefix}${top_builddir}/libguile/.libs:$DYLD_LIBRARY_PATH"
+export DYLD_LIBRARY_PATH
+
+if [ x"$PKG_CONFIG_PATH" = x ]
+then
+ PKG_CONFIG_PATH="${top_builddir}"
+else
+ PKG_CONFIG_PATH="${top_builddir}:$PKG_CONFIG_PATH"
+fi
+export PKG_CONFIG_PATH
+
+# handle PATH (no clobber)
+PATH="${top_builddir}/guile-config:${PATH}"
+PATH="${top_builddir}/libguile:${PATH}"
+PATH="${top_builddir}/meta:${PATH}"
+export PATH
+
+exec "$@"