* autoconf macro GUILE_CHECK_ICE9_OPTARGS
@ 2004-01-13 15:04 Thien-Thi Nguyen
0 siblings, 0 replies; only message in thread
From: Thien-Thi Nguyen @ 2004-01-13 15:04 UTC (permalink / raw)
Cc: guile-user
the autoconf macro below will appear in guile 1.4.1.98. it is released
here under the same license as guile 1.4.x (GPL + exception).
thi
__________________________________________
# GUILE_CHECK_ICE9_OPTARGS -- use (ice-9 optargs) for (ice-9 optargs-kw)?
#
# Usage: GUILE_CHECK_ICE9_OPTARGS(var)
#
# Check if module @code{(ice-9 optargs-kw)} is available. If so, set
# shell var @var{var} to "no" (see why below). Otherwise, check if
# module @code{(ice-9 optargs)} acts like @code{(ice-9 optargs-kw)}.
# If so, set @var{var} to "yes", otherwise set it to "no".
#
# Mark the variable for substitution, as by @code{AC_SUBST}.
#
# Some versions of Guile provide a module @code{(ice-9 optargs)} that
# acts like @code{(ice-9 optargs-kw)} (and subsequently omit the latter,
# instead of providing both). Code that uses @code{(ice-9 optargs-kw)}
# solely can be textually kludged to load @code{(ice-9 optargs)} in
# these situations if @var{var} is "yes". Here is a Makefile fragment
# that demonstrates the technique:
#
# @example
# install-data-hook:
# if test "$(need_optargs_kludge)" = yes ; then \
# sed s/optargs-kw/optargs/ foo.scm > TMP ; \
# mv TMP foo.scm ; \
# fi
# @end example
#
# In this example, @var{var} is @code{need_optargs_kludge}. If it turns
# out @code{(ice-9 optargs-kw)} is available, @code{need_optargs_kludge}
# would have value "no", and the kludge would neither be required nor
# applied.
#
AC_DEFUN([GUILE_CHECK_ICE9_OPTARGS],[
GUILE_MODULE_AVAILABLE($1, (ice-9 optargs-kw))
if test "$$1" = yes ; then
$1=no
else
GUILE_MODULE_CHECK($1, (ice-9 optargs),
[(= 2 ((lambda* (a #:optional b) b) 4 2))],
[acts like (ice-9 optargs-kw)])
fi
AC_SUBST($1)
])
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-13 15:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-13 15:04 autoconf macro GUILE_CHECK_ICE9_OPTARGS Thien-Thi Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).