Info Node: (autoconf.info)Setting Output Variables
(autoconf.info)Setting Output Variables
Setting Output Variables
========================
One way to record the results of tests is to set "output variables",
which are shell variables whose values are substituted into files that
`configure' outputs. The two macros below create new output variables.
Note:Preset Output Variables, for a list of output variables that
are always available.
- Macro: AC_SUBST (VARIABLE)
Create an output variable from a shell variable. Make `AC_OUTPUT'
substitute the variable VARIABLE into output files (typically one
or more `Makefile's). This means that `AC_OUTPUT' will replace
instances of `@VARIABLE@' in input files with the value that the
shell variable VARIABLE has when `AC_OUTPUT' is called. The value
of VARIABLE should not contain literal newlines.
- Macro: AC_SUBST_FILE (VARIABLE)
Another way to create an output variable from a shell variable.
Make `AC_OUTPUT' insert (without substitutions) the contents of
the file named by shell variable VARIABLE into output files. This
means that `AC_OUTPUT' will replace instances of `@VARIABLE@' in
output files (such as `Makefile.in') with the contents of the file
that the shell variable VARIABLE names when `AC_OUTPUT' is called.
Set the variable to `/dev/null' for cases that do not have a file
to insert.
This macro is useful for inserting `Makefile' fragments containing
special dependencies or other `make' directives for particular host
or target types into `Makefile's. For example, `configure.in'
could contain:
AC_SUBST_FILE(host_frag)dnl
host_frag=$srcdir/conf/sun4.mh
and then a `Makefile.in' could contain:
@host_frag@