@deffn {Autoconf Macro} 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. 3.0), falling back to the previous stable version
(e.g. 2.2) if it is available.  If no guile-@var{VERSION}.pc file is
found, an error is signaled.  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}.

@end deffn

@deffn {Autoconf Macro} 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}.

@end deffn

@deffn {Autoconf Macro} GUILE_SITE_DIR

This looks for Guile's "site" directories.  The variable @var{GUILE_SITE} will
be set to Guile's "site" directory for Scheme source files (usually something
like PREFIX/share/guile/site).  @var{GUILE_SITE_CCACHE} will be set to the
directory for compiled Scheme files also known as @code{.go} files
(usually something like
PREFIX/lib/guile/@var{GUILE_EFFECTIVE_VERSION}/site-ccache).
@var{GUILE_EXTENSION} will be set to the directory for compiled C extensions
(usually something like
PREFIX/lib/guile/@var{GUILE_EFFECTIVE_VERSION}/extensions). The latter two
are set to blank if the particular version of Guile does not support
them.  Note that this macro will run the macros @code{GUILE_PKG} and
@code{GUILE_PROGS} if they have not already been run.

The variables are marked for substitution, as by @code{AC_SUBST}.

@end deffn

@deffn {Autoconf Macro} GUILE_PROGS [VERSION] 

This macro looks for programs @code{guile} and @code{guild}, setting
variables @var{GUILE} and @var{GUILD} to their paths, respectively.
The macro will attempt to find @code{guile} with the suffix of
@code{-X.Y}, followed by looking for it with the suffix @code{X.Y}, and
then fall back to looking for @code{guile} with no suffix. If
@code{guile} is still not found, signal an error. The suffix, if any,
that was required to find @code{guile} will be used for @code{guild}
as well.

By default, this macro will search for the latest stable version of
Guile (e.g. 3.0). x.y or x.y.z versions can be specified. If an older
version is found, the macro will 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}.

@end deffn

@deffn {Autoconf Macro} 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.

@end deffn

@deffn {Autoconf Macro} 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).

@end deffn

@deffn {Autoconf Macro} 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).

@end deffn

@deffn {Autoconf Macro} GUILE_MODULE_REQUIRED symlist 

@var{symlist} is a list of symbols, WITHOUT surrounding parens,
like: ice-9 common-list.

@end deffn

@deffn {Autoconf Macro} 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.

@end deffn

@deffn {Autoconf Macro} 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.

@end deffn

