Package: guile;
Reported by: Mike Gran <spk121 <at> yahoo.com>
Date: Thu, 12 Jan 2012 18:44:01 UTC
Severity: normal
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10488 in the body.
You can then email your comments to 10488 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Thu, 12 Jan 2012 18:44:01 GMT) Full text and rfc822 format available.Mike Gran <spk121 <at> yahoo.com>
:bug-guile <at> gnu.org
.
(Thu, 12 Jan 2012 18:44:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Mike Gran <spk121 <at> yahoo.com> To: Bug Guile <bug-guile <at> gnu.org> Subject: guile-config deprecation? Date: Thu, 12 Jan 2012 10:42:14 -0800 (PST)
Hi- There's a bit of confusion on the guile-config deprecation. NEWS says that guile-config "will be deprecated" meta/guile-config.in says it "has been deprecated" meta/guile.m4's GUILE_PROGS rule will error "guile-config required but not found" likewise those rules that depend on GUILE_PROGS, such as GUILE_FLAGS and GUILE_SITE_DIR In the manual, in the "parallel installations" section, it implies that GUILE_SITE_DIR is the way to get the sitedir from pkg-config, but with guile.m4, it is getting that information via guile-config, which itself gets it from pkg-config. In the README, it suggests "guile-config" is the way to get the sitedir for the installation of slib. The man page for pkg-config describes the PKG_CHECK_MODULES macro, but doesn't give any indication of how to set up any autoconf flags beyond _CFLAGS and _LIBS. So it isn't clear that PKG_CHECK_MODULES could be used as a replacement for GUILE_SITE_DIR. It seems to me, that there is some inconsistency here. I'm worried that guile-config will just disappear with no equally powerful, documented replacement in place. The quickest fix would be to not deprecated it, while maybe creating and documenting a parallel set of pkg-config based macros in guile.m4 for extracting things like sitedir. Thanks, Mike
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Thu, 02 Feb 2012 13:50:01 GMT) Full text and rfc822 format available.Message #8 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: Mike Gran <spk121 <at> yahoo.com> Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Thu, 02 Feb 2012 14:41:35 +0100
On Thu 12 Jan 2012 19:42, Mike Gran <spk121 <at> yahoo.com> writes: > There's a bit of confusion on the guile-config deprecation. Indeed. > NEWS says that guile-config "will be deprecated" This reflects what I would like to happen, but I share your concern that we not create a situation in which "guile-config will just disappear with no equally powerful, documented replacement in place". Hence the slowness of this transition. Thanks for bringing it up. > meta/guile-config.in says it "has been deprecated" I changed the text to "will be deprecated". It's somewhat weasel-worded, I guess. > meta/guile.m4's GUILE_PROGS rule will error "guile-config required > but not found" Uf, this is a can of worms. I hacked on this a bit this morning, and came up with the following. What do you think? # GUILE_PKG -- find Guile development files # # Usage: GUILE_PKG([VERSIONS]) # # This macro runs the @code{pkg-config} tool to find development files # for an available version of Guile. # # By default, this macro will search for the latest stable version of # Guile (e.g. 2.0), falling back to the previous stable version # (e.g. 1.8) if it is available. If no guile-@var{VERSION}.pc file is # found, an error is signalled. The found version is stored in # @var{GUILE_EFFECTIVE_VERSION}. # # If @code{GUILE_PROGS} was already invoked, this macro ensures that the # development files have the same effective version as the Guile # program. # # @var{GUILE_EFFECTIVE_VERSION} is marked for substitution, as by # @code{AC_SUBST}. # AC_DEFUN([GUILE_PKG], [PKG_PROG_PKG_CONFIG _guile_versions_to_search=m4_default([$1], [2.0 1.8]) if test -z "$GUILE_EFFECTIVE_VERSION"; then _guile_tmp="" for v in $_guile_versions_to_search; do if test "$v" = "$GUILE_EFFECTIVE_VERSION" _guile_tmp=$v fi done if test -z "$_guile_tmp"; then AC_MSG_FAILURE([searching for guile development files for versions $_guile_versions_to_search, but previously found $GUILE version $GUILE_EFFECTIVE_VERSION]) fi _guile_versions_to_search=$GUILE_EFFECTIVE_VERSION fi GUILE_EFFECTIVE_VERSION="" _guile_errors="" for v in $_guile_versions_to_search; do AC_MSG_NOTICE([checking for guile $v]) if test -z "$GUILE_EFFECTIVE_VERSION"; then PKG_CHECK_EXISTS([guile-$v], [GUILE_EFFECTIVE_VERSION=$v], []) fi done if test -z "$GUILE_EFFECTIVE_VERSION"; then AC_MSG_ERROR([ No Guile development packages were found. Please verify that you have Guile installed. If you installed Guile from a binary distribution, please verify that you have also installed the development packages. If you installed it yourself, you might need to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more. ]) fi AC_MSG_NOTICE([found guile $v]) AC_SUBST([GUILE_EFFECTIVE_VERSION]) ]) # GUILE_FLAGS -- set flags for compiling and linking with Guile # # Usage: GUILE_FLAGS # # This macro runs the @code{pkg-config} tool to find out how to compile # and link programs against Guile. It sets four variables: # @var{GUILE_CFLAGS}, @var{GUILE_LDFLAGS}, @var{GUILE_LIBS}, and # @var{GUILE_LTLIBS}. # # @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 one or more @code{-I} # flags. # # @var{GUILE_LDFLAGS}: flags to pass to the compiler to link a program # against Guile. This includes @code{-lguile-@var{VERSION}} for the # Guile library itself, and may also include one or more @code{-L} flag # to tell the compiler where to find the libraries. But it does not # include flags that influence the program's runtime search path for # libraries, and will therefore lead to a program that fails to start, # unless all necessary libraries are installed in a standard location # such as @file{/usr/lib}. # # @var{GUILE_LIBS} and @var{GUILE_LTLIBS}: flags to pass to the compiler or to # libtool, respectively, to link a program against Guile. It includes flags # that augment the program's runtime search path for libraries, so that shared # libraries will be found at the location where they were during linking, even # in non-standard locations. @var{GUILE_LIBS} is to be used when linking the # program directly with the compiler, whereas @var{GUILE_LTLIBS} is to be used # when linking the program is done through libtool. # # The variables are marked for substitution, as by @code{AC_SUBST}. # AC_DEFUN([GUILE_FLAGS], [AC_REQUIRE([GUILE_PKG]) PKG_CHECK_MODULES(GUILE, [guile-$GUILE_EFFECTIVE_VERSION]) dnl GUILE_CFLAGS and GUILE_LIBS are already defined and AC_SUBST'd by dnl PKG_CHECK_MODULES. But GUILE_LIBS to pkg-config is GUILE_LDFLAGS dnl to us. GUILE_LDFLAGS=$GUILE_LIBS dnl Determine the platform dependent parameters needed to use rpath. dnl AC_LIB_LINKFLAGS_FROM_LIBS is defined in gnulib/m4/lib-link.m4 and needs dnl the file gnulib/build-aux/config.rpath. AC_LIB_LINKFLAGS_FROM_LIBS([GUILE_LIBS], [$GUILE_LDFLAGS], []) GUILE_LIBS="$GUILE_LDFLAGS $GUILE_LIBS" AC_LIB_LINKFLAGS_FROM_LIBS([GUILE_LTLIBS], [$GUILE_LDFLAGS], [yes]) GUILE_LTLIBS="$GUILE_LDFLAGS $GUILE_LTLIBS" AC_SUBST([GUILE_EFFECTIVE_VERSION]) AC_SUBST([GUILE_CFLAGS]) AC_SUBST([GUILE_LDFLAGS]) AC_SUBST([GUILE_LIBS]) AC_SUBST([GUILE_LTLIBS]) ]) # 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_PKG]) AC_MSG_CHECKING(for Guile site directory) GUILE_SITE=`$PKG_CONFIG --print-errors --variable=sitedir guile-$GUILE_EFFECTIVE_VERSION` AC_MSG_RESULT($GUILE_SITE) if test "$GUILE_SITE" = ""; then AC_MSG_FAILURE(sitedir not found) fi AC_SUBST(GUILE_SITE) ]) # GUILE_PROGS -- set paths to Guile interpreter, config and tool programs # # Usage: GUILE_PROGS # # This macro looks for programs @code{guile} and @code{guild}, setting # variables @var{GUILE} and @var{GUILD} to their paths, respectively. # If @code{guile} is not found, signal an error. # # The effective version of the found @code{guile} is set to # @var{GUILE_EFFECTIVE_VERSION}. This macro ensures that the effective # version is compatible with the result of a previous invocation of # @code{GUILE_FLAGS}, if any. # # As a legacy interface, it also looks for @code{guile-config} and # @code{guile-tools}, setting @var{GUILE_CONFIG} and @var{GUILE_TOOLS}. # # 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) _guile_prog_version=`$GUILE -c "(display (effective-version))"` if test -z "$GUILE_EFFECTIVE_VERSION"; then GUILE_EFFECTIVE_VERSION=$_guile_prog_version elif test "$GUILE_EFFECTIVE_VERSION" != "$_guile_prog_version"; then AC_MSG_ERROR([found development files for Guile $GUILE_EFFECTIVE_VERSION, but $GUILE has effective version $_guile_prog_version]) fi AC_PATH_PROG(GUILD,guild) AC_SUBST(GUILD) AC_PATH_PROG(GUILE_CONFIG,guile-config) AC_SUBST(GUILE_CONFIG) if test -n "$GUILD"; then GUILE_TOOLS=$GUILD else AC_PATH_PROG(GUILE_TOOLS,guile-tools) fi AC_SUBST(GUILE_TOOLS) ]) -- http://wingolog.org/
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Thu, 02 Feb 2012 18:50:02 GMT) Full text and rfc822 format available.Message #11 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: <dsmich <at> roadrunner.com> To: Andy Wingo <wingo <at> pobox.com>, Mike Gran <spk121 <at> yahoo.com> Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Thu, 2 Feb 2012 13:49:12 -0500
---- Andy Wingo <wingo <at> pobox.com> wrote: > On Thu 12 Jan 2012 19:42, Mike Gran <spk121 <at> yahoo.com> writes: > > > There's a bit of confusion on the guile-config deprecation. > > Indeed. > > > NEWS says that guile-config "will be deprecated" > > This reflects what I would like to happen, but I share your concern that > we not create a situation in which "guile-config will just disappear > with no equally powerful, documented replacement in place". Hence the > slowness of this transition. Thanks for bringing it up. > > > meta/guile-config.in says it "has been deprecated" > > I changed the text to "will be deprecated". It's somewhat > weasel-worded, I guess. > > > meta/guile.m4's GUILE_PROGS rule will error "guile-config required > > but not found" > > Uf, this is a can of worms. I hacked on this a bit this morning, and > came up with the following. What do you think? How about adding something for extensiondir ? -Dale
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Thu, 02 Feb 2012 20:44:01 GMT) Full text and rfc822 format available.Message #14 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: <dsmich <at> roadrunner.com> Cc: 10488 <at> debbugs.gnu.org, Mike Gran <spk121 <at> yahoo.com> Subject: Re: bug#10488: guile-config deprecation? Date: Thu, 02 Feb 2012 21:42:35 +0100
On Thu 02 Feb 2012 19:49, <dsmich <at> roadrunner.com> writes: > How about adding something for extensiondir ? That's a good idea. The dir for the .go files, too. Andy -- http://wingolog.org/
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Fri, 30 Mar 2012 18:38:02 GMT) Full text and rfc822 format available.Message #17 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: Mike Gran <spk121 <at> yahoo.com> Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Fri, 30 Mar 2012 20:05:41 +0200
On Thu 02 Feb 2012 14:41, Andy Wingo <wingo <at> pobox.com> writes: >> meta/guile.m4's GUILE_PROGS rule will error "guile-config required >> but not found" > > Uf, this is a can of worms. I hacked on this a bit this morning, and > came up with the following. What do you think? I pushed this as wip-guile-pkg, for review. It needs documentation still. Andy -- http://wingolog.org/
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Sat, 02 Mar 2013 18:43:02 GMT) Full text and rfc822 format available.Message #20 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Sat, 02 Mar 2013 19:42:19 +0100
[Message part 1 (text/plain, inline)]
Hi, An old bug. Here Mike notes that the manual said "guile-config is deprecated", but that guile.m4 still used it. To solve that, I fixed the docs to be say "will be deprecated", and went to look at the .m4. I ended up rewriting it. The new guile.m4 lets you choose a version, which is nice. It also checks to make sure that the Guile found via checking for GUILE_FLAGS was the same as the Guile found via checking for GUILE_PROGS. I pushed it to a branch a year ago but it never got review. Here's the patch, rebased and attached. I'll commit it soon if there are no objections. Regards, Andy
[0001-guile.m4-allows-selection-of-guile-2.0-1.8-etc.patch (text/x-diff, inline)]
From fde2e48a1e17e9f5844bae8c43f0938bcb02e60a Mon Sep 17 00:00:00 2001 From: Andy Wingo <wingo <at> pobox.com> Date: Fri, 30 Mar 2012 20:04:16 +0200 Subject: [PATCH] guile.m4 allows selection of guile 2.0, 1.8, etc. * meta/guile.m4 (GUILE_PKG): New macro, chooses a version of Guile against which to compile. (GUILE_FLAGS, GUILE_PROGS): Rewrite to call GUILE_PKG as necessary, to respect any previous call to GUILE_PKG, and to not require guile-tools. --- meta/guile.m4 | 171 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 124 insertions(+), 47 deletions(-) diff --git a/meta/guile.m4 b/meta/guile.m4 index a7186fb..a3e1ef1 100644 --- a/meta/guile.m4 +++ b/meta/guile.m4 @@ -1,6 +1,6 @@ ## Autoconf macros for working with Guile. ## -## Copyright (C) 1998,2001, 2006, 2010 Free Software Foundation, Inc. +## Copyright (C) 1998,2001, 2006, 2010, 2012 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 @@ -22,6 +22,7 @@ ## Index ## ----- ## +## GUILE_PKG -- find Guile development files ## 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 @@ -38,53 +39,85 @@ ## 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]) +# GUILE_PKG -- find Guile development files +# +# Usage: GUILE_PKG([VERSIONS]) +# +# This macro runs the @code{pkg-config} tool to find development files +# for an available version of Guile. +# +# By default, this macro will search for the latest stable version of +# Guile (e.g. 2.0), falling back to the previous stable version +# (e.g. 1.8) if it is available. If no guile-@var{VERSION}.pc file is +# found, an error is signalled. The found version is stored in +# @var{GUILE_EFFECTIVE_VERSION}. +# +# If @code{GUILE_PROGS} was already invoked, this macro ensures that the +# development files have the same effective version as the Guile +# program. +# +# @var{GUILE_EFFECTIVE_VERSION} is marked for substitution, as by +# @code{AC_SUBST}. +# +AC_DEFUN([GUILE_PKG], + [PKG_PROG_PKG_CONFIG + _guile_versions_to_search="m4_default([$1], [2.0 1.8])" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do + if test "$v" = "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp=$v + fi + done + if test -z "$_guile_tmp"; then + AC_MSG_FAILURE([searching for guile development files for versions $_guile_versions_to_search, but previously found $GUILE version $GUILE_EFFECTIVE_VERSION]) + fi + _guile_versions_to_search=$GUILE_EFFECTIVE_VERSION 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]) + GUILE_EFFECTIVE_VERSION="" + _guile_errors="" + for v in $_guile_versions_to_search; do + AC_MSG_NOTICE([checking for guile $v]) + if test -z "$GUILE_EFFECTIVE_VERSION"; then + PKG_CHECK_EXISTS([guile-$v], [GUILE_EFFECTIVE_VERSION=$v], []) + fi + done + + if test -z "$GUILE_EFFECTIVE_VERSION"; then + AC_MSG_ERROR([ +No Guile development packages were found. + +Please verify that you have Guile installed. If you installed Guile +from a binary distribution, please verify that you have also installed +the development packages. If you installed it yourself, you might need +to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more. +]) fi - AC_SUBST(GUILE_CONFIG) - AC_PATH_PROG(GUILE_TOOLS,guile-tools) - AC_SUBST(GUILE_TOOLS) + AC_MSG_NOTICE([found guile $v]) + AC_SUBST([GUILE_EFFECTIVE_VERSION]) ]) # 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 -# four variables, @var{GUILE_CFLAGS}, @var{GUILE_LDFLAGS}, @var{GUILE_LIBS}, -# and @var{GUILE_LTLIBS}. +# This macro runs the @code{pkg-config} tool to find out how to compile +# and link programs against Guile. It sets four variables: +# @var{GUILE_CFLAGS}, @var{GUILE_LDFLAGS}, @var{GUILE_LIBS}, and +# @var{GUILE_LTLIBS}. # # @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 one or more @code{-I} # flags. # -# @var{GUILE_LDFLAGS}: flags to pass to the compiler 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 one or more @code{-L} flag to tell the compiler where to find -# the libraries. But it does not include flags that influence the program's -# runtime search path for libraries, and will therefore lead to a program -# that fails to start, unless all necessary libraries are installed in a -# standard location such as @file{/usr/lib}. +# @var{GUILE_LDFLAGS}: flags to pass to the compiler to link a program +# against Guile. This includes @code{-lguile-@var{VERSION}} for the +# Guile library itself, and may also include one or more @code{-L} flag +# to tell the compiler where to find the libraries. But it does not +# include flags that influence the program's runtime search path for +# libraries, and will therefore lead to a program that fails to start, +# unless all necessary libraries are installed in a standard location +# such as @file{/usr/lib}. # # @var{GUILE_LIBS} and @var{GUILE_LTLIBS}: flags to pass to the compiler or to # libtool, respectively, to link a program against Guile. It includes flags @@ -97,16 +130,14 @@ AC_DEFUN([GUILE_PROGS], # The variables are marked for substitution, as by @code{AC_SUBST}. # AC_DEFUN([GUILE_FLAGS], - [dnl Find guile-config. - AC_REQUIRE([GUILE_PROGS])dnl + [AC_REQUIRE([GUILE_PKG]) + PKG_CHECK_MODULES(GUILE, [guile-$GUILE_EFFECTIVE_VERSION]) - AC_MSG_CHECKING([libguile compile flags]) - GUILE_CFLAGS="`$GUILE_CONFIG compile`" - AC_MSG_RESULT([$GUILE_CFLAGS]) + dnl GUILE_CFLAGS and GUILE_LIBS are already defined and AC_SUBST'd by + dnl PKG_CHECK_MODULES. But GUILE_LIBS to pkg-config is GUILE_LDFLAGS + dnl to us. - AC_MSG_CHECKING([libguile link flags]) - GUILE_LDFLAGS="`$GUILE_CONFIG link`" - AC_MSG_RESULT([$GUILE_LDFLAGS]) + GUILE_LDFLAGS=$GUILE_LIBS dnl Determine the platform dependent parameters needed to use rpath. dnl AC_LIB_LINKFLAGS_FROM_LIBS is defined in gnulib/m4/lib-link.m4 and needs @@ -116,6 +147,7 @@ AC_DEFUN([GUILE_FLAGS], AC_LIB_LINKFLAGS_FROM_LIBS([GUILE_LTLIBS], [$GUILE_LDFLAGS], [yes]) GUILE_LTLIBS="$GUILE_LDFLAGS $GUILE_LTLIBS" + AC_SUBST([GUILE_EFFECTIVE_VERSION]) AC_SUBST([GUILE_CFLAGS]) AC_SUBST([GUILE_LDFLAGS]) AC_SUBST([GUILE_LIBS]) @@ -133,16 +165,61 @@ AC_DEFUN([GUILE_FLAGS], # The variable is marked for substitution, as by @code{AC_SUBST}. # AC_DEFUN([GUILE_SITE_DIR], - [AC_REQUIRE([GUILE_PROGS])dnl + [AC_REQUIRE([GUILE_PKG]) AC_MSG_CHECKING(for Guile site directory) - GUILE_SITE=`[$GUILE_CONFIG] info sitedir` + GUILE_SITE=`$PKG_CONFIG --print-errors --variable=sitedir guile-$GUILE_EFFECTIVE_VERSION` + AC_MSG_RESULT($GUILE_SITE) if test "$GUILE_SITE" = ""; then - GUILE_SITE=`[$GUILE_CONFIG] info pkgdatadir`/site + AC_MSG_FAILURE(sitedir not found) fi - AC_MSG_RESULT($GUILE_SITE) AC_SUBST(GUILE_SITE) ]) +# GUILE_PROGS -- set paths to Guile interpreter, config and tool programs +# +# Usage: GUILE_PROGS +# +# This macro looks for programs @code{guile} and @code{guild}, setting +# variables @var{GUILE} and @var{GUILD} to their paths, respectively. +# If @code{guile} is not found, signal an error. +# +# The effective version of the found @code{guile} is set to +# @var{GUILE_EFFECTIVE_VERSION}. This macro ensures that the effective +# version is compatible with the result of a previous invocation of +# @code{GUILE_FLAGS}, if any. +# +# As a legacy interface, it also looks for @code{guile-config} and +# @code{guile-tools}, setting @var{GUILE_CONFIG} and @var{GUILE_TOOLS}. +# +# 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) + + _guile_prog_version=`$GUILE -c "(display (effective-version))"` + if test -z "$GUILE_EFFECTIVE_VERSION"; then + GUILE_EFFECTIVE_VERSION=$_guile_prog_version + elif test "$GUILE_EFFECTIVE_VERSION" != "$_guile_prog_version"; then + AC_MSG_ERROR([found development files for Guile $GUILE_EFFECTIVE_VERSION, but $GUILE has effective version $_guile_prog_version]) + fi + + AC_PATH_PROG(GUILD,guild) + AC_SUBST(GUILD) + + AC_PATH_PROG(GUILE_CONFIG,guile-config) + AC_SUBST(GUILE_CONFIG) + if test -n "$GUILD"; then + GUILE_TOOLS=$GUILD + else + AC_PATH_PROG(GUILE_TOOLS,guile-tools) + fi + AC_SUBST(GUILE_TOOLS) + ]) + # GUILE_CHECK -- evaluate Guile Scheme code and capture the return value # # Usage: GUILE_CHECK_RETVAL(var,check) -- 1.7.10.4
[Message part 3 (text/plain, inline)]
-- http://wingolog.org/
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Sat, 02 Mar 2013 21:42:01 GMT) Full text and rfc822 format available.Message #23 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Andy Wingo <wingo <at> pobox.com> Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Sat, 02 Mar 2013 22:41:28 +0100
Hi! Andy Wingo <wingo <at> pobox.com> skribis: > +# GUILE_PKG -- find Guile development files > +# > +# Usage: GUILE_PKG([VERSIONS]) > +# > +# This macro runs the @code{pkg-config} tool to find development files > +# for an available version of Guile. > +# > +# By default, this macro will search for the latest stable version of > +# Guile (e.g. 2.0), falling back to the previous stable version > +# (e.g. 1.8) if it is available. If no guile-@var{VERSION}.pc file is > +# found, an error is signalled. The found version is stored in > +# @var{GUILE_EFFECTIVE_VERSION}. > +# > +# If @code{GUILE_PROGS} was already invoked, this macro ensures that the > +# development files have the same effective version as the Guile > +# program. > +# > +# @var{GUILE_EFFECTIVE_VERSION} is marked for substitution, as by > +# @code{AC_SUBST}. Looks good. My main grief would be that it makes guile.m4 depend on pkg.m4, which we don’t distribute ourselves. And so this may cause “PKG_PROG_PKG_CONFIG: command not found” bug reports. Hmm, WDYT? Ludo’.
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Sat, 09 Mar 2013 10:22:01 GMT) Full text and rfc822 format available.Message #26 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Sat, 09 Mar 2013 11:20:39 +0100
On Sat 02 Mar 2013 22:41, ludo <at> gnu.org (Ludovic Courtès) writes: > Looks good. My main grief would be that it makes guile.m4 depend on > pkg.m4, which we don’t distribute ourselves. And so this may cause > “PKG_PROG_PKG_CONFIG: command not found” bug reports. We can just tell people to cat pkg.m4 into their acinclude.m4, if that's an issue. guile-config already calls the pkg-config binary, so builders will probably have it installed anyway. Andy -- http://wingolog.org/
bug-guile <at> gnu.org
:bug#10488
; Package guile
.
(Sat, 09 Mar 2013 10:30:02 GMT) Full text and rfc822 format available.Message #29 received at 10488 <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: Thien-Thi Nguyen <ttn <at> gnuvola.org> Cc: 10488 <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Sat, 09 Mar 2013 11:28:21 +0100
Hi, On Sun 03 Mar 2013 08:01, Thien-Thi Nguyen <ttn <at> gnuvola.org> writes: > () Andy Wingo <wingo <at> pobox.com> > () Sat, 02 Mar 2013 19:42:19 +0100 > > I pushed it to a branch a year ago but it never got review. Here's > the patch, rebased and attached. I'll commit it soon if there are no > objections. > > Not an objection, but a suggestion: If the purpose of the code is to > select a Guile version, why not call it guile-sel.m4 (or somesuch), > and distribute it alongside guile.m4? With parallel installation, there is no obvious global choice of which version of Guile is the right one. Projects should choose, explicitly. A guile.m4 update will adjust the default search order, but projects should probably also bundle a copy of guile.m4 to prevent bug reports about inexplicable autoconf errors. So even if the system guile.m4 is updated, a typical project's choice of version does not change. There is also the difficulty that Guile provides two APIs: one for C and one for Scheme. When guile.m4 goes to look for the details of those APIs (e.g. the guild binary, and the libguile library), they need to come from the same Guile installation. For this reason guile.m4 should be aware of which choice the user has made, and have an easy way of correlating C and Scheme API. Andy -- http://wingolog.org/
Andy Wingo <wingo <at> pobox.com>
:Mike Gran <spk121 <at> yahoo.com>
:Message #34 received at 10488-done <at> debbugs.gnu.org (full text, mbox):
From: Andy Wingo <wingo <at> pobox.com> To: 10488-done <at> debbugs.gnu.org Subject: Re: bug#10488: guile-config deprecation? Date: Sun, 10 Mar 2013 23:35:41 +0100
On Sat 02 Mar 2013 19:42, Andy Wingo <wingo <at> pobox.com> writes: > I pushed it to a branch a year ago but it never got review. Here's the > patch, rebased and attached. I'll commit it soon if there are no > objections. I have pushed this. Please test with your applications! Andy -- http://wingolog.org/
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Mon, 08 Apr 2013 11:24:07 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.