Node:Autofrisk, Next:Using Autofrisk, Previous:Using Autoconf Macros, Up:Autoconf Support
The guile-tools autofrisk command looks for the file modules.af
in the current directory and writes out modules.af.m4 containing
autoconf definitions for AUTOFRISK_CHECKS and AUTOFRISK_SUMMARY.
See Autoconf Background, and See Using Autoconf Macros, for more info.
The modules.af file consists of a series of configuration forms (Scheme
lists), which have one of the following formats:
(files-glob PATTERN ...) ;; required (non-critical-external MODULE ...) ;; optional (non-critical-internal MODULE ...) ;; optional (programs (MODULE PROG ...) ...) ;; optional (pww-varname VARNAME) ;; optional
pattern is a string that may contain "*" and "?" characters to be
expanded into filenames. module is a list of symbols naming a module,
such as `(srfi srfi-1)'. varname is a shell-safe name to use instead of
probably_wont_work, the default. This var is passed to `AC_SUBST'.
prog is a string that names a program, such as "gpg".
Autofrisk expands the files-glob pattern(s) into a list of files, scans
each file's module definition form(s), and constructs a module dependency
graph wherein modules defined by define-module are considered
internal and the remaining, external. For each external module
that has an internal dependency, Autofrisk emits a
GUILE_MODULE_REQUIRED check (see Autoconf Macros), which altogether
form the body of AUTOFRISK_CHECKS.
GUILE_MODULE_REQUIRED causes the configure script to exit with
an error message if the specified module is not available; it enforces a
strong dependency. You can temper dependency strength by using the
non-critical-external and non-critical-internal configuration
forms in modules.af. For graph edges that touch such non-critical modules,
Autofrisk uses GUILE_MODULE_AVAILABLE, and arranges for
AUTOFRISK_SUMMARY to display a warning if they are not found.
The shell code resulting from the expansion of AUTOFRISK_CHECKS and
AUTOFRISK_SUMMARY uses the shell variable probably_wont_work to
collect the names of unfound non-critical modules. If this bothers you, use
configuration form (pww-name foo) in modules.af.
Although Autofrisk does not detect when a module uses a program (for example,
in a system call), it can generate AC_PATH_PROG forms anyway if
you use the programs configuration form in modules.af. These are
collected into AUTOCONF_CHECKS.
See Using Autofrisk, for some modules.af examples.