blob: 6c3578f8b8f43f64522b142f1652b837a1c15d22 [file] [log] [blame]
<!-- This file automatically generated by ParseAutoconfTexinfo utility -->
<!-- cvs -d:pserver:anonymous@sources.redhat.com:/cvs/eclipse \ -->
<!-- co autotools/ParseTexinfo -->
<!DOCTYPE macros [
<!ELEMENT macros (macro)*>
<!ELEMENT macro (prototype*,synopsis)>
<!ATTLIST macro
id ID #REQUIRED
>
<!ELEMENT synopsis (#PCDATA)*>
<!ELEMENT prototype (parameter+)?>
<!ELEMENT parameter (#PCDATA)*>
<!ATTLIST parameter
content CDATA #REQUIRED
>
]>
<macros>
<macro id="AC_INIT">
<prototype>
<parameter content="package"/>
<parameter content="version"/>
<parameter content="[bug-report]"/>
<parameter content="@ [tarname]"/>
<parameter content="[url]"/>
</prototype>
<synopsis>
Process any command-line arguments and perform various
initializations and verifications.&lt;/P&gt;&lt;P&gt;
Set the name of the &lt;VAR&gt;package&lt;/VAR&gt; and its
&lt;VAR&gt;version&lt;/VAR&gt;. These are typically used in
&lt;samp&gt;--version&lt;/samp&gt; support, including that of
&lt;CODE&gt;configure&lt;/CODE&gt;. The optional argument
&lt;VAR&gt;bug-report&lt;/VAR&gt; should be the email to which
users should send bug reports. The package
&lt;VAR&gt;tarname&lt;/VAR&gt; differs from
&lt;VAR&gt;package&lt;/VAR&gt;: the latter designates the full
package name (e.g., &lt;samp&gt;GNU Autoconf&lt;/samp&gt;),
while the former is meant for distribution tar ball names (e.g.,
&lt;samp&gt;autoconf&lt;/samp&gt;). It defaults to
&lt;VAR&gt;package&lt;/VAR&gt; with &lt;samp&gt;GNU
&lt;/samp&gt; stripped, lower-cased, and all characters other
than alphanumerics and underscores are changed to
&lt;samp&gt;-&lt;/samp&gt;. If provided,
&lt;VAR&gt;url&lt;/VAR&gt; should be the home page for the
package.&lt;/P&gt;&lt;P&gt;
The arguments of &lt;CODE&gt;AC_INIT&lt;/CODE&gt; must be
static, i.e., there should not be any shell computation, quotes,
or newlines, but they can be computed by M4. This is because
the package information strings are expanded at M4 time into
several contexts, and must give the same text at shell time
whether used in single-quoted strings, double-quoted strings,
quoted here-documents, or unquoted here-documents. It is
permissible to use &lt;CODE&gt;m4_esyscmd&lt;/CODE&gt; or
&lt;CODE&gt;m4_esyscmd_s&lt;/CODE&gt; for computing a version
string that changes with every commit to a version control
system (in fact, Autoconf does just that, for all builds of the
development tree made between releases).&lt;/P&gt;&lt;P&gt;
The following M4 macros (e.g.,
&lt;CODE&gt;AC_PACKAGE_NAME&lt;/CODE&gt;), output variables
(e.g., &lt;CODE&gt;PACKAGE_NAME&lt;/CODE&gt;), and preprocessor
symbols (e.g., &lt;CODE&gt;PACKAGE_NAME&lt;/CODE&gt;), are
defined by &lt;CODE&gt;AC_INIT&lt;/CODE&gt;:&lt;/P&gt;&lt;P&gt;
&lt;DL&gt; &lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_NAME&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_NAME&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;VAR&gt;package&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_TARNAME&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_TARNAME&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;VAR&gt;tarname&lt;/VAR&gt;, possibly generated from
&lt;VAR&gt;package&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_VERSION&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_VERSION&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;VAR&gt;version&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_STRING&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_STRING&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;samp&gt;&lt;VAR&gt;package&lt;/VAR&gt;
&lt;VAR&gt;version&lt;/VAR&gt;&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_BUGREPORT&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_BUGREPORT&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;VAR&gt;bug-report&lt;/VAR&gt;, if one was provided.
Typically an email address, or URL to a bug management web page.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;&lt;CODE&gt;AC_PACKAGE_URL&lt;/CODE&gt;,
&lt;CODE&gt;PACKAGE_URL&lt;/CODE&gt; &lt;DD&gt; Exactly
&lt;VAR&gt;url&lt;/VAR&gt;, if one was provided. If
&lt;VAR&gt;url&lt;/VAR&gt; was empty, but
&lt;VAR&gt;package&lt;/VAR&gt; begins with &lt;samp&gt;GNU
&lt;/samp&gt;, then this defaults to
&lt;samp&gt;http://@/www.gnu.org/@/software/@/&lt;VAR&gt;tarname&lt;/VAR&gt;/&lt;/samp&gt;,
otherwise, no URL is assumed. &lt;/DL&gt;
</synopsis>
</macro>
<macro id="AC_PREREQ">
<prototype>
<parameter content="version"/>
</prototype>
<synopsis>
Ensure that a recent enough version of Autoconf is being used.
If the version of Autoconf being used to create
&lt;CODE&gt;configure&lt;/CODE&gt; is earlier than
&lt;VAR&gt;version&lt;/VAR&gt;, print an error message to the
standard error output and exit with failure (exit status is 63).
For example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PREREQ([VERSION])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro may be used before &lt;CODE&gt;AC_INIT&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_AUTOCONF_VERSION">
<prototype>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. It identifies the
version of Autoconf that is currently parsing the input file, in
a format suitable for
&lt;CODE&gt;m4_version_compare&lt;/CODE&gt;
(m4_version_compare); in other words, for this release of
Autoconf, its value is &lt;samp&gt;VERSION&lt;/samp&gt;. One
potential use of this macro is for writing conditional fallbacks
based on when a feature was added to Autoconf, rather than using
&lt;CODE&gt;AC_PREREQ&lt;/CODE&gt; to require the newer version
of Autoconf. However, remember that the Autoconf philosophy
favors feature checks over version checks.&lt;/P&gt;&lt;P&gt;
You should not expand this macro directly; use
&lt;samp&gt;m4_defn([AC_AUTOCONF_VERSION])&lt;/samp&gt; instead.
This is because some users might have a beta version of
Autoconf installed, with arbitrary letters included in its
version string. This means it is possible for the version
string to contain the name of a defined macro, such that
expanding &lt;CODE&gt;AC_AUTOCONF_VERSION&lt;/CODE&gt; would
trigger the expansion of that macro during rescanning, and
change the version string to be different than what you intended
to check.
</synopsis>
</macro>
<macro id="AC_COPYRIGHT">
<prototype>
<parameter content="copyright-notice"/>
</prototype>
<synopsis>
Notice State that, in addition to the Free Software
Foundation's copyright on the Autoconf macros, parts of your
&lt;CODE&gt;configure&lt;/CODE&gt; are covered by the
&lt;VAR&gt;copyright-notice&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;copyright-notice&lt;/VAR&gt; shows up in both the
head of &lt;CODE&gt;configure&lt;/CODE&gt; and in
&lt;samp&gt;configure --version&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AC_REVISION">
<prototype>
<parameter content="revision-info"/>
</prototype>
<synopsis>
Copy revision stamp &lt;VAR&gt;revision-info&lt;/VAR&gt; into
the &lt;CODE&gt;configure&lt;/CODE&gt; script, with any dollar
signs or double-quotes removed. This macro lets you put a
revision stamp from &lt;TT&gt;configure.ac&lt;/TT&gt; into
&lt;CODE&gt;configure&lt;/CODE&gt; without RCS or CVS changing
it when you check in &lt;CODE&gt;configure&lt;/CODE&gt;. That
way, you can determine easily which revision of
&lt;TT&gt;configure.ac&lt;/TT&gt; a particular
&lt;CODE&gt;configure&lt;/CODE&gt; corresponds to.&lt;/P&gt;&lt;P&gt;
For example, this line in &lt;TT&gt;configure.ac&lt;/TT&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_REVISION([$Revision: 1.30 $])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
produces this in &lt;CODE&gt;configure&lt;/CODE&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #!/bin/sh # From configure.ac
Revision: 1.30 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_CONFIG_SRCDIR">
<prototype>
<parameter content="unique-file-in-source-dir"/>
</prototype>
<synopsis>
&lt;VAR&gt;unique-file-in-source-dir&lt;/VAR&gt; is some file
that is in the package's source directory;
&lt;CODE&gt;configure&lt;/CODE&gt; checks for this file's
existence to make sure that the directory that it is told
contains the source code in fact does. Occasionally people
accidentally specify the wrong directory with
&lt;samp&gt;--srcdir&lt;/samp&gt;; this is a safety check. ,
for more information.
</synopsis>
</macro>
<macro id="AC_CONFIG_AUX_DIR">
<prototype>
<parameter content="dir"/>
</prototype>
<synopsis>
Use the auxiliary build tools (e.g.,
&lt;TT&gt;install-sh&lt;/TT&gt;,
&lt;TT&gt;config.sub&lt;/TT&gt;,
&lt;TT&gt;config.guess&lt;/TT&gt;, Cygnus
&lt;CODE&gt;configure&lt;/CODE&gt;, Automake and Libtool
scripts, etc.)@: that are in directory
&lt;VAR&gt;dir&lt;/VAR&gt;. These are auxiliary files used in
configuration. &lt;VAR&gt;dir&lt;/VAR&gt; can be either
absolute or relative to
&lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;&lt;/TT&gt;. The default
is &lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;&lt;/TT&gt; or
&lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;/..&lt;/TT&gt; or
&lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;/../..&lt;/TT&gt;,
whichever is the first that contains
&lt;TT&gt;install-sh&lt;/TT&gt;. The other files are not
checked for, so that using
&lt;CODE&gt;AC_PROG_INSTALL&lt;/CODE&gt; does not automatically
require distributing the other auxiliary files. It checks for
&lt;TT&gt;install.sh&lt;/TT&gt; also, but that name is obsolete
because some &lt;CODE&gt;make&lt;/CODE&gt; have a rule that
creates &lt;TT&gt;install&lt;/TT&gt; from it if there is no
makefile.&lt;/P&gt;&lt;P&gt;
The auxiliary directory is commonly named
&lt;TT&gt;build-aux&lt;/TT&gt;. If you need portability to DOS
variants, do not name the auxiliary directory
&lt;TT&gt;aux&lt;/TT&gt;. .
</synopsis>
</macro>
<macro id="AC_REQUIRE_AUX_FILE">
<prototype>
<parameter content="file"/>
</prototype>
<synopsis>
Declares that &lt;VAR&gt;file&lt;/VAR&gt; is expected in the
directory defined above. In Autoconf proper, this macro does
nothing: its sole purpose is to be traced by third-party tools
to produce a list of expected auxiliary files. For instance it
is called by macros like
&lt;CODE&gt;AC_PROG_INSTALL&lt;/CODE&gt; (Particular Programs)
or &lt;CODE&gt;AC_CANONICAL_BUILD&lt;/CODE&gt; (Canonicalizing)
to register the auxiliary files they need.
</synopsis>
</macro>
<macro id="AC_CONFIG_MACRO_DIR">
<prototype>
<parameter content="dir"/>
</prototype>
<synopsis>
Specify &lt;VAR&gt;dir&lt;/VAR&gt; as the location of
additional local Autoconf macros. This macro is intended for use
by future versions of commands like
&lt;CODE&gt;autoreconf&lt;/CODE&gt; that trace macro calls. It
should be called directly from &lt;TT&gt;configure.ac&lt;/TT&gt;
so that tools that install macros for
&lt;CODE&gt;aclocal&lt;/CODE&gt; can find the macros'
declarations.&lt;/P&gt;&lt;P&gt;
Note that if you use &lt;CODE&gt;aclocal&lt;/CODE&gt; from
Automake to generate &lt;TT&gt;aclocal.m4&lt;/TT&gt;, you must
also set &lt;CODE&gt;ACLOCAL_AMFLAGS = -I
&lt;VAR&gt;dir&lt;/VAR&gt;&lt;/CODE&gt; in your top-level
&lt;TT&gt;Makefile.am&lt;/TT&gt;. Due to a limitation in the
Autoconf implementation of &lt;CODE&gt;autoreconf&lt;/CODE&gt;,
these include directives currently must be set on a single line
in &lt;TT&gt;Makefile.am&lt;/TT&gt;, without any
backslash-newlines.
</synopsis>
</macro>
<macro id="AC_OUTPUT">
<prototype>
</prototype>
<synopsis>
Generate &lt;TT&gt;config.status&lt;/TT&gt; and launch it.
Call this macro once, at the end of
&lt;TT&gt;configure.ac&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TT&gt;config.status&lt;/TT&gt; performs all the
configuration actions: all the output files (see Configuration
Files, macro &lt;CODE&gt;AC_CONFIG_FILES&lt;/CODE&gt;), header
files (see Configuration Headers, macro
&lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt;), commands (see
Configuration Commands, macro
&lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt;), links (see
Configuration Links, macro
&lt;CODE&gt;AC_CONFIG_LINKS&lt;/CODE&gt;), subdirectories to
configure (see Subdirectories, macro
&lt;CODE&gt;AC_CONFIG_SUBDIRS&lt;/CODE&gt;) are honored.&lt;/P&gt;&lt;P&gt;
The location of your &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt;
invocation is the exact point where configuration actions are
taken: any code afterwards is executed by
&lt;CODE&gt;configure&lt;/CODE&gt; once
&lt;CODE&gt;config.status&lt;/CODE&gt; was run. If you want to
bind actions to &lt;CODE&gt;config.status&lt;/CODE&gt; itself
(independently of whether &lt;CODE&gt;configure&lt;/CODE&gt; is
being run), see Configuration Commands, , Running Arbitrary
Configuration Commands.
</synopsis>
</macro>
<macro id="AC_PROG_MAKE_SET">
<prototype>
</prototype>
<synopsis>
If the Make command, &lt;CODE&gt;$MAKE&lt;/CODE&gt; if set or
else &lt;samp&gt;make&lt;/samp&gt;, predefines
&lt;CODE&gt;$(MAKE)&lt;/CODE&gt;, define output variable
&lt;CODE&gt;SET_MAKE&lt;/CODE&gt; to be empty. Otherwise, define
&lt;CODE&gt;SET_MAKE&lt;/CODE&gt; to a macro definition that
sets &lt;CODE&gt;$(MAKE)&lt;/CODE&gt;, such as
&lt;samp&gt;MAKE=make&lt;/samp&gt;. Calls
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt; for
&lt;CODE&gt;SET_MAKE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CONFIG_FILES">
<prototype>
<parameter content="file..."/>
<parameter content="[cmds]"/>
<parameter content="[init-cmds]"/>
</prototype>
<synopsis>
Make &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; create each
&lt;TT&gt;&lt;VAR&gt;file&lt;/VAR&gt;&lt;/TT&gt; by copying an
input file (by default
&lt;TT&gt;&lt;VAR&gt;file&lt;/VAR&gt;.in&lt;/TT&gt;),
substituting the output variable values. This macro is one of
the instantiating macros; see Configuration Actions. , for more
information on using output variables. , for more information
on creating them. This macro creates the directory that the
file is in if it doesn't exist. Usually, makefiles are created
this way, but other files, such as
&lt;TT&gt;.gdbinit&lt;/TT&gt;, can be specified as well.&lt;/P&gt;&lt;P&gt;
Typical calls to &lt;CODE&gt;AC_CONFIG_FILES&lt;/CODE&gt; look
like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CONFIG_FILES([Makefile
src/Makefile man/Makefile X/Imakefile])
AC_CONFIG_FILES([autoconf], [chmod +x autoconf])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
You can override an input file name by appending to
&lt;VAR&gt;file&lt;/VAR&gt; a colon-separated list of input
files. Examples:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk]
[lib/Makefile:boiler/lib.mk])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Doing this allows you to keep your file names acceptable to DOS
variants, or to prepend and/or append boilerplate to the file.
</synopsis>
</macro>
<macro id="AC_CONFIG_HEADERS">
<prototype>
<parameter content="header ..."/>
<parameter content="[cmds]"/>
<parameter content="[init-cmds]"/>
</prototype>
<synopsis>
This macro is one of the instantiating macros; see
Configuration Actions. Make &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt;
create the file(s) in the blank-or-newline-separated list
&lt;VAR&gt;header&lt;/VAR&gt; containing C preprocessor
&lt;CODE&gt;#define&lt;/CODE&gt; statements, and replace
&lt;samp&gt;@@DEFS@@&lt;/samp&gt; in generated files with
&lt;samp&gt;-DHAVE_CONFIG_H&lt;/samp&gt; instead of the value of
&lt;CODE&gt;DEFS&lt;/CODE&gt;. The usual name for
&lt;VAR&gt;header&lt;/VAR&gt; is &lt;TT&gt;config.h&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;VAR&gt;header&lt;/VAR&gt; already exists and its contents
are identical to what &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; would
put in it, it is left alone. Doing this allows making some
changes in the configuration without needlessly causing object
files that depend on the header file to be recompiled.&lt;/P&gt;&lt;P&gt;
Usually the input file is named
&lt;TT&gt;&lt;VAR&gt;header&lt;/VAR&gt;.in&lt;/TT&gt;; however,
you can override the input file name by appending to
&lt;VAR&gt;header&lt;/VAR&gt; a colon-separated list of input
files. For example, you might need to make the input file name
acceptable to DOS variants:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_CONFIG_HEADERS([config.h:config.hin])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AH_HEADER">
<prototype>
</prototype>
<synopsis>
This macro is defined as the name of the first declared config
header and undefined if no config headers have been declared up
to this point. A third-party macro may, for example, require use
of a config header without invoking AC_CONFIG_HEADERS twice,
like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CONFIG_COMMANDS_PRE(
[m4_ifndef([AH_HEADER], [AC_CONFIG_HEADERS([config.h])])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AH_TEMPLATE">
<prototype>
<parameter content="key"/>
<parameter content="description"/>
</prototype>
<synopsis>
Tell &lt;CODE&gt;autoheader&lt;/CODE&gt; to generate a template
for &lt;VAR&gt;key&lt;/VAR&gt;. This macro generates standard
templates just like &lt;CODE&gt;AC_DEFINE&lt;/CODE&gt; when a
&lt;VAR&gt;description&lt;/VAR&gt; is given.&lt;/P&gt;&lt;P&gt;
For example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AH_TEMPLATE([CRAY_STACKSEG_END],
[Define to one of _getb67, GETB67, getb67
for Cray-2 and Cray-YMP systems. This function is
required for alloca.c support on those systems.])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
generates the following template, with the description properly
justified.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; /* Define to one of _getb67,
GETB67, getb67 for Cray-2 and Cray-YMP systems. This
function is required for alloca.c support on those systems.
*/ #undef CRAY_STACKSEG_END
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AH_VERBATIM">
<prototype>
<parameter content="key"/>
<parameter content="template"/>
</prototype>
<synopsis>
Tell &lt;CODE&gt;autoheader&lt;/CODE&gt; to include the
&lt;VAR&gt;template&lt;/VAR&gt; as-is in the header template
file. This &lt;VAR&gt;template&lt;/VAR&gt; is associated with
the &lt;VAR&gt;key&lt;/VAR&gt;, which is used to sort all the
different templates and guarantee their uniqueness. It should
be a symbol that can be defined via
&lt;CODE&gt;AC_DEFINE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AH_TOP">
<prototype>
<parameter content="text"/>
</prototype>
<synopsis>
Include &lt;VAR&gt;text&lt;/VAR&gt; at the top of the header
template file.
</synopsis>
</macro>
<macro id="AH_BOTTOM">
<prototype>
<parameter content="text"/>
</prototype>
<synopsis>
Include &lt;VAR&gt;text&lt;/VAR&gt; at the bottom of the header
template file.
</synopsis>
</macro>
<macro id="AC_CONFIG_COMMANDS">
<prototype>
<parameter content="tag..."/>
<parameter content="[cmds]"/>
<parameter content="[init-cmds]"/>
</prototype>
<synopsis>
Specify additional shell commands to run at the end of
&lt;TT&gt;config.status&lt;/TT&gt;, and shell commands to
initialize any variables from
&lt;CODE&gt;configure&lt;/CODE&gt;. Associate the commands with
&lt;VAR&gt;tag&lt;/VAR&gt;. Since typically the
&lt;VAR&gt;cmds&lt;/VAR&gt; create a file,
&lt;VAR&gt;tag&lt;/VAR&gt; should naturally be the name of that
file. If needed, the directory hosting
&lt;VAR&gt;tag&lt;/VAR&gt; is created. This macro is one of the
instantiating macros; see Configuration Actions.&lt;/P&gt;&lt;P&gt;
Here is an unrealistic example:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; fubar=42
AC_CONFIG_COMMANDS([fubar], [echo this is
extra $fubar, and so on.], [fubar=$fubar])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Here is a better one:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CONFIG_COMMANDS([timestamp],
[date &gt;timestamp])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_CONFIG_COMMANDS_PRE">
<prototype>
<parameter content="cmds"/>
</prototype>
<synopsis>
Execute the &lt;VAR&gt;cmds&lt;/VAR&gt; right before creating
&lt;TT&gt;config.status&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
This macro presents the last opportunity to call
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt;,
&lt;CODE&gt;AC_DEFINE&lt;/CODE&gt;, or
&lt;CODE&gt;AC_CONFIG_&lt;VAR&gt;ITEMS&lt;/VAR&gt;&lt;/CODE&gt;
macros.
</synopsis>
</macro>
<macro id="AC_CONFIG_COMMANDS_POST">
<prototype>
<parameter content="cmds"/>
</prototype>
<synopsis>
Execute the &lt;VAR&gt;cmds&lt;/VAR&gt; right after creating
&lt;TT&gt;config.status&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AC_CONFIG_LINKS">
<prototype>
<parameter content="dest:source..."/>
<parameter content="[cmds]"/>
<parameter content="@ [init-cmds]"/>
</prototype>
<synopsis>
Make &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; link each of the
existing files &lt;VAR&gt;source&lt;/VAR&gt; to the
corresponding link name &lt;VAR&gt;dest&lt;/VAR&gt;. Makes a
symbolic link if possible, otherwise a hard link if possible,
otherwise a copy. The &lt;VAR&gt;dest&lt;/VAR&gt; and
&lt;VAR&gt;source&lt;/VAR&gt; names should be relative to the
top level source or build directory. This macro is one of the
instantiating macros; see Configuration Actions.&lt;/P&gt;&lt;P&gt;
For example, this call:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_CONFIG_LINKS([host.h:config/$machine.h
object.h:config/$obj_format.h])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
creates in the current directory &lt;TT&gt;host.h&lt;/TT&gt; as
a link to
&lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;/config/$machine.h&lt;/TT&gt;,
and &lt;TT&gt;object.h&lt;/TT&gt; as a link to
&lt;TT&gt;&lt;VAR&gt;srcdir&lt;/VAR&gt;/config/$obj_format.h&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
The tempting value &lt;samp&gt;.&lt;/samp&gt; for
&lt;VAR&gt;dest&lt;/VAR&gt; is invalid: it makes it impossible
for &lt;samp&gt;config.status&lt;/samp&gt; to guess the links to
establish.&lt;/P&gt;&lt;P&gt;
One can then run:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; ./config.status host.h object.h
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; to create the
links.
</synopsis>
</macro>
<macro id="AC_CONFIG_SUBDIRS">
<prototype>
<parameter content="dir ..."/>
</prototype>
<synopsis>
Make &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; run
&lt;CODE&gt;configure&lt;/CODE&gt; in each subdirectory
&lt;VAR&gt;dir&lt;/VAR&gt; in the given
blank-or-newline-separated list. Each
&lt;VAR&gt;dir&lt;/VAR&gt; should be a literal, i.e., please do
not use:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; if test "x$package_foo_enabled" =
xyes; then my_subdirs="$my_subdirs foo" fi
AC_CONFIG_SUBDIRS([$my_subdirs])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
because this prevents &lt;samp&gt;./configure
--help=recursive&lt;/samp&gt; from displaying the options of the
package &lt;CODE&gt;foo&lt;/CODE&gt;. Instead, you should
write:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; if test "x$package_foo_enabled" =
xyes; then AC_CONFIG_SUBDIRS([foo]) fi
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If a given &lt;VAR&gt;dir&lt;/VAR&gt; is not found at
&lt;CODE&gt;configure&lt;/CODE&gt; run time, a warning is
reported; if the subdirectory is optional, write:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; if test -d "$srcdir/foo"; then
AC_CONFIG_SUBDIRS([foo]) fi
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If a given &lt;VAR&gt;dir&lt;/VAR&gt; contains
&lt;CODE&gt;configure.gnu&lt;/CODE&gt;, it is run instead of
&lt;CODE&gt;configure&lt;/CODE&gt;. This is for packages that
might use a non-Autoconf script
&lt;CODE&gt;Configure&lt;/CODE&gt;, which can't be called
through a wrapper &lt;CODE&gt;configure&lt;/CODE&gt; since it
would be the same file on case-insensitive file systems.
Likewise, if a &lt;VAR&gt;dir&lt;/VAR&gt; contains
&lt;TT&gt;configure.in&lt;/TT&gt; but no
&lt;CODE&gt;configure&lt;/CODE&gt;, the Cygnus
&lt;CODE&gt;configure&lt;/CODE&gt; script found by
&lt;CODE&gt;AC_CONFIG_AUX_DIR&lt;/CODE&gt; is used.&lt;/P&gt;&lt;P&gt;
The subdirectory &lt;CODE&gt;configure&lt;/CODE&gt; scripts are
given the same command line options that were given to this
&lt;CODE&gt;configure&lt;/CODE&gt; script, with minor changes if
needed, which include:&lt;/P&gt;&lt;P&gt;
&lt;UL&gt; &lt;LI&gt; adjusting a relative name for the cache
file;&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; adjusting a relative name for the source directory;&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; propagating the current value of
&lt;CODE&gt;$prefix&lt;/CODE&gt;, including if it was defaulted,
and if the default values of the top level and of the
subdirectory &lt;TT&gt;configure&lt;/TT&gt; differ. &lt;/UL&gt;&lt;/P&gt;&lt;P&gt;
This macro also sets the output variable
&lt;CODE&gt;subdirs&lt;/CODE&gt; to the list of directories
&lt;samp&gt;&lt;VAR&gt;dir&lt;/VAR&gt;
&lt;small&gt;...&lt;/small&gt;&lt;/samp&gt;. Make rules can use
this variable to determine which subdirectories to recurse into.&lt;/P&gt;&lt;P&gt;
This macro may be called multiple times.
</synopsis>
</macro>
<macro id="AC_PREFIX_DEFAULT">
<prototype>
<parameter content="prefix"/>
</prototype>
<synopsis>
Set the default installation prefix to
&lt;VAR&gt;prefix&lt;/VAR&gt; instead of
&lt;TT&gt;/usr/local&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AC_PREFIX_PROGRAM">
<prototype>
<parameter content="program"/>
</prototype>
<synopsis>
If the user did not specify an installation prefix (using the
&lt;samp&gt;--prefix&lt;/samp&gt; option), guess a value for it
by looking for &lt;VAR&gt;program&lt;/VAR&gt; in PATH, the way
the shell does. If &lt;VAR&gt;program&lt;/VAR&gt; is found, set
the prefix to the parent of the directory containing
&lt;VAR&gt;program&lt;/VAR&gt;, else default the prefix as
described above (&lt;TT&gt;/usr/local&lt;/TT&gt; or
&lt;CODE&gt;AC_PREFIX_DEFAULT&lt;/CODE&gt;). For example, if
&lt;VAR&gt;program&lt;/VAR&gt; is &lt;CODE&gt;gcc&lt;/CODE&gt;
and the PATH contains
&lt;TT&gt;/usr/local/gnu/bin/gcc&lt;/TT&gt;, set the prefix to
&lt;TT&gt;/usr/local/gnu&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AC_INCLUDES_DEFAULT">
<prototype>
<parameter content="[include-directives]"/>
</prototype>
<synopsis>
Expand to &lt;VAR&gt;include-directives&lt;/VAR&gt; if defined,
otherwise to:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #include &lt;stdio.h&gt;
#ifdef HAVE_SYS_TYPES_H # include &lt;sys/types.h&gt; #endif
#ifdef HAVE_SYS_STAT_H # include &lt;sys/stat.h&gt; #endif
#ifdef STDC_HEADERS # include &lt;stdlib.h&gt; # include
&lt;stddef.h&gt; #else # ifdef HAVE_STDLIB_H # include
&lt;stdlib.h&gt; # endif #endif #ifdef HAVE_STRING_H # if
!defined STDC_HEADERS &amp;&amp; defined HAVE_MEMORY_H #
include &lt;memory.h&gt; # endif # include &lt;string.h&gt;
#endif #ifdef HAVE_STRINGS_H # include &lt;strings.h&gt; #endif
#ifdef HAVE_INTTYPES_H # include &lt;inttypes.h&gt; #endif
#ifdef HAVE_STDINT_H # include &lt;stdint.h&gt; #endif #ifdef
HAVE_UNISTD_H # include &lt;unistd.h&gt; #endif @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If the default includes are used, then check for the presence of
these headers and their compatibility, i.e., you don't need to
run &lt;CODE&gt;AC_HEADER_STDC&lt;/CODE&gt;, nor check for
&lt;TT&gt;stdlib.h&lt;/TT&gt; etc.&lt;/P&gt;&lt;P&gt;
These headers are checked for in the same order as they are
included. For instance, on some systems
&lt;TT&gt;string.h&lt;/TT&gt; and &lt;TT&gt;strings.h&lt;/TT&gt;
both exist, but conflict. Then
&lt;CODE&gt;HAVE_STRING_H&lt;/CODE&gt; is defined, not
&lt;CODE&gt;HAVE_STRINGS_H&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_AWK">
<prototype>
</prototype>
<synopsis>
Check for &lt;CODE&gt;gawk&lt;/CODE&gt;,
&lt;CODE&gt;mawk&lt;/CODE&gt;, &lt;CODE&gt;nawk&lt;/CODE&gt;,
and &lt;CODE&gt;awk&lt;/CODE&gt;, in that order, and set output
variable &lt;CODE&gt;AWK&lt;/CODE&gt; to the first one that is
found. It tries &lt;CODE&gt;gawk&lt;/CODE&gt; first because that
is reported to be the best implementation. The result can be
overridden by setting the variable &lt;CODE&gt;AWK&lt;/CODE&gt;
or the cache variable &lt;CODE&gt;ac_cv_prog_AWK&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Using this macro is sufficient to avoid the pitfalls of
traditional &lt;CODE&gt;awk&lt;/CODE&gt; (awk, , Limitations of
Usual Tools).
</synopsis>
</macro>
<macro id="AC_PROG_GREP">
<prototype>
</prototype>
<synopsis>
Look for the best available &lt;CODE&gt;grep&lt;/CODE&gt; or
&lt;CODE&gt;ggrep&lt;/CODE&gt; that accepts the longest input
lines possible, and that supports multiple
&lt;samp&gt;-e&lt;/samp&gt; options. Set the output variable
&lt;CODE&gt;GREP&lt;/CODE&gt; to whatever is chosen. , for more
information about portability problems with the
&lt;CODE&gt;grep&lt;/CODE&gt; command family. The result can be
overridden by setting the &lt;CODE&gt;GREP&lt;/CODE&gt; variable
and is cached in the &lt;CODE&gt;ac_cv_path_GREP&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_PROG_EGREP">
<prototype>
</prototype>
<synopsis>
Check whether &lt;CODE&gt;$GREP -E&lt;/CODE&gt; works, or
else look for the best available &lt;CODE&gt;egrep&lt;/CODE&gt;
or &lt;CODE&gt;gegrep&lt;/CODE&gt; that accepts the longest
input lines possible. Set the output variable
&lt;CODE&gt;EGREP&lt;/CODE&gt; to whatever is chosen. The
result can be overridden by setting the
&lt;CODE&gt;EGREP&lt;/CODE&gt; variable and is cached in the
&lt;CODE&gt;ac_cv_path_EGREP&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_PROG_FGREP">
<prototype>
</prototype>
<synopsis>
Check whether &lt;CODE&gt;$GREP -F&lt;/CODE&gt; works, or
else look for the best available &lt;CODE&gt;fgrep&lt;/CODE&gt;
or &lt;CODE&gt;gfgrep&lt;/CODE&gt; that accepts the longest
input lines possible. Set the output variable
&lt;CODE&gt;FGREP&lt;/CODE&gt; to whatever is chosen. The
result can be overridden by setting the
&lt;CODE&gt;FGREP&lt;/CODE&gt; variable and is cached in the
&lt;CODE&gt;ac_cv_path_FGREP&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_PROG_INSTALL">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;INSTALL&lt;/CODE&gt; to
the name of a BSD-compatible &lt;CODE&gt;install&lt;/CODE&gt;
program, if one is found in the current PATH. Otherwise, set
&lt;CODE&gt;INSTALL&lt;/CODE&gt; to
&lt;samp&gt;&lt;VAR&gt;dir&lt;/VAR&gt;/install-sh
-c&lt;/samp&gt;, checking the directories specified to
&lt;CODE&gt;AC_CONFIG_AUX_DIR&lt;/CODE&gt; (or its default
directories) to determine &lt;VAR&gt;dir&lt;/VAR&gt; (Output).
Also set the variables &lt;CODE&gt;INSTALL_PROGRAM&lt;/CODE&gt;
and &lt;CODE&gt;INSTALL_SCRIPT&lt;/CODE&gt; to
&lt;samp&gt;$INSTALL@&lt;/samp&gt; and
&lt;CODE&gt;INSTALL_DATA&lt;/CODE&gt; to
&lt;samp&gt;$INSTALL@&lt;/samp&gt; -m 644.&lt;/P&gt;&lt;P&gt;
&lt;samp&gt;@@INSTALL@@&lt;/samp&gt; is special, as its value
may vary for different configuration files.&lt;/P&gt;&lt;P&gt;
This macro screens out various instances of
&lt;CODE&gt;install&lt;/CODE&gt; known not to work. It prefers
to find a C program rather than a shell script, for speed.
Instead of &lt;TT&gt;install-sh&lt;/TT&gt;, it can also use
&lt;TT&gt;install.sh&lt;/TT&gt;, but that name is obsolete
because some &lt;CODE&gt;make&lt;/CODE&gt; programs have a rule
that creates &lt;TT&gt;install&lt;/TT&gt; from it if there is no
makefile. Further, this macro requires
&lt;CODE&gt;install&lt;/CODE&gt; to be able to install multiple
files into a target directory in a single invocation.&lt;/P&gt;&lt;P&gt;
Autoconf comes with a copy of &lt;TT&gt;install-sh&lt;/TT&gt;
that you can use. If you use
&lt;CODE&gt;AC_PROG_INSTALL&lt;/CODE&gt;, you must include
either &lt;TT&gt;install-sh&lt;/TT&gt; or
&lt;TT&gt;install.sh&lt;/TT&gt; in your distribution; otherwise
&lt;CODE&gt;configure&lt;/CODE&gt; produces an error message
saying it can't find them---even if the system you're on has a
good &lt;CODE&gt;install&lt;/CODE&gt; program. This check is a
safety measure to prevent you from accidentally leaving that
file out, which would prevent your package from installing on
systems that don't have a BSD-compatible
&lt;CODE&gt;install&lt;/CODE&gt; program.&lt;/P&gt;&lt;P&gt;
If you need to use your own installation program because it has
features not found in standard &lt;CODE&gt;install&lt;/CODE&gt;
programs, there is no reason to use
&lt;CODE&gt;AC_PROG_INSTALL&lt;/CODE&gt;; just put the file name
of your program into your &lt;TT&gt;Makefile.in&lt;/TT&gt;
files.&lt;/P&gt;&lt;P&gt;
The result of the test can be overridden by setting the variable
&lt;CODE&gt;INSTALL&lt;/CODE&gt; or the cache variable
&lt;CODE&gt;ac_cv_path_install&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_MKDIR_P">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;MKDIR_P&lt;/CODE&gt; to a
program that ensures that for each argument, a directory named
by this argument exists, creating it and its parent directories
if needed, and without race conditions when two instances of the
program attempt to make the same directory at nearly the same
time.&lt;/P&gt;&lt;P&gt;
This macro uses the &lt;samp&gt;mkdir -p&lt;/samp&gt; command if
possible. Otherwise, it falls back on invoking
&lt;CODE&gt;install-sh&lt;/CODE&gt; with the
&lt;samp&gt;-d&lt;/samp&gt; option, so your package should
contain &lt;TT&gt;install-sh&lt;/TT&gt; as described under
&lt;CODE&gt;AC_PROG_INSTALL&lt;/CODE&gt;. An
&lt;TT&gt;install-sh&lt;/TT&gt; file that predates Autoconf 2.60
or Automake 1.10 is vulnerable to race conditions, so if you
want to support parallel installs from different packages into
the same directory you need to make sure you have an up-to-date
&lt;TT&gt;install-sh&lt;/TT&gt;. In particular, be careful
about using &lt;samp&gt;autoreconf -if&lt;/samp&gt; if your
Automake predates Automake 1.10.&lt;/P&gt;&lt;P&gt;
This macro is related to the &lt;CODE&gt;AS_MKDIR_P&lt;/CODE&gt;
macro (Programming in M4sh), but it sets an output variable
intended for use in other files, whereas
&lt;CODE&gt;AS_MKDIR_P&lt;/CODE&gt; is intended for use in
scripts like &lt;CODE&gt;configure&lt;/CODE&gt;. Also,
&lt;CODE&gt;AS_MKDIR_P&lt;/CODE&gt; does not accept options, but
&lt;CODE&gt;MKDIR_P&lt;/CODE&gt; supports the
&lt;samp&gt;-m&lt;/samp&gt; option, e.g., a makefile might
invoke &lt;CODE&gt;$(MKDIR_P) -m 0 dir&lt;/CODE&gt; to create an
inaccessible directory, and conversely a makefile should use
&lt;CODE&gt;$(MKDIR_P) -- $(FOO)&lt;/CODE&gt; if
&lt;VAR&gt;FOO&lt;/VAR&gt; might yield a value that begins with
&lt;samp&gt;-&lt;/samp&gt;. Finally,
&lt;CODE&gt;AS_MKDIR_P&lt;/CODE&gt; does not check for race
condition vulnerability, whereas
&lt;CODE&gt;AC_PROG_MKDIR_P&lt;/CODE&gt; does.&lt;/P&gt;&lt;P&gt;
&lt;samp&gt;@@MKDIR_P@@&lt;/samp&gt; is special, as its value
may vary for different configuration files.&lt;/P&gt;&lt;P&gt;
The result of the test can be overridden by setting the variable
&lt;CODE&gt;MKDIR_P&lt;/CODE&gt; or the cache variable
&lt;CODE&gt;ac_cv_path_mkdir&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_LEX">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;flex&lt;/CODE&gt; is found, set output
variable &lt;CODE&gt;LEX&lt;/CODE&gt; to
&lt;samp&gt;flex&lt;/samp&gt; and
&lt;CODE&gt;LEXLIB&lt;/CODE&gt; to
&lt;samp&gt;-lfl&lt;/samp&gt;, if that library is in a standard
place. Otherwise set &lt;CODE&gt;LEX&lt;/CODE&gt; to
&lt;samp&gt;lex&lt;/samp&gt; and &lt;CODE&gt;LEXLIB&lt;/CODE&gt;
to &lt;samp&gt;-ll&lt;/samp&gt;, if found. If neither variant
is available, set &lt;CODE&gt;LEX&lt;/CODE&gt; to
&lt;samp&gt;:&lt;/samp&gt;; for packages that ship the generated
&lt;TT&gt;file.yy.c&lt;/TT&gt; alongside the source
&lt;TT&gt;file.l&lt;/TT&gt;, this default allows users without a
lexer generator to still build the package even if the timestamp
for &lt;TT&gt;file.l&lt;/TT&gt; is inadvertantly changed.&lt;/P&gt;&lt;P&gt;
Define &lt;CODE&gt;YYTEXT_POINTER&lt;/CODE&gt; if
&lt;CODE&gt;yytext&lt;/CODE&gt; defaults to &lt;samp&gt;char
*&lt;/samp&gt; instead of to &lt;samp&gt;char []&lt;/samp&gt;.
Also set output variable
&lt;CODE&gt;LEX_OUTPUT_ROOT&lt;/CODE&gt; to the base of the file
name that the lexer generates; usually
&lt;TT&gt;lex.yy&lt;/TT&gt;, but sometimes something else.
These results vary according to whether
&lt;CODE&gt;lex&lt;/CODE&gt; or &lt;CODE&gt;flex&lt;/CODE&gt; is
being used.&lt;/P&gt;&lt;P&gt;
You are encouraged to use Flex in your sources, since it is both
more pleasant to use than plain Lex and the C source it produces
is portable. In order to ensure portability, however, you must
either provide a function &lt;CODE&gt;yywrap&lt;/CODE&gt; or, if
you don't use it (e.g., your scanner has no
&lt;samp&gt;#include&lt;/samp&gt;-like feature), simply include
a &lt;samp&gt;%noyywrap&lt;/samp&gt; statement in the scanner's
source. Once this done, the scanner is portable (unless
&lt;EM&gt;you&lt;/EM&gt; felt free to use nonportable
constructs) and does not depend on any library. In this case,
and in this case only, it is suggested that you use this
Autoconf snippet:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_LEX if test "x$LEX" !=
xflex; then LEX="$SHELL $missing_dir/missing flex"
AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) AC_SUBST([LEXLIB], [''])
fi &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The shell script &lt;CODE&gt;missing&lt;/CODE&gt; can be found
in the Automake distribution.&lt;/P&gt;&lt;P&gt;
Remember that the user may have supplied an alternate location
in LEX, so if Flex is required, it is better to check that the
user provided something sufficient by parsing the output of
&lt;samp&gt;$LEX --version&lt;/samp&gt; than by simply relying
on &lt;CODE&gt;test "x$LEX" = xflex&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
To ensure backward compatibility, Automake's
&lt;CODE&gt;AM_PROG_LEX&lt;/CODE&gt; invokes (indirectly) this
macro twice, which causes an annoying but benign
``&lt;CODE&gt;AC_PROG_LEX&lt;/CODE&gt; invoked multiple times''
warning. Future versions of Automake will fix this issue;
meanwhile, just ignore this message.&lt;/P&gt;&lt;P&gt;
As part of running the test, this macro may delete any file in
the configuration directory named &lt;TT&gt;lex.yy.c&lt;/TT&gt;
or &lt;TT&gt;lexyy.c&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
The result of this test can be influenced by setting the
variable &lt;CODE&gt;LEX&lt;/CODE&gt; or the cache variable
&lt;CODE&gt;ac_cv_prog_LEX&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_LN_S">
<prototype>
</prototype>
<synopsis>
If &lt;samp&gt;ln -s&lt;/samp&gt; works on the current file
system (the operating system and file system support symbolic
links), set the output variable &lt;CODE&gt;LN_S&lt;/CODE&gt; to
&lt;samp&gt;ln -s&lt;/samp&gt;; otherwise, if
&lt;samp&gt;ln&lt;/samp&gt; works, set
&lt;CODE&gt;LN_S&lt;/CODE&gt; to &lt;samp&gt;ln&lt;/samp&gt;,
and otherwise set it to &lt;samp&gt;cp -p&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
If you make a link in a directory other than the current
directory, its meaning depends on whether
&lt;samp&gt;ln&lt;/samp&gt; or &lt;samp&gt;ln -s&lt;/samp&gt; is
used. To safely create links using
&lt;samp&gt;$(LN_S)&lt;/samp&gt;, either find out which form is
used and adjust the arguments, or always invoke
&lt;CODE&gt;ln&lt;/CODE&gt; in the directory where the link is
to be created.&lt;/P&gt;&lt;P&gt;
In other words, it does not work to do:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; $(LN_S) foo /x/bar
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Instead, do:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; (cd /x &amp;&amp; $(LN_S) foo bar)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_PROG_RANLIB">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;RANLIB&lt;/CODE&gt; to
&lt;samp&gt;ranlib&lt;/samp&gt; if
&lt;CODE&gt;ranlib&lt;/CODE&gt; is found, and otherwise to
&lt;samp&gt;:&lt;/samp&gt; (do nothing).
</synopsis>
</macro>
<macro id="AC_PROG_SED">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;SED&lt;/CODE&gt; to a Sed
implementation that conforms to Posix and does not have
arbitrary length limits. Report an error if no acceptable Sed
is found. , for more information about portability problems
with Sed.&lt;/P&gt;&lt;P&gt;
The result of this test can be overridden by setting the
&lt;CODE&gt;SED&lt;/CODE&gt; variable and is cached in the
&lt;CODE&gt;ac_cv_path_SED&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_PROG_YACC">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;bison&lt;/CODE&gt; is found, set output
variable &lt;CODE&gt;YACC&lt;/CODE&gt; to &lt;samp&gt;bison
-y&lt;/samp&gt;. Otherwise, if &lt;CODE&gt;byacc&lt;/CODE&gt;
is found, set &lt;CODE&gt;YACC&lt;/CODE&gt; to
&lt;samp&gt;byacc&lt;/samp&gt;. Otherwise set
&lt;CODE&gt;YACC&lt;/CODE&gt; to &lt;samp&gt;yacc&lt;/samp&gt;.
The result of this test can be influenced by setting the
variable &lt;CODE&gt;YACC&lt;/CODE&gt; or the cache variable
&lt;CODE&gt;ac_cv_prog_YACC&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_PROG">
<prototype>
</prototype>
<synopsis>
&lt;VAR&gt;value-if-found&lt;/VAR&gt;, value-if-not-found,
path, $PATH, @ reject) Check whether program
&lt;VAR&gt;prog-to-check-for&lt;/VAR&gt; exists in
&lt;VAR&gt;path&lt;/VAR&gt;. If it is found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to
&lt;VAR&gt;value-if-found&lt;/VAR&gt;, otherwise to
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt;, if given. Always
pass over &lt;VAR&gt;reject&lt;/VAR&gt; (an absolute file name)
even if it is the first found in the search path; in that case,
set &lt;VAR&gt;variable&lt;/VAR&gt; using the absolute file name
of the &lt;VAR&gt;prog-to-check-for&lt;/VAR&gt; found that is
not &lt;VAR&gt;reject&lt;/VAR&gt;. If
&lt;VAR&gt;variable&lt;/VAR&gt; was already set, do nothing.
Calls &lt;CODE&gt;AC_SUBST&lt;/CODE&gt; for
&lt;VAR&gt;variable&lt;/VAR&gt;. The result of this test can be
overridden by setting the &lt;VAR&gt;variable&lt;/VAR&gt;
variable or the cache variable
&lt;CODE&gt;ac_cv_prog_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_PROGS">
<prototype>
<parameter content="variable"/>
<parameter content="progs-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Check for each program in the blank-separated list
&lt;VAR&gt;progs-to-check-for&lt;/VAR&gt; existing in the
&lt;VAR&gt;path&lt;/VAR&gt;. If one is found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to the name of that program.
Otherwise, continue checking the next program in the list. If
none of the programs in the list are found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt;; if
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt; is not specified, the
value of &lt;VAR&gt;variable&lt;/VAR&gt; is not changed. Calls
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt; for
&lt;VAR&gt;variable&lt;/VAR&gt;. The result of this test can be
overridden by setting the &lt;VAR&gt;variable&lt;/VAR&gt;
variable or the cache variable
&lt;CODE&gt;ac_cv_prog_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_TARGET_TOOL">
<prototype>
<parameter content="variable"/>
<parameter content="prog-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_PROG&lt;/CODE&gt;, but first looks
for &lt;VAR&gt;prog-to-check-for&lt;/VAR&gt; with a prefix of
the target type as determined by
&lt;CODE&gt;AC_CANONICAL_TARGET&lt;/CODE&gt;, followed by a dash
(Canonicalizing). If the tool cannot be found with a prefix, and
if the build and target types are equal, then it is also
searched for without a prefix.&lt;/P&gt;&lt;P&gt;
As noted in Specifying Target Triplets, the target is rarely
specified, because most of the time it is the same as the host:
it is the type of system for which any compiler tool in the
package produces code. What this macro looks for is, for
example, &lt;EM&gt;a tool (assembler, linker, etc.)&lt;/EM&gt;@:
that the compiler driver (&lt;CODE&gt;gcc&lt;/CODE&gt; for the
GNU C Compiler) uses to produce objects, archives or
executables.
</synopsis>
</macro>
<macro id="AC_CHECK_TOOL">
<prototype>
<parameter content="variable"/>
<parameter content="prog-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_PROG&lt;/CODE&gt;, but first looks
for &lt;VAR&gt;prog-to-check-for&lt;/VAR&gt; with a prefix of
the host type as specified by &lt;samp&gt;--host&lt;/samp&gt;,
followed by a dash. For example, if the user runs
&lt;samp&gt;configure --build=x86_64-gnu
--host=i386-gnu&lt;/samp&gt;, then this call:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_TOOL([RANLIB], [ranlib],
[:]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; sets
&lt;CODE&gt;RANLIB&lt;/CODE&gt; to
&lt;TT&gt;i386-gnu-ranlib&lt;/TT&gt; if that program exists in
&lt;VAR&gt;path&lt;/VAR&gt;, or otherwise to
&lt;samp&gt;ranlib&lt;/samp&gt; if that program exists in
&lt;VAR&gt;path&lt;/VAR&gt;, or to &lt;samp&gt;:&lt;/samp&gt; if
neither program exists.&lt;/P&gt;&lt;P&gt;
When cross-compiling, this macro will issue a warning if no
program prefixed with the host type could be found. For more
information, see Specifying Target Triplets.
</synopsis>
</macro>
<macro id="AC_CHECK_TARGET_TOOLS">
<prototype>
<parameter content="variable"/>
<parameter content="progs-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_TARGET_TOOL&lt;/CODE&gt;, each of the
tools in the list &lt;VAR&gt;progs-to-check-for&lt;/VAR&gt; are
checked with a prefix of the target type as determined by
&lt;CODE&gt;AC_CANONICAL_TARGET&lt;/CODE&gt;, followed by a dash
(Canonicalizing). If none of the tools can be found with a
prefix, and if the build and target types are equal, then the
first one without a prefix is used. If a tool is found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to the name of that program. If
none of the tools in the list are found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt;; if
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt; is not specified, the
value of &lt;VAR&gt;variable&lt;/VAR&gt; is not changed. Calls
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt; for
&lt;VAR&gt;variable&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_TOOLS">
<prototype>
<parameter content="variable"/>
<parameter content="progs-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_TOOL&lt;/CODE&gt;, each of the tools
in the list &lt;VAR&gt;progs-to-check-for&lt;/VAR&gt; are
checked with a prefix of the host type as determined by
&lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt;, followed by a dash
(Canonicalizing). If none of the tools can be found with a
prefix, then the first one without a prefix is used. If a tool
is found, set &lt;VAR&gt;variable&lt;/VAR&gt; to the name of
that program. If none of the tools in the list are found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt;; if
&lt;VAR&gt;value-if-not-found&lt;/VAR&gt; is not specified, the
value of &lt;VAR&gt;variable&lt;/VAR&gt; is not changed. Calls
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt; for
&lt;VAR&gt;variable&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
When cross-compiling, this macro will issue a warning if no
program prefixed with the host type could be found. For more
information, see Specifying Target Triplets.
</synopsis>
</macro>
<macro id="AC_PATH_PROG">
<prototype>
<parameter content="variable"/>
<parameter content="prog-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_PROG&lt;/CODE&gt;, but set
&lt;VAR&gt;variable&lt;/VAR&gt; to the absolute name of
&lt;VAR&gt;prog-to-check-for&lt;/VAR&gt; if found. The result
of this test can be overridden by setting the
&lt;VAR&gt;variable&lt;/VAR&gt; variable. A positive result of
this test is cached in the
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_PATH_PROGS">
<prototype>
<parameter content="variable"/>
<parameter content="progs-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_PROGS&lt;/CODE&gt;, but if any of
&lt;VAR&gt;progs-to-check-for&lt;/VAR&gt; are found, set
&lt;VAR&gt;variable&lt;/VAR&gt; to the absolute name of the
program found. The result of this test can be overridden by
setting the &lt;VAR&gt;variable&lt;/VAR&gt; variable. A
positive result of this test is cached in the
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_PATH_PROGS_FEATURE_CHECK">
<prototype>
</prototype>
<synopsis>
&lt;VAR&gt;progs-to-check-for&lt;/VAR&gt;,
&lt;VAR&gt;feature-test&lt;/VAR&gt;, @ action-if-not-found,
path, $PATH) This macro was introduced in Autoconf 2.62. If
&lt;VAR&gt;variable&lt;/VAR&gt; is not empty, then set the cache
variable
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;
to its value. Otherwise, check for each program in the
blank-separated list &lt;VAR&gt;progs-to-check-for&lt;/VAR&gt;
existing in &lt;VAR&gt;path&lt;/VAR&gt;. For each program
found, execute &lt;VAR&gt;feature-test&lt;/VAR&gt; with
&lt;CODE&gt;ac_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;
set to the absolute name of the candidate program. If no
invocation of &lt;VAR&gt;feature-test&lt;/VAR&gt; sets the shell
variable
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;,
then &lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is executed.
&lt;VAR&gt;feature-test&lt;/VAR&gt; will be run even when
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;
is set, to provide the ability to choose a better candidate
found later in &lt;VAR&gt;path&lt;/VAR&gt;; to accept the
current setting and bypass all futher checks,
&lt;VAR&gt;feature-test&lt;/VAR&gt; can execute
&lt;CODE&gt;ac_path_&lt;VAR&gt;variable&lt;/VAR&gt;_found=:&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Note that this macro has some subtle differences from
&lt;CODE&gt;AC_CHECK_PROGS&lt;/CODE&gt;. It is designed to be
run inside &lt;CODE&gt;AC_CACHE_VAL&lt;/CODE&gt;, therefore, it
should have no side effects. In particular,
&lt;VAR&gt;variable&lt;/VAR&gt; is not set to the final value of
&lt;CODE&gt;ac_cv_path_&lt;VAR&gt;variable&lt;/VAR&gt;&lt;/CODE&gt;,
nor is &lt;CODE&gt;AC_SUBST&lt;/CODE&gt; automatically run.
Also, on failure, any action can be performed, whereas
&lt;CODE&gt;AC_CHECK_PROGS&lt;/CODE&gt; only performs
&lt;CODE&gt;&lt;VAR&gt;variable&lt;/VAR&gt;=&lt;VAR&gt;value-if-not-found&lt;/VAR&gt;&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Here is an example, similar to what Autoconf uses in its own
configure script. It will search for an implementation of
&lt;CODE&gt;m4&lt;/CODE&gt; that supports the
&lt;CODE&gt;indir&lt;/CODE&gt; builtin, even if it goes by the
name &lt;CODE&gt;gm4&lt;/CODE&gt; or is not the first
implementation on PATH.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CACHE_CHECK([for m4 that
supports indir], [ac_cv_path_M4],
[AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], [[m4out=`echo
'changequote([,])indir([divnum])' | $ac_path_M4` test
"x$m4out" = x0 \ &amp;&amp; ac_cv_path_M4=$ac_path_M4
ac_path_M4_found=:]], [AC_MSG_ERROR([could not find m4 that
supports indir])])]) AC_SUBST([M4], [$ac_cv_path_M4])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_PATH_TARGET_TOOL">
<prototype>
<parameter content="variable"/>
<parameter content="prog-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_TARGET_TOOL&lt;/CODE&gt;, but set
&lt;VAR&gt;variable&lt;/VAR&gt; to the absolute name of the
program if it is found.
</synopsis>
</macro>
<macro id="AC_PATH_TOOL">
<prototype>
<parameter content="variable"/>
<parameter content="prog-to-check-for"/>
<parameter content="@ [value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_TOOL&lt;/CODE&gt;, but set
&lt;VAR&gt;variable&lt;/VAR&gt; to the absolute name of the
program if it is found.&lt;/P&gt;&lt;P&gt;
When cross-compiling, this macro will issue a warning if no
program prefixed with the host type could be found. For more
information, see Specifying Target Triplets.
</synopsis>
</macro>
<macro id="AC_CHECK_FILE">
<prototype>
<parameter content="file"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
Check whether file &lt;VAR&gt;file&lt;/VAR&gt; exists on the
native system. If it is found, execute
&lt;VAR&gt;action-if-found&lt;/VAR&gt;, otherwise do
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt;, if given. The
result of this test is cached in the
&lt;CODE&gt;ac_cv_file_&lt;VAR&gt;file&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_FILES">
<prototype>
<parameter content="files"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
Executes &lt;CODE&gt;AC_CHECK_FILE&lt;/CODE&gt; once for each
file listed in &lt;VAR&gt;files&lt;/VAR&gt;. Additionally,
defines
&lt;samp&gt;HAVE_&lt;VAR&gt;file&lt;/VAR&gt;&lt;/samp&gt;
(Standard Symbols) for each file found. The results of each
test are cached in the
&lt;CODE&gt;ac_cv_file_&lt;VAR&gt;file&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_LIB">
<prototype>
<parameter content="library"/>
<parameter content="function"/>
<parameter content="@ [action-if-found]"/>
<parameter content="[action-if-not-found]"/>
<parameter content="[other-libraries]"/>
</prototype>
<synopsis>
Test whether the library &lt;VAR&gt;library&lt;/VAR&gt; is
available by trying to link a test program that calls function
&lt;VAR&gt;function&lt;/VAR&gt; with the library.
&lt;VAR&gt;function&lt;/VAR&gt; should be a function provided by
the library. Use the base name of the library; e.g., to check
for &lt;samp&gt;-lmp&lt;/samp&gt;, use
&lt;samp&gt;mp&lt;/samp&gt; as the
&lt;VAR&gt;library&lt;/VAR&gt; argument.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is a list of shell
commands to run if the link with the library succeeds;
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is a list of shell
commands to run if the link fails. If
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is not specified, the
default action prepends
&lt;samp&gt;-l&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt; to
&lt;CODE&gt;LIBS&lt;/CODE&gt; and defines
&lt;samp&gt;HAVE_LIB&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
(in all capitals). This macro is intended to support building
&lt;CODE&gt;LIBS&lt;/CODE&gt; in a right-to-left
(least-dependent to most-dependent) fashion such that library
dependencies are satisfied as a natural side effect of
consecutive tests. Linkers are sensitive to library ordering so
the order in which &lt;CODE&gt;LIBS&lt;/CODE&gt; is generated is
important to reliable detection of libraries.&lt;/P&gt;&lt;P&gt;
If linking with &lt;VAR&gt;library&lt;/VAR&gt; results in
unresolved symbols that would be resolved by linking with
additional libraries, give those libraries as the
&lt;VAR&gt;other-libraries&lt;/VAR&gt; argument, separated by
spaces: e.g., &lt;samp&gt;-lXt -lX11&lt;/samp&gt;. Otherwise,
this macro may fail to detect that
&lt;VAR&gt;library&lt;/VAR&gt; is present, because linking the
test program can fail with unresolved symbols. The
&lt;VAR&gt;other-libraries&lt;/VAR&gt; argument should be
limited to cases where it is desirable to test for one library
in the presence of another that is not already in
&lt;CODE&gt;LIBS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;AC_CHECK_LIB&lt;/CODE&gt; requires some care in
usage, and should be avoided in some common cases. Many
standard functions like &lt;CODE&gt;gethostbyname&lt;/CODE&gt;
appear in the standard C library on some hosts, and in special
libraries like &lt;CODE&gt;nsl&lt;/CODE&gt; on other hosts. On
some hosts the special libraries contain variant implementations
that you may not want to use. These days it is normally better
to use &lt;CODE&gt;AC_SEARCH_LIBS([gethostbyname],
[nsl])&lt;/CODE&gt; instead of &lt;CODE&gt;AC_CHECK_LIB([nsl],
[gethostbyname])&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this test is cached in the
&lt;CODE&gt;ac_cv_lib_&lt;VAR&gt;library&lt;/VAR&gt;_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_SEARCH_LIBS">
<prototype>
<parameter content="function"/>
<parameter content="search-libs"/>
<parameter content="@ [action-if-found]"/>
<parameter content="[action-if-not-found]"/>
<parameter content="[other-libraries]"/>
</prototype>
<synopsis>
Search for a library defining &lt;VAR&gt;function&lt;/VAR&gt;
if it's not already available. This equates to calling
&lt;samp&gt;AC_LINK_IFELSE([AC_LANG_CALL([],
[&lt;VAR&gt;function&lt;/VAR&gt;])])&lt;/samp&gt; first with no
libraries, then for each library listed in
&lt;VAR&gt;search-libs&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Prepend
&lt;samp&gt;-l&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt; to
&lt;CODE&gt;LIBS&lt;/CODE&gt; for the first library found to
contain &lt;VAR&gt;function&lt;/VAR&gt;, and run
&lt;VAR&gt;action-if-found&lt;/VAR&gt;. If the function is not
found, run &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
If linking with &lt;VAR&gt;library&lt;/VAR&gt; results in
unresolved symbols that would be resolved by linking with
additional libraries, give those libraries as the
&lt;VAR&gt;other-libraries&lt;/VAR&gt; argument, separated by
spaces: e.g., &lt;samp&gt;-lXt -lX11&lt;/samp&gt;. Otherwise,
this macro fails to detect that &lt;VAR&gt;function&lt;/VAR&gt;
is present, because linking the test program always fails with
unresolved symbols.&lt;/P&gt;&lt;P&gt;
The result of this test is cached in the
&lt;CODE&gt;ac_cv_search_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/CODE&gt;
variable as &lt;samp&gt;none required&lt;/samp&gt; if
&lt;VAR&gt;function&lt;/VAR&gt; is already available, as
&lt;samp&gt;no&lt;/samp&gt; if no library containing
&lt;VAR&gt;function&lt;/VAR&gt; was found, otherwise as the
&lt;samp&gt;-l&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt; option
that needs to be prepended to &lt;CODE&gt;LIBS&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_FUNC_ALLOCA">
<prototype>
</prototype>
<synopsis>
alloca.h Check how to get &lt;CODE&gt;alloca&lt;/CODE&gt;.
Tries to get a builtin version by checking for
&lt;TT&gt;alloca.h&lt;/TT&gt; or the predefined C preprocessor
macros &lt;CODE&gt;__GNUC__&lt;/CODE&gt; and
&lt;CODE&gt;_AIX&lt;/CODE&gt;. If this macro finds
&lt;TT&gt;alloca.h&lt;/TT&gt;, it defines
&lt;CODE&gt;HAVE_ALLOCA_H&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If those attempts fail, it looks for the function in the
standard C library. If any of those methods succeed, it defines
&lt;CODE&gt;HAVE_ALLOCA&lt;/CODE&gt;. Otherwise, it sets the
output variable &lt;CODE&gt;ALLOCA&lt;/CODE&gt; to
&lt;samp&gt;$LIBOBJDIR@&lt;/samp&gt;alloca.o and defines
&lt;CODE&gt;C_ALLOCA&lt;/CODE&gt; (so programs can periodically
call &lt;samp&gt;alloca (0)&lt;/samp&gt; to garbage collect).
This variable is separate from &lt;CODE&gt;LIBOBJS&lt;/CODE&gt;
so multiple programs can share the value of
&lt;CODE&gt;ALLOCA&lt;/CODE&gt; without needing to create an
actual library, in case only some of them use the code in
&lt;CODE&gt;LIBOBJS&lt;/CODE&gt;. The
&lt;samp&gt;$LIBOBJDIR@&lt;/samp&gt; prefix serves the same
purpose as in &lt;CODE&gt;LIBOBJS&lt;/CODE&gt; (AC_LIBOBJ vs
LIBOBJS).&lt;/P&gt;&lt;P&gt;
This macro does not try to get &lt;CODE&gt;alloca&lt;/CODE&gt;
from the System V R3 &lt;TT&gt;libPW&lt;/TT&gt; or the System V
R4 &lt;TT&gt;libucb&lt;/TT&gt; because those libraries contain
some incompatible functions that cause trouble. Some versions
do not even contain &lt;CODE&gt;alloca&lt;/CODE&gt; or contain a
buggy version. If you still want to use their
&lt;CODE&gt;alloca&lt;/CODE&gt;, use &lt;CODE&gt;ar&lt;/CODE&gt;
to extract &lt;TT&gt;alloca.o&lt;/TT&gt; from them instead of
compiling &lt;TT&gt;alloca.c&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
Source files that use &lt;CODE&gt;alloca&lt;/CODE&gt; should
start with a piece of code like the following, to declare it
properly.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #ifdef STDC_HEADERS #
include &lt;stdlib.h&gt; # include &lt;stddef.h&gt; #else #
ifdef HAVE_STDLIB_H # include &lt;stdlib.h&gt; # endif #endif
#ifdef HAVE_ALLOCA_H # include &lt;alloca.h&gt; #elif defined
__GNUC__ # define alloca __builtin_alloca #elif defined _AIX #
define alloca __alloca #elif defined _MSC_VER # include
&lt;malloc.h&gt; # define alloca _alloca #else # ifndef
HAVE_ALLOCA # ifdef __cplusplus extern "C" # endif void
*alloca (size_t); # endif #endif @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_FUNC_CHOWN">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;chown&lt;/CODE&gt; function is available
and works (in particular, it should accept
&lt;samp&gt;-1&lt;/samp&gt; for &lt;CODE&gt;uid&lt;/CODE&gt; and
&lt;CODE&gt;gid&lt;/CODE&gt;), define
&lt;CODE&gt;HAVE_CHOWN&lt;/CODE&gt;. The result of this macro
is cached in the &lt;CODE&gt;ac_cv_func_chown_works&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_FUNC_CLOSEDIR_VOID">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;closedir&lt;/CODE&gt; function does not
return a meaningful value, define
&lt;CODE&gt;CLOSEDIR_VOID&lt;/CODE&gt;. Otherwise, callers
ought to check its return value for an error indicator.&lt;/P&gt;&lt;P&gt;
Currently this test is implemented by running a test program.
When cross compiling the pessimistic assumption that
&lt;CODE&gt;closedir&lt;/CODE&gt; does not return a meaningful
value is made.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_closedir_void&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as &lt;CODE&gt;closedir&lt;/CODE&gt;
returns a meaningful value on current systems. New programs
need not use this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_ERROR_AT_LINE">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;error_at_line&lt;/CODE&gt; function is not
found, require an &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement
of &lt;samp&gt;error&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_lib_error_at_line&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FUNC_ERROR_AT_LINE&lt;/CODE&gt; macro is
obsolescent. New programs should use Gnulib's
&lt;CODE&gt;error&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_FNMATCH">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;fnmatch&lt;/CODE&gt; function conforms to
Posix, define &lt;CODE&gt;HAVE_FNMATCH&lt;/CODE&gt;. Detect
common implementation bugs, for example, the bugs in Solaris
2.4.&lt;/P&gt;&lt;P&gt;
Unlike the other specific &lt;CODE&gt;AC_FUNC&lt;/CODE&gt;
macros, &lt;CODE&gt;AC_FUNC_FNMATCH&lt;/CODE&gt; does not
replace a broken/missing &lt;CODE&gt;fnmatch&lt;/CODE&gt;. This
is for historical reasons. See
&lt;CODE&gt;AC_REPLACE_FNMATCH&lt;/CODE&gt; below.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_fnmatch_works&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent. New programs should use Gnulib's
&lt;CODE&gt;fnmatch-posix&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_FNMATCH_GNU">
<prototype>
</prototype>
<synopsis>
Behave like &lt;CODE&gt;AC_REPLACE_FNMATCH&lt;/CODE&gt;
(&lt;EM&gt;replace&lt;/EM&gt;) but also test whether
&lt;CODE&gt;fnmatch&lt;/CODE&gt; supports GNU extensions.
Detect common implementation bugs, for example, the bugs in the
GNU C Library 2.1.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_fnmatch_gnu&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent. New programs should use Gnulib's
&lt;CODE&gt;fnmatch-gnu&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_FORK">
<prototype>
</prototype>
<synopsis>
vfork.h This macro checks for the
&lt;CODE&gt;fork&lt;/CODE&gt; and &lt;CODE&gt;vfork&lt;/CODE&gt;
functions. If a working &lt;CODE&gt;fork&lt;/CODE&gt; is found,
define &lt;CODE&gt;HAVE_WORKING_FORK&lt;/CODE&gt;. This macro
checks whether &lt;CODE&gt;fork&lt;/CODE&gt; is just a stub by
trying to run it.&lt;/P&gt;&lt;P&gt;
If &lt;TT&gt;vfork.h&lt;/TT&gt; is found, define
&lt;CODE&gt;HAVE_VFORK_H&lt;/CODE&gt;. If a working
&lt;CODE&gt;vfork&lt;/CODE&gt; is found, define
&lt;CODE&gt;HAVE_WORKING_VFORK&lt;/CODE&gt;. Otherwise, define
&lt;CODE&gt;vfork&lt;/CODE&gt; to be
&lt;CODE&gt;fork&lt;/CODE&gt; for backward compatibility with
previous versions of &lt;CODE&gt;autoconf&lt;/CODE&gt;. This
macro checks for several known errors in implementations of
&lt;CODE&gt;vfork&lt;/CODE&gt; and considers the system to not
have a working &lt;CODE&gt;vfork&lt;/CODE&gt; if it detects any
of them. It is not considered to be an implementation error if
a child's invocation of &lt;CODE&gt;signal&lt;/CODE&gt; modifies
the parent's signal handler, since child processes rarely change
their signal handlers.&lt;/P&gt;&lt;P&gt;
Since this macro defines &lt;CODE&gt;vfork&lt;/CODE&gt; only for
backward compatibility with previous versions of
&lt;CODE&gt;autoconf&lt;/CODE&gt; you're encouraged to define it
yourself in new code:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #ifndef HAVE_WORKING_VFORK #
define vfork fork #endif @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_FUNC_FSEEKO">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;fseeko&lt;/CODE&gt; function is
available, define &lt;CODE&gt;HAVE_FSEEKO&lt;/CODE&gt;. Define
&lt;CODE&gt;_LARGEFILE_SOURCE&lt;/CODE&gt; if necessary to make
the prototype visible on some systems (e.g., glibc 2.2).
Otherwise linkage problems may occur when compiling with
&lt;CODE&gt;AC_SYS_LARGEFILE&lt;/CODE&gt; on largefile-sensitive
systems where &lt;CODE&gt;off_t&lt;/CODE&gt; does not default to
a 64bit entity. All systems with
&lt;CODE&gt;fseeko&lt;/CODE&gt; also supply
&lt;CODE&gt;ftello&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_FUNC_GETGROUPS">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;getgroups&lt;/CODE&gt; function is
available and works (unlike on Ultrix 4.3, where
&lt;samp&gt;getgroups (0, 0)&lt;/samp&gt; always fails), define
&lt;CODE&gt;HAVE_GETGROUPS&lt;/CODE&gt;. Set
&lt;CODE&gt;GETGROUPS_LIBS&lt;/CODE&gt; to any libraries needed
to get that function. This macro runs
&lt;CODE&gt;AC_TYPE_GETGROUPS&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_FUNC_GETLOADAVG">
<prototype>
</prototype>
<synopsis>
Check how to get the system load averages. To
perform its tests properly, this macro needs the file
&lt;TT&gt;getloadavg.c&lt;/TT&gt;; therefore, be sure to set the
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement directory
properly (see Generic Functions,
&lt;CODE&gt;AC_CONFIG_LIBOBJ_DIR&lt;/CODE&gt;).&lt;/P&gt;&lt;P&gt;
If the system has the &lt;CODE&gt;getloadavg&lt;/CODE&gt;
function, define &lt;CODE&gt;HAVE_GETLOADAVG&lt;/CODE&gt;, and
set &lt;CODE&gt;GETLOADAVG_LIBS&lt;/CODE&gt; to any libraries
necessary to get that function. Also add
&lt;CODE&gt;GETLOADAVG_LIBS&lt;/CODE&gt; to
&lt;CODE&gt;LIBS&lt;/CODE&gt;. Otherwise, require an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;getloadavg&lt;/samp&gt; with source code in
&lt;TT&gt;&lt;VAR&gt;dir&lt;/VAR&gt;/getloadavg.c&lt;/TT&gt;,
and possibly define several other C preprocessor macros and
output variables:&lt;/P&gt;&lt;P&gt;
&lt;OL&gt; &lt;LI&gt; Define
&lt;CODE&gt;C_GETLOADAVG&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; Define &lt;CODE&gt;SVR4&lt;/CODE&gt;,
&lt;CODE&gt;DGUX&lt;/CODE&gt;, &lt;CODE&gt;UMAX&lt;/CODE&gt;, or
&lt;CODE&gt;UMAX4_3&lt;/CODE&gt; if on those systems.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; nlist.h If &lt;TT&gt;nlist.h&lt;/TT&gt; is found,
define &lt;CODE&gt;HAVE_NLIST_H&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; If &lt;samp&gt;struct nlist&lt;/samp&gt; has an
&lt;samp&gt;n_un.n_name&lt;/samp&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_NLIST_N_UN_N_NAME&lt;/CODE&gt;. The
obsolete symbol &lt;CODE&gt;NLIST_NAME_UNION&lt;/CODE&gt; is
still defined, but do not depend upon it.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; Programs may need to be installed set-group-ID (or
set-user-ID) for &lt;CODE&gt;getloadavg&lt;/CODE&gt; to work.
In this case, define
&lt;CODE&gt;GETLOADAVG_PRIVILEGED&lt;/CODE&gt;, set the output
variable &lt;CODE&gt;NEED_SETGID&lt;/CODE&gt; to
&lt;samp&gt;true&lt;/samp&gt; (and otherwise to
&lt;samp&gt;false&lt;/samp&gt;), and set
&lt;CODE&gt;KMEM_GROUP&lt;/CODE&gt; to the name of the group
that should own the installed program. &lt;/OL&gt;&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FUNC_GETLOADAVG&lt;/CODE&gt; macro is
obsolescent. New programs should use Gnulib's
&lt;CODE&gt;getloadavg&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_GETMNTENT">
<prototype>
</prototype>
<synopsis>
Check for &lt;CODE&gt;getmntent&lt;/CODE&gt; in the standard
C library, and then in the &lt;TT&gt;sun&lt;/TT&gt;,
&lt;TT&gt;seq&lt;/TT&gt;, and &lt;TT&gt;gen&lt;/TT&gt;
libraries, for UNICOS, IRIX 4, PTX, and UnixWare, respectively.
Then, if &lt;CODE&gt;getmntent&lt;/CODE&gt; is available, define
&lt;CODE&gt;HAVE_GETMNTENT&lt;/CODE&gt; and set
&lt;CODE&gt;ac_cv_func_getmntent&lt;/CODE&gt; to
&lt;CODE&gt;yes&lt;/CODE&gt;. Otherwise set
&lt;CODE&gt;ac_cv_func_getmntent&lt;/CODE&gt; to
&lt;CODE&gt;no&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro can be overridden by setting the cache
variable &lt;CODE&gt;ac_cv_search_getmntent&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_FUNC_GETPGRP">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;GETPGRP_VOID&lt;/CODE&gt; if it is an
error to pass 0 to &lt;CODE&gt;getpgrp&lt;/CODE&gt;; this is the
Posix behavior. On older BSD systems, you must pass 0 to
&lt;CODE&gt;getpgrp&lt;/CODE&gt;, as it takes an argument and
behaves like Posix's &lt;CODE&gt;getpgid&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #ifdef GETPGRP_VOID pid = getpgrp
(); #else pid = getpgrp (0); #endif
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro does not check whether
&lt;CODE&gt;getpgrp&lt;/CODE&gt; exists at all; if you need to
work in that situation, first call
&lt;CODE&gt;AC_CHECK_FUNC&lt;/CODE&gt; for
&lt;CODE&gt;getpgrp&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_getpgrp_void&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems have a
&lt;CODE&gt;getpgrp&lt;/CODE&gt; whose signature conforms to
Posix. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;link&lt;/TT&gt; is a symbolic link, then
&lt;CODE&gt;lstat&lt;/CODE&gt; should treat
&lt;TT&gt;link/&lt;/TT&gt; the same as
&lt;TT&gt;link/.&lt;/TT&gt;. However, many older
&lt;CODE&gt;lstat&lt;/CODE&gt; implementations incorrectly
ignore trailing slashes.&lt;/P&gt;&lt;P&gt;
It is safe to assume that if &lt;CODE&gt;lstat&lt;/CODE&gt;
incorrectly ignores trailing slashes, then other
symbolic-link-aware functions like
&lt;CODE&gt;unlink&lt;/CODE&gt; also incorrectly ignore trailing
slashes.&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;lstat&lt;/CODE&gt; behaves properly, define
&lt;CODE&gt;LSTAT_FOLLOWS_SLASHED_SYMLINK&lt;/CODE&gt;,
otherwise require an &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt;
replacement of &lt;CODE&gt;lstat&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_lstat_dereferences_slashed_symlink&lt;/CODE&gt;
variable.&lt;/P&gt;&lt;P&gt;
The
&lt;CODE&gt;AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK&lt;/CODE&gt;
macro is obsolescent. New programs should use Gnulib's
&lt;CODE&gt;lstat&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_MALLOC">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;malloc&lt;/CODE&gt; function is
compatible with the GNU C library
&lt;CODE&gt;malloc&lt;/CODE&gt; (i.e., &lt;samp&gt;malloc
(0)&lt;/samp&gt; returns a valid pointer), define
&lt;CODE&gt;HAVE_MALLOC&lt;/CODE&gt; to 1. Otherwise define
&lt;CODE&gt;HAVE_MALLOC&lt;/CODE&gt; to 0, ask for an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;malloc&lt;/samp&gt;, and define
&lt;CODE&gt;malloc&lt;/CODE&gt; to
&lt;CODE&gt;rpl_malloc&lt;/CODE&gt; so that the native
&lt;CODE&gt;malloc&lt;/CODE&gt; is not used in the main project.&lt;/P&gt;&lt;P&gt;
Typically, the replacement file &lt;TT&gt;malloc.c&lt;/TT&gt;
should look like (note the &lt;samp&gt;#undef
malloc&lt;/samp&gt;):&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt; #include &lt;config.h&gt; #undef malloc&lt;/P&gt;&lt;P&gt;
#include &lt;sys/types.h&gt;&lt;/P&gt;&lt;P&gt;
void *malloc ();&lt;/P&gt;&lt;P&gt;
/* Allocate an N-byte block of memory from the heap. If N is
zero, allocate a 1-byte block. */&lt;/P&gt;&lt;P&gt;
void * rpl_malloc (size_t n) { if (n == 0) n = 1; return
malloc (n); } &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_malloc_0_nonnull&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_MBRTOWC">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;HAVE_MBRTOWC&lt;/CODE&gt; to 1 if the
function &lt;CODE&gt;mbrtowc&lt;/CODE&gt; and the type
&lt;CODE&gt;mbstate_t&lt;/CODE&gt; are properly declared.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_mbrtowc&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_MEMCMP">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;memcmp&lt;/CODE&gt; function is not
available, or does not work on 8-bit data (like the one on SunOS
4.1.3), or fails when comparing 16 bytes or more and with at
least one buffer not starting on a 4-byte boundary (such as the
one on NeXT x86 OpenStep), require an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;memcmp&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_memcmp_working&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems have a working
&lt;CODE&gt;memcmp&lt;/CODE&gt;. New programs need not use this
macro.
</synopsis>
</macro>
<macro id="AC_FUNC_MKTIME">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;mktime&lt;/CODE&gt; function is not
available, or does not work correctly, require an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;mktime&lt;/samp&gt;. For the purposes of this test,
&lt;CODE&gt;mktime&lt;/CODE&gt; should conform to the Posix
standard and should be the inverse of
&lt;CODE&gt;localtime&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_working_mktime&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FUNC_MKTIME&lt;/CODE&gt; macro is
obsolescent. New programs should use Gnulib's
&lt;CODE&gt;mktime&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_MMAP">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;mmap&lt;/CODE&gt; function exists and
works correctly, define &lt;CODE&gt;HAVE_MMAP&lt;/CODE&gt;.
This checks only private fixed mapping of already-mapped memory.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_mmap_fixed_mapped&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_OBSTACK">
<prototype>
</prototype>
<synopsis>
If the obstacks are found, define
&lt;CODE&gt;HAVE_OBSTACK&lt;/CODE&gt;, else require an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;obstack&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_obstack&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_REALLOC">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;realloc&lt;/CODE&gt; function is
compatible with the GNU C library
&lt;CODE&gt;realloc&lt;/CODE&gt; (i.e., &lt;samp&gt;realloc
(NULL, 0)&lt;/samp&gt; returns a valid pointer), define
&lt;CODE&gt;HAVE_REALLOC&lt;/CODE&gt; to 1. Otherwise define
&lt;CODE&gt;HAVE_REALLOC&lt;/CODE&gt; to 0, ask for an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for
&lt;samp&gt;realloc&lt;/samp&gt;, and define
&lt;CODE&gt;realloc&lt;/CODE&gt; to
&lt;CODE&gt;rpl_realloc&lt;/CODE&gt; so that the native
&lt;CODE&gt;realloc&lt;/CODE&gt; is not used in the main
project. See &lt;CODE&gt;AC_FUNC_MALLOC&lt;/CODE&gt; for
details.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_realloc_0_nonnull&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_SELECT_ARGTYPES">
<prototype>
</prototype>
<synopsis>
Determines the correct type to be passed for each of the
&lt;CODE&gt;select&lt;/CODE&gt; function's arguments, and
defines those types in
&lt;CODE&gt;SELECT_TYPE_ARG1&lt;/CODE&gt;,
&lt;CODE&gt;SELECT_TYPE_ARG234&lt;/CODE&gt;, and
&lt;CODE&gt;SELECT_TYPE_ARG5&lt;/CODE&gt; respectively.
&lt;CODE&gt;SELECT_TYPE_ARG1&lt;/CODE&gt; defaults to
&lt;samp&gt;int&lt;/samp&gt;,
&lt;CODE&gt;SELECT_TYPE_ARG234&lt;/CODE&gt; defaults to
&lt;samp&gt;int *&lt;/samp&gt;, and
&lt;CODE&gt;SELECT_TYPE_ARG5&lt;/CODE&gt; defaults to
&lt;samp&gt;struct timeval *&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems have a
&lt;CODE&gt;select&lt;/CODE&gt; whose signature conforms to
Posix. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_SETPGRP">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;setpgrp&lt;/CODE&gt; takes no argument (the
Posix version), define &lt;CODE&gt;SETPGRP_VOID&lt;/CODE&gt;.
Otherwise, it is the BSD version, which takes two process IDs as
arguments. This macro does not check whether
&lt;CODE&gt;setpgrp&lt;/CODE&gt; exists at all; if you need to
work in that situation, first call
&lt;CODE&gt;AC_CHECK_FUNC&lt;/CODE&gt; for
&lt;CODE&gt;setpgrp&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_setpgrp_void&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems have a
&lt;CODE&gt;setpgrp&lt;/CODE&gt; whose signature conforms to
Posix. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_STAT">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
Determine whether &lt;CODE&gt;stat&lt;/CODE&gt; or
&lt;CODE&gt;lstat&lt;/CODE&gt; have the bug that it succeeds
when given the zero-length file name as argument. The
&lt;CODE&gt;stat&lt;/CODE&gt; and &lt;CODE&gt;lstat&lt;/CODE&gt;
from SunOS 4.1.4 and the Hurd (as of 1998-11-01) do this.&lt;/P&gt;&lt;P&gt;
If it does, then define
&lt;CODE&gt;HAVE_STAT_EMPTY_STRING_BUG&lt;/CODE&gt; (or
&lt;CODE&gt;HAVE_LSTAT_EMPTY_STRING_BUG&lt;/CODE&gt;) and ask
for an &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement of it.&lt;/P&gt;&lt;P&gt;
The results of these macros are cached in the
&lt;CODE&gt;ac_cv_func_stat_empty_string_bug&lt;/CODE&gt; and
the &lt;CODE&gt;ac_cv_func_lstat_empty_string_bug&lt;/CODE&gt;
variables, respectively.&lt;/P&gt;&lt;P&gt;
These macros are obsolescent, as no current systems have the
bug. New programs need not use these macros.
</synopsis>
</macro>
<macro id="AC_FUNC_STRCOLL">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;strcoll&lt;/CODE&gt; function exists and
works correctly, define &lt;CODE&gt;HAVE_STRCOLL&lt;/CODE&gt;.
This does a bit more than
&lt;samp&gt;AC_CHECK_FUNCS(strcoll)&lt;/samp&gt;, because some
systems have incorrect definitions of
&lt;CODE&gt;strcoll&lt;/CODE&gt; that should not be used.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_strcoll_works&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_STRERROR_R">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;strerror_r&lt;/CODE&gt; is available,
define &lt;CODE&gt;HAVE_STRERROR_R&lt;/CODE&gt;, and if it is
declared, define &lt;CODE&gt;HAVE_DECL_STRERROR_R&lt;/CODE&gt;.
If it returns a &lt;CODE&gt;char *&lt;/CODE&gt; message, define
&lt;CODE&gt;STRERROR_R_CHAR_P&lt;/CODE&gt;; otherwise it returns
an &lt;CODE&gt;int&lt;/CODE&gt; error number. The Thread-Safe
Functions option of Posix requires
&lt;CODE&gt;strerror_r&lt;/CODE&gt; to return
&lt;CODE&gt;int&lt;/CODE&gt;, but many systems (including, for
example, version 2.2.4 of the GNU C Library) return a
&lt;CODE&gt;char *&lt;/CODE&gt; value that is not necessarily
equal to the buffer argument.&lt;/P&gt;&lt;P&gt;
The result of this macro is cached in the
&lt;CODE&gt;ac_cv_func_strerror_r_char_p&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_STRFTIME">
<prototype>
</prototype>
<synopsis>
Check for &lt;CODE&gt;strftime&lt;/CODE&gt; in the
&lt;TT&gt;intl&lt;/TT&gt; library, for SCO Unix. Then, if
&lt;CODE&gt;strftime&lt;/CODE&gt; is available, define
&lt;CODE&gt;HAVE_STRFTIME&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as no current systems require the
&lt;TT&gt;intl&lt;/TT&gt; library for
&lt;CODE&gt;strftime&lt;/CODE&gt;. New programs need not use
this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_STRTOD">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;strtod&lt;/CODE&gt; function does not
exist or doesn't work correctly, ask for an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement of
&lt;samp&gt;strtod&lt;/samp&gt;. In this case, because
&lt;TT&gt;strtod.c&lt;/TT&gt; is likely to need
&lt;samp&gt;pow&lt;/samp&gt;, set the output variable
&lt;CODE&gt;POW_LIB&lt;/CODE&gt; to the extra library needed.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_strtod&lt;/CODE&gt; variable and depends
upon the result in the &lt;CODE&gt;ac_cv_func_pow&lt;/CODE&gt;
variable.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FUNC_STRTOD&lt;/CODE&gt; macro is
obsolescent. New programs should use Gnulib's
&lt;CODE&gt;strtod&lt;/CODE&gt; module. .
</synopsis>
</macro>
<macro id="AC_FUNC_STRTOLD">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;strtold&lt;/CODE&gt; function exists and
conforms to C99, define &lt;CODE&gt;HAVE_STRTOLD&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_strtold&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_STRNLEN">
<prototype>
</prototype>
<synopsis>
If the &lt;CODE&gt;strnlen&lt;/CODE&gt; function is not
available, or is buggy (like the one from AIX 4.3), require an
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement for it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_strnlen_working&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_FUNC_UTIME_NULL">
<prototype>
</prototype>
<synopsis>
If &lt;samp&gt;utime (&lt;VAR&gt;file&lt;/VAR&gt;,
NULL)&lt;/samp&gt; sets &lt;VAR&gt;file&lt;/VAR&gt;'s timestamp
to the present, define &lt;CODE&gt;HAVE_UTIME_NULL&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_utime_null&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as all current systems have a
&lt;CODE&gt;utime&lt;/CODE&gt; that behaves this way. New
programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_FUNC_VPRINTF">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;vprintf&lt;/CODE&gt; is found, define
&lt;CODE&gt;HAVE_VPRINTF&lt;/CODE&gt;. Otherwise, if
&lt;CODE&gt;_doprnt&lt;/CODE&gt; is found, define
&lt;CODE&gt;HAVE_DOPRNT&lt;/CODE&gt;. (If
&lt;CODE&gt;vprintf&lt;/CODE&gt; is available, you may assume
that &lt;CODE&gt;vfprintf&lt;/CODE&gt; and
&lt;CODE&gt;vsprintf&lt;/CODE&gt; are also available.)&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as all current systems have
&lt;CODE&gt;vprintf&lt;/CODE&gt;. New programs need not use this
macro.
</synopsis>
</macro>
<macro id="AC_REPLACE_FNMATCH">
<prototype>
</prototype>
<synopsis>
fnmatch.h If the &lt;CODE&gt;fnmatch&lt;/CODE&gt; function
does not conform to Posix (see
&lt;CODE&gt;AC_FUNC_FNMATCH&lt;/CODE&gt;), ask for its
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement.&lt;/P&gt;&lt;P&gt;
The files &lt;TT&gt;fnmatch.c&lt;/TT&gt;,
&lt;TT&gt;fnmatch_loop.c&lt;/TT&gt;, and
&lt;TT&gt;fnmatch_.h&lt;/TT&gt; in the
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement directory are
assumed to contain a copy of the source code of GNU
&lt;CODE&gt;fnmatch&lt;/CODE&gt;. If necessary, this source
code is compiled as an &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt;
replacement, and the &lt;TT&gt;fnmatch_.h&lt;/TT&gt; file is
linked to &lt;TT&gt;fnmatch.h&lt;/TT&gt; so that it can be
included in place of the system
&lt;CODE&gt;&lt;fnmatch.h&gt;&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_fnmatch_works&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as it assumes the use of particular
source files. New programs should use Gnulib's
&lt;CODE&gt;fnmatch-posix&lt;/CODE&gt; module, which provides
this macro along with the source files. .
</synopsis>
</macro>
<macro id="AC_CHECK_FUNC">
<prototype>
<parameter content="function"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
If C function &lt;VAR&gt;function&lt;/VAR&gt; is available,
run shell commands &lt;VAR&gt;action-if-found&lt;/VAR&gt;,
otherwise &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;. If you
just want to define a symbol if the function is available,
consider using &lt;CODE&gt;AC_CHECK_FUNCS&lt;/CODE&gt; instead.
This macro checks for functions with C linkage even when
&lt;CODE&gt;AC_LANG(C++)&lt;/CODE&gt; has been called, since C
is more standardized than C++. (Language Choice, for more
information about selecting the language for checks.)&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_func_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_CHECK_FUNCS">
<prototype>
<parameter content="function..."/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
For each &lt;VAR&gt;function&lt;/VAR&gt; enumerated in the
blank-or-newline-separated argument list, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals) if it is available. If
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is given, it is
additional shell code to execute when one of the functions is
found. You can give it a value of
&lt;samp&gt;break&lt;/samp&gt; to break out of the loop on the
first match. If &lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is
given, it is executed when one of the functions is not found.&lt;/P&gt;&lt;P&gt;
Results are cached for each &lt;VAR&gt;function&lt;/VAR&gt; as
in &lt;CODE&gt;AC_CHECK_FUNC&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_FUNCS_ONCE">
<prototype>
<parameter content="function..."/>
</prototype>
<synopsis>
For each &lt;VAR&gt;function&lt;/VAR&gt; enumerated in the
blank-or-newline-separated argument list, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals) if it is available. This is a once-only
variant of &lt;CODE&gt;AC_CHECK_FUNCS&lt;/CODE&gt;. It
generates the checking code at most once, so that
&lt;CODE&gt;configure&lt;/CODE&gt; is smaller and faster; but
the checks cannot be conditionalized and are always done once,
early during the &lt;CODE&gt;configure&lt;/CODE&gt; run.
</synopsis>
</macro>
<macro id="AC_LIBOBJ">
<prototype>
<parameter content="function"/>
</prototype>
<synopsis>
Specify that
&lt;samp&gt;&lt;VAR&gt;function&lt;/VAR&gt;.c&lt;/samp&gt; must
be included in the executables to replace a missing or broken
implementation of &lt;VAR&gt;function&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Technically, it adds
&lt;samp&gt;&lt;VAR&gt;function&lt;/VAR&gt;.$ac_objext&lt;/samp&gt;
to the output variable &lt;CODE&gt;LIBOBJS&lt;/CODE&gt; if it is
not already in, and calls &lt;CODE&gt;AC_LIBSOURCE&lt;/CODE&gt;
for &lt;samp&gt;&lt;VAR&gt;function&lt;/VAR&gt;.c&lt;/samp&gt;.
You should not directly change &lt;CODE&gt;LIBOBJS&lt;/CODE&gt;,
since this is not traceable.
</synopsis>
</macro>
<macro id="AC_LIBSOURCE">
<prototype>
<parameter content="file"/>
</prototype>
<synopsis>
Specify that &lt;VAR&gt;file&lt;/VAR&gt; might be needed to
compile the project. If you need to know what files might be
needed by a &lt;TT&gt;configure.ac&lt;/TT&gt;, you should trace
&lt;CODE&gt;AC_LIBSOURCE&lt;/CODE&gt;.
&lt;VAR&gt;file&lt;/VAR&gt; must be a literal.&lt;/P&gt;&lt;P&gt;
This macro is called automatically from
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt;, but you must call it
explicitly if you pass a shell variable to
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt;. In that case, since shell
variables cannot be traced statically, you must pass to
&lt;CODE&gt;AC_LIBSOURCE&lt;/CODE&gt; any possible files that
the shell variable might cause
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; to need. For example, if you
want to pass a variable &lt;CODE&gt;$foo_or_bar&lt;/CODE&gt; to
&lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; that holds either
&lt;CODE&gt;"foo"&lt;/CODE&gt; or
&lt;CODE&gt;"bar"&lt;/CODE&gt;, you should do:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LIBSOURCE([foo.c])
AC_LIBSOURCE([bar.c]) AC_LIBOBJ([$foo_or_bar])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
There is usually a way to avoid this, however, and you are
encouraged to simply call &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt;
with literal arguments.&lt;/P&gt;&lt;P&gt;
Note that this macro replaces the obsolete
&lt;CODE&gt;AC_LIBOBJ_DECL&lt;/CODE&gt;, with slightly different
semantics: the old macro took the function name, e.g.,
&lt;CODE&gt;foo&lt;/CODE&gt;, as its argument rather than the
file name.
</synopsis>
</macro>
<macro id="AC_LIBSOURCES">
<prototype>
<parameter content="files"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_LIBSOURCE&lt;/CODE&gt;, but accepts one or
more &lt;VAR&gt;files&lt;/VAR&gt; in a comma-separated M4 list.
Thus, the above example might be rewritten:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LIBSOURCES([foo.c, bar.c])
AC_LIBOBJ([$foo_or_bar])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_CONFIG_LIBOBJ_DIR">
<prototype>
<parameter content="directory"/>
</prototype>
<synopsis>
Specify that &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement
files are to be found in &lt;VAR&gt;directory&lt;/VAR&gt;, a
name relative to the top level of the source tree. The
replacement directory defaults to &lt;TT&gt;.&lt;/TT&gt;, the
top level directory, and the most typical value is
&lt;TT&gt;lib&lt;/TT&gt;, corresponding to
&lt;samp&gt;AC_CONFIG_LIBOBJ_DIR([lib])&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;configure&lt;/CODE&gt; might need to know the
replacement directory for the following reasons: (i) some checks
use the replacement files, (ii) some macros bypass broken system
headers by installing links to the replacement headers (iii)
when used in conjunction with Automake, within each makefile,
&lt;VAR&gt;directory&lt;/VAR&gt; is used as a relative path from
&lt;CODE&gt;$(top_srcdir)&lt;/CODE&gt; to each object named in
&lt;CODE&gt;LIBOBJS&lt;/CODE&gt; and
&lt;CODE&gt;LTLIBOBJS&lt;/CODE&gt;, etc.
</synopsis>
</macro>
<macro id="AC_REPLACE_FUNCS">
<prototype>
<parameter content="function..."/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_CHECK_FUNCS&lt;/CODE&gt;, but uses
&lt;samp&gt;AC_LIBOBJ(&lt;VAR&gt;function&lt;/VAR&gt;)&lt;/samp&gt;
as &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;. You can declare
your replacement function by enclosing the prototype in
&lt;samp&gt;#ifndef
HAVE_&lt;VAR&gt;function&lt;/VAR&gt;&lt;/samp&gt;. If the
system has the function, it probably declares it in a header
file you should be including, so you shouldn't redeclare it lest
your declaration conflict.
</synopsis>
</macro>
<macro id="AC_HEADER_ASSERT">
<prototype>
</prototype>
<synopsis>
assert.h Check whether to enable assertions in the style of
&lt;TT&gt;assert.h&lt;/TT&gt;. Assertions are enabled by
default, but the user can override this by invoking
&lt;CODE&gt;configure&lt;/CODE&gt; with the
&lt;samp&gt;--disable-assert&lt;/samp&gt; option.
</synopsis>
</macro>
<macro id="AC_HEADER_DIRENT">
<prototype>
</prototype>
<synopsis>
dirent.h sys/ndir.h sys/dir.h ndir.h Check for the
following header files. For the first one that is found and
defines &lt;samp&gt;DIR&lt;/samp&gt;, define the listed C
preprocessor macro:&lt;/P&gt;&lt;P&gt;
@multitable {&lt;TT&gt;sys/ndir.h&lt;/TT&gt;}
{&lt;CODE&gt;HAVE_SYS_NDIR_H&lt;/CODE&gt;} &lt;LI&gt;
&lt;TT&gt;dirent.h&lt;/TT&gt; @tab
&lt;CODE&gt;HAVE_DIRENT_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;sys/ndir.h&lt;/TT&gt; @tab
&lt;CODE&gt;HAVE_SYS_NDIR_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;sys/dir.h&lt;/TT&gt; @tab
&lt;CODE&gt;HAVE_SYS_DIR_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;ndir.h&lt;/TT&gt; @tab
&lt;CODE&gt;HAVE_NDIR_H&lt;/CODE&gt; @end multitable&lt;/P&gt;&lt;P&gt;
The directory-library declarations in your source code should
look something like the following:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #include &lt;sys/types.h&gt;
#ifdef HAVE_DIRENT_H # include &lt;dirent.h&gt; # define
NAMLEN(dirent) strlen ((dirent)-&gt;d_name) #else # define
dirent direct # define NAMLEN(dirent) ((dirent)-&gt;d_namlen) #
ifdef HAVE_SYS_NDIR_H # include &lt;sys/ndir.h&gt; # endif #
ifdef HAVE_SYS_DIR_H # include &lt;sys/dir.h&gt; # endif #
ifdef HAVE_NDIR_H # include &lt;ndir.h&gt; # endif #endif @end
group &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Using the above declarations, the program would declare
variables to be of type &lt;CODE&gt;struct dirent&lt;/CODE&gt;,
not &lt;CODE&gt;struct direct&lt;/CODE&gt;, and would access the
length of a directory entry name by passing a pointer to a
&lt;CODE&gt;struct dirent&lt;/CODE&gt; to the
&lt;CODE&gt;NAMLEN&lt;/CODE&gt; macro.&lt;/P&gt;&lt;P&gt;
This macro also checks for the SCO Xenix
&lt;TT&gt;dir&lt;/TT&gt; and &lt;TT&gt;x&lt;/TT&gt; libraries.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as all current systems with directory
libraries have &lt;CODE&gt;&lt;dirent.h&gt;&lt;/CODE&gt;. New
programs need not use this macro.&lt;/P&gt;&lt;P&gt;
Also see &lt;CODE&gt;AC_STRUCT_DIRENT_D_INO&lt;/CODE&gt; and
&lt;CODE&gt;AC_STRUCT_DIRENT_D_TYPE&lt;/CODE&gt; (Particular
Structures).
</synopsis>
</macro>
<macro id="AC_HEADER_MAJOR">
<prototype>
</prototype>
<synopsis>
sys/mkdev.h sys/sysmacros.h If
&lt;TT&gt;sys/types.h&lt;/TT&gt; does not define
&lt;CODE&gt;major&lt;/CODE&gt;, &lt;CODE&gt;minor&lt;/CODE&gt;,
and &lt;CODE&gt;makedev&lt;/CODE&gt;, but
&lt;TT&gt;sys/mkdev.h&lt;/TT&gt; does, define
&lt;CODE&gt;MAJOR_IN_MKDEV&lt;/CODE&gt;; otherwise, if
&lt;TT&gt;sys/sysmacros.h&lt;/TT&gt; does, define
&lt;CODE&gt;MAJOR_IN_SYSMACROS&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_HEADER_RESOLV">
<prototype>
</prototype>
<synopsis>
resolv.h Checks for header &lt;TT&gt;resolv.h&lt;/TT&gt;,
checking for prerequisites first. To properly use
&lt;TT&gt;resolv.h&lt;/TT&gt;, your code should contain
something like the following:&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt; #ifdef HAVE_SYS_TYPES_H # include
&lt;sys/types.h&gt; #endif #ifdef HAVE_NETINET_IN_H # include
&lt;netinet/in.h&gt; /* inet_ functions / structs */ #endif
#ifdef HAVE_ARPA_NAMESER_H # include &lt;arpa/nameser.h&gt; /*
DNS HEADER struct */ #endif #ifdef HAVE_NETDB_H # include
&lt;netdb.h&gt; #endif #include &lt;resolv.h&gt; &lt;/CODE&gt;
</synopsis>
</macro>
<macro id="AC_HEADER_STAT">
<prototype>
</prototype>
<synopsis>
sys/stat.h If the macros &lt;CODE&gt;S_ISDIR&lt;/CODE&gt;,
&lt;CODE&gt;S_ISREG&lt;/CODE&gt;, etc.@: defined in
&lt;TT&gt;sys/stat.h&lt;/TT&gt; do not work properly (returning
false positives), define
&lt;CODE&gt;STAT_MACROS_BROKEN&lt;/CODE&gt;. This is the case
on Tektronix UTekV, Amdahl UTS and Motorola System V/88.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as no current systems have the bug.
New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_HEADER_STDBOOL">
<prototype>
</prototype>
<synopsis>
stdbool.h system.h If &lt;TT&gt;stdbool.h&lt;/TT&gt; exists
and conforms to C99, define
&lt;CODE&gt;HAVE_STDBOOL_H&lt;/CODE&gt; to 1; if the type
&lt;CODE&gt;_Bool&lt;/CODE&gt; is defined, define
&lt;CODE&gt;HAVE__BOOL&lt;/CODE&gt; to 1. To fulfill the C99
requirements, your &lt;TT&gt;system.h&lt;/TT&gt; could contain
the following code:&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt; #ifdef HAVE_STDBOOL_H # include &lt;stdbool.h&gt;
#else # ifndef HAVE__BOOL # ifdef __cplusplus typedef bool
_Bool; # else # define _Bool signed char # endif # endif #
define bool _Bool # define false 0 # define true 1 # define
__bool_true_false_are_defined 1 #endif &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;
Alternatively you can use the &lt;samp&gt;stdbool&lt;/samp&gt;
package of Gnulib (Gnulib); it packages the above code into a
replacement header and contains a few other bells and whistles.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_stdbool_h&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_HEADER_STDC">
<prototype>
</prototype>
<synopsis>
stdlib.h stdarg.h string.h float.h ctype.h Define
&lt;CODE&gt;STDC_HEADERS&lt;/CODE&gt; if the system has C header
files conforming to ANSI C89 (ISO C90). Specifically, this macro
checks for &lt;TT&gt;stdlib.h&lt;/TT&gt;,
&lt;TT&gt;stdarg.h&lt;/TT&gt;, &lt;TT&gt;string.h&lt;/TT&gt;,
and &lt;TT&gt;float.h&lt;/TT&gt;; if the system has those, it
probably has the rest of the C89 header files. This macro also
checks whether &lt;TT&gt;string.h&lt;/TT&gt; declares
&lt;CODE&gt;memchr&lt;/CODE&gt; (and thus presumably the other
&lt;CODE&gt;mem&lt;/CODE&gt; functions), whether
&lt;TT&gt;stdlib.h&lt;/TT&gt; declare
&lt;CODE&gt;free&lt;/CODE&gt; (and thus presumably
&lt;CODE&gt;malloc&lt;/CODE&gt; and other related functions),
and whether the &lt;TT&gt;ctype.h&lt;/TT&gt; macros work on
characters with the high bit set, as the C standard requires.&lt;/P&gt;&lt;P&gt;
If you use this macro, your code can refer to
&lt;CODE&gt;STDC_HEADERS&lt;/CODE&gt; to determine whether the
system has conforming header files (and probably C library
functions).&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_stdc&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro.&lt;/P&gt;&lt;P&gt;
string.h strings.h Nowadays &lt;TT&gt;string.h&lt;/TT&gt; is
part of the C standard and declares functions like
&lt;CODE&gt;strcpy&lt;/CODE&gt;, and
&lt;TT&gt;strings.h&lt;/TT&gt; is standardized by Posix and
declares BSD functions like &lt;CODE&gt;bcopy&lt;/CODE&gt;; but
historically, string functions were a major sticking point in
this area. If you still want to worry about portability to
ancient systems without standard headers, there is so much
variation that it is probably easier to declare the functions
you use than to figure out exactly what the system header files
declare. Some ancient systems contained a mix of functions from
the C standard and from BSD; some were mostly standard but
lacked &lt;samp&gt;memmove&lt;/samp&gt;; some defined the BSD
functions as macros in &lt;TT&gt;string.h&lt;/TT&gt; or
&lt;TT&gt;strings.h&lt;/TT&gt;; some had only the BSD functions
but &lt;TT&gt;string.h&lt;/TT&gt;; some declared the memory
functions in &lt;TT&gt;memory.h&lt;/TT&gt;, some in
&lt;TT&gt;string.h&lt;/TT&gt;; etc. It is probably sufficient
to check for one string function and one memory function; if the
library had the standard versions of those then it probably had
most of the others. If you put the following in
&lt;TT&gt;configure.ac&lt;/TT&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; # This example is obsolescent. #
Nowadays you can omit these macro calls. AC_HEADER_STDC
AC_CHECK_FUNCS([strchr memcpy])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
then, in your code, you can use declarations like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group /* This example is
obsolescent. Nowadays you can just #include &lt;string.h&gt;.
*/ #ifdef STDC_HEADERS # include &lt;string.h&gt; #else #
ifndef HAVE_STRCHR # define strchr index # define strrchr
rindex # endif char *strchr (), *strrchr (); # ifndef
HAVE_MEMCPY # define memcpy(d, s, n) bcopy ((s), (d), (n)) #
define memmove(d, s, n) bcopy ((s), (d), (n)) # endif #endif
@end group &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If you use a function like &lt;CODE&gt;memchr&lt;/CODE&gt;,
&lt;CODE&gt;memset&lt;/CODE&gt;,
&lt;CODE&gt;strtok&lt;/CODE&gt;, or
&lt;CODE&gt;strspn&lt;/CODE&gt;, which have no BSD equivalent,
then macros don't suffice to port to ancient hosts; you must
provide an implementation of each function. An easy way to
incorporate your implementations only when needed (since the
ones in system C libraries may be hand optimized) is to, taking
&lt;CODE&gt;memchr&lt;/CODE&gt; for example, put it in
&lt;TT&gt;memchr.c&lt;/TT&gt; and use
&lt;samp&gt;AC_REPLACE_FUNCS([memchr])&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AC_HEADER_SYS_WAIT">
<prototype>
</prototype>
<synopsis>
sys/wait.h If &lt;TT&gt;sys/wait.h&lt;/TT&gt; exists and is
compatible with Posix, define
&lt;CODE&gt;HAVE_SYS_WAIT_H&lt;/CODE&gt;. Incompatibility can
occur if &lt;TT&gt;sys/wait.h&lt;/TT&gt; does not exist, or if
it uses the old BSD &lt;CODE&gt;union wait&lt;/CODE&gt; instead
of &lt;CODE&gt;int&lt;/CODE&gt; to store a status value. If
&lt;TT&gt;sys/wait.h&lt;/TT&gt; is not Posix compatible, then
instead of including it, define the Posix macros with their
usual interpretations. Here is an example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #include &lt;sys/types.h&gt;
#ifdef HAVE_SYS_WAIT_H # include &lt;sys/wait.h&gt; #endif
#ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned
int) (stat_val) &gt;&gt; 8) #endif #ifndef WIFEXITED # define
WIFEXITED(stat_val) (((stat_val) &amp; 255) == 0) #endif @end
group &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_sys_wait_h&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems are compatible
with Posix. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_HEADER_TIME">
<prototype>
</prototype>
<synopsis>
time.h sys/time.h If a program may include both
&lt;TT&gt;time.h&lt;/TT&gt; and &lt;TT&gt;sys/time.h&lt;/TT&gt;,
define &lt;CODE&gt;TIME_WITH_SYS_TIME&lt;/CODE&gt;. On some
ancient systems, &lt;TT&gt;sys/time.h&lt;/TT&gt; included
&lt;TT&gt;time.h&lt;/TT&gt;, but &lt;TT&gt;time.h&lt;/TT&gt; was
not protected against multiple inclusion, so programs could not
explicitly include both files. This macro is useful in programs
that use, for example, &lt;CODE&gt;struct timeval&lt;/CODE&gt;
as well as &lt;CODE&gt;struct tm&lt;/CODE&gt;. It is best used
in conjunction with &lt;CODE&gt;HAVE_SYS_TIME_H&lt;/CODE&gt;,
which can be checked for using
&lt;CODE&gt;AC_CHECK_HEADERS([sys/time.h])&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #ifdef TIME_WITH_SYS_TIME #
include &lt;sys/time.h&gt; # include &lt;time.h&gt; #else #
ifdef HAVE_SYS_TIME_H # include &lt;sys/time.h&gt; # else #
include &lt;time.h&gt; # endif #endif @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_time&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current systems can include both
files when they exist. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_HEADER_TIOCGWINSZ">
<prototype>
</prototype>
<synopsis>
sys/ioctl.h termios.h If the use of
&lt;CODE&gt;TIOCGWINSZ&lt;/CODE&gt; requires
&lt;TT&gt;&lt;sys/ioctl.h&gt;&lt;/TT&gt;, then define
&lt;CODE&gt;GWINSZ_IN_SYS_IOCTL&lt;/CODE&gt;. Otherwise
&lt;CODE&gt;TIOCGWINSZ&lt;/CODE&gt; can be found in
&lt;TT&gt;&lt;termios.h&gt;&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
Use:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group #ifdef HAVE_TERMIOS_H #
include &lt;termios.h&gt; #endif&lt;/P&gt;&lt;P&gt;
#ifdef GWINSZ_IN_SYS_IOCTL # include &lt;sys/ioctl.h&gt; #endif
@end group &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_CHECK_HEADER">
<prototype>
<parameter content="header-file"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes]"/>
</prototype>
<synopsis>
-file} If the system header file
&lt;VAR&gt;header-file&lt;/VAR&gt; is compilable, execute shell
commands &lt;VAR&gt;action-if-found&lt;/VAR&gt;, otherwise
execute &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;. If you just
want to define a symbol if the header file is available,
consider using &lt;CODE&gt;AC_CHECK_HEADERS&lt;/CODE&gt;
instead.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;includes&lt;/VAR&gt; is decoded to determine the
appropriate include directives. If omitted or empty,
&lt;TT&gt;configure&lt;/TT&gt; will check for both header
existence (with the preprocessor) and usability (with the
compiler), using &lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt;
for the compile test. If there is a discrepancy between the
results, a warning is issued to the user, and the compiler
results are favored (Present But Cannot Be Compiled). In
general, favoring the compiler results means that a header will
be treated as not found even though the file exists, because you
did not provide enough prerequisites.&lt;/P&gt;&lt;P&gt;
Providing a non-empty &lt;VAR&gt;includes&lt;/VAR&gt; argument
allows the code to provide any prerequisites prior to including
the header under test; it is common to use the argument
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes).
With an explicit fourth argument, no preprocessor test is
needed. As a special case, an &lt;VAR&gt;includes&lt;/VAR&gt;
of exactly &lt;samp&gt;-&lt;/samp&gt; triggers the older
preprocessor check, which merely determines existence of the
file in the preprocessor search path; this should only be used
as a last resort (it is safer to determine the actual
prerequisites and perform a compiler check, or else use
&lt;CODE&gt;AC_PREPROC_IFELSE&lt;/CODE&gt; to make it obvious
that only a preprocessor check is desired).&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_&lt;VAR&gt;header-file&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_HEADERS">
<prototype>
</prototype>
<synopsis>
action-if-found, action-if-not-found, @ includes) -file}
For each given system header file
&lt;VAR&gt;header-file&lt;/VAR&gt; in the blank-separated
argument list that exists, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;header-file&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals). If &lt;VAR&gt;action-if-found&lt;/VAR&gt; is
given, it is additional shell code to execute when one of the
header files is found. You can give it a value of
&lt;samp&gt;break&lt;/samp&gt; to break out of the loop on the
first match. If &lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is
given, it is executed when one of the header files is not found.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;includes&lt;/VAR&gt; is interpreted as in
&lt;CODE&gt;AC_CHECK_HEADER&lt;/CODE&gt;, in order to choose the
set of preprocessor directives supplied before the header under
test.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_header_&lt;VAR&gt;header-file&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_HEADERS_ONCE">
<prototype>
<parameter content="header-file..."/>
</prototype>
<synopsis>
For each given system header file
&lt;VAR&gt;header-file&lt;/VAR&gt; in the blank-separated
argument list that exists, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;header-file&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals). This is a once-only variant of
&lt;CODE&gt;AC_CHECK_HEADERS&lt;/CODE&gt;. It generates the
checking code at most once, so that
&lt;CODE&gt;configure&lt;/CODE&gt; is smaller and faster; but
the checks cannot be conditionalized and are always done once,
early during the &lt;CODE&gt;configure&lt;/CODE&gt; run. Thus,
this macro is only safe for checking headers that do not have
prerequisites beyond what
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; provides.
</synopsis>
</macro>
<macro id="AC_CHECK_DECL">
<prototype>
<parameter content="symbol"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;symbol&lt;/VAR&gt; (a function, variable, or
constant) is not declared in &lt;VAR&gt;includes&lt;/VAR&gt; and
a declaration is needed, run the shell commands
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt;, otherwise
&lt;VAR&gt;action-if-found&lt;/VAR&gt;.
&lt;VAR&gt;includes&lt;/VAR&gt; is a series of include
directives, defaulting to
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes),
which are used prior to the declaration under test.&lt;/P&gt;&lt;P&gt;
This macro actually tests whether &lt;VAR&gt;symbol&lt;/VAR&gt;
is defined as a macro or can be used as an r-value, not whether
it is really declared, because it is much safer to avoid
introducing extra declarations when they are not needed. In
order to facilitate use of C++ and overloaded function
declarations, it is possible to specify function argument types
in parentheses for types which can be zero-initialized:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_DECL([basename(char *)])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_have_decl_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_DECLS">
<prototype>
<parameter content="symbols"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
For each of the &lt;VAR&gt;symbols&lt;/VAR&gt;
(&lt;EM&gt;comma&lt;/EM&gt;-separated list with optional
function argument types for C++ overloads), define
&lt;CODE&gt;HAVE_DECL_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals) to &lt;samp&gt;1&lt;/samp&gt; if
&lt;VAR&gt;symbol&lt;/VAR&gt; is declared, otherwise to
&lt;samp&gt;0&lt;/samp&gt;. If
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is given, it is
additional shell code to execute when one of the function
declarations is needed, otherwise
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is executed.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;includes&lt;/VAR&gt; is a series of include
directives, defaulting to
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes),
which are used prior to the declarations under test.&lt;/P&gt;&lt;P&gt;
This macro uses an M4 list as first argument:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_DECLS([strdup])
AC_CHECK_DECLS([strlen]) AC_CHECK_DECLS([malloc, realloc,
calloc, free]) AC_CHECK_DECLS([j0], [], [], [[#include
&lt;math.h&gt;]]) AC_CHECK_DECLS([[basename(char *)],
[dirname(char *)]])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Unlike the other &lt;samp&gt;AC_CHECK_*S&lt;/samp&gt; macros,
when a &lt;VAR&gt;symbol&lt;/VAR&gt; is not declared,
&lt;CODE&gt;HAVE_DECL_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
is defined to &lt;samp&gt;0&lt;/samp&gt; instead of leaving
&lt;CODE&gt;HAVE_DECL_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
undeclared. When you are &lt;EM&gt;sure&lt;/EM&gt; that the
check was performed, use
&lt;CODE&gt;HAVE_DECL_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
in &lt;CODE&gt;#if&lt;/CODE&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #if !HAVE_DECL_SYMBOL extern char
*symbol; #endif &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If the test may have not been performed, however, because it is
safer &lt;EM&gt;not&lt;/EM&gt; to declare a symbol than to use a
declaration that conflicts with the system's one, you should
use:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #if defined HAVE_DECL_MALLOC
&amp;&amp; !HAVE_DECL_MALLOC void *malloc (size_t *s); #endif
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
You fall into the second category only in extreme situations:
either your files may be used without being configured, or they
are used during the configuration. In most cases the
traditional approach is enough.&lt;/P&gt;&lt;P&gt;
This macro caches its results in
&lt;CODE&gt;ac_cv_have_decl_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
variables, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_DECLS_ONCE">
<prototype>
<parameter content="symbols"/>
</prototype>
<synopsis>
For each of the &lt;VAR&gt;symbols&lt;/VAR&gt;
(&lt;EM&gt;comma&lt;/EM&gt;-separated list), define
&lt;CODE&gt;HAVE_DECL_&lt;VAR&gt;symbol&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals) to &lt;samp&gt;1&lt;/samp&gt; if
&lt;VAR&gt;symbol&lt;/VAR&gt; is declared in the default include
files, otherwise to &lt;samp&gt;0&lt;/samp&gt;. This is a
once-only variant of &lt;CODE&gt;AC_CHECK_DECLS&lt;/CODE&gt;.
It generates the checking code at most once, so that
&lt;CODE&gt;configure&lt;/CODE&gt; is smaller and faster; but
the checks cannot be conditionalized and are always done once,
early during the &lt;CODE&gt;configure&lt;/CODE&gt; run.
</synopsis>
</macro>
<macro id="AC_STRUCT_DIRENT_D_INO">
<prototype>
</prototype>
<synopsis>
Perform all the actions of
&lt;CODE&gt;AC_HEADER_DIRENT&lt;/CODE&gt; (Particular Headers).
Then, if &lt;CODE&gt;struct dirent&lt;/CODE&gt; contains a
&lt;CODE&gt;d_ino&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_DIRENT_D_INO&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;HAVE_STRUCT_DIRENT_D_INO&lt;/CODE&gt; indicates only
the presence of &lt;CODE&gt;d_ino&lt;/CODE&gt;, not whether its
contents are always reliable. Traditionally, a zero
&lt;CODE&gt;d_ino&lt;/CODE&gt; indicated a deleted directory
entry, though current systems hide this detail from the user and
never return zero &lt;CODE&gt;d_ino&lt;/CODE&gt; values. Many
current systems report an incorrect
&lt;CODE&gt;d_ino&lt;/CODE&gt; for a directory entry that is a
mount point.
</synopsis>
</macro>
<macro id="AC_STRUCT_DIRENT_D_TYPE">
<prototype>
</prototype>
<synopsis>
Perform all the actions of
&lt;CODE&gt;AC_HEADER_DIRENT&lt;/CODE&gt; (Particular Headers).
Then, if &lt;CODE&gt;struct dirent&lt;/CODE&gt; contains a
&lt;CODE&gt;d_type&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_DIRENT_D_TYPE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_STRUCT_ST_BLOCKS">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;struct stat&lt;/CODE&gt; contains an
&lt;CODE&gt;st_blocks&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_STAT_ST_BLOCKS&lt;/CODE&gt;. Otherwise,
require an &lt;CODE&gt;AC_LIBOBJ&lt;/CODE&gt; replacement of
&lt;samp&gt;fileblocks&lt;/samp&gt;. The former name,
&lt;CODE&gt;HAVE_ST_BLOCKS&lt;/CODE&gt; is to be avoided, as its
support will cease in the future.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_member_struct_stat_st_blocks&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_STRUCT_TM">
<prototype>
</prototype>
<synopsis>
time.h sys/time.h If &lt;TT&gt;time.h&lt;/TT&gt; does not
define &lt;CODE&gt;struct tm&lt;/CODE&gt;, define
&lt;CODE&gt;TM_IN_SYS_TIME&lt;/CODE&gt;, which means that
including &lt;TT&gt;sys/time.h&lt;/TT&gt; had better define
&lt;CODE&gt;struct tm&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as &lt;TT&gt;time.h&lt;/TT&gt;
defines &lt;CODE&gt;struct tm&lt;/CODE&gt; in current systems.
New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_STRUCT_TIMEZONE">
<prototype>
</prototype>
<synopsis>
Figure out how to get the current timezone. If
&lt;CODE&gt;struct tm&lt;/CODE&gt; has a
&lt;CODE&gt;tm_zone&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_TM_TM_ZONE&lt;/CODE&gt; (and the
obsoleted &lt;CODE&gt;HAVE_TM_ZONE&lt;/CODE&gt;). Otherwise, if
the external array &lt;CODE&gt;tzname&lt;/CODE&gt; is found,
define &lt;CODE&gt;HAVE_TZNAME&lt;/CODE&gt;; if it is declared,
define &lt;CODE&gt;HAVE_DECL_TZNAME&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CHECK_MEMBER">
<prototype>
</prototype>
<synopsis>
action-if-found, action-if-not-found, @ includes,
AC_INCLUDES_DEFAULT) Check whether
&lt;VAR&gt;member&lt;/VAR&gt; is a member of the aggregate
&lt;VAR&gt;aggregate&lt;/VAR&gt;. If no
&lt;VAR&gt;includes&lt;/VAR&gt; are specified, the default
includes are used (Default Includes).&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_MEMBER([struct
passwd.pw_gecos], [], [AC_MSG_ERROR([we need
`passwd.pw_gecos'])], [[#include
&lt;pwd.h&gt;]])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
You can use this macro for submembers:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_MEMBER(struct
top.middle.bot) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;av_cv_member_&lt;VAR&gt;aggregate&lt;/VAR&gt;_&lt;VAR&gt;member&lt;/VAR&gt;&lt;/CODE&gt;
variable, with characters not suitable for a variable name
mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_MEMBERS">
<prototype>
<parameter content="members"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
Check for the existence of each
&lt;samp&gt;&lt;VAR&gt;aggregate&lt;/VAR&gt;.&lt;VAR&gt;member&lt;/VAR&gt;&lt;/samp&gt;
of &lt;VAR&gt;members&lt;/VAR&gt; using the previous macro.
When &lt;VAR&gt;member&lt;/VAR&gt; belongs to
&lt;VAR&gt;aggregate&lt;/VAR&gt;, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;aggregate&lt;/VAR&gt;_&lt;VAR&gt;member&lt;/VAR&gt;&lt;/CODE&gt;
(in all capitals, with spaces and dots replaced by underscores).
If &lt;VAR&gt;action-if-found&lt;/VAR&gt; is given, it is
executed for each of the found members. If
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is given, it is
executed for each of the members that could not be found.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;includes&lt;/VAR&gt; is a series of include
directives, defaulting to
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes),
which are used prior to the members under test.&lt;/P&gt;&lt;P&gt;
This macro uses M4 lists:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_MEMBERS([struct
stat.st_rdev, struct stat.st_blksize])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_TYPE_GETGROUPS">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;GETGROUPS_T&lt;/CODE&gt; to be whichever
of &lt;CODE&gt;gid_t&lt;/CODE&gt; or
&lt;CODE&gt;int&lt;/CODE&gt; is the base type of the array
argument to &lt;CODE&gt;getgroups&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches the base type in the
&lt;CODE&gt;ac_cv_type_getgroups&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_INT8_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; does not define the type
&lt;CODE&gt;int8_t&lt;/CODE&gt;, define
&lt;CODE&gt;int8_t&lt;/CODE&gt; to a signed integer type that is
exactly 8 bits wide and that uses two's complement
representation, if such a type exists. If you are worried about
porting to hosts that lack such a type, you can use the results
of this macro in C89-or-later code as follows:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #if HAVE_STDINT_H # include
&lt;stdint.h&gt; #endif #if defined INT8_MAX || defined int8_t
&lt;EM&gt;code using int8_t&lt;/EM&gt; #else
&lt;EM&gt;complicated alternative using &gt;8-bit 'signed
char'&lt;/EM&gt; #endif
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro caches the type in the
&lt;CODE&gt;ac_cv_c_int8_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_INT16_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_INT8_T&lt;/CODE&gt;, except
for 16-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_INT32_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_INT8_T&lt;/CODE&gt;, except
for 32-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_INT64_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_INT8_T&lt;/CODE&gt;, except
for 64-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_INTMAX_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; defines the type
&lt;CODE&gt;intmax_t&lt;/CODE&gt;, define
&lt;CODE&gt;HAVE_INTMAX_T&lt;/CODE&gt;. Otherwise, define
&lt;CODE&gt;intmax_t&lt;/CODE&gt; to the widest signed integer
type.
</synopsis>
</macro>
<macro id="AC_TYPE_INTPTR_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; defines the type
&lt;CODE&gt;intptr_t&lt;/CODE&gt;, define
&lt;CODE&gt;HAVE_INTPTR_T&lt;/CODE&gt;. Otherwise, define
&lt;CODE&gt;intptr_t&lt;/CODE&gt; to a signed integer type wide
enough to hold a pointer, if such a type exists.
</synopsis>
</macro>
<macro id="AC_TYPE_LONG_DOUBLE">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;long
double&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_LONG_DOUBLE&lt;/CODE&gt;. The &lt;CODE&gt;long
double&lt;/CODE&gt; type might have the same range and precision
as &lt;CODE&gt;double&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_long_double&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers support
&lt;CODE&gt;long double&lt;/CODE&gt;. New programs need not use
this macro.
</synopsis>
</macro>
<macro id="AC_TYPE_LONG_DOUBLE_WIDER">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;long
double&lt;/CODE&gt; type with more range or precision than the
&lt;CODE&gt;double&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_LONG_DOUBLE_WIDER&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_long_double_wider&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_LONG_LONG_INT">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;long long
int&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_LONG_LONG_INT&lt;/CODE&gt;. However, this test
does not test &lt;CODE&gt;long long int&lt;/CODE&gt; values in
preprocessor &lt;CODE&gt;#if&lt;/CODE&gt; expressions, because
too many compilers mishandle such expressions. .&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_long_long_int&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_MBSTATE_T">
<prototype>
</prototype>
<synopsis>
wchar.h Define &lt;CODE&gt;HAVE_MBSTATE_T&lt;/CODE&gt; if
&lt;CODE&gt;&lt;wchar.h&gt;&lt;/CODE&gt; declares the
&lt;CODE&gt;mbstate_t&lt;/CODE&gt; type. Also, define
&lt;CODE&gt;mbstate_t&lt;/CODE&gt; to be a type if
&lt;CODE&gt;&lt;wchar.h&gt;&lt;/CODE&gt; does not declare it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_mbstate_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_MODE_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;mode_t&lt;/CODE&gt; to a suitable type, if
standard headers do not define it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_mode_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_OFF_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;off_t&lt;/CODE&gt; to a suitable type, if
standard headers do not define it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_off_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_PID_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;pid_t&lt;/CODE&gt; to a suitable type, if
standard headers do not define it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_pid_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_SIZE_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;size_t&lt;/CODE&gt; to a suitable type, if
standard headers do not define it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_size_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_SSIZE_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;ssize_t&lt;/CODE&gt; to a suitable type,
if standard headers do not define it.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_ssize_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_UID_T">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;uid_t&lt;/CODE&gt; and
&lt;CODE&gt;gid_t&lt;/CODE&gt; to suitable types, if standard
headers do not define them.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_uid_t&lt;/CODE&gt; variable.
</synopsis>
</macro>
<macro id="AC_TYPE_UINT8_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; does not define the type
&lt;CODE&gt;uint8_t&lt;/CODE&gt;, define
&lt;CODE&gt;uint8_t&lt;/CODE&gt; to an unsigned integer type
that is exactly 8 bits wide, if such a type exists. This is like
&lt;CODE&gt;AC_TYPE_INT8_T&lt;/CODE&gt;, except for unsigned
integers.
</synopsis>
</macro>
<macro id="AC_TYPE_UINT16_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_UINT8_T&lt;/CODE&gt;,
except for 16-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_UINT32_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_UINT8_T&lt;/CODE&gt;,
except for 32-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_UINT64_T">
<prototype>
</prototype>
<synopsis>
This is like &lt;CODE&gt;AC_TYPE_UINT8_T&lt;/CODE&gt;,
except for 64-bit integers.
</synopsis>
</macro>
<macro id="AC_TYPE_UINTMAX_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; defines the type
&lt;CODE&gt;uintmax_t&lt;/CODE&gt;, define
&lt;CODE&gt;HAVE_UINTMAX_T&lt;/CODE&gt;. Otherwise, define
&lt;CODE&gt;uintmax_t&lt;/CODE&gt; to the widest unsigned
integer type.
</synopsis>
</macro>
<macro id="AC_TYPE_UINTPTR_T">
<prototype>
</prototype>
<synopsis>
If &lt;TT&gt;stdint.h&lt;/TT&gt; or
&lt;TT&gt;inttypes.h&lt;/TT&gt; defines the type
&lt;CODE&gt;uintptr_t&lt;/CODE&gt;, define
&lt;CODE&gt;HAVE_UINTPTR_T&lt;/CODE&gt;. Otherwise, define
&lt;CODE&gt;uintptr_t&lt;/CODE&gt; to an unsigned integer type
wide enough to hold a pointer, if such a type exists.
</synopsis>
</macro>
<macro id="AC_TYPE_UNSIGNED_LONG_LONG_INT">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;unsigned
long long int&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_UNSIGNED_LONG_LONG_INT&lt;/CODE&gt;. However,
this test does not test &lt;CODE&gt;unsigned long long
int&lt;/CODE&gt; values in preprocessor
&lt;CODE&gt;#if&lt;/CODE&gt; expressions, because too many
compilers mishandle such expressions. .&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_unsigned_long_long_int&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_CHECK_TYPE">
<prototype>
<parameter content="type"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
Check whether &lt;VAR&gt;type&lt;/VAR&gt; is defined. It may
be a compiler builtin type or defined by the
&lt;VAR&gt;includes&lt;/VAR&gt;.
&lt;VAR&gt;includes&lt;/VAR&gt; is a series of include
directives, defaulting to
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes),
which are used prior to the type under test.&lt;/P&gt;&lt;P&gt;
In C, &lt;VAR&gt;type&lt;/VAR&gt; must be a type-name, so that
the expression &lt;samp&gt;sizeof
(&lt;VAR&gt;type&lt;/VAR&gt;)&lt;/samp&gt; is valid (but
&lt;samp&gt;sizeof ((&lt;VAR&gt;type&lt;/VAR&gt;))&lt;/samp&gt;
is not). The same test is applied when compiling for C++, which
means that in C++ &lt;VAR&gt;type&lt;/VAR&gt; should be a
type-id and should not be an anonymous
&lt;samp&gt;struct&lt;/samp&gt; or
&lt;samp&gt;union&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_type_&lt;VAR&gt;type&lt;/VAR&gt;&lt;/CODE&gt;
variable, with &lt;samp&gt;*&lt;/samp&gt; mapped to
&lt;samp&gt;p&lt;/samp&gt; and other characters not suitable for
a variable name mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_TYPES">
<prototype>
<parameter content="types"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
For each &lt;VAR&gt;type&lt;/VAR&gt; of the
&lt;VAR&gt;types&lt;/VAR&gt; that is defined, define
&lt;CODE&gt;HAVE_&lt;VAR&gt;type&lt;/VAR&gt;&lt;/CODE&gt; (in
all capitals). Each &lt;VAR&gt;type&lt;/VAR&gt; must follow the
rules of &lt;CODE&gt;AC_CHECK_TYPE&lt;/CODE&gt;. If no
&lt;VAR&gt;includes&lt;/VAR&gt; are specified, the default
includes are used (Default Includes). If
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is given, it is
additional shell code to execute when one of the types is found.
If &lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is given, it is
executed when one of the types is not found.&lt;/P&gt;&lt;P&gt;
This macro uses M4 lists:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_TYPES([unsigned long long int, uintmax_t])
AC_CHECK_TYPES([float_t], [], [], [[#include &lt;math.h&gt;]])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AC_CHECK_SIZEOF">
<prototype>
<parameter content="type-or-expr"/>
<parameter content="[unused]"/>
<parameter content="@ [includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
-or-expr} -or-expr} Define
&lt;CODE&gt;SIZEOF_&lt;VAR&gt;type-or-expr&lt;/VAR&gt;&lt;/CODE&gt;
(Standard Symbols) to be the size in bytes of
&lt;VAR&gt;type-or-expr&lt;/VAR&gt;, which may be either a type
or an expression returning a value that has a size. If the
expression &lt;samp&gt;sizeof
(&lt;VAR&gt;type-or-expr&lt;/VAR&gt;)&lt;/samp&gt; is invalid,
the result is 0. &lt;VAR&gt;includes&lt;/VAR&gt; is a series of
include directives, defaulting to
&lt;CODE&gt;AC_INCLUDES_DEFAULT&lt;/CODE&gt; (Default Includes),
which are used prior to the expression under test.&lt;/P&gt;&lt;P&gt;
This macro now works even when cross-compiling. The
&lt;VAR&gt;unused&lt;/VAR&gt; argument was used when
cross-compiling.&lt;/P&gt;&lt;P&gt;
For example, the call&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_SIZEOF([int *])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
defines &lt;CODE&gt;SIZEOF_INT_P&lt;/CODE&gt; to be 8 on DEC
Alpha AXP systems.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_sizeof_&lt;VAR&gt;type-or-expr&lt;/VAR&gt;&lt;/CODE&gt;
variable, with &lt;samp&gt;*&lt;/samp&gt; mapped to
&lt;samp&gt;p&lt;/samp&gt; and other characters not suitable for
a variable name mapped to underscores.
</synopsis>
</macro>
<macro id="AC_CHECK_ALIGNOF">
<prototype>
<parameter content="type"/>
<parameter content="[includes= AC_INCLUDES_DEFAULT]"/>
</prototype>
<synopsis>
-or-expr} Define
&lt;CODE&gt;ALIGNOF_&lt;VAR&gt;type&lt;/VAR&gt;&lt;/CODE&gt;
(Standard Symbols) to be the alignment in bytes of
&lt;VAR&gt;type&lt;/VAR&gt;.
&lt;samp&gt;&lt;VAR&gt;type&lt;/VAR&gt; y;&lt;/samp&gt; must be
valid as a structure member declaration. If
&lt;samp&gt;type&lt;/samp&gt; is unknown, the result is 0. If
no &lt;VAR&gt;includes&lt;/VAR&gt; are specified, the default
includes are used (Default Includes).&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_alignof_&lt;VAR&gt;type-or-expr&lt;/VAR&gt;&lt;/CODE&gt;
variable, with &lt;samp&gt;*&lt;/samp&gt; mapped to
&lt;samp&gt;p&lt;/samp&gt; and other characters not suitable for
a variable name mapped to underscores.
</synopsis>
</macro>
<macro id="AC_COMPUTE_INT">
<prototype>
<parameter content="var"/>
<parameter content="expression"/>
<parameter content="@ [includes= AC_INCLUDES_DEFAULT]"/>
<parameter content="[action-if-fails]"/>
</prototype>
<synopsis>
Store into the shell variable &lt;VAR&gt;var&lt;/VAR&gt; the
value of the integer &lt;VAR&gt;expression&lt;/VAR&gt;. The
value should fit in an initializer in a C variable of type
&lt;CODE&gt;signed long&lt;/CODE&gt;. To support cross
compilation (in which case, the macro only works on hosts that
use twos-complement arithmetic), it should be possible to
evaluate the expression at compile-time. If no
&lt;VAR&gt;includes&lt;/VAR&gt; are specified, the default
includes are used (Default Includes).&lt;/P&gt;&lt;P&gt;
Execute &lt;VAR&gt;action-if-fails&lt;/VAR&gt; if the value
cannot be determined correctly.
</synopsis>
</macro>
<macro id="AC_LANG_WERROR">
<prototype>
</prototype>
<synopsis>
Normally Autoconf ignores warnings generated by the compiler,
linker, and preprocessor. If this macro is used, warnings count
as fatal errors for the current language. This macro is useful
when the results of configuration are used where warnings are
unacceptable; for instance, if parts of a program are built with
the GCC &lt;samp&gt;-Werror&lt;/samp&gt; option. If the whole
program is built using &lt;samp&gt;-Werror&lt;/samp&gt; it is
often simpler to put &lt;samp&gt;-Werror&lt;/samp&gt; in the
compiler flags (&lt;CODE&gt;CFLAGS&lt;/CODE&gt;, etc.).
</synopsis>
</macro>
<macro id="AC_OPENMP">
<prototype>
</prototype>
<synopsis>
http://@/www.openmp.org/, OpenMP specifies extensions of
C, C++, and Fortran that simplify optimization of shared memory
parallelism, which is a common problem on multicore CPUs.&lt;/P&gt;&lt;P&gt;
If the current language is C, the macro
&lt;CODE&gt;AC_OPENMP&lt;/CODE&gt; sets the variable
&lt;CODE&gt;OPENMP_CFLAGS&lt;/CODE&gt; to the C compiler flags
needed for supporting OpenMP@.
&lt;CODE&gt;OPENMP_CFLAGS&lt;/CODE&gt; is set to empty if the
compiler already supports OpenMP, if it has no way to activate
OpenMP support, or if the user rejects OpenMP support by
invoking &lt;samp&gt;configure&lt;/samp&gt; with the
&lt;samp&gt;--disable-openmp&lt;/samp&gt; option.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;OPENMP_CFLAGS&lt;/CODE&gt; needs to be used when
compiling programs, when preprocessing program source, and when
linking programs. Therefore you need to add
&lt;CODE&gt;$(OPENMP_CFLAGS)&lt;/CODE&gt; to the
&lt;CODE&gt;CFLAGS&lt;/CODE&gt; of C programs that use OpenMP@.
If you preprocess OpenMP-specific C code, you also need to add
&lt;CODE&gt;$(OPENMP_CFLAGS)&lt;/CODE&gt; to
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt;. The presence of OpenMP
support is revealed at compile time by the preprocessor macro
&lt;CODE&gt;_OPENMP&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Linking a program with &lt;CODE&gt;OPENMP_CFLAGS&lt;/CODE&gt;
typically adds one more shared library to the program's
dependencies, so its use is recommended only on programs that
actually require OpenMP.&lt;/P&gt;&lt;P&gt;
If the current language is C++,
&lt;CODE&gt;AC_OPENMP&lt;/CODE&gt; sets the variable
&lt;CODE&gt;OPENMP_CXXFLAGS&lt;/CODE&gt;, suitably for the C++
compiler. The same remarks hold as for C.&lt;/P&gt;&lt;P&gt;
If the current language is Fortran 77 or Fortran,
&lt;CODE&gt;AC_OPENMP&lt;/CODE&gt; sets the variable
&lt;CODE&gt;OPENMP_FFLAGS&lt;/CODE&gt; or
&lt;CODE&gt;OPENMP_FCFLAGS&lt;/CODE&gt;, respectively. Similar
remarks as for C hold, except that
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; is not used for Fortran, and
no preprocessor macro signals OpenMP support.&lt;/P&gt;&lt;P&gt;
For portability, it is best to avoid spaces between
&lt;samp&gt;#&lt;/samp&gt; and &lt;samp&gt;pragma
omp&lt;/samp&gt;. That is, write &lt;samp&gt;#pragma
omp&lt;/samp&gt;, not &lt;samp&gt;# pragma omp&lt;/samp&gt;.
The Sun WorkShop 6.2 C compiler chokes on the latter.
</synopsis>
</macro>
<macro id="AC_PROG_CC">
<prototype>
<parameter content="[compiler-search-list]"/>
</prototype>
<synopsis>
Determine a C compiler to use. If
&lt;CODE&gt;CC&lt;/CODE&gt; is not already set in the
environment, check for &lt;CODE&gt;gcc&lt;/CODE&gt; and
&lt;CODE&gt;cc&lt;/CODE&gt;, then for other C compilers. Set
output variable &lt;CODE&gt;CC&lt;/CODE&gt; to the name of the
compiler found.&lt;/P&gt;&lt;P&gt;
This macro may, however, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
C compilers to search for. This just gives the user an
opportunity to specify an alternative search list for the C
compiler. For example, if you didn't like the default order,
then you could invoke &lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt; like
this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_CC([gcc cl cc])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If the C compiler does not handle function prototypes correctly
by default, try to add an option to output variable
&lt;CODE&gt;CC&lt;/CODE&gt; to make it so. This macro tries
various options that select standard-conformance modes on
various systems.&lt;/P&gt;&lt;P&gt;
After calling this macro you can check whether the C compiler
has been set to accept ANSI C89 (ISO C90); if not, the shell
variable &lt;CODE&gt;ac_cv_prog_cc_c89&lt;/CODE&gt; is set to
&lt;samp&gt;no&lt;/samp&gt;. See also
&lt;CODE&gt;AC_C_PROTOTYPES&lt;/CODE&gt; below.&lt;/P&gt;&lt;P&gt;
If using the GNU C compiler, set shell variable
&lt;CODE&gt;GCC&lt;/CODE&gt; to &lt;samp&gt;yes&lt;/samp&gt;.
If output variable &lt;CODE&gt;CFLAGS&lt;/CODE&gt; was not
already set, set it to &lt;samp&gt;-g -O2&lt;/samp&gt; for the
GNU C compiler (&lt;samp&gt;-O2&lt;/samp&gt; on systems where
GCC does not accept &lt;samp&gt;-g&lt;/samp&gt;), or
&lt;samp&gt;-g&lt;/samp&gt; for other compilers. If your
package does not like this default, then it is acceptable to
insert the line &lt;samp&gt;: $CFLAGS=""@&lt;/samp&gt; after
&lt;CODE&gt;AC_INIT&lt;/CODE&gt; and before
&lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt; to select an empty default
instead.&lt;/P&gt;&lt;P&gt;
Many Autoconf macros use a compiler, and thus call
&lt;samp&gt;AC_REQUIRE([AC_PROG_CC])&lt;/samp&gt; to ensure that
the compiler has been determined before the body of the
outermost &lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; macro. Although
&lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt; is safe to directly expand
multiple times, it performs certain checks (such as the proper
value of EXEEXT) only on the first invocation. Therefore, care
must be used when invoking this macro from within another macro
rather than at the top level (Expanded Before Required).
</synopsis>
</macro>
<macro id="AC_PROG_CC_C_O">
<prototype>
</prototype>
<synopsis>
If the C compiler does not accept the
&lt;samp&gt;-c&lt;/samp&gt; and &lt;samp&gt;-o&lt;/samp&gt;
options simultaneously, define
&lt;CODE&gt;NO_MINUS_C_MINUS_O&lt;/CODE&gt;. This macro
actually tests both the compiler found by
&lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt;, and, if different, the
first &lt;CODE&gt;cc&lt;/CODE&gt; in the path. The test fails
if one fails. This macro was created for GNU Make to choose the
default C compilation rule.&lt;/P&gt;&lt;P&gt;
For the compiler &lt;VAR&gt;compiler&lt;/VAR&gt;, this macro
caches its result in the
&lt;CODE&gt;ac_cv_prog_cc_&lt;VAR&gt;compiler&lt;/VAR&gt;_c_o&lt;/CODE&gt;
variable.
</synopsis>
</macro>
<macro id="AC_PROG_CPP">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;CPP&lt;/CODE&gt; to a command
that runs the C preprocessor. If &lt;samp&gt;$CC
-E&lt;/samp&gt; doesn't work, &lt;TT&gt;/lib/cpp&lt;/TT&gt; is
used. It is only portable to run &lt;CODE&gt;CPP&lt;/CODE&gt; on
files with a &lt;TT&gt;.c&lt;/TT&gt; extension.&lt;/P&gt;&lt;P&gt;
Some preprocessors don't indicate missing include files by the
error status. For such preprocessors an internal variable is
set that causes other macros to check the standard error from
the preprocessor and consider the test failed if any warnings
have been reported. For most preprocessors, though, warnings do
not cause include-file tests to fail unless
&lt;CODE&gt;AC_PROG_CPP_WERROR&lt;/CODE&gt; is also specified.
</synopsis>
</macro>
<macro id="AC_PROG_CPP_WERROR">
<prototype>
</prototype>
<synopsis>
This acts like &lt;CODE&gt;AC_PROG_CPP&lt;/CODE&gt;, except it
treats warnings from the preprocessor as errors even if the
preprocessor exit status indicates success. This is useful for
avoiding headers that generate mandatory warnings, such as
deprecation notices.
</synopsis>
</macro>
<macro id="AC_PROG_CC_STDC">
<prototype>
</prototype>
<synopsis>
If the C compiler cannot compile ISO Standard C (currently
C99), try to add an option to output variable
&lt;CODE&gt;CC&lt;/CODE&gt; to make it work. If the compiler
does not support C99, fall back to supporting ANSI C89 (ISO
C90).&lt;/P&gt;&lt;P&gt;
After calling this macro you can check whether the C compiler
has been set to accept Standard C; if not, the shell variable
&lt;CODE&gt;ac_cv_prog_cc_stdc&lt;/CODE&gt; is set to
&lt;samp&gt;no&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_CC_C89">
<prototype>
</prototype>
<synopsis>
If the C compiler is not in ANSI C89 (ISO C90) mode by
default, try to add an option to output variable
&lt;CODE&gt;CC&lt;/CODE&gt; to make it so. This macro tries
various options that select ANSI C89 on some system or another,
preferring extended functionality modes over strict conformance
modes. It considers the compiler to be in ANSI C89 mode if it
handles function prototypes correctly.&lt;/P&gt;&lt;P&gt;
After calling this macro you can check whether the C compiler
has been set to accept ANSI C89; if not, the shell variable
&lt;CODE&gt;ac_cv_prog_cc_c89&lt;/CODE&gt; is set to
&lt;samp&gt;no&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This macro is called automatically by
&lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PROG_CC_C99">
<prototype>
</prototype>
<synopsis>
If the C compiler is not in C99 mode by default, try to add an
option to output variable &lt;CODE&gt;CC&lt;/CODE&gt; to make it
so. This macro tries various options that select C99 on some
system or another, preferring extended functionality modes over
strict conformance modes. It considers the compiler to be in
C99 mode if it handles &lt;CODE&gt;_Bool&lt;/CODE&gt;,
&lt;CODE&gt;//&lt;/CODE&gt; comments, flexible array members,
&lt;CODE&gt;inline&lt;/CODE&gt;, signed and unsigned
&lt;CODE&gt;long long int&lt;/CODE&gt;, mixed code and
declarations, named initialization of structs,
&lt;CODE&gt;restrict&lt;/CODE&gt;,
&lt;CODE&gt;va_copy&lt;/CODE&gt;, varargs macros, variable
declarations in &lt;CODE&gt;for&lt;/CODE&gt; loops, and variable
length arrays.&lt;/P&gt;&lt;P&gt;
After calling this macro you can check whether the C compiler
has been set to accept C99; if not, the shell variable
&lt;CODE&gt;ac_cv_prog_cc_c99&lt;/CODE&gt; is set to
&lt;samp&gt;no&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AC_C_BACKSLASH_A">
<prototype>
</prototype>
<synopsis>
Define &lt;samp&gt;HAVE_C_BACKSLASH_A&lt;/samp&gt; to 1 if the
C compiler understands &lt;samp&gt;\a&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers understand
&lt;samp&gt;\a&lt;/samp&gt;. New programs need not use this
macro.
</synopsis>
</macro>
<macro id="AC_C_BIGENDIAN">
<prototype>
<parameter content="[action-if-true]"/>
<parameter content="[action-if-false]"/>
<parameter content="@ [action-if-unknown]"/>
<parameter content="[action-if-universal]"/>
</prototype>
<synopsis>
If words are stored with the most significant byte first
(like Motorola and SPARC CPUs), execute
&lt;VAR&gt;action-if-true&lt;/VAR&gt;. If words are stored with
the least significant byte first (like Intel and VAX CPUs),
execute &lt;VAR&gt;action-if-false&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
This macro runs a test-case if endianness cannot be determined
from the system header files. When cross-compiling, the
test-case is not run but grep'ed for some magic values.
&lt;VAR&gt;action-if-unknown&lt;/VAR&gt; is executed if the
latter case fails to determine the byte sex of the host system.&lt;/P&gt;&lt;P&gt;
In some cases a single run of a compiler can generate code for
multiple architectures. This can happen, for example, when
generating Mac OS X universal binary files, which work on both
PowerPC and Intel architectures. In this case, the different
variants might be for different architectures whose endiannesses
differ. If &lt;CODE&gt;configure&lt;/CODE&gt; detects this, it
executes &lt;VAR&gt;action-if-universal&lt;/VAR&gt; instead of
&lt;VAR&gt;action-if-unknown&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The default for &lt;VAR&gt;action-if-true&lt;/VAR&gt; is to
define &lt;samp&gt;WORDS_BIGENDIAN&lt;/samp&gt;. The default
for &lt;VAR&gt;action-if-false&lt;/VAR&gt; is to do nothing.
The default for &lt;VAR&gt;action-if-unknown&lt;/VAR&gt; is to
abort configure and tell the installer how to bypass this test.
And finally, the default for
&lt;VAR&gt;action-if-universal&lt;/VAR&gt; is to ensure that
&lt;samp&gt;WORDS_BIGENDIAN&lt;/samp&gt; is defined if and only
if a universal build is detected and the current code is
big-endian; this default works only if
&lt;CODE&gt;autoheader&lt;/CODE&gt; is used (autoheader
Invocation).&lt;/P&gt;&lt;P&gt;
If you use this macro without specifying
&lt;VAR&gt;action-if-universal&lt;/VAR&gt;, you should also use
&lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt;; otherwise
&lt;samp&gt;WORDS_BIGENDIAN&lt;/samp&gt; may be set incorrectly
for Mac OS X universal binary files.
</synopsis>
</macro>
<macro id="AC_C_CONST">
<prototype>
</prototype>
<synopsis>
If the C compiler does not fully support the
&lt;CODE&gt;const&lt;/CODE&gt; keyword, define
&lt;CODE&gt;const&lt;/CODE&gt; to be empty. Some C compilers
that do not define &lt;CODE&gt;__STDC__&lt;/CODE&gt; do support
&lt;CODE&gt;const&lt;/CODE&gt;; some compilers that define
&lt;CODE&gt;__STDC__&lt;/CODE&gt; do not completely support
&lt;CODE&gt;const&lt;/CODE&gt;. Programs can simply use
&lt;CODE&gt;const&lt;/CODE&gt; as if every C compiler supported
it; for those that don't, the makefile or configuration header
file defines it as empty.&lt;/P&gt;&lt;P&gt;
Occasionally installers use a C++ compiler to compile C code,
typically because they lack a C compiler. This causes problems
with &lt;CODE&gt;const&lt;/CODE&gt;, because C and C++ treat
&lt;CODE&gt;const&lt;/CODE&gt; differently. For example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; const int foo;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
is valid in C but not in C++. These differences unfortunately
cannot be papered over by defining
&lt;CODE&gt;const&lt;/CODE&gt; to be empty.&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;autoconf&lt;/CODE&gt; detects this situation, it
leaves &lt;CODE&gt;const&lt;/CODE&gt; alone, as this generally
yields better results in practice. However, using a C++
compiler to compile C code is not recommended or supported, and
installers who run into trouble in this area should get a C
compiler like GCC to compile their C code.&lt;/P&gt;&lt;P&gt;
This macro caches its result in the
&lt;CODE&gt;ac_cv_c_const&lt;/CODE&gt; variable.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers support
&lt;CODE&gt;const&lt;/CODE&gt;. New programs need not use this
macro.
</synopsis>
</macro>
<macro id="AC_C_RESTRICT">
<prototype>
</prototype>
<synopsis>
If the C compiler recognizes a variant spelling for the
&lt;CODE&gt;restrict&lt;/CODE&gt; keyword
(&lt;CODE&gt;__restrict&lt;/CODE&gt;,
&lt;CODE&gt;__restrict__&lt;/CODE&gt;, or
&lt;CODE&gt;_Restrict&lt;/CODE&gt;), then define
&lt;CODE&gt;restrict&lt;/CODE&gt; to that; this is more likely
to do the right thing with compilers that support language
variants where plain &lt;CODE&gt;restrict&lt;/CODE&gt; is not a
keyword. Otherwise, if the C compiler recognizes the
&lt;CODE&gt;restrict&lt;/CODE&gt; keyword, don't do anything.
Otherwise, define &lt;CODE&gt;restrict&lt;/CODE&gt; to be empty.
Thus, programs may simply use &lt;CODE&gt;restrict&lt;/CODE&gt;
as if every C compiler supported it; for those that do not, the
makefile or configuration header defines it away.&lt;/P&gt;&lt;P&gt;
Although support in C++ for the
&lt;CODE&gt;restrict&lt;/CODE&gt; keyword is not required,
several C++ compilers do accept the keyword. This macro works
for them, too.&lt;/P&gt;&lt;P&gt;
This macro caches &lt;samp&gt;no&lt;/samp&gt; in the
&lt;CODE&gt;ac_cv_c_restrict&lt;/CODE&gt; variable if
&lt;CODE&gt;restrict&lt;/CODE&gt; is not supported, and a
supported spelling otherwise.
</synopsis>
</macro>
<macro id="AC_C_VOLATILE">
<prototype>
</prototype>
<synopsis>
If the C compiler does not understand the keyword
&lt;CODE&gt;volatile&lt;/CODE&gt;, define
&lt;CODE&gt;volatile&lt;/CODE&gt; to be empty. Programs can
simply use &lt;CODE&gt;volatile&lt;/CODE&gt; as if every C
compiler supported it; for those that do not, the makefile or
configuration header defines it as empty.&lt;/P&gt;&lt;P&gt;
If the correctness of your program depends on the semantics of
&lt;CODE&gt;volatile&lt;/CODE&gt;, simply defining it to be
empty does, in a sense, break your code. However, given that
the compiler does not support &lt;CODE&gt;volatile&lt;/CODE&gt;,
you are at its mercy anyway. At least your program compiles,
when it wouldn't before. , for more about
&lt;CODE&gt;volatile&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
In general, the &lt;CODE&gt;volatile&lt;/CODE&gt; keyword is a
standard C feature, so you might expect that
&lt;CODE&gt;volatile&lt;/CODE&gt; is available only when
&lt;CODE&gt;__STDC__&lt;/CODE&gt; is defined. However, Ultrix
4.3's native compiler does support volatile, but does not define
&lt;CODE&gt;__STDC__&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers support
&lt;CODE&gt;volatile&lt;/CODE&gt;. New programs need not use
this macro.
</synopsis>
</macro>
<macro id="AC_C_INLINE">
<prototype>
</prototype>
<synopsis>
If the C compiler supports the keyword
&lt;CODE&gt;inline&lt;/CODE&gt;, do nothing. Otherwise define
&lt;CODE&gt;inline&lt;/CODE&gt; to
&lt;CODE&gt;__inline__&lt;/CODE&gt; or
&lt;CODE&gt;__inline&lt;/CODE&gt; if it accepts one of those,
otherwise define &lt;CODE&gt;inline&lt;/CODE&gt; to be empty.
</synopsis>
</macro>
<macro id="AC_C_CHAR_UNSIGNED">
<prototype>
</prototype>
<synopsis>
If the C type &lt;CODE&gt;char&lt;/CODE&gt; is unsigned,
define &lt;CODE&gt;__CHAR_UNSIGNED__&lt;/CODE&gt;, unless the C
compiler predefines it.&lt;/P&gt;&lt;P&gt;
These days, using this macro is not necessary. The same
information can be determined by this portable alternative, thus
avoiding the use of preprocessor macros in the namespace
reserved for the implementation.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #include &lt;limits.h&gt; #if
CHAR_MIN == 0 # define CHAR_UNSIGNED 1 #endif
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_C_STRINGIZE">
<prototype>
</prototype>
<synopsis>
If the C preprocessor supports the stringizing operator,
define &lt;CODE&gt;HAVE_STRINGIZE&lt;/CODE&gt;. The stringizing
operator is &lt;samp&gt;#&lt;/samp&gt; and is found in macros
such as this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #define x(y) #y
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers support the
stringizing operator. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_C_FLEXIBLE_ARRAY_MEMBER">
<prototype>
</prototype>
<synopsis>
If the C compiler supports flexible array members, define
&lt;CODE&gt;FLEXIBLE_ARRAY_MEMBER&lt;/CODE&gt; to nothing;
otherwise define it to 1. That way, a declaration like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; struct s size_t n_vals;
double val[FLEXIBLE_ARRAY_MEMBER]; @;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
will let applications use the ``struct hack'' even with
compilers that do not support flexible array members. To
allocate and use such an object, you can use code like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; size_t i; size_t n =
compute_value_count (); struct s *p = malloc (offsetof
(struct s, val) + n * sizeof (double)); p-&gt;n_vals
= n; for (i = 0; i &lt; n; i++) p-&gt;val[i] = compute_value
(i); &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_C_VARARRAYS">
<prototype>
</prototype>
<synopsis>
If the C compiler supports variable-length arrays, define
&lt;CODE&gt;HAVE_C_VARARRAYS&lt;/CODE&gt;. A variable-length
array is an array of automatic storage duration whose length is
determined at run time, when the array is declared.
</synopsis>
</macro>
<macro id="AC_C_TYPEOF">
<prototype>
</prototype>
<synopsis>
If the C compiler supports GCC's
&lt;CODE&gt;typeof&lt;/CODE&gt; syntax either directly or
through a different spelling of the keyword (e.g.,
&lt;CODE&gt;__typeof__&lt;/CODE&gt;), define
&lt;CODE&gt;HAVE_TYPEOF&lt;/CODE&gt;. If the support is
available only through a different spelling, define
&lt;CODE&gt;typeof&lt;/CODE&gt; to that spelling.
</synopsis>
</macro>
<macro id="AC_C_PROTOTYPES">
<prototype>
</prototype>
<synopsis>
If function prototypes are understood by the compiler (as
determined by &lt;CODE&gt;AC_PROG_CC&lt;/CODE&gt;), define
&lt;CODE&gt;PROTOTYPES&lt;/CODE&gt; and
&lt;CODE&gt;__PROTOTYPES&lt;/CODE&gt;. Defining
&lt;CODE&gt;__PROTOTYPES&lt;/CODE&gt; is for the benefit of
header files that cannot use macros that infringe on user name
space.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, as current C compilers support
prototypes. New programs need not use this macro.
</synopsis>
</macro>
<macro id="AC_PROG_GCC_TRADITIONAL">
<prototype>
</prototype>
<synopsis>
Add &lt;samp&gt;-traditional&lt;/samp&gt; to output variable
&lt;CODE&gt;CC&lt;/CODE&gt; if using the GNU C compiler and
&lt;CODE&gt;ioctl&lt;/CODE&gt; does not work properly without
&lt;samp&gt;-traditional&lt;/samp&gt;. That usually happens
when the fixed header files have not been installed on an old
system.&lt;/P&gt;&lt;P&gt;
This macro is obsolescent, since current versions of the GNU C
compiler fix the header files automatically when installed.
</synopsis>
</macro>
<macro id="AC_PROG_CXX">
<prototype>
<parameter content="[compiler-search-list]"/>
</prototype>
<synopsis>
Determine a C++ compiler to use. Check whether the
environment variable &lt;CODE&gt;CXX&lt;/CODE&gt; or
&lt;CODE&gt;CCC&lt;/CODE&gt; (in that order) is set; if so, then
set output variable &lt;CODE&gt;CXX&lt;/CODE&gt; to its value.&lt;/P&gt;&lt;P&gt;
Otherwise, if the macro is invoked without an argument, then
search for a C++ compiler under the likely names (first
&lt;CODE&gt;g++&lt;/CODE&gt; and &lt;CODE&gt;c++&lt;/CODE&gt;
then other names). If none of those checks succeed, then as a
last resort set &lt;CODE&gt;CXX&lt;/CODE&gt; to
&lt;CODE&gt;g++&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro may, however, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
C++ compilers to search for. This just gives the user an
opportunity to specify an alternative search list for the C++
compiler. For example, if you didn't like the default order,
then you could invoke &lt;CODE&gt;AC_PROG_CXX&lt;/CODE&gt; like
this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_CXX([gcc cl KCC CC cxx cc++
xlC aCC c++ g++])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If using the GNU C++ compiler, set shell variable
&lt;CODE&gt;GXX&lt;/CODE&gt; to &lt;samp&gt;yes&lt;/samp&gt;.
If output variable &lt;CODE&gt;CXXFLAGS&lt;/CODE&gt; was not
already set, set it to &lt;samp&gt;-g -O2&lt;/samp&gt; for the
GNU C++ compiler (&lt;samp&gt;-O2&lt;/samp&gt; on systems where
G++ does not accept &lt;samp&gt;-g&lt;/samp&gt;), or
&lt;samp&gt;-g&lt;/samp&gt; for other compilers. If your
package does not like this default, then it is acceptable to
insert the line &lt;samp&gt;: $CXXFLAGS=""@&lt;/samp&gt; after
&lt;CODE&gt;AC_INIT&lt;/CODE&gt; and before
&lt;CODE&gt;AC_PROG_CXX&lt;/CODE&gt; to select an empty default
instead.&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AC_PROG_CXXCPP">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;CXXCPP&lt;/CODE&gt; to a
command that runs the C++ preprocessor. If &lt;samp&gt;$CXX
-E&lt;/samp&gt; doesn't work, &lt;TT&gt;/lib/cpp&lt;/TT&gt; is
used. It is portable to run &lt;CODE&gt;CXXCPP&lt;/CODE&gt; only
on files with a &lt;TT&gt;.c&lt;/TT&gt;,
&lt;TT&gt;.C&lt;/TT&gt;, &lt;TT&gt;.cc&lt;/TT&gt;, or
&lt;TT&gt;.cpp&lt;/TT&gt; extension.&lt;/P&gt;&lt;P&gt;
Some preprocessors don't indicate missing include files by the
error status. For such preprocessors an internal variable is
set that causes other macros to check the standard error from
the preprocessor and consider the test failed if any warnings
have been reported. However, it is not known whether such
broken preprocessors exist for C++.
</synopsis>
</macro>
<macro id="AC_PROG_CXX_C_O">
<prototype>
</prototype>
<synopsis>
Test whether the C++ compiler accepts the options
&lt;samp&gt;-c&lt;/samp&gt; and &lt;samp&gt;-o&lt;/samp&gt;
simultaneously, and define
&lt;CODE&gt;CXX_NO_MINUS_C_MINUS_O&lt;/CODE&gt;, if it does not.
</synopsis>
</macro>
<macro id="AC_PROG_OBJC">
<prototype>
<parameter content="[compiler-search-list]"/>
</prototype>
<synopsis>
Determine an Objective C compiler to use. If
&lt;CODE&gt;OBJC&lt;/CODE&gt; is not already set in the
environment, check for Objective C compilers. Set output
variable &lt;CODE&gt;OBJC&lt;/CODE&gt; to the name of the
compiler found.&lt;/P&gt;&lt;P&gt;
This macro may, however, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
Objective C compilers to search for. This just gives the user
an opportunity to specify an alternative search list for the
Objective C compiler. For example, if you didn't like the
default order, then you could invoke
&lt;CODE&gt;AC_PROG_OBJC&lt;/CODE&gt; like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_OBJC([gcc objcc objc])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If using the GNU Objective C compiler, set shell variable
&lt;CODE&gt;GOBJC&lt;/CODE&gt; to &lt;samp&gt;yes&lt;/samp&gt;.
If output variable &lt;CODE&gt;OBJCFLAGS&lt;/CODE&gt; was not
already set, set it to &lt;samp&gt;-g -O2&lt;/samp&gt; for the
GNU Objective C compiler (&lt;samp&gt;-O2&lt;/samp&gt; on
systems where &lt;CODE&gt;gcc&lt;/CODE&gt; does not accept
&lt;samp&gt;-g&lt;/samp&gt;), or &lt;samp&gt;-g&lt;/samp&gt; for
other compilers.
</synopsis>
</macro>
<macro id="AC_PROG_OBJCPP">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;OBJCPP&lt;/CODE&gt; to a
command that runs the Objective C preprocessor. If
&lt;samp&gt;$OBJC -E&lt;/samp&gt; doesn't work,
&lt;TT&gt;/lib/cpp&lt;/TT&gt; is used.
</synopsis>
</macro>
<macro id="AC_PROG_OBJCXX">
<prototype>
<parameter content="[compiler-search-list]"/>
</prototype>
<synopsis>
Determine an Objective C++ compiler to use. If
&lt;CODE&gt;OBJCXX&lt;/CODE&gt; is not already set in the
environment, check for Objective C++ compilers. Set output
variable &lt;CODE&gt;OBJCXX&lt;/CODE&gt; to the name of the
compiler found.&lt;/P&gt;&lt;P&gt;
This macro may, however, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
Objective C++ compilers to search for. This just gives the user
an opportunity to specify an alternative search list for the
Objective C++ compiler. For example, if you didn't like the
default order, then you could invoke
&lt;CODE&gt;AC_PROG_OBJCXX&lt;/CODE&gt; like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_OBJCXX([gcc g++ objcc++
objcxx]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If using the GNU Objective C++ compiler, set shell variable
&lt;CODE&gt;GOBJCXX&lt;/CODE&gt; to
&lt;samp&gt;yes&lt;/samp&gt;. If output variable
&lt;CODE&gt;OBJCXXFLAGS&lt;/CODE&gt; was not already set, set it
to &lt;samp&gt;-g -O2&lt;/samp&gt; for the GNU Objective C++
compiler (&lt;samp&gt;-O2&lt;/samp&gt; on systems where
&lt;CODE&gt;gcc&lt;/CODE&gt; does not accept
&lt;samp&gt;-g&lt;/samp&gt;), or &lt;samp&gt;-g&lt;/samp&gt; for
other compilers.
</synopsis>
</macro>
<macro id="AC_PROG_OBJCXXCPP">
<prototype>
</prototype>
<synopsis>
Set output variable &lt;CODE&gt;OBJCXXCPP&lt;/CODE&gt; to a
command that runs the Objective C++ preprocessor. If
&lt;samp&gt;$OBJCXX -E&lt;/samp&gt; doesn't work,
&lt;TT&gt;/lib/cpp&lt;/TT&gt; is used.
</synopsis>
</macro>
<macro id="AC_ERLANG_PATH_ERLC">
<prototype>
<parameter content="[value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Determine an Erlang compiler to use. If
&lt;CODE&gt;ERLC&lt;/CODE&gt; is not already set in the
environment, check for &lt;CODE&gt;erlc&lt;/CODE&gt;. Set
output variable &lt;CODE&gt;ERLC&lt;/CODE&gt; to the complete
path of the compiler command found. In addition, if
&lt;CODE&gt;ERLCFLAGS&lt;/CODE&gt; is not set in the
environment, set it to an empty value.&lt;/P&gt;&lt;P&gt;
The two optional arguments have the same meaning as the two last
arguments of macro &lt;CODE&gt;AC_PROG_PATH&lt;/CODE&gt; for
looking for the &lt;CODE&gt;erlc&lt;/CODE&gt; program. For
example, to look for &lt;CODE&gt;erlc&lt;/CODE&gt; only in the
&lt;TT&gt;/usr/lib/erlang/bin&lt;/TT&gt; directory:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ERLANG_PATH_ERLC([not found],
[/usr/lib/erlang/bin])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_ERLANG_NEED_ERLC">
<prototype>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
A simplified variant of the
&lt;CODE&gt;AC_ERLANG_PATH_ERLC&lt;/CODE&gt; macro, that prints
an error message and exits the
&lt;CODE&gt;configure&lt;/CODE&gt; script if the
&lt;CODE&gt;erlc&lt;/CODE&gt; program is not found.
</synopsis>
</macro>
<macro id="AC_ERLANG_PATH_ERL">
<prototype>
<parameter content="[value-if-not-found]"/>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
Determine an Erlang interpreter to use. If
&lt;CODE&gt;ERL&lt;/CODE&gt; is not already set in the
environment, check for &lt;CODE&gt;erl&lt;/CODE&gt;. Set output
variable &lt;CODE&gt;ERL&lt;/CODE&gt; to the complete path of
the interpreter command found.&lt;/P&gt;&lt;P&gt;
The two optional arguments have the same meaning as the two last
arguments of macro &lt;CODE&gt;AC_PROG_PATH&lt;/CODE&gt; for
looking for the &lt;CODE&gt;erl&lt;/CODE&gt; program. For
example, to look for &lt;CODE&gt;erl&lt;/CODE&gt; only in the
&lt;TT&gt;/usr/lib/erlang/bin&lt;/TT&gt; directory:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ERLANG_PATH_ERL([not found],
[/usr/lib/erlang/bin])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_ERLANG_NEED_ERL">
<prototype>
<parameter content="[path= $PATH]"/>
</prototype>
<synopsis>
A simplified variant of the
&lt;CODE&gt;AC_ERLANG_PATH_ERL&lt;/CODE&gt; macro, that prints
an error message and exits the
&lt;CODE&gt;configure&lt;/CODE&gt; script if the
&lt;CODE&gt;erl&lt;/CODE&gt; program is not found.
</synopsis>
</macro>
<macro id="AC_PROG_F77">
<prototype>
<parameter content="[compiler-search-list]"/>
</prototype>
<synopsis>
Determine a Fortran 77 compiler to use. If
&lt;CODE&gt;F77&lt;/CODE&gt; is not already set in the
environment, then check for &lt;CODE&gt;g77&lt;/CODE&gt; and
&lt;CODE&gt;f77&lt;/CODE&gt;, and then some other names. Set
the output variable &lt;CODE&gt;F77&lt;/CODE&gt; to the name of
the compiler found.&lt;/P&gt;&lt;P&gt;
This macro may, however, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
Fortran 77 compilers to search for. This just gives the user an
opportunity to specify an alternative search list for the
Fortran 77 compiler. For example, if you didn't like the
default order, then you could invoke
&lt;CODE&gt;AC_PROG_F77&lt;/CODE&gt; like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PROG_F77([fl32 f77 fort77 xlf
g77 f90 xlf90]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If using &lt;CODE&gt;g77&lt;/CODE&gt; (the GNU Fortran 77
compiler), then set the shell variable
&lt;CODE&gt;G77&lt;/CODE&gt; to &lt;samp&gt;yes&lt;/samp&gt;. If
the output variable &lt;CODE&gt;FFLAGS&lt;/CODE&gt; was not
already set in the environment, then set it to &lt;samp&gt;-g
-02&lt;/samp&gt; for &lt;CODE&gt;g77&lt;/CODE&gt; (or
&lt;samp&gt;-O2&lt;/samp&gt; where &lt;CODE&gt;g77&lt;/CODE&gt;
does not accept &lt;samp&gt;-g&lt;/samp&gt;). Otherwise, set
&lt;CODE&gt;FFLAGS&lt;/CODE&gt; to &lt;samp&gt;-g&lt;/samp&gt;
for all other Fortran 77 compilers.
</synopsis>
</macro>
<macro id="AC_PROG_FC">
<prototype>
<parameter content="[compiler-search-list]"/>
<parameter content="[dialect]"/>
</prototype>
<synopsis>
Determine a Fortran compiler to use. If
&lt;CODE&gt;FC&lt;/CODE&gt; is not already set in the
environment, then &lt;CODE&gt;dialect&lt;/CODE&gt; is a hint to
indicate what Fortran dialect to search for; the default is to
search for the newest available dialect. Set the output
variable &lt;CODE&gt;FC&lt;/CODE&gt; to the name of the compiler
found.&lt;/P&gt;&lt;P&gt;
By default, newer dialects are preferred over older dialects,
but if &lt;CODE&gt;dialect&lt;/CODE&gt; is specified then older
dialects are preferred starting with the specified dialect.
&lt;CODE&gt;dialect&lt;/CODE&gt; can currently be one of Fortran
77, Fortran 90, or Fortran 95. However, this is only a hint of
which compiler &lt;EM&gt;name&lt;/EM&gt; to prefer (e.g.,
&lt;CODE&gt;f90&lt;/CODE&gt; or &lt;CODE&gt;f95&lt;/CODE&gt;),
and no attempt is made to guarantee that a particular language
standard is actually supported. Thus, it is preferable that you
avoid the &lt;CODE&gt;dialect&lt;/CODE&gt; option, and use
AC_PROG_FC only for code compatible with the latest Fortran
standard.&lt;/P&gt;&lt;P&gt;
This macro may, alternatively, be invoked with an optional first
argument which, if specified, must be a blank-separated list of
Fortran compilers to search for, just as in
&lt;CODE&gt;AC_PROG_F77&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If the output variable &lt;CODE&gt;FCFLAGS&lt;/CODE&gt; was not
already set in the environment, then set it to &lt;samp&gt;-g
-02&lt;/samp&gt; for GNU &lt;CODE&gt;g77&lt;/CODE&gt; (or
&lt;samp&gt;-O2&lt;/samp&gt; where &lt;CODE&gt;g77&lt;/CODE&gt;
does not accept &lt;samp&gt;-g&lt;/samp&gt;). Otherwise, set
&lt;CODE&gt;FCFLAGS&lt;/CODE&gt; to &lt;samp&gt;-g&lt;/samp&gt;
for all other Fortran compilers.
</synopsis>
</macro>
<macro id="AC_PROG_F77_C_O">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
Test whether the Fortran compiler accepts the options
&lt;samp&gt;-c&lt;/samp&gt; and &lt;samp&gt;-o&lt;/samp&gt;
simultaneously, and define
&lt;CODE&gt;F77_NO_MINUS_C_MINUS_O&lt;/CODE&gt; or
&lt;CODE&gt;FC_NO_MINUS_C_MINUS_O&lt;/CODE&gt;, respectively, if
it does not.
</synopsis>
</macro>
<macro id="AC_F77_LIBRARY_LDFLAGS">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
Determine the linker flags (e.g.,
&lt;samp&gt;-L&lt;/samp&gt; and &lt;samp&gt;-l&lt;/samp&gt;) for
the Fortran intrinsic and runtime libraries that are required to
successfully link a Fortran program or shared library. The
output variable &lt;CODE&gt;FLIBS&lt;/CODE&gt; or
&lt;CODE&gt;FCLIBS&lt;/CODE&gt; is set to these flags (which
should be included after &lt;CODE&gt;LIBS&lt;/CODE&gt; when
linking).&lt;/P&gt;&lt;P&gt;
This macro is intended to be used in those situations when it is
necessary to mix, e.g., C++ and Fortran source code in a single
program or shared library (Mixing Fortran 77 With C and C++, , ,
automake, GNU Automake).&lt;/P&gt;&lt;P&gt;
For example, if object files from a C++ and Fortran compiler
must be linked together, then the C++ compiler/linker must be
used for linking (since special C++-ish things need to happen at
link time like calling global constructors, instantiating
templates, enabling exception support, etc.).&lt;/P&gt;&lt;P&gt;
However, the Fortran intrinsic and runtime libraries must be
linked in as well, but the C++ compiler/linker doesn't know by
default how to add these Fortran 77 libraries. Hence, this
macro was created to determine these Fortran libraries.&lt;/P&gt;&lt;P&gt;
The macros &lt;CODE&gt;AC_F77_DUMMY_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;AC_FC_DUMMY_MAIN&lt;/CODE&gt; or
&lt;CODE&gt;AC_F77_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;AC_FC_MAIN&lt;/CODE&gt; are probably also necessary
to link C/C++ with Fortran; see below. Further, it is highly
recommended that you use
&lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt; (Configuration
Headers) because the complex defines that the function wrapper
macros create may not work with C/C++ compiler drivers.
</synopsis>
</macro>
<macro id="AC_F77_DUMMY_MAIN">
<prototype>
<parameter content="[action-if-found]"/>
<parameter content="[action-if-not-found]"/>
</prototype>
<prototype>
<parameter content="[action-if-found]"/>
<parameter content="[action-if-not-found]"/>
</prototype>
<synopsis>
With many compilers, the Fortran libraries detected by
&lt;CODE&gt;AC_F77_LIBRARY_LDFLAGS&lt;/CODE&gt; or
&lt;CODE&gt;AC_FC_LIBRARY_LDFLAGS&lt;/CODE&gt; provide their own
&lt;CODE&gt;main&lt;/CODE&gt; entry function that initializes
things like Fortran I/O, and which then calls a user-provided
entry function named (say) &lt;CODE&gt;MAIN__&lt;/CODE&gt; to
run the user's program. The
&lt;CODE&gt;AC_F77_DUMMY_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;AC_FC_DUMMY_MAIN&lt;/CODE&gt; or
&lt;CODE&gt;AC_F77_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;AC_FC_MAIN&lt;/CODE&gt; macros figure out how to
deal with this interaction.&lt;/P&gt;&lt;P&gt;
When using Fortran for purely numerical functions (no I/O,
etc.)@: often one prefers to provide one's own
&lt;CODE&gt;main&lt;/CODE&gt; and skip the Fortran library
initializations. In this case, however, one may still need to
provide a dummy &lt;CODE&gt;MAIN__&lt;/CODE&gt; routine in order
to prevent linking errors on some systems.
&lt;CODE&gt;AC_F77_DUMMY_MAIN&lt;/CODE&gt; or
&lt;CODE&gt;AC_FC_DUMMY_MAIN&lt;/CODE&gt; detects whether any
such routine is &lt;EM&gt;required&lt;/EM&gt; for linking, and
what its name is; the shell variable
&lt;CODE&gt;F77_DUMMY_MAIN&lt;/CODE&gt; or
&lt;CODE&gt;FC_DUMMY_MAIN&lt;/CODE&gt; holds this name,
&lt;CODE&gt;unknown&lt;/CODE&gt; when no solution was found, and
&lt;CODE&gt;none&lt;/CODE&gt; when no such dummy main is needed.&lt;/P&gt;&lt;P&gt;
By default, &lt;VAR&gt;action-if-found&lt;/VAR&gt; defines
&lt;CODE&gt;F77_DUMMY_MAIN&lt;/CODE&gt; or
&lt;CODE&gt;FC_DUMMY_MAIN&lt;/CODE&gt; to the name of this
routine (e.g., &lt;CODE&gt;MAIN__&lt;/CODE&gt;)
&lt;EM&gt;if&lt;/EM&gt; it is required.
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt; defaults to exiting
with an error.&lt;/P&gt;&lt;P&gt;
In order to link with Fortran routines, the user's C/C++ program
should then include the following code to define the dummy main
if it is needed:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #ifdef F77_DUMMY_MAIN # ifdef
__cplusplus extern "C" # endif int F77_DUMMY_MAIN ()
return 1; @ #endif
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
(Replace &lt;CODE&gt;F77&lt;/CODE&gt; with
&lt;CODE&gt;FC&lt;/CODE&gt; for Fortran instead of Fortran 77.)&lt;/P&gt;&lt;P&gt;
Note that this macro is called automatically from
&lt;CODE&gt;AC_F77_WRAPPERS&lt;/CODE&gt; or
&lt;CODE&gt;AC_FC_WRAPPERS&lt;/CODE&gt;; there is generally no
need to call it explicitly unless one wants to change the
default actions.
</synopsis>
</macro>
<macro id="AC_F77_MAIN">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
As discussed above, many Fortran libraries allow you to
provide an entry point called (say)
&lt;CODE&gt;MAIN__&lt;/CODE&gt; instead of the usual
&lt;CODE&gt;main&lt;/CODE&gt;, which is then called by a
&lt;CODE&gt;main&lt;/CODE&gt; function in the Fortran libraries
that initializes things like Fortran I/O@. The
&lt;CODE&gt;AC_F77_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;AC_FC_MAIN&lt;/CODE&gt; macros detect whether it is
&lt;EM&gt;possible&lt;/EM&gt; to utilize such an alternate main
function, and defines &lt;CODE&gt;F77_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;FC_MAIN&lt;/CODE&gt; to the name of the function.
(If no alternate main function name is found,
&lt;CODE&gt;F77_MAIN&lt;/CODE&gt; and
&lt;CODE&gt;FC_MAIN&lt;/CODE&gt; are simply defined to
&lt;CODE&gt;main&lt;/CODE&gt;.)&lt;/P&gt;&lt;P&gt;
Thus, when calling Fortran routines from C that perform things
like I/O, one should use this macro and declare the "main"
function like so:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #ifdef __cplusplus extern "C"
#endif int F77_MAIN (int argc, char *argv[]);
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
(Again, replace &lt;CODE&gt;F77&lt;/CODE&gt; with
&lt;CODE&gt;FC&lt;/CODE&gt; for Fortran instead of Fortran 77.)
</synopsis>
</macro>
<macro id="AC_F77_WRAPPERS">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
Defines C macros &lt;CODE&gt;F77_FUNC (name,
NAME)&lt;/CODE&gt;, &lt;CODE&gt;FC_FUNC (name,
NAME)&lt;/CODE&gt;, &lt;CODE&gt;F77_FUNC_(name,
NAME)&lt;/CODE&gt;, and &lt;CODE&gt;FC_FUNC_(name,
NAME)&lt;/CODE&gt; to properly mangle the names of C/C++
identifiers, and identifiers with underscores, respectively, so
that they match the name-mangling scheme used by the Fortran
compiler.&lt;/P&gt;&lt;P&gt;
Fortran is case-insensitive, and in order to achieve this the
Fortran compiler converts all identifiers into a canonical case
and format. To call a Fortran subroutine from C or to write a C
function that is callable from Fortran, the C program must
explicitly use identifiers in the format expected by the Fortran
compiler. In order to do this, one simply wraps all C
identifiers in one of the macros provided by
&lt;CODE&gt;AC_F77_WRAPPERS&lt;/CODE&gt; or
&lt;CODE&gt;AC_FC_WRAPPERS&lt;/CODE&gt;. For example, suppose
you have the following Fortran 77 subroutine:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; subroutine foobar (x, y)
double precision x, y y = 3.14159 * x return
end &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
You would then declare its prototype in C or C++ as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; #define FOOBAR_F77 F77_FUNC
(foobar, FOOBAR) #ifdef __cplusplus extern "C" /* prevent C++
name mangling */ #endif void FOOBAR_F77 (double *x, double *y);
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Note that we pass both the lowercase and uppercase versions of
the function name to &lt;CODE&gt;F77_FUNC&lt;/CODE&gt; so that
it can select the right one. Note also that all parameters to
Fortran 77 routines are passed as pointers (Mixing Fortran 77
With C and C++, , , automake, GNU Automake).&lt;/P&gt;&lt;P&gt;
(Replace &lt;CODE&gt;F77&lt;/CODE&gt; with
&lt;CODE&gt;FC&lt;/CODE&gt; for Fortran instead of Fortran 77.)&lt;/P&gt;&lt;P&gt;
Although Autoconf tries to be intelligent about detecting the
name-mangling scheme of the Fortran compiler, there may be
Fortran compilers that it doesn't support yet. In this case,
the above code generates a compile-time error, but some other
behavior (e.g., disabling Fortran-related features) can be
induced by checking whether &lt;CODE&gt;F77_FUNC&lt;/CODE&gt; or
&lt;CODE&gt;FC_FUNC&lt;/CODE&gt; is defined.&lt;/P&gt;&lt;P&gt;
Now, to call that routine from a C program, we would do
something like:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; double x = 2.7183, y;
FOOBAR_F77 (&amp;x, &amp;y); @
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If the Fortran identifier contains an underscore (e.g.,
&lt;CODE&gt;foo_bar&lt;/CODE&gt;), you should use
&lt;CODE&gt;F77_FUNC_&lt;/CODE&gt; or
&lt;CODE&gt;FC_FUNC_&lt;/CODE&gt; instead of
&lt;CODE&gt;F77_FUNC&lt;/CODE&gt; or
&lt;CODE&gt;FC_FUNC&lt;/CODE&gt; (with the same arguments).
This is because some Fortran compilers mangle names differently
if they contain an underscore.
</synopsis>
</macro>
<macro id="AC_F77_FUNC">
<prototype>
<parameter content="name"/>
<parameter content="[shellvar]"/>
</prototype>
<prototype>
<parameter content="name"/>
<parameter content="[shellvar]"/>
</prototype>
<synopsis>
Given an identifier &lt;VAR&gt;name&lt;/VAR&gt;, set the shell
variable &lt;VAR&gt;shellvar&lt;/VAR&gt; to hold the mangled
version &lt;VAR&gt;name&lt;/VAR&gt; according to the rules of
the Fortran linker (see also
&lt;CODE&gt;AC_F77_WRAPPERS&lt;/CODE&gt; or
&lt;CODE&gt;AC_FC_WRAPPERS&lt;/CODE&gt;).
&lt;VAR&gt;shellvar&lt;/VAR&gt; is optional; if it is not
supplied, the shell variable is simply
&lt;VAR&gt;name&lt;/VAR&gt;. The purpose of this macro is to
give the caller a way to access the name-mangling information
other than through the C preprocessor as above, for example, to
call Fortran routines from some language other than C/C++.
</synopsis>
</macro>
<macro id="AC_FC_SRCEXT">
<prototype>
<parameter content="ext"/>
<parameter content="[action-if-success]"/>
<parameter content="@ [action-if-failure]"/>
</prototype>
<synopsis>
By default, the &lt;CODE&gt;FC&lt;/CODE&gt; macros perform
their tests using a &lt;TT&gt;.f&lt;/TT&gt; extension for
source-code files. Some compilers, however, only enable newer
language features for appropriately named files, e.g., Fortran
90 features only for &lt;TT&gt;.f90&lt;/TT&gt; files. On the
other hand, some other compilers expect all source files to end
in &lt;TT&gt;.f&lt;/TT&gt; and require special flags to support
other file name extensions. The
&lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt; macro deals with both of
these issues.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt; tries to get the
&lt;CODE&gt;FC&lt;/CODE&gt; compiler to accept files ending with
the extension .&lt;VAR&gt;ext&lt;/VAR&gt; (i.e.,
&lt;VAR&gt;ext&lt;/VAR&gt; does &lt;EM&gt;not&lt;/EM&gt; contain
the dot). If any special compiler flags are needed for this, it
stores them in the output variable
&lt;CODE&gt;FCFLAGS_&lt;/CODE&gt;&lt;VAR&gt;ext&lt;/VAR&gt;.
This extension and these flags are then used for all subsequent
&lt;CODE&gt;FC&lt;/CODE&gt; tests (until
&lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt; is called again).&lt;/P&gt;&lt;P&gt;
For example, you would use
&lt;CODE&gt;AC_FC_SRCEXT(f90)&lt;/CODE&gt; to employ the
&lt;TT&gt;.f90&lt;/TT&gt; extension in future tests, and it
would set the &lt;CODE&gt;FCFLAGS_f90&lt;/CODE&gt; output
variable with any extra flags that are needed to compile such
files.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;FCFLAGS_&lt;/CODE&gt;&lt;VAR&gt;ext&lt;/VAR&gt;
can &lt;EM&gt;not&lt;/EM&gt; be simply absorbed into
&lt;CODE&gt;FCFLAGS&lt;/CODE&gt;, for two reasons based on the
limitations of some compilers. First, only one
&lt;CODE&gt;FCFLAGS_&lt;/CODE&gt;&lt;VAR&gt;ext&lt;/VAR&gt; can
be used at a time, so files with different extensions must be
compiled separately. Second,
&lt;CODE&gt;FCFLAGS_&lt;/CODE&gt;&lt;VAR&gt;ext&lt;/VAR&gt; must
appear &lt;EM&gt;immediately&lt;/EM&gt; before the source-code
file name when compiling. So, continuing the example above, you
might compile a &lt;TT&gt;foo.f90&lt;/TT&gt; file in your
makefile with the command:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; foo.o: foo.f90 $(FC) -c
$(FCFLAGS) $(FCFLAGS_f90) '$(srcdir)/foo.f90'
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt; succeeds in compiling
files with the &lt;VAR&gt;ext&lt;/VAR&gt; extension, it calls
&lt;VAR&gt;action-if-success&lt;/VAR&gt; (defaults to nothing).
If it fails, and cannot find a way to make the
&lt;CODE&gt;FC&lt;/CODE&gt; compiler accept such files, it calls
&lt;VAR&gt;action-if-failure&lt;/VAR&gt; (defaults to exiting
with an error message).&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AC_FC_FREEFORM">
<prototype>
<parameter content="[action-if-success]"/>
<parameter content="[action-if-failure]"/>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FC_FREEFORM&lt;/CODE&gt; tries to ensure that
the Fortran compiler (&lt;CODE&gt;$FC&lt;/CODE&gt;) allows
free-format source code (as opposed to the older fixed-format
style from Fortran 77). If necessary, it may add some
additional flags to &lt;CODE&gt;FCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro is most important if you are using the default
&lt;TT&gt;.f&lt;/TT&gt; extension, since many compilers
interpret this extension as indicating fixed-format source
unless an additional flag is supplied. If you specify a
different extension with &lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt;,
such as &lt;TT&gt;.f90&lt;/TT&gt;, then
&lt;CODE&gt;AC_FC_FREEFORM&lt;/CODE&gt; ordinarily succeeds
without modifying &lt;CODE&gt;FCFLAGS&lt;/CODE&gt;. For
extensions which the compiler does not know about, the flag set
by the &lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt; macro might let the
compiler assume Fortran 77 by default, however.&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;AC_FC_FREEFORM&lt;/CODE&gt; succeeds in compiling
free-form source, it calls
&lt;VAR&gt;action-if-success&lt;/VAR&gt; (defaults to nothing).
If it fails, it calls &lt;VAR&gt;action-if-failure&lt;/VAR&gt;
(defaults to exiting with an error message).
</synopsis>
</macro>
<macro id="AC_FC_FIXEDFORM">
<prototype>
<parameter content="[action-if-success]"/>
<parameter content="[action-if-failure]"/>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FC_FIXEDFORM&lt;/CODE&gt; tries to ensure
that the Fortran compiler (&lt;CODE&gt;$FC&lt;/CODE&gt;) allows
the old fixed-format source code (as opposed to free-format
style). If necessary, it may add some additional flags to
&lt;CODE&gt;FCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro is needed for some compilers alias names like
&lt;CODE&gt;xlf95&lt;/CODE&gt; which assume free-form source
code by default, and in case you want to use fixed-form source
with an extension like &lt;TT&gt;.f90&lt;/TT&gt; which many
compilers interpret as free-form by default. If you specify a
different extension with &lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt;,
such as &lt;TT&gt;.f&lt;/TT&gt;, then
&lt;CODE&gt;AC_FC_FIXEDFORM&lt;/CODE&gt; ordinarily succeeds
without modifying &lt;CODE&gt;FCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;AC_FC_FIXEDFORM&lt;/CODE&gt; succeeds in
compiling fixed-form source, it calls
&lt;VAR&gt;action-if-success&lt;/VAR&gt; (defaults to nothing).
If it fails, it calls &lt;VAR&gt;action-if-failure&lt;/VAR&gt;
(defaults to exiting with an error message).
</synopsis>
</macro>
<macro id="AC_FC_LINE_LENGTH">
<prototype>
<parameter content="[length]"/>
<parameter content="[action-if-success]"/>
<parameter content="@ [action-if-failure]"/>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AC_FC_LINE_LENGTH&lt;/CODE&gt; macro tries to
ensure that the Fortran compiler (&lt;CODE&gt;$FC&lt;/CODE&gt;)
accepts long source code lines. The
&lt;VAR&gt;length&lt;/VAR&gt; argument may be given as 80, 132,
or unlimited, and defaults to 132. Note that line lengths above
254 columns are not portable, and some compilers do not accept
more than 132 columns at least for fixed format source. If
necessary, it may add some additional flags to
&lt;CODE&gt;FCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;CODE&gt;AC_FC_LINE_LENGTH&lt;/CODE&gt; succeeds in
compiling fixed-form source, it calls
&lt;VAR&gt;action-if-success&lt;/VAR&gt; (defaults to nothing).
If it fails, it calls &lt;VAR&gt;action-if-failure&lt;/VAR&gt;
(defaults to exiting with an error message).
</synopsis>
</macro>
<macro id="AC_PATH_X">
<prototype>
</prototype>
<synopsis>
Window System Try to locate the X Window System include files
and libraries. If the user gave the command line options
&lt;samp&gt;--x-includes=&lt;VAR&gt;dir&lt;/VAR&gt;&lt;/samp&gt;
and
&lt;samp&gt;--x-libraries=&lt;VAR&gt;dir&lt;/VAR&gt;&lt;/samp&gt;,
use those directories.&lt;/P&gt;&lt;P&gt;
If either or both were not given, get the missing values by
running &lt;CODE&gt;xmkmf&lt;/CODE&gt; (or an executable pointed
to by the &lt;CODE&gt;XMKMF&lt;/CODE&gt; environment variable)
on a trivial &lt;TT&gt;Imakefile&lt;/TT&gt; and examining the
makefile that it produces. Setting
&lt;CODE&gt;XMKMF&lt;/CODE&gt; to &lt;samp&gt;false&lt;/samp&gt;
disables this method.&lt;/P&gt;&lt;P&gt;
If this method fails to find the X Window System,
&lt;CODE&gt;configure&lt;/CODE&gt; looks for the files in
several directories where they often reside. If either method is
successful, set the shell variables
&lt;CODE&gt;x_includes&lt;/CODE&gt; and
&lt;CODE&gt;x_libraries&lt;/CODE&gt; to their locations, unless
they are in directories the compiler searches by default.&lt;/P&gt;&lt;P&gt;
If both methods fail, or the user gave the command line option
&lt;samp&gt;--without-x&lt;/samp&gt;, set the shell variable
&lt;CODE&gt;no_x&lt;/CODE&gt; to &lt;samp&gt;yes&lt;/samp&gt;;
otherwise set it to the empty string.
</synopsis>
</macro>
<macro id="AC_PATH_XTRA">
<prototype>
</prototype>
<synopsis>
An enhanced version of &lt;CODE&gt;AC_PATH_X&lt;/CODE&gt;.
It adds the C compiler flags that X needs to output variable
&lt;CODE&gt;X_CFLAGS&lt;/CODE&gt;, and the X linker flags to
&lt;CODE&gt;X_LIBS&lt;/CODE&gt;. Define
&lt;CODE&gt;X_DISPLAY_MISSING&lt;/CODE&gt; if X is not
available.&lt;/P&gt;&lt;P&gt;
This macro also checks for special libraries that some systems
need in order to compile X programs. It adds any that the
system needs to output variable
&lt;CODE&gt;X_EXTRA_LIBS&lt;/CODE&gt;. And it checks for
special X11R6 libraries that need to be linked with before
&lt;samp&gt;-lX11&lt;/samp&gt;, and adds any found to the output
variable &lt;CODE&gt;X_PRE_LIBS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AC_SYS_INTERPRETER">
<prototype>
</prototype>
<synopsis>
Check whether the system supports starting scripts with a line
of the form &lt;samp&gt;#!/bin/sh&lt;/samp&gt; to select the
interpreter to use for the script. After running this macro,
shell code in &lt;TT&gt;configure.ac&lt;/TT&gt; can check the
shell variable &lt;CODE&gt;interpval&lt;/CODE&gt;; it is set to
&lt;samp&gt;yes&lt;/samp&gt; if the system supports
&lt;samp&gt;#!&lt;/samp&gt;, &lt;samp&gt;no&lt;/samp&gt; if not.
</synopsis>
</macro>
<macro id="AC_SYS_LARGEFILE">
<prototype>
</prototype>
<synopsis>
file support Arrange for 64-bit file offsets, known as
http://@/www.unix-systems@/.org/@/version2/@/whatsnew/@/lfs20mar.html,
large-file support. On some hosts, one must use special
compiler options to build programs that can access large files.
Append any such options to the output variable
&lt;CODE&gt;CC&lt;/CODE&gt;. Define
&lt;CODE&gt;_FILE_OFFSET_BITS&lt;/CODE&gt; and
&lt;CODE&gt;_LARGE_FILES&lt;/CODE&gt; if necessary.&lt;/P&gt;&lt;P&gt;
Large-file support can be disabled by configuring with the
&lt;samp&gt;--disable-largefile&lt;/samp&gt; option.&lt;/P&gt;&lt;P&gt;
If you use this macro, check that your program works even when
&lt;CODE&gt;off_t&lt;/CODE&gt; is wider than &lt;CODE&gt;long
int&lt;/CODE&gt;, since this is common when large-file support
is enabled. For example, it is not correct to print an
arbitrary &lt;CODE&gt;off_t&lt;/CODE&gt; value
&lt;CODE&gt;X&lt;/CODE&gt; with &lt;CODE&gt;printf ("%ld", (long
int) X)&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The LFS introduced the &lt;CODE&gt;fseeko&lt;/CODE&gt; and
&lt;CODE&gt;ftello&lt;/CODE&gt; functions to replace their C
counterparts &lt;CODE&gt;fseek&lt;/CODE&gt; and
&lt;CODE&gt;ftell&lt;/CODE&gt; that do not use
&lt;CODE&gt;off_t&lt;/CODE&gt;. Take care to use
&lt;CODE&gt;AC_FUNC_FSEEKO&lt;/CODE&gt; to make their prototypes
available when using them and large-file support is enabled.
</synopsis>
</macro>
<macro id="AC_SYS_LONG_FILE_NAMES">
<prototype>
</prototype>
<synopsis>
If the system supports file names longer than 14 characters,
define &lt;CODE&gt;HAVE_LONG_FILE_NAMES&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_SYS_POSIX_TERMIOS">
<prototype>
</prototype>
<synopsis>
termios headers Posix headers Check to see if the Posix
termios headers and functions are available on the system. If
so, set the shell variable
&lt;CODE&gt;ac_cv_sys_posix_termios&lt;/CODE&gt; to
&lt;samp&gt;yes&lt;/samp&gt;. If not, set the variable to
&lt;samp&gt;no&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AC_USE_SYSTEM_EXTENSIONS">
<prototype>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.60. If
possible, enable extensions to C or Posix on hosts that normally
disable the extensions, typically due to standards-conformance
namespace issues. This should be called before any macros that
run the C compiler. The following preprocessor macros are
defined where appropriate:&lt;/P&gt;&lt;P&gt;
@table @code &lt;LI&gt; _GNU_SOURCE Enable extensions on
GNU/Linux. &lt;LI&gt; __EXTENSIONS__ Enable general extensions
on Solaris. &lt;LI&gt; _POSIX_PTHREAD_SEMANTICS Enable threading
extensions on Solaris. &lt;LI&gt; _TANDEM_SOURCE Enable
extensions for the HP NonStop platform. &lt;LI&gt; _ALL_SOURCE
Enable extensions for AIX 3, and for Interix. &lt;LI&gt;
_POSIX_SOURCE Enable Posix functions for Minix. &lt;LI&gt;
_POSIX_1_SOURCE Enable additional Posix functions for Minix.
&lt;LI&gt; _MINIX Identify Minix platform. This particular
preprocessor macro is obsolescent, and may be removed in a
future release of Autoconf. &lt;/DL&gt;
</synopsis>
</macro>
<macro id="AC_ERLANG_SUBST_ERTS_VER">
<prototype>
</prototype>
<synopsis>
Set the output variable
&lt;CODE&gt;ERLANG_ERTS_VER&lt;/CODE&gt; to the version of the
Erlang runtime system (as returned by Erlang's
&lt;CODE&gt;erlang:system_info(version)&lt;/CODE&gt; function).
The result of this test is cached if caching is enabled when
running &lt;CODE&gt;configure&lt;/CODE&gt;. The
&lt;CODE&gt;ERLANG_ERTS_VER&lt;/CODE&gt; variable is not
intended to be used for testing for features of specific ERTS
versions, but to be used for substituting the ERTS version in
Erlang/OTP release resource files (&lt;CODE&gt;.rel&lt;/CODE&gt;
files), as shown below.
</synopsis>
</macro>
<macro id="AC_ERLANG_SUBST_ROOT_DIR">
<prototype>
</prototype>
<synopsis>
Set the output variable
&lt;CODE&gt;ERLANG_ROOT_DIR&lt;/CODE&gt; to the path to the base
directory in which Erlang/OTP is installed (as returned by
Erlang's &lt;CODE&gt;code:root_dir/0&lt;/CODE&gt; function).
The result of this test is cached if caching is enabled when
running &lt;CODE&gt;configure&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_ERLANG_SUBST_LIB_DIR">
<prototype>
</prototype>
<synopsis>
Set the output variable
&lt;CODE&gt;ERLANG_LIB_DIR&lt;/CODE&gt; to the path of the
library directory of Erlang/OTP (as returned by Erlang's
&lt;CODE&gt;code:lib_dir/0&lt;/CODE&gt; function), which
subdirectories each contain an installed Erlang/OTP library.
The result of this test is cached if caching is enabled when
running &lt;CODE&gt;configure&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_ERLANG_CHECK_LIB">
<prototype>
<parameter content="library"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
Test whether the Erlang/OTP library
&lt;VAR&gt;library&lt;/VAR&gt; is installed by calling Erlang's
&lt;CODE&gt;code:lib_dir/1&lt;/CODE&gt; function. The result of
this test is cached if caching is enabled when running
&lt;CODE&gt;configure&lt;/CODE&gt;.
&lt;VAR&gt;action-if-found&lt;/VAR&gt; is a list of shell
commands to run if the library is installed;
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt; is a list of shell
commands to run if it is not. Additionally, if the library is
installed, the output variable
&lt;samp&gt;ERLANG_LIB_DIR_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
is set to the path to the library installation directory, and
the output variable
&lt;samp&gt;ERLANG_LIB_VER_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
is set to the version number that is part of the subdirectory
name, if it is in the standard form
(&lt;CODE&gt;&lt;VAR&gt;library&lt;/VAR&gt;-&lt;VAR&gt;version&lt;/VAR&gt;&lt;/CODE&gt;).
If the directory name does not have a version part,
&lt;samp&gt;ERLANG_LIB_VER_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
is set to the empty string. If the library is not installed,
&lt;samp&gt;ERLANG_LIB_DIR_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
and
&lt;samp&gt;ERLANG_LIB_VER_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
are set to &lt;CODE&gt;"not found"&lt;/CODE&gt;. For example,
to check if library &lt;CODE&gt;stdlib&lt;/CODE&gt; is
installed:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ERLANG_CHECK_LIB([stdlib],
[echo "stdlib version \"$ERLANG_LIB_VER_stdlib\"" echo "is
installed in \"$ERLANG_LIB_DIR_stdlib\""],
[AC_MSG_ERROR([stdlib was not found!])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The
&lt;samp&gt;ERLANG_LIB_VER_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
variables (set by &lt;CODE&gt;AC_ERLANG_CHECK_LIB&lt;/CODE&gt;)
and the &lt;CODE&gt;ERLANG_ERTS_VER&lt;/CODE&gt; variable (set
by &lt;CODE&gt;AC_ERLANG_SUBST_ERTS_VER&lt;/CODE&gt;) are not
intended to be used for testing for features of specific
versions of libraries or of the Erlang runtime system. Those
variables are intended to be substituted in Erlang release
resource files (&lt;CODE&gt;.rel&lt;/CODE&gt; files). For
instance, to generate a &lt;TT&gt;example.rel&lt;/TT&gt; file
for an application depending on the
&lt;CODE&gt;stdlib&lt;/CODE&gt; library,
&lt;TT&gt;configure.ac&lt;/TT&gt; could contain:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ERLANG_SUBST_ERTS_VER
AC_ERLANG_CHECK_LIB([stdlib], [], [AC_MSG_ERROR([stdlib was
not found!])]) AC_CONFIG_FILES([example.rel])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The &lt;TT&gt;example.rel.in&lt;/TT&gt; file used to generate
&lt;TT&gt;example.rel&lt;/TT&gt; should contain:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; release, "@@PACKAGE@@",
"@@VERSION@@"@, erts, "@@ERLANG_ERTS_VER@@"@, [stdlib,
"@@ERLANG_LIB_VER_stdlib@@"@, @@PACKAGE@@,
"@@VERSION@@"@]@.
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_ERLANG_SUBST_INSTALL_LIB_DIR">
<prototype>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
Set the &lt;CODE&gt;ERLANG_INSTALL_LIB_DIR&lt;/CODE&gt; output
variable to the directory into which every built Erlang library
should be installed in a separate subdirectory. If this variable
is not set in the environment when
&lt;CODE&gt;configure&lt;/CODE&gt; runs, its default value is
&lt;CODE&gt;$libdir@&lt;/CODE&gt;/erlang/lib.
</synopsis>
</macro>
<macro id="AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR">
<prototype>
<parameter content="library"/>
<parameter content="version"/>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
Set the
&lt;samp&gt;ERLANG_INSTALL_LIB_DIR_&lt;VAR&gt;library&lt;/VAR&gt;&lt;/samp&gt;
output variable to the directory into which the built Erlang
library &lt;VAR&gt;library&lt;/VAR&gt; version
&lt;VAR&gt;version&lt;/VAR&gt; should be installed. If this
variable is not set in the environment when
&lt;CODE&gt;configure&lt;/CODE&gt; runs, its default value is
&lt;samp&gt;$ERLANG_INSTALL_LIB_DIR/&lt;VAR&gt;library&lt;/VAR&gt;-&lt;VAR&gt;version&lt;/VAR&gt;&lt;/samp&gt;,
the value of the &lt;CODE&gt;ERLANG_INSTALL_LIB_DIR&lt;/CODE&gt;
variable being set by the
&lt;CODE&gt;AC_ERLANG_SUBST_INSTALL_LIB_DIR&lt;/CODE&gt; macro.
</synopsis>
</macro>
<macro id="AC_LANG">
<prototype>
<parameter content="language"/>
</prototype>
<synopsis>
Do compilation tests using the compiler, preprocessor, and file
extensions for the specified &lt;VAR&gt;language&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Supported languages are:&lt;/P&gt;&lt;P&gt;
&lt;DL&gt; &lt;DT&gt;'&lt;SAMP&gt;C&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;CC&lt;/CODE&gt; and
&lt;CODE&gt;CPP&lt;/CODE&gt; and use extension
&lt;TT&gt;.c&lt;/TT&gt; for test programs. Use compilation
flags: &lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;CPP&lt;/CODE&gt;, and both
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;CFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;CC&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;C++&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;CXX&lt;/CODE&gt; and
&lt;CODE&gt;CXXCPP&lt;/CODE&gt; and use extension
&lt;TT&gt;.C&lt;/TT&gt; for test programs. Use compilation
flags: &lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;CXXCPP&lt;/CODE&gt;, and both
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;CXXFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;CXX&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;Fortran 77&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;F77&lt;/CODE&gt; and use
extension &lt;TT&gt;.f&lt;/TT&gt; for test programs. Use
compilation flags: &lt;CODE&gt;FFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;Fortran&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;FC&lt;/CODE&gt; and use
extension &lt;TT&gt;.f&lt;/TT&gt; (or whatever has been set by
&lt;CODE&gt;AC_FC_SRCEXT&lt;/CODE&gt;) for test programs. Use
compilation flags: &lt;CODE&gt;FCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;Erlang&lt;/SAMP&gt;' &lt;DD&gt;
Compile and execute tests using &lt;CODE&gt;ERLC&lt;/CODE&gt;
and &lt;CODE&gt;ERL&lt;/CODE&gt; and use extension
&lt;TT&gt;.erl&lt;/TT&gt; for test Erlang modules. Use
compilation flags: &lt;CODE&gt;ERLCFLAGS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;Objective C&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;OBJC&lt;/CODE&gt; and
&lt;CODE&gt;OBJCPP&lt;/CODE&gt; and use extension
&lt;TT&gt;.m&lt;/TT&gt; for test programs. Use compilation
flags: &lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;OBJCPP&lt;/CODE&gt;, and both
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;OBJCFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;OBJC&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;Objective C++&lt;/SAMP&gt;' &lt;DD&gt; Do
compilation tests using &lt;CODE&gt;OBJCXX&lt;/CODE&gt; and
&lt;CODE&gt;OBJCXXCPP&lt;/CODE&gt; and use extension
&lt;TT&gt;.mm&lt;/TT&gt; for test programs. Use compilation
flags: &lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;OBJCXXCPP&lt;/CODE&gt;, and both
&lt;CODE&gt;CPPFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;OBJCXXFLAGS&lt;/CODE&gt; with
&lt;CODE&gt;OBJCXX&lt;/CODE&gt;. &lt;/DL&gt;
</synopsis>
</macro>
<macro id="AC_LANG_PUSH">
<prototype>
<parameter content="language"/>
</prototype>
<synopsis>
Remember the current language (as set by
&lt;CODE&gt;AC_LANG&lt;/CODE&gt;) on a stack, and then select
the &lt;VAR&gt;language&lt;/VAR&gt;. Use this macro and
&lt;CODE&gt;AC_LANG_POP&lt;/CODE&gt; in macros that need to
temporarily switch to a particular language.
</synopsis>
</macro>
<macro id="AC_LANG_POP">
<prototype>
<parameter content="[language]"/>
</prototype>
<synopsis>
Select the language that is saved on the top of the stack, as
set by &lt;CODE&gt;AC_LANG_PUSH&lt;/CODE&gt;, and remove it from
the stack.&lt;/P&gt;&lt;P&gt;
If given, &lt;VAR&gt;language&lt;/VAR&gt; specifies the language
we just &lt;EM&gt;quit&lt;/EM&gt;. It is a good idea to specify
it when it's known (which should be the
case&lt;small&gt;...&lt;/small&gt;), since Autoconf detects
inconsistencies.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LANG_PUSH([Fortran 77]) #
Perform some tests on Fortran 77. #
&lt;small&gt;...&lt;/small&gt; AC_LANG_POP([Fortran 77])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_LANG_ASSERT">
<prototype>
<parameter content="language"/>
</prototype>
<synopsis>
Check statically that the current language is
&lt;VAR&gt;language&lt;/VAR&gt;. You should use this in your
language specific macros to avoid that they be called with an
inappropriate language.&lt;/P&gt;&lt;P&gt;
This macro runs only at &lt;CODE&gt;autoconf&lt;/CODE&gt; time,
and incurs no cost at &lt;CODE&gt;configure&lt;/CODE&gt; time.
Sadly enough and because Autoconf is a two layer language
Because M4 is not aware of Sh code, especially conditionals,
some optimizations that look nice statically may produce
incorrect results at runtime., the macros
&lt;CODE&gt;AC_LANG_PUSH&lt;/CODE&gt; and
&lt;CODE&gt;AC_LANG_POP&lt;/CODE&gt; cannot be ``optimizing'',
therefore as much as possible you ought to avoid using them to
wrap your code, rather, require from the user to run the macro
with a correct current language, and check it with
&lt;CODE&gt;AC_LANG_ASSERT&lt;/CODE&gt;. And anyway, that may
help the user understand she is running a Fortran macro while
expecting a result about her Fortran 77 compiler
</synopsis>
</macro>
<macro id="AC_REQUIRE_CPP">
<prototype>
</prototype>
<synopsis>
Ensure that whichever preprocessor would currently be used for
tests has been found. Calls &lt;CODE&gt;AC_REQUIRE&lt;/CODE&gt;
(Prerequisite Macros) with an argument of either
&lt;CODE&gt;AC_PROG_CPP&lt;/CODE&gt; or
&lt;CODE&gt;AC_PROG_CXXCPP&lt;/CODE&gt;, depending on which
language is current.
</synopsis>
</macro>
<macro id="AC_LANG_CONFTEST">
<prototype>
<parameter content="source"/>
</prototype>
<synopsis>
Save the &lt;VAR&gt;source&lt;/VAR&gt; text in the current test
source file:
&lt;TT&gt;conftest.&lt;VAR&gt;extension&lt;/VAR&gt;&lt;/TT&gt;
where the &lt;VAR&gt;extension&lt;/VAR&gt; depends on the
current language. As of Autoconf 2.63b, the source file also
contains the results of all of the
&lt;CODE&gt;AC_DEFINE&lt;/CODE&gt; performed so far.&lt;/P&gt;&lt;P&gt;
Note that the &lt;VAR&gt;source&lt;/VAR&gt; is evaluated exactly
once, like regular Autoconf macro arguments, and therefore (i)
you may pass a macro invocation, (ii) if not, be sure to double
quote if needed.&lt;/P&gt;&lt;P&gt;
This macro issues a warning during
&lt;CODE&gt;autoconf&lt;/CODE&gt; processing if
&lt;VAR&gt;source&lt;/VAR&gt; does not include an expansion of
the macro &lt;CODE&gt;AC_LANG_DEFINES_PROVIDED&lt;/CODE&gt;
(note that both &lt;CODE&gt;AC_LANG_SOURCE&lt;/CODE&gt; and
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt; call this macro, and
thus avoid the warning).&lt;/P&gt;&lt;P&gt;
This macro is seldom called directly, but is used under the hood
by more common macros such as
&lt;CODE&gt;AC_COMPILE_IFELSE&lt;/CODE&gt; and
&lt;CODE&gt;AC_RUN_IFELSE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_LANG_DEFINES_PROVIDED">
<prototype>
</prototype>
<synopsis>
This macro is called as a witness that the file
&lt;TT&gt;conftest.&lt;VAR&gt;extension&lt;/VAR&gt;&lt;/TT&gt;
appropriate for the current language is complete, including all
previously determined results from
&lt;CODE&gt;AC_DEFINE&lt;/CODE&gt;. This macro is seldom called
directly, but exists if you have a compelling reason to write a
conftest file without using
&lt;CODE&gt;AC_LANG_SOURCE&lt;/CODE&gt;, yet still want to avoid
a syntax warning from &lt;CODE&gt;AC_LANG_CONFTEST&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_LANG_SOURCE">
<prototype>
<parameter content="source"/>
</prototype>
<synopsis>
Expands into the &lt;VAR&gt;source&lt;/VAR&gt;, with the
definition of all the &lt;CODE&gt;AC_DEFINE&lt;/CODE&gt;
performed so far. This macro includes an expansion of
&lt;CODE&gt;AC_LANG_DEFINES_PROVIDED&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
In many cases, you may find it more convenient to use the
wrapper &lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_LANG_PROGRAM">
<prototype>
<parameter content="prologue"/>
<parameter content="body"/>
</prototype>
<synopsis>
Expands into a source file which consists of the
&lt;VAR&gt;prologue&lt;/VAR&gt;, and then
&lt;VAR&gt;body&lt;/VAR&gt; as body of the main function (e.g.,
&lt;CODE&gt;main&lt;/CODE&gt; in C). Since it uses
&lt;CODE&gt;AC_LANG_SOURCE&lt;/CODE&gt;, the features of the
latter are available.
</synopsis>
</macro>
<macro id="AC_LANG_CALL">
<prototype>
<parameter content="prologue"/>
<parameter content="function"/>
</prototype>
<synopsis>
Expands into a source file which consists of the
&lt;VAR&gt;prologue&lt;/VAR&gt;, and then a call to the
&lt;VAR&gt;function&lt;/VAR&gt; as body of the main function
(e.g., &lt;CODE&gt;main&lt;/CODE&gt; in C). Since it uses
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt;, the feature of the
latter are available.&lt;/P&gt;&lt;P&gt;
This function will probably be replaced in the future by a
version which would enable specifying the arguments. The use of
this macro is not encouraged, as it violates strongly the typing
system.&lt;/P&gt;&lt;P&gt;
This macro cannot be used for Erlang tests.
</synopsis>
</macro>
<macro id="AC_LANG_FUNC_LINK_TRY">
<prototype>
<parameter content="function"/>
</prototype>
<synopsis>
Expands into a source file which uses the
&lt;VAR&gt;function&lt;/VAR&gt; in the body of the main function
(e.g., &lt;CODE&gt;main&lt;/CODE&gt; in C). Since it uses
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt;, the features of the
latter are available.&lt;/P&gt;&lt;P&gt;
As &lt;CODE&gt;AC_LANG_CALL&lt;/CODE&gt;, this macro is
documented only for completeness. It is considered to be
severely broken, and in the future will be removed in favor of
actual function calls (with properly typed arguments).&lt;/P&gt;&lt;P&gt;
This macro cannot be used for Erlang tests.
</synopsis>
</macro>
<macro id="AC_PREPROC_IFELSE">
<prototype>
<parameter content="input"/>
<parameter content="[action-if-true]"/>
<parameter content="@ [action-if-false]"/>
</prototype>
<synopsis>
Run the preprocessor of the current language (Language Choice)
on the &lt;VAR&gt;input&lt;/VAR&gt;, run the shell commands
&lt;VAR&gt;action-if-true&lt;/VAR&gt; on success,
&lt;VAR&gt;action-if-false&lt;/VAR&gt; otherwise. The
&lt;VAR&gt;input&lt;/VAR&gt; can be made by
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt; and friends.&lt;/P&gt;&lt;P&gt;
This macro uses &lt;CODE&gt;CPPFLAGS&lt;/CODE&gt;, but not
&lt;CODE&gt;CFLAGS&lt;/CODE&gt;, because
&lt;samp&gt;-g&lt;/samp&gt;, &lt;samp&gt;-O&lt;/samp&gt;, etc.@:
are not valid options to many C preprocessors.&lt;/P&gt;&lt;P&gt;
It is customary to report unexpected failures with
&lt;CODE&gt;AC_MSG_FAILURE&lt;/CODE&gt;. If needed,
&lt;VAR&gt;action-if-true&lt;/VAR&gt; can further access the
preprocessed output in the file &lt;TT&gt;conftest.i&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AC_EGREP_HEADER">
<prototype>
<parameter content="pattern"/>
<parameter content="header-file"/>
<parameter content="@ action-if-found"/>
<parameter content="[action-if-not-found]"/>
</prototype>
<synopsis>
If the output of running the preprocessor on the system header
file &lt;VAR&gt;header-file&lt;/VAR&gt; matches the extended
regular expression &lt;VAR&gt;pattern&lt;/VAR&gt;, execute shell
commands &lt;VAR&gt;action-if-found&lt;/VAR&gt;, otherwise
execute &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="AC_EGREP_CPP">
<prototype>
<parameter content="pattern"/>
<parameter content="program"/>
<parameter content="@ [action-if-found]"/>
<parameter content="[action-if-not-found]"/>
</prototype>
<synopsis>
&lt;VAR&gt;program&lt;/VAR&gt; is the text of a C or C++
program, on which shell variable, back quote, and backslash
substitutions are performed. If the output of running the
preprocessor on &lt;VAR&gt;program&lt;/VAR&gt; matches the
extended regular expression &lt;VAR&gt;pattern&lt;/VAR&gt;,
execute shell commands &lt;VAR&gt;action-if-found&lt;/VAR&gt;,
otherwise execute &lt;VAR&gt;action-if-not-found&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="AC_COMPILE_IFELSE">
<prototype>
<parameter content="input"/>
<parameter content="[action-if-true]"/>
<parameter content="@ [action-if-false]"/>
</prototype>
<synopsis>
Run the compiler and compilation flags of the current language
(Language Choice) on the &lt;VAR&gt;input&lt;/VAR&gt;, run the
shell commands &lt;VAR&gt;action-if-true&lt;/VAR&gt; on success,
&lt;VAR&gt;action-if-false&lt;/VAR&gt; otherwise. The
&lt;VAR&gt;input&lt;/VAR&gt; can be made by
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt; and friends.&lt;/P&gt;&lt;P&gt;
It is customary to report unexpected failures with
&lt;CODE&gt;AC_MSG_FAILURE&lt;/CODE&gt;. This macro does not
try to link; use &lt;CODE&gt;AC_LINK_IFELSE&lt;/CODE&gt; if you
need to do that (Running the Linker). If needed,
&lt;VAR&gt;action-if-true&lt;/VAR&gt; can further access the
just-compiled object file &lt;TT&gt;conftest.$OBJEXT&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
This macro uses &lt;CODE&gt;AC_REQUIRE&lt;/CODE&gt; for the
compiler associated with the current language, which means that
if the compiler has not yet been determined, the compiler
determination will be made prior to the body of the outermust
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; macro that triggered this
macro to expand (Expanded Before Required).
</synopsis>
</macro>
<macro id="AC_LINK_IFELSE">
<prototype>
<parameter content="input"/>
<parameter content="[action-if-true]"/>
<parameter content="@ [action-if-false]"/>
</prototype>
<synopsis>
Run the compiler (and compilation flags) and the linker of the
current language (Language Choice) on the
&lt;VAR&gt;input&lt;/VAR&gt;, run the shell commands
&lt;VAR&gt;action-if-true&lt;/VAR&gt; on success,
&lt;VAR&gt;action-if-false&lt;/VAR&gt; otherwise. The
&lt;VAR&gt;input&lt;/VAR&gt; can be made by
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt; and friends. If
needed, &lt;VAR&gt;action-if-true&lt;/VAR&gt; can further access
the just-linked program file
&lt;TT&gt;conftest$EXEEXT&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;LDFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;LIBS&lt;/CODE&gt; are used for linking, in addition
to the current compilation flags.&lt;/P&gt;&lt;P&gt;
It is customary to report unexpected failures with
&lt;CODE&gt;AC_MSG_FAILURE&lt;/CODE&gt;. This macro does not
try to execute the program; use
&lt;CODE&gt;AC_RUN_IFELSE&lt;/CODE&gt; if you need to do that
(Runtime).
</synopsis>
</macro>
<macro id="AC_RUN_IFELSE">
<prototype>
<parameter content="input"/>
<parameter content="[action-if-true]"/>
<parameter content="@ [action-if-false]"/>
<parameter content="[action-if-cross-compiling]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;program&lt;/VAR&gt; compiles and links
successfully and returns an exit status of 0 when executed, run
shell commands &lt;VAR&gt;action-if-true&lt;/VAR&gt;. Otherwise,
run shell commands &lt;VAR&gt;action-if-false&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;input&lt;/VAR&gt; can be made by
&lt;CODE&gt;AC_LANG_PROGRAM&lt;/CODE&gt; and friends.
&lt;CODE&gt;LDFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;LIBS&lt;/CODE&gt; are used for linking, in addition
to the compilation flags of the current language (Language
Choice). Additionally, &lt;VAR&gt;action-if-true&lt;/VAR&gt; can
run &lt;CODE&gt;./conftest$EXEEXT&lt;/CODE&gt; for further
testing.&lt;/P&gt;&lt;P&gt;
If the compiler being used does not produce executables that run
on the system where &lt;CODE&gt;configure&lt;/CODE&gt; is being
run, then the test program is not run. If the optional shell
commands &lt;VAR&gt;action-if-cross-compiling&lt;/VAR&gt; are
given, they are run instead. Otherwise,
&lt;CODE&gt;configure&lt;/CODE&gt; prints an error message and
exits.&lt;/P&gt;&lt;P&gt;
In the &lt;VAR&gt;action-if-false&lt;/VAR&gt; section, the
failing exit status is available in the shell variable
&lt;samp&gt;$?&lt;/samp&gt;. This exit status might be that of
a failed compilation, or it might be that of a failed program
execution.&lt;/P&gt;&lt;P&gt;
It is customary to report unexpected failures with
&lt;CODE&gt;AC_MSG_FAILURE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_DEFINE">
<prototype>
<parameter content="variable"/>
<parameter content="value"/>
<parameter content="[description]"/>
</prototype>
<prototype>
<parameter content="variable"/>
</prototype>
<synopsis>
Define &lt;VAR&gt;variable&lt;/VAR&gt; to
&lt;VAR&gt;value&lt;/VAR&gt; (verbatim), by defining a C
preprocessor macro for &lt;VAR&gt;variable&lt;/VAR&gt;.
&lt;VAR&gt;variable&lt;/VAR&gt; should be a C identifier,
optionally suffixed by a parenthesized argument list to define a
C preprocessor macro with arguments. The macro argument list,
if present, should be a comma-separated list of C identifiers,
possibly terminated by an ellipsis &lt;samp&gt;...&lt;/samp&gt;
if C99 syntax is employed. &lt;VAR&gt;variable&lt;/VAR&gt;
should not contain comments, white space, trigraphs,
backslash-newlines, universal character names, or non-ASCII
characters.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;value&lt;/VAR&gt; may contain backslash-escaped
newlines, which will be preserved if you use
&lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt; but flattened if
passed via &lt;CODE&gt;@@DEFS@@&lt;/CODE&gt; (with no effect on
the compilation, since the preprocessor sees only one line in
the first place). &lt;VAR&gt;value&lt;/VAR&gt; should not
contain raw newlines. If you are not using
&lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt;,
&lt;VAR&gt;value&lt;/VAR&gt; should not contain any
&lt;samp&gt;#&lt;/samp&gt; characters, as
&lt;CODE&gt;make&lt;/CODE&gt; tends to eat them. To use a shell
variable, use &lt;CODE&gt;AC_DEFINE_UNQUOTED&lt;/CODE&gt;
instead.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;description&lt;/VAR&gt; is only useful if you are
using &lt;CODE&gt;AC_CONFIG_HEADERS&lt;/CODE&gt;. In this case,
&lt;VAR&gt;description&lt;/VAR&gt; is put into the generated
&lt;TT&gt;config.h.in&lt;/TT&gt; as the comment before the macro
define. The following example defines the C preprocessor
variable &lt;CODE&gt;EQUATION&lt;/CODE&gt; to be the string
constant &lt;samp&gt;"$a &gt; $b"&lt;/samp&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_DEFINE([EQUATION], ["$a &gt;
$b"], [Equation string.])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
If neither &lt;VAR&gt;value&lt;/VAR&gt; nor
&lt;VAR&gt;description&lt;/VAR&gt; are given, then
&lt;VAR&gt;value&lt;/VAR&gt; defaults to 1 instead of to the
empty string. This is for backwards compatibility with older
versions of Autoconf, but this usage is obsolescent and may be
withdrawn in future versions of Autoconf.&lt;/P&gt;&lt;P&gt;
If the &lt;VAR&gt;variable&lt;/VAR&gt; is a literal string, it
is passed to &lt;CODE&gt;m4_pattern_allow&lt;/CODE&gt;
(Forbidden Patterns).&lt;/P&gt;&lt;P&gt;
If multiple &lt;CODE&gt;AC_DEFINE&lt;/CODE&gt; statements are
executed for the same &lt;VAR&gt;variable&lt;/VAR&gt; name (not
counting any parenthesized argument list), the last one wins.
</synopsis>
</macro>
<macro id="AC_DEFINE_UNQUOTED">
<prototype>
<parameter content="variable"/>
<parameter content="value"/>
<parameter content="[description]"/>
</prototype>
<prototype>
<parameter content="variable"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;AC_DEFINE&lt;/CODE&gt;, but three shell
expansions are performed---once---on
&lt;VAR&gt;variable&lt;/VAR&gt; and
&lt;VAR&gt;value&lt;/VAR&gt;: variable expansion
(&lt;samp&gt;$&lt;/samp&gt;), command substitution
(&lt;samp&gt;`&lt;/samp&gt;), and backslash escaping
(&lt;samp&gt;\&lt;/samp&gt;), as if in an unquoted
here-document. Single and double quote characters in the value
have no special meaning. Use this macro instead of
&lt;CODE&gt;AC_DEFINE&lt;/CODE&gt; when
&lt;VAR&gt;variable&lt;/VAR&gt; or &lt;VAR&gt;value&lt;/VAR&gt;
is a shell variable. Examples:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_DEFINE_UNQUOTED([config_machfile], ["$machfile"],
[Configuration machine file.]) AC_DEFINE_UNQUOTED([GETGROUPS_T],
[$ac_cv_type_getgroups], [getgroups return type.])
AC_DEFINE_UNQUOTED([$ac_tr_hdr], [1], [Translated header
name.]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_SUBST">
<prototype>
<parameter content="variable"/>
<parameter content="[value]"/>
</prototype>
<synopsis>
Create an output variable from a shell variable. Make
&lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; substitute the variable
&lt;VAR&gt;variable&lt;/VAR&gt; into output files (typically one
or more makefiles). This means that
&lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; replaces instances of
&lt;samp&gt;@@&lt;VAR&gt;variable&lt;/VAR&gt;@@&lt;/samp&gt; in
input files with the value that the shell variable
&lt;VAR&gt;variable&lt;/VAR&gt; has when
&lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; is called. The value can
contain any non-&lt;CODE&gt;NUL&lt;/CODE&gt; character,
including newline. If you are using Automake 1.11 or newer, for
newlines in values you might want to consider using
&lt;CODE&gt;AM_SUBST_NOTMAKE&lt;/CODE&gt; to prevent
&lt;CODE&gt;automake&lt;/CODE&gt; from adding a line
&lt;CODE&gt;&lt;VAR&gt;variable&lt;/VAR&gt; =
@@&lt;VAR&gt;variable&lt;/VAR&gt;@@&lt;/CODE&gt; to the
&lt;TT&gt;Makefile.in&lt;/TT&gt; files (Optional, , Automake,
automake, Other things Automake recognizes).&lt;/P&gt;&lt;P&gt;
Variable occurrences should not overlap: e.g., an input file
should not contain
&lt;samp&gt;@@&lt;VAR&gt;var1&lt;/VAR&gt;@@&lt;VAR&gt;var2&lt;/VAR&gt;@@&lt;/samp&gt;
if &lt;VAR&gt;var1&lt;/VAR&gt; and &lt;VAR&gt;var2&lt;/VAR&gt;
are variable names. The substituted value is not rescanned for
more output variables; occurrences of
&lt;samp&gt;@@&lt;VAR&gt;variable&lt;/VAR&gt;@@&lt;/samp&gt; in
the value are inserted literally into the output file. (The
algorithm uses the special marker
&lt;CODE&gt;|#_!!_#|&lt;/CODE&gt; internally, so neither the
substituted value nor the output file may contain
&lt;CODE&gt;|#_!!_#|&lt;/CODE&gt;.)&lt;/P&gt;&lt;P&gt;
If &lt;VAR&gt;value&lt;/VAR&gt; is given, in addition assign it
to &lt;VAR&gt;variable&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The string &lt;VAR&gt;variable&lt;/VAR&gt; is passed to
&lt;CODE&gt;m4_pattern_allow&lt;/CODE&gt; (Forbidden Patterns).
</synopsis>
</macro>
<macro id="AC_SUBST_FILE">
<prototype>
<parameter content="variable"/>
</prototype>
<synopsis>
Another way to create an output variable from a shell variable.
Make &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; insert (without
substitutions) the contents of the file named by shell variable
&lt;VAR&gt;variable&lt;/VAR&gt; into output files. This means
that &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; replaces instances of
&lt;samp&gt;@@&lt;VAR&gt;variable&lt;/VAR&gt;@@&lt;/samp&gt; in
output files (such as &lt;TT&gt;Makefile.in&lt;/TT&gt;) with the
contents of the file that the shell variable
&lt;VAR&gt;variable&lt;/VAR&gt; names when
&lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt; is called. Set the variable
to &lt;TT&gt;/dev/null&lt;/TT&gt; for cases that do not have a
file to insert. This substitution occurs only when the
&lt;samp&gt;@@&lt;VAR&gt;variable&lt;/VAR&gt;@@&lt;/samp&gt; is
on a line by itself, optionally surrounded by spaces and tabs.
The substitution replaces the whole line, including the spaces,
tabs, and the terminating newline.&lt;/P&gt;&lt;P&gt;
This macro is useful for inserting makefile fragments containing
special dependencies or other &lt;CODE&gt;make&lt;/CODE&gt;
directives for particular host or target types into makefiles.
For example, &lt;TT&gt;configure.ac&lt;/TT&gt; could contain:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_SUBST_FILE([host_frag])
host_frag=$srcdir/conf/sun4.mh
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
and then a &lt;TT&gt;Makefile.in&lt;/TT&gt; could contain:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @@host_frag@@
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The string &lt;VAR&gt;variable&lt;/VAR&gt; is passed to
&lt;CODE&gt;m4_pattern_allow&lt;/CODE&gt; (Forbidden Patterns).
</synopsis>
</macro>
<macro id="AC_ARG_VAR">
<prototype>
<parameter content="variable"/>
<parameter content="description"/>
</prototype>
<synopsis>
Declare &lt;VAR&gt;variable&lt;/VAR&gt; is a precious variable,
and include its &lt;VAR&gt;description&lt;/VAR&gt; in the
variable section of &lt;samp&gt;./configure --help&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
Being precious means that &lt;UL&gt; &lt;LI&gt;
&lt;VAR&gt;variable&lt;/VAR&gt; is substituted via
&lt;CODE&gt;AC_SUBST&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; The value of &lt;VAR&gt;variable&lt;/VAR&gt; when
&lt;CODE&gt;configure&lt;/CODE&gt; was launched is saved in the
cache, including if it was not specified on the command line but
via the environment. Indeed, while
&lt;CODE&gt;configure&lt;/CODE&gt; can notice the definition of
&lt;CODE&gt;CC&lt;/CODE&gt; in &lt;samp&gt;./configure
CC=bizarre-cc&lt;/samp&gt;, it is impossible to notice it in
&lt;samp&gt;CC=bizarre-cc ./configure&lt;/samp&gt;, which,
unfortunately, is what most users do.&lt;/P&gt;&lt;P&gt;
We emphasize that it is the &lt;EM&gt;initial&lt;/EM&gt; value
of &lt;VAR&gt;variable&lt;/VAR&gt; which is saved, not that
found during the execution of
&lt;CODE&gt;configure&lt;/CODE&gt;. Indeed, specifying
&lt;samp&gt;./configure FOO=foo&lt;/samp&gt; and letting
&lt;samp&gt;./configure&lt;/samp&gt; guess that
&lt;CODE&gt;FOO&lt;/CODE&gt; is &lt;CODE&gt;foo&lt;/CODE&gt; can
be two different things.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; &lt;VAR&gt;variable&lt;/VAR&gt; is checked for
consistency between two &lt;CODE&gt;configure&lt;/CODE&gt; runs.
For instance:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; $ &lt;KBD&gt;./configure --silent
--config-cache&lt;/KBD&gt; $ &lt;KBD&gt;CC=cc ./configure
--silent --config-cache&lt;/KBD&gt; configure: error: `CC' was
not set in the previous run configure: error: changes in the
environment can compromise \ the build configure: error: run
`make distclean' and/or \ `rm config.cache' and start over
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
and similarly if the variable is unset, or if its content is
changed. If the content has white space changes only, then the
error is degraded to a warning only, but the old value is
reused.&lt;/P&gt;&lt;P&gt;
&lt;LI&gt; &lt;VAR&gt;variable&lt;/VAR&gt; is kept during
automatic reconfiguration (config.status Invocation) as if it
had been passed as a command line argument, including when no
cache is used:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; $ &lt;KBD&gt;CC=/usr/bin/cc
./configure var=raboof --silent&lt;/KBD&gt; $
&lt;KBD&gt;./config.status --recheck&lt;/KBD&gt; running
CONFIG_SHELL=/bin/sh /bin/sh ./configure var=raboof \
CC=/usr/bin/cc --no-create --no-recursion
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;/UL&gt;
</synopsis>
</macro>
<macro id="AC_CACHE_VAL">
<prototype>
<parameter content="cache-id"/>
<parameter content="commands-to-set-it"/>
</prototype>
<synopsis>
Ensure that the results of the check identified by
&lt;VAR&gt;cache-id&lt;/VAR&gt; are available. If the results
of the check were in the cache file that was read, and
&lt;CODE&gt;configure&lt;/CODE&gt; was not given the
&lt;samp&gt;--quiet&lt;/samp&gt; or
&lt;samp&gt;--silent&lt;/samp&gt; option, print a message saying
that the result was cached; otherwise, run the shell commands
&lt;VAR&gt;commands-to-set-it&lt;/VAR&gt;. If the shell
commands are run to determine the value, the value is saved in
the cache file just before &lt;CODE&gt;configure&lt;/CODE&gt;
creates its output files. , for how to choose the name of the
&lt;VAR&gt;cache-id&lt;/VAR&gt; variable.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;commands-to-set-it&lt;/VAR&gt; &lt;EM&gt;must
have no side effects&lt;/EM&gt; except for setting the variable
&lt;VAR&gt;cache-id&lt;/VAR&gt;, see below.
</synopsis>
</macro>
<macro id="AC_CACHE_CHECK">
<prototype>
<parameter content="message"/>
<parameter content="cache-id"/>
<parameter content="@ commands-to-set-it"/>
</prototype>
<synopsis>
A wrapper for &lt;CODE&gt;AC_CACHE_VAL&lt;/CODE&gt; that takes
care of printing the messages. This macro provides a convenient
shorthand for the most common way to use these macros. It calls
&lt;CODE&gt;AC_MSG_CHECKING&lt;/CODE&gt; for
&lt;VAR&gt;message&lt;/VAR&gt;, then
&lt;CODE&gt;AC_CACHE_VAL&lt;/CODE&gt; with the
&lt;VAR&gt;cache-id&lt;/VAR&gt; and
&lt;VAR&gt;commands&lt;/VAR&gt; arguments, and
&lt;CODE&gt;AC_MSG_RESULT&lt;/CODE&gt; with
&lt;VAR&gt;cache-id&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;commands-to-set-it&lt;/VAR&gt; &lt;EM&gt;must
have no side effects&lt;/EM&gt; except for setting the variable
&lt;VAR&gt;cache-id&lt;/VAR&gt;, see below.
</synopsis>
</macro>
<macro id="AC_CACHE_LOAD">
<prototype>
</prototype>
<synopsis>
Loads values from existing cache file, or creates a new cache
file if a cache file is not found. Called automatically from
&lt;CODE&gt;AC_INIT&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CACHE_SAVE">
<prototype>
</prototype>
<synopsis>
Flushes all cached values to the cache file. Called
automatically from &lt;CODE&gt;AC_OUTPUT&lt;/CODE&gt;, but it
can be quite useful to call
&lt;CODE&gt;AC_CACHE_SAVE&lt;/CODE&gt; at key points in
&lt;TT&gt;configure.ac&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AC_MSG_CHECKING">
<prototype>
<parameter content="feature-description"/>
</prototype>
<synopsis>
Notify the user that &lt;CODE&gt;configure&lt;/CODE&gt; is
checking for a particular feature. This macro prints a message
that starts with &lt;samp&gt;checking &lt;/samp&gt; and ends
with &lt;samp&gt;...&lt;/samp&gt; and no newline. It must be
followed by a call to &lt;CODE&gt;AC_MSG_RESULT&lt;/CODE&gt; to
print the result of the check and the newline. The
&lt;VAR&gt;feature-description&lt;/VAR&gt; should be something
like &lt;samp&gt;whether the Fortran compiler accepts C++
comments&lt;/samp&gt; or &lt;samp&gt;for c89&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This macro prints nothing if &lt;CODE&gt;configure&lt;/CODE&gt;
is run with the &lt;samp&gt;--quiet&lt;/samp&gt; or
&lt;samp&gt;--silent&lt;/samp&gt; option.
</synopsis>
</macro>
<macro id="AC_MSG_RESULT">
<prototype>
<parameter content="result-description"/>
</prototype>
<synopsis>
Notify the user of the results of a check.
&lt;VAR&gt;result-description&lt;/VAR&gt; is almost always the
value of the cache variable for the check, typically
&lt;samp&gt;yes&lt;/samp&gt;, &lt;samp&gt;no&lt;/samp&gt;, or a
file name. This macro should follow a call to
&lt;CODE&gt;AC_MSG_CHECKING&lt;/CODE&gt;, and the
&lt;VAR&gt;result-description&lt;/VAR&gt; should be the
completion of the message printed by the call to
&lt;CODE&gt;AC_MSG_CHECKING&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
This macro prints nothing if &lt;CODE&gt;configure&lt;/CODE&gt;
is run with the &lt;samp&gt;--quiet&lt;/samp&gt; or
&lt;samp&gt;--silent&lt;/samp&gt; option.
</synopsis>
</macro>
<macro id="AC_MSG_NOTICE">
<prototype>
<parameter content="message"/>
</prototype>
<synopsis>
Deliver the &lt;VAR&gt;message&lt;/VAR&gt; to the user. It is
useful mainly to print a general description of the overall
purpose of a group of feature checks, e.g.,&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_MSG_NOTICE([checking if stack
overflow is detectable])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro prints nothing if &lt;CODE&gt;configure&lt;/CODE&gt;
is run with the &lt;samp&gt;--quiet&lt;/samp&gt; or
&lt;samp&gt;--silent&lt;/samp&gt; option.
</synopsis>
</macro>
<macro id="AC_MSG_ERROR">
<prototype>
<parameter content="error-description"/>
<parameter content="[exit-status= $?/1]"/>
</prototype>
<synopsis>
Notify the user of an error that prevents
&lt;CODE&gt;configure&lt;/CODE&gt; from completing. This macro
prints an error message to the standard error output and exits
&lt;CODE&gt;configure&lt;/CODE&gt; with
&lt;VAR&gt;exit-status&lt;/VAR&gt; (&lt;samp&gt;$?&lt;/samp&gt;
by default, except that &lt;samp&gt;0&lt;/samp&gt; is converted
to &lt;samp&gt;1&lt;/samp&gt;).
&lt;VAR&gt;error-description&lt;/VAR&gt; should be something
like &lt;samp&gt;invalid value $HOME for \$HOME&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;error-description&lt;/VAR&gt; should start with a
lower-case letter, and ``cannot'' is preferred to ``can't''.
</synopsis>
</macro>
<macro id="AC_MSG_FAILURE">
<prototype>
<parameter content="error-description"/>
<parameter content="[exit-status]"/>
</prototype>
<synopsis>
This &lt;CODE&gt;AC_MSG_ERROR&lt;/CODE&gt; wrapper notifies the
user of an error that prevents
&lt;CODE&gt;configure&lt;/CODE&gt; from completing
&lt;EM&gt;and&lt;/EM&gt; that additional details are provided in
&lt;TT&gt;config.log&lt;/TT&gt;. This is typically used when
abnormal results are found during a compilation.
</synopsis>
</macro>
<macro id="AC_MSG_WARN">
<prototype>
<parameter content="problem-description"/>
</prototype>
<synopsis>
Notify the &lt;CODE&gt;configure&lt;/CODE&gt; user of a
possible problem. This macro prints the message to the standard
error output; &lt;CODE&gt;configure&lt;/CODE&gt; continues
running afterward, so macros that call
&lt;CODE&gt;AC_MSG_WARN&lt;/CODE&gt; should provide a default
(back-up) behavior for the situations they warn about.
&lt;VAR&gt;problem-description&lt;/VAR&gt; should be something
like &lt;samp&gt;ln -s seems to make hard links&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="__file__">
<prototype>
</prototype>
<prototype>
</prototype>
<synopsis>
All M4 macros starting with &lt;samp&gt;__&lt;/samp&gt; retain
their original name: for example, no
&lt;CODE&gt;m4__file__&lt;/CODE&gt; is defined.
</synopsis>
</macro>
<macro id="__oline__">
<prototype>
</prototype>
<synopsis>
This is not technically a macro, but a feature of Autom4te.
The sequence &lt;CODE&gt;__oline__&lt;/CODE&gt; can be used
similarly to the other m4sugar location macros, but rather than
expanding to the location of the input file, it is translated to
the line number where it appears in the output file after all
other M4 expansions.
</synopsis>
</macro>
<macro id="dnl">
<prototype>
</prototype>
<synopsis>
This macro kept its original name: no
&lt;CODE&gt;m4_dnl&lt;/CODE&gt; is defined.
</synopsis>
</macro>
<macro id="m4_bpatsubst">
<prototype>
<parameter content="string"/>
<parameter content="regexp"/>
<parameter content="[replacement]"/>
</prototype>
<synopsis>
This macro corresponds to &lt;CODE&gt;patsubst&lt;/CODE&gt;.
The name &lt;CODE&gt;m4_patsubst&lt;/CODE&gt; is kept for future
versions of M4sugar, once GNU M4 2.0 is released and supports
extended regular expression syntax.
</synopsis>
</macro>
<macro id="m4_bregexp">
<prototype>
<parameter content="string"/>
<parameter content="regexp"/>
<parameter content="[replacement]"/>
</prototype>
<synopsis>
This macro corresponds to &lt;CODE&gt;regexp&lt;/CODE&gt;. The
name &lt;CODE&gt;m4_regexp&lt;/CODE&gt; is kept for future
versions of M4sugar, once GNU M4 2.0 is released and supports
extended regular expression syntax.
</synopsis>
</macro>
<macro id="m4_copy">
<prototype>
<parameter content="source"/>
<parameter content="dest"/>
</prototype>
<prototype>
<parameter content="source"/>
<parameter content="dest"/>
</prototype>
<prototype>
<parameter content="source"/>
<parameter content="dest"/>
</prototype>
<prototype>
<parameter content="source"/>
<parameter content="dest"/>
</prototype>
<synopsis>
These macros aren't directly builtins, but are closely
related to &lt;CODE&gt;m4_pushdef&lt;/CODE&gt; and
&lt;CODE&gt;m4_defn&lt;/CODE&gt;.
&lt;CODE&gt;m4_copy&lt;/CODE&gt; and
&lt;CODE&gt;m4_rename&lt;/CODE&gt; ensure that
&lt;VAR&gt;dest&lt;/VAR&gt; is undefined, while
&lt;CODE&gt;m4_copy_force&lt;/CODE&gt; and
&lt;CODE&gt;m4_rename_force&lt;/CODE&gt; overwrite any existing
definition. All four macros then proceed to copy the entire
pushdef stack of definitions of &lt;VAR&gt;source&lt;/VAR&gt;
over to &lt;VAR&gt;dest&lt;/VAR&gt;.
&lt;CODE&gt;m4_copy&lt;/CODE&gt; and
&lt;CODE&gt;m4_copy_force&lt;/CODE&gt; preserve the source
(including in the special case where
&lt;VAR&gt;source&lt;/VAR&gt; is undefined), while
&lt;CODE&gt;m4_rename&lt;/CODE&gt; and
&lt;CODE&gt;m4_rename_force&lt;/CODE&gt; undefine the original
macro name (making it an error to rename an undefined
&lt;VAR&gt;source&lt;/VAR&gt;).&lt;/P&gt;&lt;P&gt;
Note that attempting to invoke a renamed macro might not work,
since the macro may have a dependence on helper macros accessed
via composition of &lt;samp&gt;$0&lt;/samp&gt; but that were not
also renamed; likewise, other macros may have a hard-coded
dependence on &lt;VAR&gt;source&lt;/VAR&gt; and could break if
&lt;VAR&gt;source&lt;/VAR&gt; has been deleted. On the other
hand, it is always safe to rename a macro to temporarily move it
out of the way, then rename it back later to restore original
semantics.
</synopsis>
</macro>
<macro id="m4_defn">
<prototype>
<parameter content="macro..."/>
</prototype>
<synopsis>
This macro fails if &lt;VAR&gt;macro&lt;/VAR&gt; is not
defined, even when using older versions of M4 that did not warn.
See &lt;CODE&gt;m4_undefine&lt;/CODE&gt;. Unfortunately, in
order to support these older versions of M4, there are some
situations involving unbalanced quotes where concatenating
multiple macros together will work in newer M4 but not in
m4sugar; use quadrigraphs to work around this.
</synopsis>
</macro>
<macro id="m4_divert">
<prototype>
<parameter content="diversion"/>
</prototype>
<synopsis>
M4sugar relies heavily on diversions, so rather than behaving
as a primitive, &lt;CODE&gt;m4_divert&lt;/CODE&gt; behaves like:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_divert_pop()m4_divert_push([&lt;VAR&gt;diversion&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; , for more
details about the use of the diversion stack. In particular,
this implies that &lt;VAR&gt;diversion&lt;/VAR&gt; should be a
named diversion rather than a raw number. But be aware that it
is seldom necessary to explicitly change the diversion stack,
and that when done incorrectly, it can lead to syntactically
invalid scripts.
</synopsis>
</macro>
<macro id="m4_dumpdef">
<prototype>
<parameter content="name..."/>
</prototype>
<prototype>
<parameter content="name..."/>
</prototype>
<synopsis>
&lt;CODE&gt;m4_dumpdef&lt;/CODE&gt; is like the M4 builtin,
except that this version requires at least one argument, output
always goes to standard error rather than the current debug
file, no sorting is done on multiple arguments, and an error is
issued if any &lt;VAR&gt;name&lt;/VAR&gt; is undefined.
&lt;CODE&gt;m4_dumpdefs&lt;/CODE&gt; is a convenience macro that
calls &lt;CODE&gt;m4_dumpdef&lt;/CODE&gt; for all of the
&lt;CODE&gt;m4_pushdef&lt;/CODE&gt; stack of definitions,
starting with the current, and silently does nothing if
&lt;VAR&gt;name&lt;/VAR&gt; is undefined.&lt;/P&gt;&lt;P&gt;
Unfortunately, due to a limitation in M4 1.4.x, any macro
defined as a builtin is output as the empty string. This
behavior is rectified by using M4 1.6 or newer. However, this
behavior difference means that
&lt;CODE&gt;m4_dumpdef&lt;/CODE&gt; should only be used while
developing m4sugar macros, and never in the final published form
of a macro.
</synopsis>
</macro>
<macro id="m4_esyscmd_s">
<prototype>
<parameter content="command"/>
</prototype>
<synopsis>
Like &lt;CODE&gt;m4_esyscmd&lt;/CODE&gt;, this macro expands to
the result of running &lt;VAR&gt;command&lt;/VAR&gt; in a shell.
The difference is that any trailing newlines are removed, so
that the output behaves more like shell command substitution.
</synopsis>
</macro>
<macro id="m4_exit">
<prototype>
<parameter content="exit-status"/>
</prototype>
<synopsis>
This macro corresponds to &lt;CODE&gt;m4exit&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_if">
<prototype>
<parameter content="comment"/>
</prototype>
<prototype>
<parameter content="string-1"/>
<parameter content="string-2"/>
<parameter content="equal"/>
<parameter content="[not-equal]"/>
</prototype>
<prototype>
</prototype>
<synopsis>
&lt;VAR&gt;string-3&lt;/VAR&gt;,
&lt;VAR&gt;string-4&lt;/VAR&gt;, &lt;VAR&gt;equal-2&lt;/VAR&gt;,
&lt;small&gt;...&lt;/small&gt;, not-equal) This macro
corresponds to &lt;CODE&gt;ifelse&lt;/CODE&gt;.
&lt;VAR&gt;string-1&lt;/VAR&gt; and
&lt;VAR&gt;string-2&lt;/VAR&gt; are compared literally, so
usually one of the two arguments is passed unquoted. , for more
conditional idioms.
</synopsis>
</macro>
<macro id="m4_include">
<prototype>
<parameter content="file"/>
</prototype>
<prototype>
<parameter content="file"/>
</prototype>
<synopsis>
Like the M4 builtins, but warn against multiple inclusions of
&lt;VAR&gt;file&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_mkstemp">
<prototype>
<parameter content="template"/>
</prototype>
<prototype>
<parameter content="template"/>
</prototype>
<synopsis>
Posix requires &lt;CODE&gt;maketemp&lt;/CODE&gt; to replace
the trailing &lt;samp&gt;X&lt;/samp&gt; characters in
&lt;VAR&gt;template&lt;/VAR&gt; with the process id, without
regards to the existence of a file by that name, but this a
security hole. When this was pointed out to the Posix folks,
they agreed to invent a new macro
&lt;CODE&gt;mkstemp&lt;/CODE&gt; that always creates a uniquely
named file, but not all versions of GNU M4 support the new
macro. In M4sugar, &lt;CODE&gt;m4_maketemp&lt;/CODE&gt; and
&lt;CODE&gt;m4_mkstemp&lt;/CODE&gt; are synonyms for each other,
and both have the secure semantics regardless of which macro the
underlying M4 provides.
</synopsis>
</macro>
<macro id="m4_popdef">
<prototype>
<parameter content="macro..."/>
</prototype>
<synopsis>
This macro fails if &lt;VAR&gt;macro&lt;/VAR&gt; is not
defined, even when using older versions of M4 that did not warn.
See &lt;CODE&gt;m4_undefine&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_undefine">
<prototype>
<parameter content="macro..."/>
</prototype>
<synopsis>
This macro fails if &lt;VAR&gt;macro&lt;/VAR&gt; is not
defined, even when using older versions of M4 that did not warn.
Use&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_ifdef([&lt;VAR&gt;macro&lt;/VAR&gt;],
[m4_undefine([&lt;VAR&gt;macro&lt;/VAR&gt;])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
if you are not sure whether &lt;VAR&gt;macro&lt;/VAR&gt; is
defined.
</synopsis>
</macro>
<macro id="m4_undivert">
<prototype>
<parameter content="diversion..."/>
</prototype>
<synopsis>
Unlike the M4 builtin, at least one
&lt;VAR&gt;diversion&lt;/VAR&gt; must be specified. Also, since
the M4sugar diversion stack prefers named diversions, the use of
&lt;CODE&gt;m4_undivert&lt;/CODE&gt; to include files is risky.
, for more details about the use of the diversion stack. But be
aware that it is seldom necessary to explicitly change the
diversion stack, and that when done incorrectly, it can lead to
syntactically invalid scripts.
</synopsis>
</macro>
<macro id="m4_wrap">
<prototype>
<parameter content="text"/>
</prototype>
<prototype>
<parameter content="text"/>
</prototype>
<synopsis>
These macros correspond to &lt;CODE&gt;m4wrap&lt;/CODE&gt;.
Posix requires arguments of multiple wrap calls to be
reprocessed at EOF in the same order as the original calls
(first-in, first-out). GNU M4 versions through 1.4.10, however,
reprocess them in reverse order (last-in, first-out). Both
orders are useful, therefore, you can rely on
&lt;CODE&gt;m4_wrap&lt;/CODE&gt; to provide FIFO semantics and
&lt;CODE&gt;m4_wrap_lifo&lt;/CODE&gt; for LIFO semantics,
regardless of the underlying GNU M4 version.&lt;/P&gt;&lt;P&gt;
Unlike the GNU M4 builtin, these macros only recognize one
argument, and avoid token pasting between consecutive
invocations. On the other hand, nested calls to
&lt;CODE&gt;m4_wrap&lt;/CODE&gt; from within wrapped text work
just as in the builtin.
</synopsis>
</macro>
<macro id="m4_assert">
<prototype>
<parameter content="expression"/>
<parameter content="[exit-status= 1]"/>
</prototype>
<synopsis>
Assert that the arithmetic &lt;VAR&gt;expression&lt;/VAR&gt;
evaluates to non-zero. Otherwise, issue a fatal error, and exit
&lt;CODE&gt;autom4te&lt;/CODE&gt; with
&lt;VAR&gt;exit-status&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_errprintn">
<prototype>
<parameter content="message"/>
</prototype>
<synopsis>
Similar to the builtin &lt;CODE&gt;m4_errprint&lt;/CODE&gt;,
except that a newline is guaranteed after
&lt;VAR&gt;message&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_fatal">
<prototype>
<parameter content="message"/>
</prototype>
<synopsis>
Report a severe error &lt;VAR&gt;message&lt;/VAR&gt; prefixed
with the current location, and have
&lt;CODE&gt;autom4te&lt;/CODE&gt; die.
</synopsis>
</macro>
<macro id="m4_location">
<prototype>
</prototype>
<synopsis>
Useful as a prefix in a message line. Short for:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; __file__:__line__
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_warn">
<prototype>
<parameter content="category"/>
<parameter content="message"/>
</prototype>
<synopsis>
Report &lt;VAR&gt;message&lt;/VAR&gt; as a warning (or as an
error if requested by the user) if warnings of the
&lt;VAR&gt;category&lt;/VAR&gt; are turned on. If the message
is emitted, it is prefixed with the current location, and
followed by a call trace of all macros defined via
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; used to get to the current
expansion. You are encouraged to use standard categories, which
currently include:&lt;/P&gt;&lt;P&gt;
&lt;DL&gt; &lt;DT&gt;'&lt;SAMP&gt;all&lt;/SAMP&gt;' &lt;DD&gt;
messages that don't fall into one of the following categories.
Use of an empty &lt;VAR&gt;category&lt;/VAR&gt; is equivalent.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;cross&lt;/SAMP&gt;' &lt;DD&gt; related to
cross compilation issues.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;obsolete&lt;/SAMP&gt;' &lt;DD&gt; use of
an obsolete construct.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;syntax&lt;/SAMP&gt;' &lt;DD&gt; dubious
syntactic constructs, incorrectly ordered macro calls.
&lt;/DL&gt;
</synopsis>
</macro>
<macro id="m4_cleardivert">
<prototype>
<parameter content="diversion..."/>
</prototype>
<synopsis>
Permanently discard any text that has been diverted into
&lt;VAR&gt;diversion&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_divert_once">
<prototype>
<parameter content="diversion"/>
<parameter content="[content]"/>
</prototype>
<synopsis>
Similar to &lt;CODE&gt;m4_divert_text&lt;/CODE&gt;, except that
&lt;VAR&gt;content&lt;/VAR&gt; is only output to
&lt;VAR&gt;diversion&lt;/VAR&gt; if this is the first time that
&lt;CODE&gt;m4_divert_once&lt;/CODE&gt; has been called with its
particular arguments.
</synopsis>
</macro>
<macro id="m4_divert_pop">
<prototype>
<parameter content="[diversion]"/>
</prototype>
<synopsis>
If provided, check that the current diversion is indeed
&lt;VAR&gt;diversion&lt;/VAR&gt;. Then change to the diversion
located earlier on the stack, giving an error if an attempt is
made to pop beyond the initial m4sugar diversion of
&lt;CODE&gt;KILL&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_divert_push">
<prototype>
<parameter content="diversion"/>
</prototype>
<synopsis>
Remember the former diversion on the diversion stack, and
output subsequent text into &lt;VAR&gt;diversion&lt;/VAR&gt;.
M4sugar maintains a diversion stack, and issues an error if
there is not a matching pop for every push.
</synopsis>
</macro>
<macro id="m4_divert_text">
<prototype>
<parameter content="diversion"/>
<parameter content="[content]"/>
</prototype>
<synopsis>
Output &lt;VAR&gt;content&lt;/VAR&gt; and a newline into
&lt;VAR&gt;diversion&lt;/VAR&gt;, without affecting the current
diversion. Shorthand for:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_divert_push([&lt;VAR&gt;diversion&lt;/VAR&gt;])&lt;VAR&gt;content&lt;/VAR&gt;
m4_divert_pop([&lt;VAR&gt;diversion&lt;/VAR&gt;])dnl
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
One use of &lt;CODE&gt;m4_divert_text&lt;/CODE&gt; is to develop
two related macros, where macro &lt;samp&gt;MY_A&lt;/samp&gt;
does the work, but adjusts what work is performed based on
whether the optional macro &lt;samp&gt;MY_B&lt;/samp&gt; has
also been expanded. Of course, it is possible to use
&lt;CODE&gt;AC_BEFORE&lt;/CODE&gt; within
&lt;CODE&gt;MY_A&lt;/CODE&gt; to require that
&lt;samp&gt;MY_B&lt;/samp&gt; occurs first, if it occurs at all.
But this imposes an ordering restriction on the user; it would
be nicer if macros &lt;samp&gt;MY_A&lt;/samp&gt; and
&lt;samp&gt;MY_B&lt;/samp&gt; can be invoked in either order.
The trick is to let &lt;samp&gt;MY_B&lt;/samp&gt; leave a
breadcrumb in an early diversion, which
&lt;samp&gt;MY_A&lt;/samp&gt; can then use to determine whether
&lt;samp&gt;MY_B&lt;/samp&gt; has been expanded.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_DEFUN([MY_A], [# various actions
if test -n "$b_was_used"; then # extra action fi])
AC_DEFUN([MY_B], [AC_REQUIRE([MY_A])dnl
m4_divert_text([INIT_PREPARE], [b_was_used=true])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="m4_init">
<prototype>
</prototype>
<synopsis>
Initialize the M4sugar environment, setting up the default
named diversion to be &lt;CODE&gt;KILL&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_bmatch">
<prototype>
<parameter content="string"/>
<parameter content="regex-1"/>
<parameter content="value-1"/>
<parameter content="@ [regex-2]"/>
<parameter content="[value-2]"/>
<parameter content="..."/>
<parameter content="[default]"/>
</prototype>
<synopsis>
The string &lt;VAR&gt;string&lt;/VAR&gt; is repeatedly compared
against a series of &lt;VAR&gt;regex&lt;/VAR&gt; arguments; if a
match is found, the expansion is the corresponding
&lt;VAR&gt;value&lt;/VAR&gt;, otherwise, the macro moves on to
the next &lt;VAR&gt;regex&lt;/VAR&gt;. If no
&lt;VAR&gt;regex&lt;/VAR&gt; match, then the result is the
optional &lt;VAR&gt;default&lt;/VAR&gt;, or nothing.
</synopsis>
</macro>
<macro id="m4_bpatsubsts">
<prototype>
<parameter content="string"/>
<parameter content="regex-1"/>
<parameter content="subst-1"/>
<parameter content="@ [regex-2]"/>
<parameter content="[subst-2]"/>
<parameter content="..."/>
</prototype>
<synopsis>
The string &lt;VAR&gt;string&lt;/VAR&gt; is altered by
&lt;VAR&gt;regex-1&lt;/VAR&gt; and
&lt;VAR&gt;subst-1&lt;/VAR&gt;, as if by:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_bpatsubst([[&lt;VAR&gt;string&lt;/VAR&gt;]],
[&lt;VAR&gt;regex&lt;/VAR&gt;], [&lt;VAR&gt;subst&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The result of the substitution is then passed through the next
set of &lt;VAR&gt;regex&lt;/VAR&gt; and
&lt;VAR&gt;subst&lt;/VAR&gt;, and so forth. An empty
&lt;VAR&gt;subst&lt;/VAR&gt; implies deletion of any matched
portions in the current string. Note that this macro
over-quotes &lt;VAR&gt;string&lt;/VAR&gt;; this behavior is
intentional, so that the result of each step of the recursion
remains as a quoted string. However, it means that anchors
(&lt;samp&gt;^&lt;/samp&gt; and &lt;samp&gt;$&lt;/samp&gt; in
the &lt;VAR&gt;regex&lt;/VAR&gt; will line up with the extra
quotations, and not the characters of the original string. The
overquoting is removed after the final substitution.
</synopsis>
</macro>
<macro id="m4_case">
<prototype>
<parameter content="string"/>
<parameter content="value-1"/>
<parameter content="if-value-1"/>
<parameter content="@ [value-2]"/>
<parameter content="[if-value-2]"/>
<parameter content="..."/>
<parameter content="[default]"/>
</prototype>
<synopsis>
Test &lt;VAR&gt;string&lt;/VAR&gt; against multiple
&lt;VAR&gt;value&lt;/VAR&gt; possibilities, resulting in the
first &lt;VAR&gt;if-value&lt;/VAR&gt; for a match, or in the
optional &lt;VAR&gt;default&lt;/VAR&gt;. This is shorthand for:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_if([&lt;VAR&gt;string&lt;/VAR&gt;],
[&lt;VAR&gt;value-1&lt;/VAR&gt;],
[&lt;VAR&gt;if-value-1&lt;/VAR&gt;],
[&lt;VAR&gt;string&lt;/VAR&gt;],
[&lt;VAR&gt;value-2&lt;/VAR&gt;],
[&lt;VAR&gt;if-value-2&lt;/VAR&gt;],
&lt;small&gt;...&lt;/small&gt;,
[&lt;VAR&gt;default&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_cond">
<prototype>
<parameter content="test-1"/>
<parameter content="value-1"/>
<parameter content="if-value-1"/>
<parameter content="@ [test-2]"/>
<parameter content="[value-2]"/>
<parameter content="[if-value-2]"/>
<parameter content="..."/>
<parameter content="[default]"/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. Similar to
&lt;CODE&gt;m4_if&lt;/CODE&gt;, except that each
&lt;VAR&gt;test&lt;/VAR&gt; is expanded only when it is
encountered. This is useful for short-circuiting expensive
tests; while &lt;CODE&gt;m4_if&lt;/CODE&gt; requires all its
strings to be expanded up front before doing comparisons,
&lt;CODE&gt;m4_cond&lt;/CODE&gt; only expands a
&lt;VAR&gt;test&lt;/VAR&gt; when all earlier tests have failed.&lt;/P&gt;&lt;P&gt;
For an example, these two sequences give the same result, but in
the case where &lt;samp&gt;$1&lt;/samp&gt; does not contain a
backslash, the &lt;CODE&gt;m4_cond&lt;/CODE&gt; version only
expands &lt;CODE&gt;m4_index&lt;/CODE&gt; once, instead of five
times, for faster computation if this is a common case for
&lt;samp&gt;$1&lt;/samp&gt;. Notice that every third argument
is unquoted for &lt;CODE&gt;m4_if&lt;/CODE&gt;, and quoted for
&lt;CODE&gt;m4_cond&lt;/CODE&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_if(m4_index([$1], [\]), [-1],
[$2], m4_eval(m4_index([$1], [\\]) &gt;= 0), [1], [$2],
m4_eval(m4_index([$1], [\$]) &gt;= 0), [1], [$2],
m4_eval(m4_index([$1], [\`]) &gt;= 0), [1], [$3],
m4_eval(m4_index([$1], [\"]) &gt;= 0), [1], [$3], [$2])
m4_cond([m4_index([$1], [\])], [-1], [$2],
[m4_eval(m4_index([$1], [\\]) &gt;= 0)], [1], [$2],
[m4_eval(m4_index([$1], [\$]) &gt;= 0)], [1], [$2],
[m4_eval(m4_index([$1], [\`]) &gt;= 0)], [1], [$3],
[m4_eval(m4_index([$1], [\"]) &gt;= 0)], [1], [$3],
[$2]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_default">
<prototype>
<parameter content="expr-1"/>
<parameter content="expr-2"/>
</prototype>
<prototype>
<parameter content="expr-1"/>
<parameter content="expr-2"/>
</prototype>
<prototype>
<parameter content="expr-1"/>
<parameter content="[expr-2]"/>
</prototype>
<prototype>
<parameter content="expr-1"/>
<parameter content="[expr-2]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;expr-1&lt;/VAR&gt; contains text, use it.
Otherwise, select &lt;VAR&gt;expr-2&lt;/VAR&gt;.
&lt;CODE&gt;m4_default&lt;/CODE&gt; expands the result, while
&lt;CODE&gt;m4_default_quoted&lt;/CODE&gt; does not. Useful for
providing a fixed default if the expression that results in
&lt;VAR&gt;expr-1&lt;/VAR&gt; would otherwise be empty. The
difference between &lt;CODE&gt;m4_default&lt;/CODE&gt; and
&lt;CODE&gt;m4_default_nblank&lt;/CODE&gt; is whether an
argument consisting of just blanks (space, tab, newline) is
significant. When using the expanding versions, note that an
argument may contain text but still expand to an empty string.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACTIVE])dnl
m4_define([empty], [])dnl m4_define([demo1], [m4_default([$1],
[$2])])dnl m4_define([demo2], [m4_default_quoted([$1],
[$2])])dnl m4_define([demo3], [m4_default_nblank([$1],
[$2])])dnl m4_define([demo4], [m4_default_nblank_quoted([$1],
[$2])])dnl demo1([active], [default]) ACTIVE demo1([], [active])
ACTIVE demo1([empty], [text]) -demo1([ ], [active])- - -
demo2([active], [default]) active demo2([], [active]) active
demo2([empty], [text]) empty -demo2([ ], [active])- - -
demo3([active], [default]) ACTIVE demo3([], [active]) ACTIVE
demo3([empty], [text]) -demo3([ ], [active])- -ACTIVE-
demo4([active], [default]) active demo4([], [active]) active
demo4([empty], [text]) empty -demo4([ ], [active])- -active-
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_define_default">
<prototype>
<parameter content="macro"/>
<parameter content="[default-definition]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;macro&lt;/VAR&gt; does not already have a
definition, then define it to
&lt;VAR&gt;default-definition&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_ifblank">
<prototype>
<parameter content="cond"/>
<parameter content="[if-blank]"/>
<parameter content="[if-text]"/>
</prototype>
<prototype>
<parameter content="cond"/>
<parameter content="[if-text]"/>
<parameter content="[if-blank]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;cond&lt;/VAR&gt; is empty or consists only of
blanks (space, tab, newline), then expand
&lt;VAR&gt;if-blank&lt;/VAR&gt;; otherwise, expand
&lt;VAR&gt;if-text&lt;/VAR&gt;. Two variants exist, in order to
make it easier to select the correct logical sense when using
only two parameters. Note that this is more efficient than the
equivalent behavior of:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_ifval(m4_normalize([&lt;VAR&gt;cond&lt;/VAR&gt;]),
&lt;VAR&gt;if-text&lt;/VAR&gt;, &lt;VAR&gt;if-blank&lt;/VAR&gt;)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_ifndef">
<prototype>
<parameter content="macro"/>
<parameter content="if-not-defined"/>
<parameter content="[if-defined]"/>
</prototype>
<synopsis>
This is shorthand for:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_ifdef([&lt;VAR&gt;macro&lt;/VAR&gt;],
[&lt;VAR&gt;if-defined&lt;/VAR&gt;],
[&lt;VAR&gt;if-not-defined&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_ifset">
<prototype>
<parameter content="macro"/>
<parameter content="[if-true]"/>
<parameter content="[if-false]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;macro&lt;/VAR&gt; is undefined, or is defined as
the empty string, expand to &lt;VAR&gt;if-false&lt;/VAR&gt;.
Otherwise, expands to &lt;VAR&gt;if-true&lt;/VAR&gt;. Similar
to: &lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_ifval(m4_defn([&lt;VAR&gt;macro&lt;/VAR&gt;]),
[&lt;VAR&gt;if-true&lt;/VAR&gt;],
[&lt;VAR&gt;if-false&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; except that it
is not an error if &lt;VAR&gt;macro&lt;/VAR&gt; is undefined.
</synopsis>
</macro>
<macro id="m4_ifval">
<prototype>
<parameter content="cond"/>
<parameter content="[if-true]"/>
<parameter content="[if-false]"/>
</prototype>
<synopsis>
Expands to &lt;VAR&gt;if-true&lt;/VAR&gt; if
&lt;VAR&gt;cond&lt;/VAR&gt; is not empty, otherwise to
&lt;VAR&gt;if-false&lt;/VAR&gt;. This is shorthand for:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_if([&lt;VAR&gt;cond&lt;/VAR&gt;], [],
[&lt;VAR&gt;if-true&lt;/VAR&gt;],
[&lt;VAR&gt;if-false&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_ifvaln">
<prototype>
<parameter content="cond"/>
<parameter content="[if-true]"/>
<parameter content="[if-false]"/>
</prototype>
<synopsis>
Similar to &lt;CODE&gt;m4_ifval&lt;/CODE&gt;, except guarantee
that a newline is present after any non-empty expansion. Often
followed by &lt;CODE&gt;dnl&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_n">
<prototype>
<parameter content="text"/>
</prototype>
<synopsis>
Expand to &lt;VAR&gt;text&lt;/VAR&gt;, and add a newline if
&lt;VAR&gt;text&lt;/VAR&gt; is not empty. Often followed by
&lt;CODE&gt;dnl&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_argn">
<prototype>
<parameter content="n"/>
<parameter content="[arg]..."/>
</prototype>
<synopsis>
Extracts argument &lt;VAR&gt;n&lt;/VAR&gt; (larger than 0) from
the remaining arguments. If there are too few arguments, the
empty string is used. For any &lt;VAR&gt;n&lt;/VAR&gt; besides
1, this is more efficient than the similar
&lt;samp&gt;m4_car(m4_shiftn([&lt;VAR&gt;n&lt;/VAR&gt;], [],
[&lt;VAR&gt;arg&lt;/VAR&gt;&lt;small&gt;...&lt;/small&gt;]))&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="m4_car">
<prototype>
<parameter content="arg..."/>
</prototype>
<synopsis>
Expands to the quoted first &lt;VAR&gt;arg&lt;/VAR&gt;. Can be
used with &lt;CODE&gt;m4_cdr&lt;/CODE&gt; to recursively iterate
through a list. Generally, when using quoted lists of quoted
elements, &lt;CODE&gt;m4_car&lt;/CODE&gt; should be called
without any extra quotes.
</synopsis>
</macro>
<macro id="m4_cdr">
<prototype>
<parameter content="arg..."/>
</prototype>
<synopsis>
Expands to a quoted list of all but the first
&lt;VAR&gt;arg&lt;/VAR&gt;, or the empty string if there was
only one argument. Generally, when using quoted lists of quoted
elements, &lt;CODE&gt;m4_cdr&lt;/CODE&gt; should be called
without any extra quotes.&lt;/P&gt;&lt;P&gt;
For example, this is a simple implementation of
&lt;CODE&gt;m4_map&lt;/CODE&gt;; note how each iteration checks
for the end of recursion, then merely applies the first argument
to the first element of the list, then repeats with the rest of
the list. (The actual implementation in M4sugar is a bit more
involved, to gain some speed and share code with
&lt;CODE&gt;m4_map_sep&lt;/CODE&gt;, and also to avoid expanding
side effects in &lt;samp&gt;$2&lt;/samp&gt; twice).
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([m4_map], [m4_ifval([$2],
[m4_apply([$1], m4_car($2))[]$0([$1], m4_cdr($2))])])dnl
m4_map([ m4_eval], [[[1]], [[1+1]], [[10],[16]]]) 1 2 a
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_for">
<prototype>
<parameter content="var"/>
<parameter content="first"/>
<parameter content="last"/>
<parameter content="[step]"/>
<parameter content="@ expression"/>
</prototype>
<synopsis>
Loop over the numeric values between
&lt;VAR&gt;first&lt;/VAR&gt; and &lt;VAR&gt;last&lt;/VAR&gt;
including bounds by increments of &lt;VAR&gt;step&lt;/VAR&gt;.
For each iteration, expand &lt;VAR&gt;expression&lt;/VAR&gt;
with the numeric value assigned to &lt;VAR&gt;var&lt;/VAR&gt;.
If &lt;VAR&gt;step&lt;/VAR&gt; is omitted, it defaults to
&lt;samp&gt;1&lt;/samp&gt; or &lt;samp&gt;-1&lt;/samp&gt;
depending on the order of the limits. If given,
&lt;VAR&gt;step&lt;/VAR&gt; has to match this order. The number
of iterations is determined independently from definition of
&lt;VAR&gt;var&lt;/VAR&gt;; iteration cannot be short-circuited
or lengthened by modifying &lt;VAR&gt;var&lt;/VAR&gt; from
within &lt;VAR&gt;expression&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_foreach">
<prototype>
<parameter content="var"/>
<parameter content="list"/>
<parameter content="expression"/>
</prototype>
<synopsis>
Loop over the comma-separated M4 list
&lt;VAR&gt;list&lt;/VAR&gt;, assigning each value to
&lt;VAR&gt;var&lt;/VAR&gt;, and expand
&lt;VAR&gt;expression&lt;/VAR&gt;. The following example
outputs two lines:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_foreach([myvar], [[foo], [bar,
baz]], [echo myvar ])dnl echo foo echo bar, baz
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Note that for some forms of &lt;VAR&gt;expression&lt;/VAR&gt;,
it may be faster to use &lt;CODE&gt;m4_map_args&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_foreach_w">
<prototype>
<parameter content="var"/>
<parameter content="list"/>
<parameter content="expression"/>
</prototype>
<synopsis>
Loop over the white-space-separated list
&lt;VAR&gt;list&lt;/VAR&gt;, assigning each value to
&lt;VAR&gt;var&lt;/VAR&gt;, and expand
&lt;VAR&gt;expression&lt;/VAR&gt;. If
&lt;VAR&gt;var&lt;/VAR&gt; is only referenced once in
&lt;VAR&gt;expression&lt;/VAR&gt;, it is more efficient to use
&lt;CODE&gt;m4_map_args_w&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The deprecated macro &lt;CODE&gt;AC_FOREACH&lt;/CODE&gt; is an
alias of &lt;CODE&gt;m4_foreach_w&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_map">
<prototype>
<parameter content="macro"/>
<parameter content="list"/>
</prototype>
<prototype>
<parameter content="macro"/>
<parameter content="list"/>
</prototype>
<prototype>
<parameter content="macro"/>
<parameter content="separator"/>
<parameter content="list"/>
</prototype>
<prototype>
<parameter content="macro"/>
<parameter content="separator"/>
<parameter content="list"/>
</prototype>
<synopsis>
Loop over the comma separated quoted list of argument
descriptions in &lt;VAR&gt;list&lt;/VAR&gt;, and invoke
&lt;VAR&gt;macro&lt;/VAR&gt; with the arguments. An argument
description is in turn a comma-separated quoted list of quoted
elements, suitable for &lt;CODE&gt;m4_apply&lt;/CODE&gt;. The
macros &lt;CODE&gt;m4_map&lt;/CODE&gt; and
&lt;CODE&gt;m4_map_sep&lt;/CODE&gt; ignore empty argument
descriptions, while &lt;CODE&gt;m4_mapall&lt;/CODE&gt; and
&lt;CODE&gt;m4_mapall_sep&lt;/CODE&gt; invoke
&lt;VAR&gt;macro&lt;/VAR&gt; with no arguments. The macros
&lt;CODE&gt;m4_map_sep&lt;/CODE&gt; and
&lt;CODE&gt;m4_mapall_sep&lt;/CODE&gt; additionally expand
&lt;VAR&gt;separator&lt;/VAR&gt; between invocations of
&lt;VAR&gt;macro&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Note that &lt;VAR&gt;separator&lt;/VAR&gt; is expanded, unlike
in &lt;CODE&gt;m4_join&lt;/CODE&gt;. When separating output
with commas, this means that the map result can be used as a
series of arguments, by using a single-quoted comma as
&lt;VAR&gt;separator&lt;/VAR&gt;, or as a single string, by
using a double-quoted comma.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_map([m4_count], []) m4_map([
m4_count], [[], [[1]],
[[1], [2]]]) 1 2 m4_mapall([ m4_count], [[],
[[1]], [[1], [2]]]) 0 1 2
m4_map_sep([m4_eval], [,], [[[1+2]],
[[10], [16]]]) 3,a m4_map_sep([m4_echo], [,], [[[a]], [[b]]])
a,b m4_count(m4_map_sep([m4_echo], [,], [[[a]], [[b]]])) 2
m4_map_sep([m4_echo], [[,]], [[[a]], [[b]]]) a,b
m4_count(m4_map_sep([m4_echo], [[,]], [[[a]], [[b]]])) 1
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_map_args">
<prototype>
<parameter content="macro"/>
<parameter content="arg..."/>
</prototype>
<synopsis>
Repeatedly invoke &lt;VAR&gt;macro&lt;/VAR&gt; with each
successive &lt;VAR&gt;arg&lt;/VAR&gt; as its only argument. In
the following example, three solutions are presented with the
same expansion; the solution using
&lt;CODE&gt;m4_map_args&lt;/CODE&gt; is the most efficient.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACTIVE])dnl
m4_foreach([var], [[plain], [active]], [
m4_echo(m4_defn([var]))]) plain active m4_map([ m4_echo],
[[[plain]], [[active]]]) plain active m4_map_args([ m4_echo],
[plain], [active]) plain active
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
In cases where it is useful to operate on additional parameters
besides the list elements, the macro
&lt;CODE&gt;m4_curry&lt;/CODE&gt; can be used in
&lt;VAR&gt;macro&lt;/VAR&gt; to supply the argument currying
necessary to generate the desired argument list. In the
following example, &lt;CODE&gt;list_add_n&lt;/CODE&gt; is more
efficient than &lt;CODE&gt;list_add_x&lt;/CODE&gt;. On the
other hand, using &lt;CODE&gt;m4_map_args_sep&lt;/CODE&gt; can
be even more efficient.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([list], [[1], [2],
[3]])dnl m4_define([add], [m4_eval(([$1]) + ([$2]))])dnl dnl
list_add_n(N, ARG...) dnl Output a list consisting of each ARG
added to N m4_define([list_add_n],
[m4_shift(m4_map_args([,m4_curry([add], [$1])],
m4_shift($@@)))])dnl list_add_n([1], list) 2,3,4 list_add_n([2],
list) 3,4,5 m4_define([list_add_x], [m4_shift(m4_foreach([var],
m4_dquote(m4_shift($@@)), [,add([$1],m4_defn([var]))]))])dnl
list_add_x([1], list) 2,3,4
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_map_args_pair">
<prototype>
<parameter content="macro"/>
<parameter content="[macro-end= macro]"/>
<parameter content="@ arg..."/>
</prototype>
<synopsis>
For every pair of arguments &lt;VAR&gt;arg&lt;/VAR&gt;, invoke
&lt;VAR&gt;macro&lt;/VAR&gt; with two arguments. If there is an
odd number of arguments, invoke
&lt;VAR&gt;macro-end&lt;/VAR&gt;, which defaults to
&lt;VAR&gt;macro&lt;/VAR&gt;, with the remaining argument.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_map_args_pair([, m4_reverse],
[], [1], [2], [3]) , 2, 1, 3 m4_map_args_pair([, m4_reverse], [,
m4_dquote], [1], [2], [3]) , 2, 1, [3] m4_map_args_pair([,
m4_reverse], [, m4_dquote], [1], [2], [3], [4]) , 2, 1, 4, 3
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_map_args_sep">
<prototype>
<parameter content="[pre]"/>
<parameter content="[post]"/>
<parameter content="[sep]"/>
<parameter content="arg..."/>
</prototype>
<synopsis>
Expand the sequence
&lt;CODE&gt;&lt;VAR&gt;pre&lt;/VAR&gt;[&lt;VAR&gt;arg&lt;/VAR&gt;]&lt;VAR&gt;post&lt;/VAR&gt;&lt;/CODE&gt;
for each argument, additionally expanding
&lt;VAR&gt;sep&lt;/VAR&gt; between arguments. One common use of
this macro is constructing a macro call, where the opening and
closing parentheses are split between &lt;VAR&gt;pre&lt;/VAR&gt;
and &lt;VAR&gt;post&lt;/VAR&gt;; in particular,
&lt;CODE&gt;m4_map_args([&lt;VAR&gt;macro&lt;/VAR&gt;],
[&lt;VAR&gt;arg&lt;/VAR&gt;])&lt;/CODE&gt; is equivalent to
&lt;CODE&gt;m4_map_args_sep([&lt;VAR&gt;macro&lt;/VAR&gt;(],
[)], [], [&lt;VAR&gt;arg&lt;/VAR&gt;])&lt;/CODE&gt;. This macro
provides the most efficient means for iterating over an
arbitrary list of arguments, particularly when repeatedly
constructing a macro call with more arguments than
&lt;VAR&gt;arg&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="m4_map_args_w">
<prototype>
<parameter content="string"/>
<parameter content="[pre]"/>
<parameter content="[post]"/>
<parameter content="[sep]"/>
</prototype>
<synopsis>
Expand the sequence
&lt;CODE&gt;&lt;VAR&gt;pre&lt;/VAR&gt;[word]&lt;VAR&gt;post&lt;/VAR&gt;&lt;/CODE&gt;
for each word in the whitespace-separated
&lt;VAR&gt;string&lt;/VAR&gt;, additionally expanding
&lt;VAR&gt;sep&lt;/VAR&gt; between words. This macro provides
the most efficient means for iterating over a
whitespace-separated string. In particular,
&lt;CODE&gt;m4_map_args_w([&lt;VAR&gt;string&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;(], [)])&lt;/CODE&gt; is more
efficient than &lt;CODE&gt;m4_foreach_w([var],
[&lt;VAR&gt;string&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;(m4_defn([var]))])&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_shiftn">
<prototype>
<parameter content="count"/>
<parameter content="..."/>
</prototype>
<prototype>
<parameter content="..."/>
</prototype>
<prototype>
<parameter content="..."/>
</prototype>
<synopsis>
&lt;CODE&gt;m4_shiftn&lt;/CODE&gt; performs
&lt;VAR&gt;count&lt;/VAR&gt; iterations of
&lt;CODE&gt;m4_shift&lt;/CODE&gt;, along with validation that
enough arguments were passed in to match the shift count, and
that the count is positive. &lt;CODE&gt;m4_shift2&lt;/CODE&gt;
and &lt;CODE&gt;m4_shift3&lt;/CODE&gt; are specializations of
&lt;CODE&gt;m4_shiftn&lt;/CODE&gt;, introduced in Autoconf 2.62,
and are more efficient for two and three shifts, respectively.
</synopsis>
</macro>
<macro id="m4_stack_foreach">
<prototype>
<parameter content="macro"/>
<parameter content="action"/>
</prototype>
<prototype>
<parameter content="macro"/>
<parameter content="action"/>
</prototype>
<synopsis>
For each of the &lt;CODE&gt;m4_pushdef&lt;/CODE&gt;
definitions of &lt;VAR&gt;macro&lt;/VAR&gt;, expand
&lt;VAR&gt;action&lt;/VAR&gt; with the single argument of a
definition of &lt;VAR&gt;macro&lt;/VAR&gt;.
&lt;CODE&gt;m4_stack_foreach&lt;/CODE&gt; starts with the oldest
definition, while &lt;CODE&gt;m4_stack_foreach_lifo&lt;/CODE&gt;
starts with the current definition.
&lt;VAR&gt;action&lt;/VAR&gt; should not push or pop definitions
of &lt;VAR&gt;macro&lt;/VAR&gt;, nor is there any guarantee that
the current definition of &lt;VAR&gt;macro&lt;/VAR&gt; matches
the argument that was passed to &lt;VAR&gt;action&lt;/VAR&gt;.
The macro &lt;CODE&gt;m4_curry&lt;/CODE&gt; can be used if
&lt;VAR&gt;action&lt;/VAR&gt; needs more than one argument,
although in that case it is more efficient to use
&lt;VAR&gt;m4_stack_foreach_sep&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Due to technical limitations, there are a few low-level m4sugar
functions, such as &lt;CODE&gt;m4_pushdef&lt;/CODE&gt;, that
cannot be used as the &lt;VAR&gt;macro&lt;/VAR&gt; argument.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_pushdef([a], [1])m4_pushdef([a],
[2])dnl m4_stack_foreach([a], [ m4_incr]) 2 3
m4_stack_foreach_lifo([a], [ m4_curry([m4_substr], [abcd])]) cd
bcd &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_stack_foreach_sep">
<prototype>
<parameter content="macro"/>
<parameter content="[pre]"/>
<parameter content="[post]"/>
<parameter content="[sep]"/>
</prototype>
<prototype>
</prototype>
<synopsis>
sep) Expand the sequence
&lt;CODE&gt;&lt;VAR&gt;pre&lt;/VAR&gt;[definition]&lt;VAR&gt;post&lt;/VAR&gt;&lt;/CODE&gt;
for each &lt;CODE&gt;m4_pushdef&lt;/CODE&gt; definition of
&lt;VAR&gt;macro&lt;/VAR&gt;, additionally expanding
&lt;VAR&gt;sep&lt;/VAR&gt; between definitions.
&lt;CODE&gt;m4_stack_foreach_sep&lt;/CODE&gt; visits the oldest
definition first, while
&lt;CODE&gt;m4_stack_foreach_sep_lifo&lt;/CODE&gt; visits the
current definition first. This macro provides the most
efficient means for iterating over a pushdef stack. In
particular,
&lt;CODE&gt;m4_stack_foreach([&lt;VAR&gt;macro&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;])&lt;/CODE&gt; is short for
&lt;CODE&gt;m4_stack_foreach_sep([&lt;VAR&gt;macro&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;(], [)])&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_apply">
<prototype>
<parameter content="macro"/>
<parameter content="list"/>
</prototype>
<synopsis>
Apply the elements of the quoted, comma-separated
&lt;VAR&gt;list&lt;/VAR&gt; as the arguments to
&lt;VAR&gt;macro&lt;/VAR&gt;. If &lt;VAR&gt;list&lt;/VAR&gt; is
empty, invoke &lt;VAR&gt;macro&lt;/VAR&gt; without arguments.
Note the difference between &lt;CODE&gt;m4_indir&lt;/CODE&gt;,
which expects its first argument to be a macro name but can use
names that are otherwise invalid, and
&lt;CODE&gt;m4_apply&lt;/CODE&gt;, where
&lt;VAR&gt;macro&lt;/VAR&gt; can contain other text, but must
end in a valid macro name.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_apply([m4_count], []) 0
m4_apply([m4_count], [[]]) 1 m4_apply([m4_count], [[1], [2]]) 2
m4_apply([m4_join], [[|], [1], [2]]) 1|2
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_count">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro returns the decimal count of the number of arguments
it was passed.
</synopsis>
</macro>
<macro id="m4_curry">
<prototype>
<parameter content="macro"/>
<parameter content="arg..."/>
</prototype>
<synopsis>
This macro performs argument currying. The expansion of this
macro is another macro name that expects exactly one argument;
that argument is then appended to the &lt;VAR&gt;arg&lt;/VAR&gt;
list, and then &lt;VAR&gt;macro&lt;/VAR&gt; is expanded with the
resulting argument list.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_curry([m4_curry], [m4_reverse],
[1])([2])([3]) 3, 2, 1
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Unfortunately, due to a limitation in M4 1.4.x, it is not
possible to pass the definition of a builtin macro as the
argument to the output of &lt;CODE&gt;m4_curry&lt;/CODE&gt;; the
empty string is used instead of the builtin token. This behavior
is rectified by using M4 1.6 or newer.
</synopsis>
</macro>
<macro id="m4_do">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro loops over its arguments and expands each
&lt;VAR&gt;arg&lt;/VAR&gt; in sequence. Its main use is for
readability; it allows the use of indentation and fewer
&lt;CODE&gt;dnl&lt;/CODE&gt; to result in the same expansion.
This macro guarantees that no expansion will be concatenated
with subsequent text; to achieve full concatenation, use
&lt;CODE&gt;m4_unquote(m4_join([],
&lt;VAR&gt;arg&lt;/VAR&gt;&lt;/CODE&gt;)).&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_define([ab],[1])m4_define([bc],[2])m4_define([abc],[3])dnl
m4_do([a],[b])c abc m4_unquote(m4_join([],[a],[b]))c 3
m4_define([a],[A])m4_define([b],[B])m4_define([c],[C])dnl
m4_define([AB],[4])m4_define([BC],[5])m4_define([ABC],[6])dnl
m4_do([a],[b])c ABC m4_unquote(m4_join([],[a],[b]))c 3
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_dquote">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
Return the arguments as a quoted list of quoted arguments.
Conveniently, if there is just one &lt;VAR&gt;arg&lt;/VAR&gt;,
this effectively adds a level of quoting.
</synopsis>
</macro>
<macro id="m4_dquote_elt">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
Return the arguments as a series of double-quoted arguments.
Whereas &lt;CODE&gt;m4_dquote&lt;/CODE&gt; returns a single
argument, &lt;CODE&gt;m4_dquote_elt&lt;/CODE&gt; returns as many
arguments as it was passed.
</synopsis>
</macro>
<macro id="m4_echo">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
Return the arguments, with the same level of quoting. Other
than discarding whitespace after unquoted commas, this macro is
a no-op.
</synopsis>
</macro>
<macro id="m4_expand">
<prototype>
<parameter content="arg"/>
</prototype>
<synopsis>
Return the expansion of &lt;VAR&gt;arg&lt;/VAR&gt; as a quoted
string. Whereas &lt;CODE&gt;m4_quote&lt;/CODE&gt; is designed
to collect expanded text into a single argument,
&lt;CODE&gt;m4_expand&lt;/CODE&gt; is designed to perform one
level of expansion on quoted text. One distinction is in the
treatment of whitespace following a comma in the original
&lt;VAR&gt;arg&lt;/VAR&gt;. Any time multiple arguments are
collected into one with &lt;CODE&gt;m4_quote&lt;/CODE&gt;, the
M4 argument collection rules discard the whitespace. However,
with &lt;CODE&gt;m4_expand&lt;/CODE&gt;, whitespace is
preserved, even after the expansion of macros contained in
&lt;VAR&gt;arg&lt;/VAR&gt;. Additionally,
&lt;CODE&gt;m4_expand&lt;/CODE&gt; is able to expand text that
would involve an unterminated comment, whereas expanding that
same text as the argument to &lt;CODE&gt;m4_quote&lt;/CODE&gt;
runs into difficulty in finding the end of the argument. Since
manipulating diversions during argument collection is inherently
unsafe, &lt;CODE&gt;m4_expand&lt;/CODE&gt; issues an error if
&lt;VAR&gt;arg&lt;/VAR&gt; attempts to change the current
diversion (Diversion support).&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACT, IVE])dnl
m4_define([active2], [[ACT, IVE]])dnl m4_quote(active, active)
ACT,IVE,ACT,IVE m4_expand([active, active]) ACT, IVE, ACT, IVE
m4_quote(active2, active2) ACT, IVE,ACT, IVE m4_expand([active2,
active2]) ACT, IVE, ACT, IVE m4_expand([# m4_echo]) # m4_echo
m4_quote(# m4_echo) ) # m4_echo)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Note that &lt;CODE&gt;m4_expand&lt;/CODE&gt; cannot handle an
&lt;VAR&gt;arg&lt;/VAR&gt; that expands to literal unbalanced
quotes, but that quadrigraphs can be used when unbalanced output
is necessary. Likewise, unbalanced parentheses should be
supplied with double quoting or a quadrigraph.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([pattern],
[[!@@&lt;:@@]])dnl m4_define([bar], [BAR])dnl m4_expand([case
$foo in m4_defn([pattern])@@:@}@@ bar ;; *[)] blah ;; esac])
case $foo in [![]) BAR ;; *) blah ;; esac
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_ignore">
<prototype>
<parameter content="..."/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. Expands to
nothing, ignoring all of its arguments. By itself, this isn't
very useful. However, it can be used to conditionally ignore an
arbitrary number of arguments, by deciding which macro name to
apply to a list of arguments.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; dnl foo outputs a message only if
[debug] is defined. m4_define([foo],
[m4_ifdef([debug],[AC_MSG_NOTICE],[m4_ignore])([debug
message])]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Note that for earlier versions of Autoconf, the macro
&lt;CODE&gt;__gnu__&lt;/CODE&gt; can serve the same purpose,
although it is less readable.
</synopsis>
</macro>
<macro id="m4_make_list">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro exists to aid debugging of M4sugar algorithms. Its
net effect is similar to &lt;CODE&gt;m4_dquote&lt;/CODE&gt;---it
produces a quoted list of quoted arguments, for each
&lt;VAR&gt;arg&lt;/VAR&gt;. The difference is that this version
uses a comma-newline separator instead of just comma, to improve
readability of the list; with the result that it is less
efficient than &lt;CODE&gt;m4_dquote&lt;/CODE&gt;.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_define([zero],[0])m4_define([one],[1])m4_define([two],[2])dnl
m4_dquote(zero, [one], [[two]]) [0],[one],[[two]]
m4_make_list(zero, [one], [[two]]) [0], [one], [[two]]
m4_foreach([number], m4_dquote(zero, [one], [[two]]), [ number])
0 1 two m4_foreach([number], m4_make_list(zero, [one],
[[two]]), [ number]) 0 1 two
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_quote">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
Return the arguments as a single entity, i.e., wrap them into a
pair of quotes. This effectively collapses multiple arguments
into one, although it loses whitespace after unquoted commas in
the process.
</synopsis>
</macro>
<macro id="m4_reverse">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
Outputs each argument with the same level of quoting, but in
reverse order, and with space following each comma for
readability.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACT,IVE])
m4_reverse(active, [active]) active, IVE, ACT
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_unquote">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. Expand each
argument, separated by commas. For a single
&lt;VAR&gt;arg&lt;/VAR&gt;, this effectively removes a layer of
quoting, and
&lt;CODE&gt;m4_unquote([&lt;VAR&gt;arg&lt;/VAR&gt;])&lt;/CODE&gt;
is more efficient than the equivalent
&lt;CODE&gt;m4_do([&lt;VAR&gt;arg&lt;/VAR&gt;])&lt;/CODE&gt;.
For multiple arguments, this results in an unquoted list of
expansions. This is commonly used with
&lt;CODE&gt;m4_split&lt;/CODE&gt;, in order to convert a single
quoted list into a series of quoted elements.
</synopsis>
</macro>
<macro id="m4_append">
<prototype>
<parameter content="macro-name"/>
<parameter content="string"/>
<parameter content="[separator]"/>
</prototype>
<prototype>
</prototype>
<synopsis>
if-uniq, if-duplicate) Redefine
&lt;VAR&gt;macro-name&lt;/VAR&gt; to its former contents with
&lt;VAR&gt;separator&lt;/VAR&gt; and
&lt;VAR&gt;string&lt;/VAR&gt; added at the end. If
&lt;VAR&gt;macro-name&lt;/VAR&gt; was undefined before (but not
if it was defined but empty), then no
&lt;VAR&gt;separator&lt;/VAR&gt; is added. As of Autoconf 2.62,
neither &lt;VAR&gt;string&lt;/VAR&gt; nor
&lt;VAR&gt;separator&lt;/VAR&gt; are expanded during this macro;
instead, they are expanded when
&lt;VAR&gt;macro-name&lt;/VAR&gt; is invoked.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;m4_append&lt;/CODE&gt; can be used to grow strings,
and &lt;CODE&gt;m4_append_uniq&lt;/CODE&gt; to grow strings
without duplicating substrings. Additionally,
&lt;CODE&gt;m4_append_uniq&lt;/CODE&gt; takes two optional
parameters as of Autoconf 2.62; &lt;VAR&gt;if-uniq&lt;/VAR&gt;
is expanded if &lt;VAR&gt;string&lt;/VAR&gt; was appended, and
&lt;VAR&gt;if-duplicate&lt;/VAR&gt; is expanded if
&lt;VAR&gt;string&lt;/VAR&gt; was already present. Also,
&lt;CODE&gt;m4_append_uniq&lt;/CODE&gt; warns if
&lt;VAR&gt;separator&lt;/VAR&gt; is not empty, but occurs within
&lt;VAR&gt;string&lt;/VAR&gt;, since that can lead to
duplicates.&lt;/P&gt;&lt;P&gt;
Note that &lt;CODE&gt;m4_append&lt;/CODE&gt; can scale linearly
in the length of the final string, depending on the quality of
the underlying M4 implementation, while
&lt;CODE&gt;m4_append_uniq&lt;/CODE&gt; has an inherent
quadratic scaling factor. If an algorithm can tolerate
duplicates in the final string, use the former for speed. If
duplicates must be avoided, consider using
&lt;CODE&gt;m4_set_add&lt;/CODE&gt; instead (Set manipulation
Macros).&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACTIVE])dnl
m4_append([sentence], [This is an])dnl m4_append([sentence], [
active ])dnl m4_append([sentence], [symbol.])dnl sentence This
is an ACTIVE symbol. m4_undefine([active])dnl This is an active
symbol. m4_append_uniq([list], [one], [, ], [new], [existing])
new m4_append_uniq([list], [one], [, ], [new], [existing])
existing m4_append_uniq([list], [two], [, ], [new], [existing])
new m4_append_uniq([list], [three], [, ], [new], [existing]) new
m4_append_uniq([list], [two], [, ], [new], [existing]) existing
list one, two, three m4_dquote(list) [one],[two],[three]
m4_append([list2], [one], [[, ]])dnl m4_append_uniq([list2],
[two], [[, ]])dnl m4_append([list2], [three], [[, ]])dnl list2
one, two, three m4_dquote(list2) [one, two, three]
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_append_uniq_w">
<prototype>
<parameter content="macro-name"/>
<parameter content="strings"/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. It is similar to
&lt;CODE&gt;m4_append_uniq&lt;/CODE&gt;, but treats
&lt;VAR&gt;strings&lt;/VAR&gt; as a whitespace separated list of
words to append, and only appends unique words.
&lt;VAR&gt;macro-name&lt;/VAR&gt; is updated with a single space
between new words.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_append_uniq_w([numbers], [1 1
2])dnl m4_append_uniq_w([numbers], [ 2 3 ])dnl numbers 1 2 3
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_chomp">
<prototype>
<parameter content="string"/>
</prototype>
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Output &lt;VAR&gt;string&lt;/VAR&gt; in quotes, but without a
trailing newline. The macro &lt;CODE&gt;m4_chomp&lt;/CODE&gt;
is slightly faster, and removes at most one newline; the macro
&lt;CODE&gt;m4_chomp_all&lt;/CODE&gt; removes all consecutive
trailing newlines. Unlike &lt;CODE&gt;m4_flatten&lt;/CODE&gt;,
embedded newlines are left intact, and backslash does not
influence the result.
</synopsis>
</macro>
<macro id="m4_combine">
<prototype>
<parameter content="[separator]"/>
<parameter content="prefix-list"/>
<parameter content="[infix]"/>
<parameter content="@ suffix-1"/>
<parameter content="[suffix-2]"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro produces a quoted string containing the pairwise
combination of every element of the quoted, comma-separated
&lt;VAR&gt;prefix-list&lt;/VAR&gt;, and every element from the
&lt;VAR&gt;suffix&lt;/VAR&gt; arguments. Each pairwise
combination is joined with &lt;VAR&gt;infix&lt;/VAR&gt; in the
middle, and successive pairs are joined by
&lt;VAR&gt;separator&lt;/VAR&gt;. No expansion occurs on any of
the arguments. No output occurs if either the
&lt;VAR&gt;prefix&lt;/VAR&gt; or &lt;VAR&gt;suffix&lt;/VAR&gt;
list is empty, but the lists can contain empty elements.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([a], [oops])dnl
m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3]) a-1, a-2,
a-3, b-1, b-2, b-3, c-1, c-2, c-3 m4_combine([, ], [[a], [b]],
[-]) m4_combine([, ], [[a], [b]], [-], []) a-, b- m4_combine([,
], [], [-], [1], [2]) m4_combine([, ], [[]], [-], [1], [2]) -1,
-2 &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_escape">
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Convert all instances of &lt;samp&gt;[&lt;/samp&gt;,
&lt;samp&gt;]&lt;/samp&gt;, &lt;samp&gt;#&lt;/samp&gt;, and
&lt;samp&gt;$&lt;/samp&gt; within &lt;VAR&gt;string&lt;/VAR&gt;
into their respective quadrigraphs. The result is still a
quoted string.
</synopsis>
</macro>
<macro id="m4_flatten">
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Flatten &lt;VAR&gt;string&lt;/VAR&gt; into a single line.
Delete all backslash-newline pairs, and replace all remaining
newlines with a space. The result is still a quoted string.
</synopsis>
</macro>
<macro id="m4_join">
<prototype>
<parameter content="[separator]"/>
<parameter content="args..."/>
</prototype>
<prototype>
<parameter content="[separator]"/>
<parameter content="args..."/>
</prototype>
<synopsis>
Concatenate each &lt;VAR&gt;arg&lt;/VAR&gt;, separated by
&lt;VAR&gt;separator&lt;/VAR&gt;.
&lt;CODE&gt;joinall&lt;/CODE&gt; uses every argument, while
&lt;CODE&gt;join&lt;/CODE&gt; omits empty arguments so that
there are no back-to-back separators in the output. The result
is a quoted string.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([active], [ACTIVE])dnl
m4_join([|], [one], [], [active], [two]) one|active|two
m4_joinall([|], [one], [], [active], [two]) one||active|two
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Note that if all you intend to do is join
&lt;VAR&gt;args&lt;/VAR&gt; with commas between them, to form a
quoted list suitable for &lt;CODE&gt;m4_foreach&lt;/CODE&gt;, it
is more efficient to use &lt;CODE&gt;m4_dquote&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_newline">
<prototype>
<parameter content="[text]"/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62, and expands to a
newline, followed by any &lt;VAR&gt;text&lt;/VAR&gt;. It is
primarily useful for maintaining macro formatting, and ensuring
that M4 does not discard leading whitespace during argument
collection.
</synopsis>
</macro>
<macro id="m4_normalize">
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Remove leading and trailing spaces and tabs, sequences of
backslash-then-newline, and replace multiple spaces, tabs, and
newlines with a single space. This is a combination of
&lt;CODE&gt;m4_flatten&lt;/CODE&gt; and
&lt;CODE&gt;m4_strip&lt;/CODE&gt;. To determine if
&lt;VAR&gt;string&lt;/VAR&gt; consists only of bytes that would
be removed by &lt;CODE&gt;m4_normalize&lt;/CODE&gt;, you can use
&lt;CODE&gt;m4_ifblank&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_re_escape">
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Backslash-escape all characters in
&lt;VAR&gt;string&lt;/VAR&gt; that are active in regexps.
</synopsis>
</macro>
<macro id="m4_split">
<prototype>
<parameter content="string"/>
<parameter content="[regexp = @samp{[\t ]+}]"/>
</prototype>
<synopsis>
Split &lt;VAR&gt;string&lt;/VAR&gt; into an M4 list of elements
quoted by &lt;samp&gt;[&lt;/samp&gt; and
&lt;samp&gt;]&lt;/samp&gt;, while keeping white space at the
beginning and at the end. If &lt;VAR&gt;regexp&lt;/VAR&gt; is
given, use it instead of &lt;samp&gt;[\t ]+&lt;/samp&gt; for
splitting. If &lt;VAR&gt;string&lt;/VAR&gt; is empty, the result
is an empty list.
</synopsis>
</macro>
<macro id="m4_strip">
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Strip whitespace from &lt;VAR&gt;string&lt;/VAR&gt;. Sequences
of spaces and tabs are reduced to a single space, then leading
and trailing spaces are removed. The result is still a quoted
string. Note that this does not interfere with newlines; if you
want newlines stripped as well, consider
&lt;CODE&gt;m4_flatten&lt;/CODE&gt;, or do it all at once with
&lt;CODE&gt;m4_normalize&lt;/CODE&gt;. To quickly test if
&lt;VAR&gt;string&lt;/VAR&gt; has only whitespace, use
&lt;CODE&gt;m4_ifblank&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_text_box">
<prototype>
<parameter content="message"/>
<parameter content="[frame= -]"/>
</prototype>
<synopsis>
Add a text box around &lt;VAR&gt;message&lt;/VAR&gt;, using
&lt;VAR&gt;frame&lt;/VAR&gt; as the border character above and
below the message. The &lt;VAR&gt;frame&lt;/VAR&gt; argument
must be a single byte, and does not support quadrigraphs. The
frame correctly accounts for the subsequent expansion of
&lt;VAR&gt;message&lt;/VAR&gt;. For example:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([macro], [abc])dnl
m4_text_box([macro]) ## --- ## ## abc ## ## --- ##
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;message&lt;/VAR&gt; must contain balanced quotes
and parentheses, although quadrigraphs can be used to work
around this.
</synopsis>
</macro>
<macro id="m4_text_wrap">
<prototype>
<parameter content="string"/>
<parameter content="[prefix]"/>
<parameter content="@ [prefix1= prefix]"/>
<parameter content="[width= 79]"/>
</prototype>
<synopsis>
Break &lt;VAR&gt;string&lt;/VAR&gt; into a series of
whitespace-separated words, then output those words separated by
spaces, and wrapping lines any time the output would exceed
&lt;VAR&gt;width&lt;/VAR&gt; columns. If given,
&lt;VAR&gt;prefix1&lt;/VAR&gt; begins the first line, and
&lt;VAR&gt;prefix&lt;/VAR&gt; begins all wrapped lines. If
&lt;VAR&gt;prefix1&lt;/VAR&gt; is longer than
&lt;VAR&gt;prefix&lt;/VAR&gt;, then the first line consists of
just &lt;VAR&gt;prefix1&lt;/VAR&gt;. If
&lt;VAR&gt;prefix&lt;/VAR&gt; is longer than
&lt;VAR&gt;prefix1&lt;/VAR&gt;, padding is inserted so that the
first word of &lt;VAR&gt;string&lt;/VAR&gt; begins at the same
indentation as all wrapped lines. Note that using literal tab
characters in any of the arguments will interfere with the
calculation of width. No expansions occur on
&lt;VAR&gt;prefix&lt;/VAR&gt;, &lt;VAR&gt;prefix1&lt;/VAR&gt;,
or the words of &lt;VAR&gt;string&lt;/VAR&gt;, although
quadrigraphs are recognized.&lt;/P&gt;&lt;P&gt;
For some examples:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_text_wrap([Short string */], [
], [/* ], [20]) /* Short string */ m4_text_wrap([Much longer
string */], [ ], [/* ], [20]) /* Much longer string */
m4_text_wrap([Short doc.], [ ], [ --short ], [30])
--short Short doc. m4_text_wrap([Short doc.], [ ], [
--too-wide ], [30]) --too-wide Short doc.
m4_text_wrap([Super long documentation.], [ ],
[ --too-wide ], 30) --too-wide Super long
documentation. &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_tolower">
<prototype>
<parameter content="string"/>
</prototype>
<prototype>
<parameter content="string"/>
</prototype>
<synopsis>
Return &lt;VAR&gt;string&lt;/VAR&gt; with letters converted to
upper or lower case, respectively.
</synopsis>
</macro>
<macro id="m4_cmp">
<prototype>
<parameter content="expr-1"/>
<parameter content="expr-2"/>
</prototype>
<synopsis>
Compare the arithmetic expressions
&lt;VAR&gt;expr-1&lt;/VAR&gt; and &lt;VAR&gt;expr-2&lt;/VAR&gt;,
and expand to &lt;samp&gt;-1&lt;/samp&gt; if
&lt;VAR&gt;expr-1&lt;/VAR&gt; is smaller,
&lt;samp&gt;0&lt;/samp&gt; if they are equal, and
&lt;samp&gt;1&lt;/samp&gt; if &lt;VAR&gt;expr-1&lt;/VAR&gt; is
larger.
</synopsis>
</macro>
<macro id="m4_list_cmp">
<prototype>
<parameter content="list-1"/>
<parameter content="list-2"/>
</prototype>
<synopsis>
Compare the two M4 lists consisting of comma-separated
arithmetic expressions, left to right. Expand to
&lt;samp&gt;-1&lt;/samp&gt; for the first element pairing where
the value from &lt;VAR&gt;list-1&lt;/VAR&gt; is smaller,
&lt;samp&gt;1&lt;/samp&gt; where the value from
&lt;VAR&gt;list-2&lt;/VAR&gt; is smaller, or
&lt;samp&gt;0&lt;/samp&gt; if both lists have the same values.
If one list is shorter than the other, the remaining elements of
the longer list are compared against zero.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_list_cmp([1, 0], [1]) 0
m4_list_cmp([1, [1 * 0]], [1, 0]) 0 m4_list_cmp([1, 2],
[1, 0]) 1 m4_list_cmp([1, [1+1], 3],[1, 2]) 1 m4_list_cmp([1, 2,
-3], [1, 2]) -1 m4_list_cmp([1, 0], [1, 2]) -1
m4_list_cmp([1], [1, 2]) -1
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_max">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. Expand to the
decimal value of the maximum arithmetic expression among all the
arguments.
</synopsis>
</macro>
<macro id="m4_min">
<prototype>
<parameter content="arg"/>
<parameter content="..."/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.62. Expand to the
decimal value of the minimum arithmetic expression among all the
arguments.
</synopsis>
</macro>
<macro id="m4_sign">
<prototype>
<parameter content="expr"/>
</prototype>
<synopsis>
Expand to &lt;samp&gt;-1&lt;/samp&gt; if the arithmetic
expression &lt;VAR&gt;expr&lt;/VAR&gt; is negative,
&lt;samp&gt;1&lt;/samp&gt; if it is positive, and
&lt;samp&gt;0&lt;/samp&gt; if it is zero.
</synopsis>
</macro>
<macro id="m4_version_compare">
<prototype>
<parameter content="version-1"/>
<parameter content="version-2"/>
</prototype>
<synopsis>
This macro was introduced in Autoconf 2.53, but had a number of
usability limitations that were not lifted until Autoconf 2.62.
Compare the version strings &lt;VAR&gt;version-1&lt;/VAR&gt; and
&lt;VAR&gt;version-2&lt;/VAR&gt;, and expand to
&lt;samp&gt;-1&lt;/samp&gt; if &lt;VAR&gt;version-1&lt;/VAR&gt;
is smaller, &lt;samp&gt;0&lt;/samp&gt; if they are the same, or
&lt;samp&gt;1&lt;/samp&gt; &lt;VAR&gt;version-2&lt;/VAR&gt; is
smaller. Version strings must be a list of elements separated
by &lt;samp&gt;.&lt;/samp&gt;, &lt;samp&gt;,&lt;/samp&gt; or
&lt;samp&gt;-&lt;/samp&gt;, where each element is a number along
with optional case-insensitive letters designating beta
releases. The comparison stops at the leftmost element that
contains a difference, although a 0 element compares equal to a
missing element.&lt;/P&gt;&lt;P&gt;
It is permissible to include commit identifiers in
&lt;VAR&gt;version&lt;/VAR&gt;, such as an abbreviated SHA1 of
the commit, provided there is still a monotonically increasing
prefix to allow for accurate version-based comparisons. For
example, this paragraph was written when the development
snapshot of autoconf claimed to be at version
&lt;samp&gt;2.61a-248-dc51&lt;/samp&gt;, or 248 commits after
the 2.61a release, with an abbreviated commit identification of
&lt;samp&gt;dc51&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_version_compare([1.1], [2.0]) -1
m4_version_compare([2.0b], [2.0a]) 1 m4_version_compare([1.1.1],
[1.1.1a]) -1 m4_version_compare([1.2], [1.1.1a]) 1
m4_version_compare([1.0], [1]) 0 m4_version_compare([1.1pre],
[1.1PRE]) 0 m4_version_compare([1.1a], [1,10]) -1
m4_version_compare([2.61a], [2.61a-248-dc51]) -1
m4_version_compare([2.61b], [2.61a-248-dc51]) 1
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_version_prereq">
<prototype>
<parameter content="version"/>
<parameter content="[if-new-enough]"/>
<parameter content="@ [if-old= m4_fatal]"/>
</prototype>
<synopsis>
Compares &lt;VAR&gt;version&lt;/VAR&gt; against the version of
Autoconf currently running. If the running version is at
&lt;VAR&gt;version&lt;/VAR&gt; or newer, expand
&lt;VAR&gt;if-new-enough&lt;/VAR&gt;, but if
&lt;VAR&gt;version&lt;/VAR&gt; is larger than the version
currently executing, expand &lt;VAR&gt;if-old&lt;/VAR&gt;, which
defaults to printing an error message and exiting m4sugar with
status 63. When given only one argument, this behaves like
&lt;CODE&gt;AC_PREREQ&lt;/CODE&gt; (Versioning). Remember that
the autoconf philosophy favors feature checks over version
checks.
</synopsis>
</macro>
<macro id="m4_set_add">
<prototype>
<parameter content="set"/>
<parameter content="value"/>
<parameter content="[if-uniq]"/>
<parameter content="[if-dup]"/>
</prototype>
<synopsis>
Adds the string &lt;VAR&gt;value&lt;/VAR&gt; as a member of set
&lt;VAR&gt;set&lt;/VAR&gt;. Expand
&lt;VAR&gt;if-uniq&lt;/VAR&gt; if the element was added, or
&lt;VAR&gt;if-dup&lt;/VAR&gt; if it was previously in the set.
Operates in amortized constant time, so that set creation scales
linearly.
</synopsis>
</macro>
<macro id="m4_set_add_all">
<prototype>
<parameter content="set"/>
<parameter content="value..."/>
</prototype>
<synopsis>
Adds each &lt;VAR&gt;value&lt;/VAR&gt; to the set
&lt;VAR&gt;set&lt;/VAR&gt;. This is slightly more efficient
than repeatedly invoking &lt;CODE&gt;m4_set_add&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_set_contains">
<prototype>
<parameter content="set"/>
<parameter content="value"/>
<parameter content="[if-present]"/>
<parameter content="@ [if-absent]"/>
</prototype>
<synopsis>
Expands &lt;VAR&gt;if-present&lt;/VAR&gt; if the string
&lt;VAR&gt;value&lt;/VAR&gt; is a member of
&lt;VAR&gt;set&lt;/VAR&gt;, otherwise
&lt;VAR&gt;if-absent&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_set_contains([a], [1], [yes],
[no]) no m4_set_add([a], [1], [added], [dup]) added
m4_set_add([a], [1], [added], [dup]) dup m4_set_contains([a],
[1], [yes], [no]) yes m4_set_remove([a], [1], [removed],
[missing]) removed m4_set_contains([a], [1], [yes], [no]) no
m4_set_remove([a], [1], [removed], [missing]) missing
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_set_contents">
<prototype>
<parameter content="set"/>
<parameter content="[sep]"/>
</prototype>
<prototype>
<parameter content="set"/>
<parameter content="[sep]"/>
</prototype>
<synopsis>
Expands to a single string consisting of all the members of
the set &lt;VAR&gt;set&lt;/VAR&gt;, each separated by
&lt;VAR&gt;sep&lt;/VAR&gt;, which is not expanded.
&lt;CODE&gt;m4_set_contents&lt;/CODE&gt; leaves the elements in
&lt;VAR&gt;set&lt;/VAR&gt; but reclaims any memory occupied by
removed elements, while &lt;CODE&gt;m4_set_dump&lt;/CODE&gt; is
a faster one-shot action that also deletes the set. No
provision is made for disambiguating members that contain a
non-empty &lt;VAR&gt;sep&lt;/VAR&gt; as a substring; use
&lt;CODE&gt;m4_set_empty&lt;/CODE&gt; to distinguish between an
empty set and the set containing only the empty string. The
order of the output is unspecified; in the current
implementation, part of the speed of
&lt;CODE&gt;m4_set_dump&lt;/CODE&gt; results from using a
different output order than
&lt;CODE&gt;m4_set_contents&lt;/CODE&gt;. These macros scale
linearly in the size of the set before memory pruning, and
&lt;CODE&gt;m4_set_contents([&lt;VAR&gt;set&lt;/VAR&gt;],
[&lt;VAR&gt;sep&lt;/VAR&gt;])&lt;/CODE&gt; is faster than
&lt;CODE&gt;m4_joinall([&lt;VAR&gt;sep&lt;/VAR&gt;]m4_set_listc([&lt;VAR&gt;set&lt;/VAR&gt;]))&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_set_add_all([a], [1], [2], [3])
m4_set_contents([a], [-]) 1-2-3 m4_joinall([-]m4_set_listc([a]))
1-2-3 m4_set_dump([a], [-]) 3-2-1 m4_set_contents([a])
m4_set_add([a], []) m4_set_contents([a], [-])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_set_delete">
<prototype>
<parameter content="set"/>
</prototype>
<synopsis>
Delete all elements and memory associated with
&lt;VAR&gt;set&lt;/VAR&gt;. This is linear in the set size, and
faster than removing one element at a time.
</synopsis>
</macro>
<macro id="m4_set_difference">
<prototype>
<parameter content="seta"/>
<parameter content="setb"/>
</prototype>
<prototype>
<parameter content="seta"/>
<parameter content="setb"/>
</prototype>
<prototype>
<parameter content="seta"/>
<parameter content="setb"/>
</prototype>
<synopsis>
Compute the relation between &lt;VAR&gt;seta&lt;/VAR&gt; and
&lt;VAR&gt;setb&lt;/VAR&gt;, and output the result as a list of
quoted arguments without duplicates and with a leading comma.
Set difference selects the elements in
&lt;VAR&gt;seta&lt;/VAR&gt; but not &lt;VAR&gt;setb&lt;/VAR&gt;,
intersection selects only elements in both sets, and union
selects elements in either set. These actions are linear in the
sum of the set sizes. The leading comma is necessary to
distinguish between no elements and the empty string as the only
element.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_set_add_all([a], [1], [2], [3])
m4_set_add_all([b], [3], [], [4]) m4_set_difference([a], [b])
,1,2 m4_set_difference([b], [a]) ,,4 m4_set_intersection([a],
[b]) ,3 m4_set_union([a], [b]) ,1,2,3,,4
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_set_empty">
<prototype>
<parameter content="set"/>
<parameter content="[if-empty]"/>
<parameter content="[if-elements]"/>
</prototype>
<synopsis>
Expand &lt;VAR&gt;if-empty&lt;/VAR&gt; if the set
&lt;VAR&gt;set&lt;/VAR&gt; has no elements, otherwise expand
&lt;VAR&gt;if-elements&lt;/VAR&gt;. This macro operates in
constant time. Using this macro can help disambiguate output
from &lt;CODE&gt;m4_set_contents&lt;/CODE&gt; or
&lt;CODE&gt;m4_set_list&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_set_foreach">
<prototype>
<parameter content="set"/>
<parameter content="variable"/>
<parameter content="action"/>
</prototype>
<synopsis>
For each element in the set &lt;VAR&gt;set&lt;/VAR&gt;, expand
&lt;VAR&gt;action&lt;/VAR&gt; with the macro
&lt;VAR&gt;variable&lt;/VAR&gt; defined as the set element.
Behavior is unspecified if &lt;VAR&gt;action&lt;/VAR&gt;
recursively lists the contents of &lt;VAR&gt;set&lt;/VAR&gt;
(although listing other sets is acceptable), or if it modifies
the set in any way other than removing the element currently
contained in &lt;VAR&gt;variable&lt;/VAR&gt;. This macro is
faster than the corresponding
&lt;CODE&gt;m4_foreach([&lt;VAR&gt;variable&lt;/VAR&gt;],
m4_indir([m4_dquote]m4_set_listc([&lt;VAR&gt;set&lt;/VAR&gt;])),
[&lt;VAR&gt;action&lt;/VAR&gt;])&lt;/CODE&gt;, although
&lt;CODE&gt;m4_set_map&lt;/CODE&gt; might be faster still.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_set_add_all([a]m4_for([i], [1],
[5], [], [,i])) m4_set_contents([a]) 12345 m4_set_foreach([a],
[i], [m4_if(m4_eval(i&amp;1), [0], [m4_set_remove([a], i,
[i])])]) 24 m4_set_contents([a]) 135
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_set_list">
<prototype>
<parameter content="set"/>
</prototype>
<prototype>
<parameter content="set"/>
</prototype>
<synopsis>
Produce a list of arguments, where each argument is a quoted
element from the set &lt;VAR&gt;set&lt;/VAR&gt;. The variant
&lt;CODE&gt;m4_set_listc&lt;/CODE&gt; is unambiguous, by adding
a leading comma if there are any set elements, whereas the
variant &lt;CODE&gt;m4_set_list&lt;/CODE&gt; cannot distinguish
between an empty set and a set containing only the empty string.
These can be directly used in macros that take multiple
arguments, such as &lt;CODE&gt;m4_join&lt;/CODE&gt; or
&lt;CODE&gt;m4_set_add_all&lt;/CODE&gt;, or wrapped by
&lt;CODE&gt;m4_dquote&lt;/CODE&gt; for macros that take a quoted
list, such as &lt;CODE&gt;m4_map&lt;/CODE&gt; or
&lt;CODE&gt;m4_foreach&lt;/CODE&gt;. Any memory occupied by
removed elements is reclaimed during these macros.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_set_add_all([a], [1], [2], [3])
m4_set_list([a]) 1,2,3 m4_set_list([b]) m4_set_listc([b])
m4_count(m4_set_list([b])) 1 m4_set_empty([b], [0],
[m4_count(m4_set_list([b]))]) 0 m4_set_add([b], [])
m4_set_list([b]) m4_set_listc([b]) , m4_count(m4_set_list([b]))
1 m4_set_empty([b], [0], [m4_count(m4_set_list([b]))]) 1
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="m4_set_map">
<prototype>
<parameter content="set"/>
<parameter content="action"/>
</prototype>
<synopsis>
For each element in the set &lt;VAR&gt;set&lt;/VAR&gt;, expand
&lt;VAR&gt;action&lt;/VAR&gt; with a single argument of the set
element. Behavior is unspecified if
&lt;VAR&gt;action&lt;/VAR&gt; recursively lists the contents of
&lt;VAR&gt;set&lt;/VAR&gt; (although listing other sets is
acceptable), or if it modifies the set in any way other than
removing the element passed as an argument. This macro is
faster than either corresponding counterpart of
&lt;CODE&gt;m4_map_args([&lt;VAR&gt;action&lt;/VAR&gt;]m4_set_listc([&lt;VAR&gt;set&lt;/VAR&gt;]))&lt;/CODE&gt;
or &lt;CODE&gt;m4_set_foreach([&lt;VAR&gt;set&lt;/VAR&gt;],
[var],
[&lt;VAR&gt;action&lt;/VAR&gt;(m4_defn([var]))])&lt;/CODE&gt;.
It is possible to use &lt;CODE&gt;m4_curry&lt;/CODE&gt; if more
than one argument is needed for &lt;VAR&gt;action&lt;/VAR&gt;,
although it is more efficient to use
&lt;CODE&gt;m4_set_map_sep&lt;/CODE&gt; in that case.
</synopsis>
</macro>
<macro id="m4_set_map_sep">
<prototype>
<parameter content="set"/>
<parameter content="[pre]"/>
<parameter content="[post]"/>
<parameter content="[sep]"/>
</prototype>
<synopsis>
For each element in the set &lt;VAR&gt;set&lt;/VAR&gt;, expand
&lt;CODE&gt;&lt;VAR&gt;pre&lt;/VAR&gt;[element]&lt;VAR&gt;post&lt;/VAR&gt;&lt;/CODE&gt;,
additionally expanding &lt;VAR&gt;sep&lt;/VAR&gt; between
elements. Behavior is unspecified if the expansion recursively
lists the contents of &lt;VAR&gt;set&lt;/VAR&gt; (although
listing other sets is acceptable), or if it modifies the set in
any way other than removing the element visited by the
expansion. This macro provides the most efficient means for
non-destructively visiting the elements of a set; in particular,
&lt;CODE&gt;m4_set_map([&lt;VAR&gt;set&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;])&lt;/CODE&gt; is equivalent to
&lt;CODE&gt;m4_set_map_sep([&lt;VAR&gt;set&lt;/VAR&gt;],
[&lt;VAR&gt;action&lt;/VAR&gt;(], [)])&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_set_remove">
<prototype>
<parameter content="set"/>
<parameter content="value"/>
<parameter content="[if-present]"/>
<parameter content="@ [if-absent]"/>
</prototype>
<synopsis>
If &lt;VAR&gt;value&lt;/VAR&gt; is an element in the set
&lt;VAR&gt;set&lt;/VAR&gt;, then remove it and expand
&lt;VAR&gt;if-present&lt;/VAR&gt;. Otherwise expand
&lt;VAR&gt;if-absent&lt;/VAR&gt;. This macro operates in
constant time so that multiple removals will scale linearly
rather than quadratically; but when used outside of
&lt;CODE&gt;m4_set_foreach&lt;/CODE&gt; or
&lt;CODE&gt;m4_set_map&lt;/CODE&gt;, it leaves memory occupied
until the set is later compacted by
&lt;CODE&gt;m4_set_contents&lt;/CODE&gt; or
&lt;CODE&gt;m4_set_list&lt;/CODE&gt;. Several other set
operations are then less efficient between the time of element
removal and subsequent memory compaction, but still maintain
their guaranteed scaling performance.
</synopsis>
</macro>
<macro id="m4_set_size">
<prototype>
<parameter content="set"/>
</prototype>
<synopsis>
Expand to the size of the set &lt;VAR&gt;set&lt;/VAR&gt;. This
implementation operates in constant time, and is thus more
efficient than &lt;CODE&gt;m4_eval(m4_count(m4_set_listc([set]))
- 1)&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="m4_pattern_forbid">
<prototype>
<parameter content="pattern"/>
</prototype>
<synopsis>
Declare that no token matching &lt;VAR&gt;pattern&lt;/VAR&gt;
must be found in the output. Comments are not checked; this can
be a problem if, for instance, you have some macro left
unexpanded after an &lt;samp&gt;#include&lt;/samp&gt;. No
consensus is currently found in the Autoconf community, as some
people consider it should be valid to name macros in comments
(which doesn't make sense to the authors of this documentation:
input, such as macros, should be documented by
&lt;samp&gt;dnl&lt;/samp&gt; comments; reserving
&lt;samp&gt;#&lt;/samp&gt;-comments to document the output).
</synopsis>
</macro>
<macro id="m4_pattern_allow">
<prototype>
<parameter content="pattern"/>
</prototype>
<synopsis>
Any token matching &lt;VAR&gt;pattern&lt;/VAR&gt; is allowed,
including if it matches an
&lt;CODE&gt;m4_pattern_forbid&lt;/CODE&gt; pattern.
</synopsis>
</macro>
<macro id="AS_BASENAME">
<prototype>
<parameter content="file-name"/>
</prototype>
<synopsis>
Output the non-directory portion of
&lt;VAR&gt;file-name&lt;/VAR&gt;. For example, if
&lt;CODE&gt;$file&lt;/CODE&gt; is
&lt;samp&gt;/one/two/three&lt;/samp&gt;, the command
&lt;CODE&gt;base=`AS_BASENAME(["$file"])`&lt;/CODE&gt; sets
&lt;CODE&gt;base&lt;/CODE&gt; to &lt;samp&gt;three&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AS_BOX">
<prototype>
<parameter content="text"/>
<parameter content="[char= -]"/>
</prototype>
<synopsis>
Expand into shell code that will output
&lt;VAR&gt;text&lt;/VAR&gt; surrounded by a box with
&lt;VAR&gt;char&lt;/VAR&gt; in the top and bottom border.
&lt;VAR&gt;text&lt;/VAR&gt; should not contain a newline, but
may contain shell expansions valid for unquoted here-documents.
&lt;VAR&gt;char&lt;/VAR&gt; defaults to
&lt;samp&gt;-&lt;/samp&gt;, but can be any character except
&lt;samp&gt;/&lt;/samp&gt;, &lt;samp&gt;'&lt;/samp&gt;,
&lt;samp&gt;"&lt;/samp&gt;, &lt;samp&gt;\&lt;/samp&gt;,
&lt;samp&gt;&amp;&lt;/samp&gt;, or &lt;samp&gt;`&lt;/samp&gt;.
This is useful for outputting a comment box into log files to
separate distinct phases of script operation.
</synopsis>
</macro>
<macro id="AS_CASE">
<prototype>
<parameter content="word"/>
<parameter content="[pattern1]"/>
<parameter content="[if-matched1]"/>
<parameter content="@ ..."/>
<parameter content="[default]"/>
</prototype>
<synopsis>
Expand into a shell &lt;samp&gt;case&lt;/samp&gt; statement,
where &lt;VAR&gt;word&lt;/VAR&gt; is matched against one or more
patterns. &lt;VAR&gt;if-matched&lt;/VAR&gt; is run if the
corresponding pattern matched &lt;VAR&gt;word&lt;/VAR&gt;, else
&lt;VAR&gt;default&lt;/VAR&gt; is run. Avoids several
portability issues (case, , Limitations of Shell Builtins).
</synopsis>
</macro>
<macro id="AS_DIRNAME">
<prototype>
<parameter content="file-name"/>
</prototype>
<synopsis>
Output the directory portion of
&lt;VAR&gt;file-name&lt;/VAR&gt;. For example, if
&lt;CODE&gt;$file&lt;/CODE&gt; is
&lt;samp&gt;/one/two/three&lt;/samp&gt;, the command
&lt;CODE&gt;dir=`AS_DIRNAME(["$file"])`&lt;/CODE&gt; sets
&lt;CODE&gt;dir&lt;/CODE&gt; to
&lt;samp&gt;/one/two&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
This interface may be improved in the future to avoid forks and
losing trailing newlines.
</synopsis>
</macro>
<macro id="AS_ECHO">
<prototype>
<parameter content="word"/>
</prototype>
<synopsis>
Emits &lt;VAR&gt;word&lt;/VAR&gt; to the standard output,
followed by a newline. &lt;VAR&gt;word&lt;/VAR&gt; must be a
single shell word (typically a quoted string). The bytes of
&lt;VAR&gt;word&lt;/VAR&gt; are output as-is, even if it starts
with "-" or contains "\". Redirections can be placed outside the
macro invocation. This is much more portable than using
&lt;CODE&gt;echo&lt;/CODE&gt; (echo, , Limitations of Shell
Builtins).
</synopsis>
</macro>
<macro id="AS_ECHO_N">
<prototype>
<parameter content="word"/>
</prototype>
<synopsis>
Emits &lt;VAR&gt;word&lt;/VAR&gt; to the standard output,
without a following newline. &lt;VAR&gt;word&lt;/VAR&gt; must be
a single shell word (typically a quoted string) and, for
portability, should not include more than one newline. The
bytes of &lt;VAR&gt;word&lt;/VAR&gt; are output as-is, even if
it starts with "-" or contains "\". Redirections can be placed
outside the macro invocation.
</synopsis>
</macro>
<macro id="AS_ESCAPE">
<prototype>
<parameter content="string"/>
<parameter content="[chars = @samp{`\&quot;$}]"/>
</prototype>
<synopsis>
Expands to &lt;VAR&gt;string&lt;/VAR&gt;, with any characters
in &lt;VAR&gt;chars&lt;/VAR&gt; escaped with a backslash
(&lt;samp&gt;\&lt;/samp&gt;). &lt;VAR&gt;chars&lt;/VAR&gt;
should be at most four bytes long, and only contain characters
from the set &lt;samp&gt;`\"$&lt;/samp&gt;; however, characters
may be safely listed more than once in
&lt;VAR&gt;chars&lt;/VAR&gt; for the sake of syntax highlighting
editors. The current implementation expands
&lt;VAR&gt;string&lt;/VAR&gt; after adding escapes; if
&lt;VAR&gt;string&lt;/VAR&gt; contains macro calls that in turn
expand to text needing shell quoting, you can use
&lt;CODE&gt;AS_ESCAPE(m4_dquote(m4_expand([string])))&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The default for &lt;VAR&gt;chars&lt;/VAR&gt;
(&lt;samp&gt;\"$`&lt;/samp&gt;) is the set of characters needing
escapes when &lt;VAR&gt;string&lt;/VAR&gt; will be used
literally within double quotes. One common variant is the set
of characters to protect when &lt;VAR&gt;string&lt;/VAR&gt; will
be used literally within back-ticks or an unquoted here-document
(&lt;samp&gt;\$`&lt;/samp&gt;). Another common variant is
&lt;samp&gt;""&lt;/samp&gt;, which can be used to form a
double-quoted string containing the same expansions that would
have occurred if &lt;VAR&gt;string&lt;/VAR&gt; were expanded in
an unquoted here-document; however, when using this variant,
care must be taken that &lt;VAR&gt;string&lt;/VAR&gt; does not
use double quotes within complex variable expansions (such as
&lt;samp&gt;$foo-`echo "hi"`@&lt;/samp&gt;) that would be broken
with improper escapes.&lt;/P&gt;&lt;P&gt;
This macro is often used with &lt;CODE&gt;AS_ECHO&lt;/CODE&gt;.
For an example, observe the output generated by the shell code
generated from this snippet:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; foo=bar AS_ECHO(["AS_ESCAPE(["$foo"
= ])AS_ESCAPE(["$foo"], [""])"]) "$foo" = "bar"
m4_define([macro], [a, [\b]]) AS_ECHO(["AS_ESCAPE([[macro]])"])
macro AS_ECHO(["AS_ESCAPE([macro])"]) a, b
AS_ECHO(["AS_ESCAPE(m4_dquote(m4_expand([macro])))"]) a, \b
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
To escape a string that will be placed within single quotes,
use:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_bpatsubst([[&lt;VAR&gt;string&lt;/VAR&gt;]], ['], ['\\''])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AS_EXIT">
<prototype>
<parameter content="[status= $?]"/>
</prototype>
<synopsis>
Emit code to exit the shell with &lt;VAR&gt;status&lt;/VAR&gt;,
defaulting to &lt;samp&gt;$?&lt;/samp&gt;. This macro works
around shells that see the exit status of the command prior to
&lt;CODE&gt;exit&lt;/CODE&gt; inside a &lt;samp&gt;trap
0&lt;/samp&gt; handler (trap, , Limitations of Shell Builtins).
</synopsis>
</macro>
<macro id="AS_IF">
<prototype>
<parameter content="test1"/>
<parameter content="[run-if-true1]"/>
<parameter content="..."/>
<parameter content="[run-if-false]"/>
</prototype>
<synopsis>
Run shell code &lt;VAR&gt;test1&lt;/VAR&gt;. If
&lt;VAR&gt;test1&lt;/VAR&gt; exits with a zero status then run
shell code &lt;VAR&gt;run-if-true1&lt;/VAR&gt;, else examine
further tests. If no test exits with a zero status, run shell
code &lt;VAR&gt;run-if-false&lt;/VAR&gt;, with simplifications
if either &lt;VAR&gt;run-if-true1&lt;/VAR&gt; or
&lt;VAR&gt;run-if-false&lt;/VAR&gt; is empty. For example,&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AS_IF([test "x$foo" = xyes],
[HANDLE_FOO([yes])], [test "x$foo" != xno],
[HANDLE_FOO([maybe])], [echo foo not specified])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
ensures any required macros of
&lt;CODE&gt;HANDLE_FOO&lt;/CODE&gt; are expanded before the
first test.
</synopsis>
</macro>
<macro id="AS_MKDIR_P">
<prototype>
<parameter content="file-name"/>
</prototype>
<synopsis>
Make the directory &lt;VAR&gt;file-name&lt;/VAR&gt;, including
intervening directories as necessary. This is equivalent to
&lt;samp&gt;mkdir -p --
&lt;VAR&gt;file-name&lt;/VAR&gt;&lt;/samp&gt;, except that it is
portable to older versions of &lt;CODE&gt;mkdir&lt;/CODE&gt;
that lack support for the &lt;samp&gt;-p&lt;/samp&gt; option or
for the &lt;samp&gt;--&lt;/samp&gt; delimiter (mkdir, ,
Limitations of Usual Tools). Also,
&lt;CODE&gt;AS_MKDIR_P&lt;/CODE&gt; succeeds if
&lt;VAR&gt;file-name&lt;/VAR&gt; is a symbolic link to an
existing directory, even though Posix is unclear whether
&lt;samp&gt;mkdir -p&lt;/samp&gt; should succeed in that case.
If creation of &lt;VAR&gt;file-name&lt;/VAR&gt; fails, exit the
script.&lt;/P&gt;&lt;P&gt;
Also see the &lt;CODE&gt;AC_PROG_MKDIR_P&lt;/CODE&gt; macro
(Particular Programs).
</synopsis>
</macro>
<macro id="AS_SET_STATUS">
<prototype>
<parameter content="status"/>
</prototype>
<synopsis>
Emit shell code to set the value of &lt;samp&gt;$?&lt;/samp&gt;
to &lt;VAR&gt;status&lt;/VAR&gt;, as efficiently as possible.
However, this is not guaranteed to abort a shell running with
&lt;CODE&gt;set -e&lt;/CODE&gt; (set, , Limitations of Shell
Builtins). This should also be used at the end of a complex
shell function instead of &lt;samp&gt;return&lt;/samp&gt; (Shell
Functions) to avoid a DJGPP shell bug.
</synopsis>
</macro>
<macro id="AS_TR_CPP">
<prototype>
<parameter content="expression"/>
</prototype>
<synopsis>
Transform &lt;VAR&gt;expression&lt;/VAR&gt; into a valid
right-hand side for a C &lt;CODE&gt;#define&lt;/CODE&gt;. For
example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; # This outputs "#define HAVE_CHAR_P
1". # Notice the m4 quoting around #, to prevent an m4 comment
type="char *" echo "[#]define AS_TR_CPP([HAVE_$type]) 1"
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AS_TR_SH">
<prototype>
<parameter content="expression"/>
</prototype>
<synopsis>
Transform &lt;VAR&gt;expression&lt;/VAR&gt; into shell code
that generates a valid shell variable name. The result is
literal when possible at m4 time, but must be used with
&lt;CODE&gt;eval&lt;/CODE&gt; if
&lt;VAR&gt;expression&lt;/VAR&gt; causes shell indirections. For
example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; # This outputs "Have it!".
header="sys/some file.h" eval AS_TR_SH([HAVE_$header])=yes if
test "x$HAVE_sys_some_file_h" = xyes; then echo "Have it!"; fi
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AS_SET_CATFILE">
<prototype>
<parameter content="var"/>
<parameter content="dir"/>
<parameter content="file"/>
</prototype>
<synopsis>
Set the polymorphic shell variable &lt;VAR&gt;var&lt;/VAR&gt;
to &lt;VAR&gt;dir&lt;/VAR&gt;/&lt;VAR&gt;file&lt;/VAR&gt;, but
optimizing the common cases (&lt;VAR&gt;dir&lt;/VAR&gt; or
&lt;VAR&gt;file&lt;/VAR&gt; is &lt;samp&gt;.&lt;/samp&gt;,
&lt;VAR&gt;file&lt;/VAR&gt; is absolute, etc.).
</synopsis>
</macro>
<macro id="AS_UNSET">
<prototype>
<parameter content="var"/>
</prototype>
<synopsis>
Unsets the shell variable &lt;VAR&gt;var&lt;/VAR&gt;, working
around bugs in older shells (unset, , Limitations of Shell
Builtins). &lt;VAR&gt;var&lt;/VAR&gt; can be a literal or
indirect variable name.
</synopsis>
</macro>
<macro id="AS_VERSION_COMPARE">
<prototype>
<parameter content="version-1"/>
<parameter content="version-2"/>
<parameter content="@ [action-if-less]"/>
<parameter content="[action-if-equal]"/>
<parameter content="[action-if-greater]"/>
</prototype>
<synopsis>
Compare two strings &lt;VAR&gt;version-1&lt;/VAR&gt; and
&lt;VAR&gt;version-2&lt;/VAR&gt;, possibly containing shell
variables, as version strings, and expand
&lt;VAR&gt;action-if-less&lt;/VAR&gt;,
&lt;VAR&gt;action-if-equal&lt;/VAR&gt;, or
&lt;VAR&gt;action-if-greater&lt;/VAR&gt; depending upon the
result. The algorithm to compare is similar to the one used by
strverscmp in glibc (String/Array Comparison, , String/Array
Comparison, libc, The GNU C Library).
</synopsis>
</macro>
<macro id="AS_LITERAL_IF">
<prototype>
<parameter content="expression"/>
<parameter content="[if-literal]"/>
<parameter content="[if-not]"/>
<parameter content="@ [if-simple-ref= if-not]"/>
</prototype>
<prototype>
</prototype>
<synopsis>
if-not, if-simple-ref, &lt;VAR&gt;if-not&lt;/VAR&gt;) If the
expansion of &lt;VAR&gt;expression&lt;/VAR&gt; is definitely a
shell literal, expand &lt;VAR&gt;if-literal&lt;/VAR&gt;. If the
expansion of &lt;VAR&gt;expression&lt;/VAR&gt; looks like it
might contain shell indirections (such as
&lt;CODE&gt;$var&lt;/CODE&gt; or
&lt;CODE&gt;`expr`&lt;/CODE&gt;), then
&lt;VAR&gt;if-not&lt;/VAR&gt; is expanded. Sometimes, it is
possible to output optimized code if
&lt;VAR&gt;expression&lt;/VAR&gt; consists only of shell
variable expansions (such as &lt;CODE&gt;$var@&lt;/CODE&gt;), in
which case &lt;VAR&gt;if-simple-ref&lt;/VAR&gt; can be provided;
but defaulting to &lt;VAR&gt;if-not&lt;/VAR&gt; should always be
safe. &lt;CODE&gt;AS_LITERAL_WORD_IF&lt;/CODE&gt; only expands
&lt;VAR&gt;if-literal&lt;/VAR&gt; if
&lt;VAR&gt;expression&lt;/VAR&gt; looks like a single shell
word, containing no whitespace; while
&lt;CODE&gt;AS_LITERAL_IF&lt;/CODE&gt; allows whitespace in
&lt;VAR&gt;expression&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
In order to reduce the time spent recognizing whether an
&lt;VAR&gt;expression&lt;/VAR&gt; qualifies as a literal or a
simple indirection, the implementation is somewhat conservative:
&lt;VAR&gt;expression&lt;/VAR&gt; must be a single shell word
(possibly after stripping whitespace), consisting only of bytes
that would have the same meaning whether unquoted or enclosed in
double quotes (for example, &lt;samp&gt;a.b&lt;/samp&gt; results
in &lt;VAR&gt;if-literal&lt;/VAR&gt;, even though it is not a
valid shell variable name; while both
&lt;samp&gt;'a'&lt;/samp&gt; and &lt;samp&gt;[$]&lt;/samp&gt;
result in &lt;VAR&gt;if-not&lt;/VAR&gt;, because they behave
differently than &lt;samp&gt;"'a'"&lt;/samp&gt; and
&lt;samp&gt;"[$]"&lt;/samp&gt;). This macro can be used in
contexts for recognizing portable file names (such as in the
implementation of &lt;CODE&gt;AC_LIBSOURCE&lt;/CODE&gt;), or
coupled with some transliterations for forming valid variable
names (such as in the implementation of
&lt;CODE&gt;AS_TR_SH&lt;/CODE&gt;, which uses an additional
&lt;CODE&gt;m4_translit&lt;/CODE&gt; to convert
&lt;samp&gt;.&lt;/samp&gt; to &lt;samp&gt;_&lt;/samp&gt;).&lt;/P&gt;&lt;P&gt;
This example shows how to read the contents of the shell
variable &lt;CODE&gt;bar&lt;/CODE&gt;, exercising all three
arguments to &lt;CODE&gt;AS_LITERAL_IF&lt;/CODE&gt;. It results
in a script that will output the line
&lt;samp&gt;hello&lt;/samp&gt; three times.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_DEFUN([MY_ACTION],
[AS_LITERAL_IF([$1], [echo "$$1"], [AS_VAR_COPY([var], [$1])
echo "$var"], [eval 'echo "$'"$1"\"])]) foo=bar bar=hello
MY_ACTION([bar]) MY_ACTION([`echo bar`]) MY_ACTION([$foo])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AS_VAR_APPEND">
<prototype>
<parameter content="var"/>
<parameter content="text"/>
</prototype>
<synopsis>
Emit shell code to append the shell expansion of
&lt;VAR&gt;text&lt;/VAR&gt; to the end of the current contents
of the polymorphic shell variable &lt;VAR&gt;var&lt;/VAR&gt;,
taking advantage of shells that provide the
&lt;samp&gt;+=&lt;/samp&gt; extension for more efficient
scaling.&lt;/P&gt;&lt;P&gt;
For situations where the final contents of
&lt;VAR&gt;var&lt;/VAR&gt; are relatively short (less than 256
bytes), it is more efficient to use the simpler code sequence of
&lt;CODE&gt;&lt;VAR&gt;var&lt;/VAR&gt;=$&lt;VAR&gt;var&lt;/VAR&gt;@&lt;/CODE&gt;&lt;VAR&gt;text&lt;/VAR&gt;
(or its polymorphic equivalent of &lt;CODE&gt;AS_VAR_COPY([t],
[&lt;VAR&gt;var&lt;/VAR&gt;])&lt;/CODE&gt; and
&lt;CODE&gt;AS_VAR_SET([&lt;VAR&gt;var&lt;/VAR&gt;],
["$t"&lt;VAR&gt;text&lt;/VAR&gt;])&lt;/CODE&gt;). But in the
case when the script will be repeatedly appending text into
&lt;CODE&gt;var&lt;/CODE&gt;, issues of scaling start to become
apparent. A naive implementation requires execution time linear
to the length of the current contents of
&lt;VAR&gt;var&lt;/VAR&gt; as well as the length of
&lt;VAR&gt;text&lt;/VAR&gt; for a single append, for an overall
quadratic scaling with multiple appends. This macro takes
advantage of shells which provide the extension
&lt;CODE&gt;&lt;VAR&gt;var&lt;/VAR&gt;+=&lt;VAR&gt;text&lt;/VAR&gt;&lt;/CODE&gt;,
which can provide amortized constant time for a single append,
for an overall linear scaling with multiple appends. Note that
unlike &lt;CODE&gt;AS_VAR_SET&lt;/CODE&gt;, this macro requires
that &lt;VAR&gt;text&lt;/VAR&gt; be quoted properly to avoid
field splitting and file name expansion.
</synopsis>
</macro>
<macro id="AS_VAR_ARITH">
<prototype>
<parameter content="var"/>
<parameter content="expression"/>
</prototype>
<synopsis>
Emit shell code to compute the arithmetic expansion of
&lt;VAR&gt;expression&lt;/VAR&gt;, assigning the result as the
contents of the polymorphic shell variable
&lt;VAR&gt;var&lt;/VAR&gt;. The code takes advantage of shells
that provide &lt;samp&gt;$(())&lt;/samp&gt; for fewer forks, but
uses &lt;CODE&gt;expr&lt;/CODE&gt; as a fallback. Therefore,
the syntax for a valid &lt;VAR&gt;expression&lt;/VAR&gt; is
rather limited: all operators must occur as separate shell
arguments and with proper quoting, there is no portable equality
operator, all variables containing numeric values must be
expanded prior to the computation, all numeric values must be
provided in decimal without leading zeroes, and the first shell
argument should not be a negative number. In the following
example, this snippet will print &lt;samp&gt;(2+3)*4 ==
20&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; bar=3 AS_VAR_ARITH([foo], [\( 2 +
$bar \) \* 4]) echo "(2+$bar)*4 == $foo"
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AS_VAR_COPY">
<prototype>
<parameter content="dest"/>
<parameter content="source"/>
</prototype>
<synopsis>
Emit shell code to assign the contents of the polymorphic shell
variable &lt;VAR&gt;source&lt;/VAR&gt; to the polymorphic shell
variable &lt;VAR&gt;dest&lt;/VAR&gt;. For example, executing
this M4sh snippet will output &lt;samp&gt;bar hi&lt;/samp&gt;:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; foo=bar bar=hi AS_VAR_COPY([a],
[foo]) AS_VAR_COPY([b], [$foo]) echo "$a $b"
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
When it is necessary to access the contents of an indirect
variable inside a shell double-quoted context, the recommended
idiom is to first copy the contents into a temporary literal
shell variable.&lt;/P&gt;&lt;P&gt;
@smallexample for header in stdint_h inttypes_h ; do
AS_VAR_COPY([var], [ac_cv_header_$header]) echo "$header
detected: $var" done @end smallexample
</synopsis>
</macro>
<macro id="AS_VAR_IF">
<prototype>
<parameter content="var"/>
<parameter content="[word]"/>
<parameter content="[if-equal]"/>
<parameter content="@ [if-not-equal]"/>
</prototype>
<synopsis>
Output a shell conditional statement. If the contents of the
polymorphic shell variable &lt;VAR&gt;var&lt;/VAR&gt; match the
string &lt;VAR&gt;word&lt;/VAR&gt;, execute
&lt;VAR&gt;if-equal&lt;/VAR&gt;; otherwise execute
&lt;VAR&gt;if-not-equal&lt;/VAR&gt;.
&lt;VAR&gt;word&lt;/VAR&gt; must be a single shell word
(typically a quoted string). Avoids shell bugs if an interrupt
signal arrives while a command substitution in
&lt;VAR&gt;var&lt;/VAR&gt; is being expanded.
</synopsis>
</macro>
<macro id="AS_VAR_PUSHDEF">
<prototype>
<parameter content="m4-name"/>
<parameter content="value"/>
</prototype>
<prototype>
<parameter content="m4-name"/>
</prototype>
<synopsis>
variable names names, composing A common M4sh idiom involves
composing shell variable names from an m4 argument (for example,
writing a macro that uses a cache variable).
&lt;VAR&gt;value&lt;/VAR&gt; can be an arbitrary string, which
will be transliterated into a valid shell name by
&lt;CODE&gt;AS_TR_SH&lt;/CODE&gt;. In order to access the
composed variable name based on &lt;VAR&gt;value&lt;/VAR&gt;, it
is easier to declare a temporary m4 macro
&lt;VAR&gt;m4-name&lt;/VAR&gt; with
&lt;CODE&gt;AS_VAR_PUSHDEF&lt;/CODE&gt;, then use that macro as
the argument to subsequent &lt;CODE&gt;AS_VAR&lt;/CODE&gt;
macros as a polymorphic variable name, and finally free the
temporary macro with &lt;CODE&gt;AS_VAR_POPDEF&lt;/CODE&gt;.
These macros are often followed with
&lt;CODE&gt;dnl&lt;/CODE&gt;, to avoid excess newlines in the
output.&lt;/P&gt;&lt;P&gt;
Here is an involved example, that shows the power of writing
macros that can handle composed shell variable names:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_define([MY_CHECK_HEADER],
[AS_VAR_PUSHDEF([my_Header], [ac_cv_header_$1])dnl
AS_VAR_IF([my_Header], [yes], [echo "header $1 detected"])dnl
AS_VAR_POPDEF([my_Header])dnl ]) MY_CHECK_HEADER([stdint.h]) for
header in inttypes.h stdlib.h ; do MY_CHECK_HEADER([$header])
done &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
In the above example, &lt;CODE&gt;MY_CHECK_HEADER&lt;/CODE&gt;
can operate on polymorphic variable names. In the first
invocation, the m4 argument is
&lt;CODE&gt;stdint.h&lt;/CODE&gt;, which transliterates into a
literal &lt;CODE&gt;stdint_h&lt;/CODE&gt;. As a result, the
temporary macro &lt;CODE&gt;my_Header&lt;/CODE&gt; expands to
the literal shell name
&lt;samp&gt;ac_cv_header_stdint_h&lt;/samp&gt;. In the second
invocation, the m4 argument to
&lt;CODE&gt;MY_CHECK_HEADER&lt;/CODE&gt; is
&lt;CODE&gt;$header&lt;/CODE&gt;, and the temporary macro
&lt;CODE&gt;my_Header&lt;/CODE&gt; expands to the indirect shell
name &lt;samp&gt;$as_my_Header&lt;/samp&gt;. During the shell
execution of the for loop, when &lt;samp&gt;$header&lt;/samp&gt;
contains &lt;samp&gt;inttypes.h&lt;/samp&gt;, then
&lt;samp&gt;$as_my_Header&lt;/samp&gt; contains
&lt;samp&gt;ac_cv_header_inttypes_h&lt;/samp&gt;. If this
script is then run on a platform where all three headers have
been previously detected, the output of the script will include:&lt;/P&gt;&lt;P&gt;
@smallexample header stdint.h detected header inttypes.h
detected header stdlib.h detected @end smallexample
</synopsis>
</macro>
<macro id="AS_VAR_SET">
<prototype>
<parameter content="var"/>
<parameter content="[value]"/>
</prototype>
<synopsis>
Emit shell code to assign the contents of the polymorphic shell
variable &lt;VAR&gt;var&lt;/VAR&gt; to the shell expansion of
&lt;VAR&gt;value&lt;/VAR&gt;. &lt;VAR&gt;value&lt;/VAR&gt; is
not subject to field splitting or file name expansion, so if
command substitution is used, it may be done with
&lt;samp&gt;`""`&lt;/samp&gt; rather than using an intermediate
variable (Shell Substitutions). However,
&lt;VAR&gt;value&lt;/VAR&gt; does undergo rescanning for
additional macro names; behavior is unspecified if late
expansion results in any shell meta-characters.
</synopsis>
</macro>
<macro id="AS_VAR_SET_IF">
<prototype>
<parameter content="var"/>
<parameter content="[if-set]"/>
<parameter content="[if-undef]"/>
</prototype>
<synopsis>
Emit a shell conditional statement, which executes
&lt;VAR&gt;if-set&lt;/VAR&gt; if the polymorphic shell variable
&lt;CODE&gt;var&lt;/CODE&gt; is set to any value, and
&lt;VAR&gt;if-undef&lt;/VAR&gt; otherwise.
</synopsis>
</macro>
<macro id="AS_VAR_TEST_SET">
<prototype>
<parameter content="var"/>
</prototype>
<synopsis>
Emit a shell statement that results in a successful exit status
only if the polymorphic shell variable
&lt;CODE&gt;var&lt;/CODE&gt; is set.
</synopsis>
</macro>
<macro id="AS_BOURNE_COMPATIBLE">
<prototype>
</prototype>
<synopsis>
Set up the shell to be more compatible with the Bourne shell as
standardized by Posix, if possible. This may involve setting
environment variables, or setting options, or similar
implementation-specific actions. This macro is deprecated,
since &lt;CODE&gt;AS_INIT&lt;/CODE&gt; already invokes it.
</synopsis>
</macro>
<macro id="AS_INIT">
<prototype>
</prototype>
<synopsis>
Initialize the M4sh environment. This macro calls
&lt;CODE&gt;m4_init&lt;/CODE&gt;, then outputs the
&lt;CODE&gt;#! /bin/sh&lt;/CODE&gt; line, a notice about where
the output was generated from, and code to sanitize the
environment for the rest of the script. Among other
initializations, this sets SHELL to the shell chosen to run the
script (CONFIG_SHELL), and LC_ALL to ensure the C locale.
Finally, it changes the current diversion to
&lt;CODE&gt;BODY&lt;/CODE&gt;. &lt;CODE&gt;AS_INIT&lt;/CODE&gt;
is called automatically by &lt;CODE&gt;AC_INIT&lt;/CODE&gt; and
&lt;CODE&gt;AT_INIT&lt;/CODE&gt;, so shell code in
&lt;TT&gt;configure&lt;/TT&gt;,
&lt;TT&gt;config.status&lt;/TT&gt;, and
&lt;TT&gt;testsuite&lt;/TT&gt; all benefit from a sanitized
shell environment.
</synopsis>
</macro>
<macro id="AS_INIT_GENERATED">
<prototype>
<parameter content="file"/>
<parameter content="[comment]"/>
</prototype>
<synopsis>
Emit shell code to start the creation of a subsidiary shell
script in &lt;VAR&gt;file&lt;/VAR&gt;, including changing
&lt;VAR&gt;file&lt;/VAR&gt; to be executable. This macro
populates the child script with information learned from the
parent (thus, the emitted code is equivalent in effect, but more
efficient, than the code output by
&lt;CODE&gt;AS_INIT&lt;/CODE&gt;,
&lt;CODE&gt;AS_BOURNE_COMPATIBLE&lt;/CODE&gt;, and
&lt;CODE&gt;AS_SHELL_SANITIZE&lt;/CODE&gt;). If present,
&lt;VAR&gt;comment&lt;/VAR&gt; is output near the beginning of
the child, prior to the shell initialization code, and is
subject to parameter expansion, command substitution, and
backslash quote removal. The parent script should check the
exit status after this macro, in case
&lt;VAR&gt;file&lt;/VAR&gt; could not be properly created (for
example, if the disk was full). If successfully created, the
parent script can then proceed to append additional M4sh
constructs into the child script.&lt;/P&gt;&lt;P&gt;
Note that the child script starts life without a log file open,
so if the parent script uses logging (AS_MESSAGE_LOG_FD), you
must temporarily disable any attempts to use the log file until
after emitting code to open a log within the child. On the
other hand, if the parent script has
&lt;CODE&gt;AS_MESSAGE_FD&lt;/CODE&gt; redirected somewhere
besides &lt;samp&gt;1&lt;/samp&gt;, then the child script
already has code that copies stdout to that descriptor.
Currently, the suggested idiom for writing a M4sh shell script
from within another script is:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AS_INIT_GENERATED([&lt;VAR&gt;file&lt;/VAR&gt;], [[# My child
script. ]]) || AS_ECHO(["Failed to create child script"]);
AS_EXIT; @ m4_pushdef([AS_MESSAGE_LOG_FD])dnl cat &gt;&gt;
"&lt;VAR&gt;file&lt;/VAR&gt;" &lt;&lt;\__EOF__ # Code to
initialize AS_MESSAGE_LOG_FD m4_popdef([AS_MESSAGE_LOG_FD])dnl #
Additional code __EOF__
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This, however, may change in the future as the M4sh interface is
stabilized further.&lt;/P&gt;&lt;P&gt;
Also, be aware that use of LINENO within the child script may
report line numbers relative to their location in the parent
script, even when using
&lt;CODE&gt;AS_LINENO_PREPARE&lt;/CODE&gt;, if the parent script
was unable to locate a shell with working LINENO support.
</synopsis>
</macro>
<macro id="AS_LINENO_PREPARE">
<prototype>
</prototype>
<synopsis>
Find a shell that supports the special variable LINENO, which
contains the number of the currently executing line. This macro
is automatically invoked by &lt;CODE&gt;AC_INIT&lt;/CODE&gt; in
configure scripts.
</synopsis>
</macro>
<macro id="AS_ME_PREPARE">
<prototype>
</prototype>
<synopsis>
Set up variable as_me to be the basename of the currently
executing script. This macro is automatically invoked by
&lt;CODE&gt;AC_INIT&lt;/CODE&gt; in configure scripts.
</synopsis>
</macro>
<macro id="AS_TMPDIR">
<prototype>
<parameter content="prefix"/>
<parameter content="[dir= $@{TMPDIR:=/tmp@]}"/>
</prototype>
<synopsis>
Create, as safely as possible, a temporary sub-directory
within &lt;VAR&gt;dir&lt;/VAR&gt; with a name starting with
&lt;VAR&gt;prefix&lt;/VAR&gt;. &lt;VAR&gt;prefix&lt;/VAR&gt;
should be 2-4 characters, to make it slightly easier to identify
the owner of the directory. If &lt;VAR&gt;dir&lt;/VAR&gt; is
omitted, then the value of TMPDIR will be used (defaulting to
&lt;samp&gt;/tmp&lt;/samp&gt;). On success, the name of the
newly created directory is stored in the shell variable
&lt;CODE&gt;tmp&lt;/CODE&gt;. On error, the script is aborted.&lt;/P&gt;&lt;P&gt;
Typically, this macro is coupled with some exit traps to delete
the created directory and its contents on exit or interrupt.
However, there is a slight window between when the directory is
created and when the name is actually known to the shell, so an
interrupt at the right moment might leave the temporary
directory behind. Hence it is important to use a
&lt;VAR&gt;prefix&lt;/VAR&gt; that makes it easier to determine
if a leftover temporary directory from an interrupted script is
safe to delete.&lt;/P&gt;&lt;P&gt;
The use of the output variable &lt;samp&gt;$tmp&lt;/samp&gt;
rather than something in the &lt;samp&gt;as_&lt;/samp&gt;
namespace is historical; it has the unfortunate consequence that
reusing this otherwise common name for any other purpose inside
your script has the potential to break any cleanup traps
designed to remove the temporary directory.
</synopsis>
</macro>
<macro id="AS_SHELL_SANITIZE">
<prototype>
</prototype>
<synopsis>
Initialize the shell suitably for
&lt;CODE&gt;configure&lt;/CODE&gt; scripts. This has the effect
of &lt;CODE&gt;AS_BOURNE_COMPATIBLE&lt;/CODE&gt;, and sets some
other environment variables for predictable results from
configuration tests. For example, it sets LC_ALL to change to
the default C locale. . This macro is deprecated, since
&lt;CODE&gt;AS_INIT&lt;/CODE&gt; already invokes it.
</synopsis>
</macro>
<macro id="AS_MESSAGE_FD">
<prototype>
</prototype>
<synopsis>
The file descriptor for &lt;samp&gt;checking
for...&lt;/samp&gt; messages and results. By default,
&lt;CODE&gt;AS_INIT&lt;/CODE&gt; sets this to
&lt;samp&gt;1&lt;/samp&gt; for standalone M4sh clients.
However, &lt;CODE&gt;AC_INIT&lt;/CODE&gt; shuffles things around
to another file descriptor, in order to allow the
&lt;samp&gt;-q&lt;/samp&gt; option of
&lt;CODE&gt;configure&lt;/CODE&gt; to choose whether messages
should go to the script's standard output or be discarded.&lt;/P&gt;&lt;P&gt;
If you want to display some messages, consider using one of the
printing macros (Printing Messages) instead. Copies of messages
output via these macros are also recorded in
&lt;TT&gt;config.log&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AS_MESSAGE_LOG_FD">
<prototype>
</prototype>
<synopsis>
This must either be empty, or expand to a file descriptor for
log messages. By default, &lt;CODE&gt;AS_INIT&lt;/CODE&gt; sets
this macro to the empty string for standalone M4sh clients, thus
disabling logging. However, &lt;CODE&gt;AC_INIT&lt;/CODE&gt;
shuffles things around so that both
&lt;CODE&gt;configure&lt;/CODE&gt; and
&lt;CODE&gt;config.status&lt;/CODE&gt; use
&lt;TT&gt;config.log&lt;/TT&gt; for log messages. Macros that
run tools, like &lt;CODE&gt;AC_COMPILE_IFELSE&lt;/CODE&gt;
(Running the Compiler), redirect all output to this descriptor.
You may want to do so if you develop such a low-level macro.
</synopsis>
</macro>
<macro id="AS_ORIGINAL_STDIN_FD">
<prototype>
</prototype>
<synopsis>
This must expand to a file descriptor for the original standard
input. By default, &lt;CODE&gt;AS_INIT&lt;/CODE&gt; sets this
macro to &lt;samp&gt;0&lt;/samp&gt; for standalone M4sh clients.
However, &lt;CODE&gt;AC_INIT&lt;/CODE&gt; shuffles things
around for safety.&lt;/P&gt;&lt;P&gt;
When &lt;CODE&gt;configure&lt;/CODE&gt; runs, it may
accidentally execute an interactive command that has the same
name as the non-interactive meant to be used or checked. If the
standard input was the terminal, such interactive programs would
cause &lt;CODE&gt;configure&lt;/CODE&gt; to stop, pending some
user input. Therefore &lt;CODE&gt;configure&lt;/CODE&gt;
redirects its standard input from &lt;TT&gt;/dev/null&lt;/TT&gt;
during its initialization. This is not normally a problem,
since &lt;CODE&gt;configure&lt;/CODE&gt; normally does not need
user input.&lt;/P&gt;&lt;P&gt;
In the extreme case where your &lt;TT&gt;configure&lt;/TT&gt;
script really needs to obtain some values from the original
standard input, you can read them explicitly from
&lt;CODE&gt;AS_ORIGINAL_STDIN_FD&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_DEFUN">
<prototype>
<parameter content="name"/>
<parameter content="[body]"/>
</prototype>
<synopsis>
Autoconf macros are defined using the
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; macro, which is similar to the
M4 builtin &lt;CODE&gt;m4_define&lt;/CODE&gt; macro; this
creates a macro named &lt;VAR&gt;name&lt;/VAR&gt; and with
&lt;VAR&gt;body&lt;/VAR&gt; as its expansion. In addition to
defining a macro, &lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; adds to it
some code that is used to constrain the order in which macros
are called, while avoiding redundant output (Prerequisite
Macros).
</synopsis>
</macro>
<macro id="AC_DIAGNOSE">
<prototype>
<parameter content="category"/>
<parameter content="message"/>
</prototype>
<synopsis>
Report &lt;VAR&gt;message&lt;/VAR&gt; as a warning (or as an
error if requested by the user) if warnings of the
&lt;VAR&gt;category&lt;/VAR&gt; are turned on. This macro is
obsolescent; you are encouraged to use:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_warn([&lt;VAR&gt;category&lt;/VAR&gt;],
[&lt;VAR&gt;message&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; instead. ,
for more details, including valid
&lt;VAR&gt;category&lt;/VAR&gt; names.
</synopsis>
</macro>
<macro id="AC_WARNING">
<prototype>
<parameter content="message"/>
</prototype>
<synopsis>
Report &lt;VAR&gt;message&lt;/VAR&gt; as a syntax warning.
This macro is obsolescent; you are encouraged to use:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; m4_warn([syntax],
[&lt;VAR&gt;message&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; instead. ,
for more details, as well as better finer-grained categories of
warnings (not all problems have to do with syntax).
</synopsis>
</macro>
<macro id="AC_FATAL">
<prototype>
<parameter content="message"/>
</prototype>
<synopsis>
Report a severe error &lt;VAR&gt;message&lt;/VAR&gt;, and have
&lt;CODE&gt;autoconf&lt;/CODE&gt; die. This macro is
obsolescent; you are encouraged to use:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
m4_fatal([&lt;VAR&gt;message&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; instead. ,
for more details.
</synopsis>
</macro>
<macro id="AC_REQUIRE">
<prototype>
<parameter content="macro-name"/>
</prototype>
<synopsis>
If the M4 macro &lt;VAR&gt;macro-name&lt;/VAR&gt; has not
already been called, call it (without any arguments). Make sure
to quote &lt;VAR&gt;macro-name&lt;/VAR&gt; with square brackets.
&lt;VAR&gt;macro-name&lt;/VAR&gt; must have been defined using
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; or else contain a call to
&lt;CODE&gt;AC_PROVIDE&lt;/CODE&gt; to indicate that it has been
called.&lt;/P&gt;&lt;P&gt;
&lt;CODE&gt;AC_REQUIRE&lt;/CODE&gt; must be used inside a macro
defined by &lt;CODE&gt;AC_DEFUN&lt;/CODE&gt;; it must not be
called from the top level. Also, it does not make sense to
require a macro that takes parameters.
</synopsis>
</macro>
<macro id="AC_BEFORE">
<prototype>
<parameter content="this-macro-name"/>
<parameter content="called-macro-name"/>
</prototype>
<synopsis>
Make M4 print a warning message to the standard error output if
&lt;VAR&gt;called-macro-name&lt;/VAR&gt; has already been
called. &lt;VAR&gt;this-macro-name&lt;/VAR&gt; should be the
name of the macro that is calling
&lt;CODE&gt;AC_BEFORE&lt;/CODE&gt;. The macro
&lt;VAR&gt;called-macro-name&lt;/VAR&gt; must have been defined
using &lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; or else contain a call
to &lt;CODE&gt;AC_PROVIDE&lt;/CODE&gt; to indicate that it has
been called.
</synopsis>
</macro>
<macro id="AC_DEFUN_ONCE">
<prototype>
<parameter content="macro-name"/>
<parameter content="macro-body"/>
</prototype>
<synopsis>
Declare macro &lt;VAR&gt;macro-name&lt;/VAR&gt; like
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; would (Macro Definitions), but
add additional logic that guarantees that only the first use of
the macro (whether by direct expansion or
&lt;CODE&gt;AC_REQUIRE&lt;/CODE&gt;) causes an expansion of
&lt;VAR&gt;macro-body&lt;/VAR&gt;; the expansion will occur
before the start of any enclosing macro defined by
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt;. Subsequent expansions are
silently ignored. Generally, it does not make sense for
&lt;VAR&gt;macro-body&lt;/VAR&gt; to use parameters such as
&lt;CODE&gt;$1&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AU_DEFUN">
<prototype>
<parameter content="old-macro"/>
<parameter content="implementation"/>
<parameter content="[message]"/>
</prototype>
<synopsis>
Define &lt;VAR&gt;old-macro&lt;/VAR&gt; as
&lt;VAR&gt;implementation&lt;/VAR&gt;. The only difference with
&lt;CODE&gt;AC_DEFUN&lt;/CODE&gt; is that the user is warned
that &lt;VAR&gt;old-macro&lt;/VAR&gt; is now obsolete.&lt;/P&gt;&lt;P&gt;
If she then uses &lt;CODE&gt;autoupdate&lt;/CODE&gt;, the call
to &lt;VAR&gt;old-macro&lt;/VAR&gt; is replaced by the modern
&lt;VAR&gt;implementation&lt;/VAR&gt;.
&lt;VAR&gt;message&lt;/VAR&gt; should include information on
what to do after running &lt;CODE&gt;autoupdate&lt;/CODE&gt;;
&lt;CODE&gt;autoupdate&lt;/CODE&gt; prints it as a warning, and
includes it in the updated &lt;TT&gt;configure.ac&lt;/TT&gt;
file.&lt;/P&gt;&lt;P&gt;
The details of this macro are hairy: if
&lt;CODE&gt;autoconf&lt;/CODE&gt; encounters an
&lt;CODE&gt;AU_DEFUN&lt;/CODE&gt;ed macro, all macros inside its
second argument are expanded as usual. However, when
&lt;CODE&gt;autoupdate&lt;/CODE&gt; is run, only M4 and M4sugar
macros are expanded here, while all other macros are disabled
and appear literally in the updated
&lt;TT&gt;configure.ac&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AU_ALIAS">
<prototype>
<parameter content="old-name"/>
<parameter content="new-name"/>
</prototype>
<synopsis>
Used if the &lt;VAR&gt;old-name&lt;/VAR&gt; is to be replaced
by a call to &lt;VAR&gt;new-macro&lt;/VAR&gt; with the same
parameters. This happens for example if the macro was renamed.
</synopsis>
</macro>
<macro id="AC_CANONICAL_BUILD">
<prototype>
</prototype>
<synopsis>
Compute the canonical build-system type variable,
&lt;CODE&gt;build&lt;/CODE&gt;, and its three individual parts
&lt;CODE&gt;build_cpu&lt;/CODE&gt;,
&lt;CODE&gt;build_vendor&lt;/CODE&gt;, and
&lt;CODE&gt;build_os&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;samp&gt;--build&lt;/samp&gt; was specified, then
&lt;CODE&gt;build&lt;/CODE&gt; is the canonicalization of
&lt;CODE&gt;build_alias&lt;/CODE&gt; by
&lt;CODE&gt;config.sub&lt;/CODE&gt;, otherwise it is determined
by the shell script &lt;CODE&gt;config.guess&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CANONICAL_HOST">
<prototype>
</prototype>
<synopsis>
Compute the canonical host-system type variable,
&lt;CODE&gt;host&lt;/CODE&gt;, and its three individual parts
&lt;CODE&gt;host_cpu&lt;/CODE&gt;,
&lt;CODE&gt;host_vendor&lt;/CODE&gt;, and
&lt;CODE&gt;host_os&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;samp&gt;--host&lt;/samp&gt; was specified, then
&lt;CODE&gt;host&lt;/CODE&gt; is the canonicalization of
&lt;CODE&gt;host_alias&lt;/CODE&gt; by
&lt;CODE&gt;config.sub&lt;/CODE&gt;, otherwise it defaults to
&lt;CODE&gt;build&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CANONICAL_TARGET">
<prototype>
</prototype>
<synopsis>
Compute the canonical target-system type variable,
&lt;CODE&gt;target&lt;/CODE&gt;, and its three individual parts
&lt;CODE&gt;target_cpu&lt;/CODE&gt;,
&lt;CODE&gt;target_vendor&lt;/CODE&gt;, and
&lt;CODE&gt;target_os&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;samp&gt;--target&lt;/samp&gt; was specified, then
&lt;CODE&gt;target&lt;/CODE&gt; is the canonicalization of
&lt;CODE&gt;target_alias&lt;/CODE&gt; by
&lt;CODE&gt;config.sub&lt;/CODE&gt;, otherwise it defaults to
&lt;CODE&gt;host&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_PRESERVE_HELP_ORDER">
<prototype>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
Request an alternate &lt;samp&gt;--help&lt;/samp&gt; format, in
which options of all types appear together, in the order
defined. Call this macro before any
&lt;CODE&gt;AC_ARG_ENABLE&lt;/CODE&gt; or
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; Optional Features and Packages:
&lt;small&gt;...&lt;/small&gt; --enable-bar include
bar --with-foo use foo
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
</synopsis>
</macro>
<macro id="AC_ARG_WITH">
<prototype>
<parameter content="package"/>
<parameter content="help-string"/>
<parameter content="@ [action-if-given]"/>
<parameter content="[action-if-not-given]"/>
</prototype>
<synopsis>
If the user gave &lt;CODE&gt;configure&lt;/CODE&gt; the option
&lt;samp&gt;--with-&lt;VAR&gt;package&lt;/VAR&gt;&lt;/samp&gt;
or
&lt;samp&gt;--without-&lt;VAR&gt;package&lt;/VAR&gt;&lt;/samp&gt;,
run shell commands &lt;VAR&gt;action-if-given&lt;/VAR&gt;. If
neither option was given, run shell commands
&lt;VAR&gt;action-if-not-given&lt;/VAR&gt;. The name
&lt;VAR&gt;package&lt;/VAR&gt; indicates another software
package that this program should work with. It should consist
only of alphanumeric characters, dashes, plus signs, and dots.&lt;/P&gt;&lt;P&gt;
The option's argument is available to the shell commands
&lt;VAR&gt;action-if-given&lt;/VAR&gt; in the shell variable
&lt;CODE&gt;withval&lt;/CODE&gt;, which is actually just the
value of the shell variable named
&lt;CODE&gt;with_&lt;VAR&gt;package&lt;/VAR&gt;&lt;/CODE&gt;,
with any non-alphanumeric characters in
&lt;VAR&gt;package&lt;/VAR&gt; changed into
&lt;samp&gt;_&lt;/samp&gt;. You may use that variable instead,
if you wish.&lt;/P&gt;&lt;P&gt;
The argument &lt;VAR&gt;help-string&lt;/VAR&gt; is a description
of the option that looks like this:
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; --with-readline support
fancy command line editing
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;help-string&lt;/VAR&gt; may be more than one line
long, if more detail is needed. Just make sure the columns line
up in &lt;samp&gt;configure --help&lt;/samp&gt;. Avoid tabs in
the help string. The easiest way to provide the proper leading
whitespace is to format your &lt;VAR&gt;help-string&lt;/VAR&gt;
with the macro &lt;CODE&gt;AS_HELP_STRING&lt;/CODE&gt; (Pretty
Help Strings).&lt;/P&gt;&lt;P&gt;
The following example shows how to use the
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; macro in a common
situation. You want to let the user decide whether to enable
support for an external library (e.g., the readline library); if
the user specified neither
&lt;samp&gt;--with-readline&lt;/samp&gt; nor
&lt;samp&gt;--without-readline&lt;/samp&gt;, you want to enable
support for readline only if the library is available on the
system.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ARG_WITH([readline],
[AS_HELP_STRING([--with-readline], [support fancy command
line editing @@&lt;:@@default=check@@:&gt;@@])], [],
[with_readline=check])&lt;/P&gt;&lt;P&gt;
LIBREADLINE= AS_IF([test "x$with_readline" != xno],
[AC_CHECK_LIB([readline], [main], [AC_SUBST([LIBREADLINE],
["-lreadline -lncurses"]) AC_DEFINE([HAVE_LIBREADLINE],
[1], [Define if you have libreadline]) ],
[if test "x$with_readline" != xcheck; then
AC_MSG_FAILURE( [--with-readline was given, but test
for readline failed]) fi ], -lncurses)])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The next example shows how to use
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; to give the user the
possibility to enable support for the readline library, in case
it is still experimental and not well tested, and is therefore
disabled by default.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ARG_WITH([readline],
[AS_HELP_STRING([--with-readline], [enable experimental
support for readline])], [], [with_readline=no])&lt;/P&gt;&lt;P&gt;
LIBREADLINE= AS_IF([test "x$with_readline" != xno],
[AC_CHECK_LIB([readline], [main], [AC_SUBST([LIBREADLINE],
["-lreadline -lncurses"]) AC_DEFINE([HAVE_LIBREADLINE],
[1], [Define if you have libreadline]) ],
[AC_MSG_FAILURE( [--with-readline was given, but test for
readline failed])], [-lncurses])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The last example shows how to use
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; to give the user the
possibility to disable support for the readline library, given
that it is an important feature and that it should be enabled by
default.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ARG_WITH([readline],
[AS_HELP_STRING([--without-readline], [disable support for
readline])], [], [with_readline=yes])&lt;/P&gt;&lt;P&gt;
LIBREADLINE= AS_IF([test "x$with_readline" != xno],
[AC_CHECK_LIB([readline], [main], [AC_SUBST([LIBREADLINE],
["-lreadline -lncurses"]) AC_DEFINE([HAVE_LIBREADLINE],
[1], [Define if you have libreadline]) ],
[AC_MSG_FAILURE( [readline test failed
(--without-readline to disable)])], [-lncurses])])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
These three examples can be easily adapted to the case where
&lt;CODE&gt;AC_ARG_ENABLE&lt;/CODE&gt; should be preferred to
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; (see Package Options).
</synopsis>
</macro>
<macro id="AC_ARG_ENABLE">
<prototype>
<parameter content="feature"/>
<parameter content="help-string"/>
<parameter content="@ [action-if-given]"/>
<parameter content="[action-if-not-given]"/>
</prototype>
<synopsis>
If the user gave &lt;CODE&gt;configure&lt;/CODE&gt; the option
&lt;samp&gt;--enable-&lt;VAR&gt;feature&lt;/VAR&gt;&lt;/samp&gt;
or
&lt;samp&gt;--disable-&lt;VAR&gt;feature&lt;/VAR&gt;&lt;/samp&gt;,
run shell commands &lt;VAR&gt;action-if-given&lt;/VAR&gt;. If
neither option was given, run shell commands
&lt;VAR&gt;action-if-not-given&lt;/VAR&gt;. The name
&lt;VAR&gt;feature&lt;/VAR&gt; indicates an optional user-level
facility. It should consist only of alphanumeric characters,
dashes, plus signs, and dots.&lt;/P&gt;&lt;P&gt;
The option's argument is available to the shell commands
&lt;VAR&gt;action-if-given&lt;/VAR&gt; in the shell variable
&lt;CODE&gt;enableval&lt;/CODE&gt;, which is actually just the
value of the shell variable named
&lt;CODE&gt;enable_&lt;VAR&gt;feature&lt;/VAR&gt;&lt;/CODE&gt;,
with any non-alphanumeric characters in
&lt;VAR&gt;feature&lt;/VAR&gt; changed into
&lt;samp&gt;_&lt;/samp&gt;. You may use that variable instead,
if you wish. The &lt;VAR&gt;help-string&lt;/VAR&gt; argument is
like that of &lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; (External
Software).&lt;/P&gt;&lt;P&gt;
You should format your &lt;VAR&gt;help-string&lt;/VAR&gt; with
the macro &lt;CODE&gt;AS_HELP_STRING&lt;/CODE&gt; (Pretty Help
Strings).&lt;/P&gt;&lt;P&gt;
See the examples suggested with the definition of
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; (External Software) to get
an idea of possible applications of
&lt;CODE&gt;AC_ARG_ENABLE&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AS_HELP_STRING">
<prototype>
<parameter content="left-hand-side"/>
<parameter content="right-hand-side @ [indent-column= 26]"/>
<parameter content="[wrap-column= 79]"/>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
Expands into a help string that looks pretty when the user
executes &lt;samp&gt;configure --help&lt;/samp&gt;. It is
typically used in &lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; (External
Software) or &lt;CODE&gt;AC_ARG_ENABLE&lt;/CODE&gt; (Package
Options). The following example makes this clearer.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_ARG_WITH([foo],
[AS_HELP_STRING([--with-foo], [use foo (default is no)])],
[use_foo=$withval], [use_foo=no])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Then the last few lines of &lt;samp&gt;configure
--help&lt;/samp&gt; appear like this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; --enable and --with options
recognized: --with-foo use foo (default is no)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Macro expansion is performed on the first argument. However,
the second argument of &lt;CODE&gt;AS_HELP_STRING&lt;/CODE&gt;
is treated as a whitespace separated list of text to be
reformatted, and is not subject to macro expansion. Since it is
not expanded, it should not be double quoted. , for a more
detailed explanation.&lt;/P&gt;&lt;P&gt;
The &lt;CODE&gt;AS_HELP_STRING&lt;/CODE&gt; macro is
particularly helpful when the
&lt;VAR&gt;left-hand-side&lt;/VAR&gt; and/or
&lt;VAR&gt;right-hand-side&lt;/VAR&gt; are composed of macro
arguments, as shown in the following example. Be aware that
&lt;VAR&gt;left-hand-side&lt;/VAR&gt; may not expand to
unbalanced quotes, although quadrigraphs can be used.&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_DEFUN([MY_ARG_WITH],
[AC_ARG_WITH(m4_translit([[$1]], [_], [-]),
[AS_HELP_STRING([--with-m4_translit([$1], [_], [-])],
[use $1 (default is $2)])], [use_[]$1=$withval],
[use_[]$1=$2])]) MY_ARG_WITH([a_b], [no])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; Here, the last
few lines of &lt;samp&gt;configure --help&lt;/samp&gt; will
include:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; --enable and --with options
recognized: --with-a-b use a_b (default is no)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
The parameters &lt;VAR&gt;indent-column&lt;/VAR&gt; and
&lt;VAR&gt;wrap-column&lt;/VAR&gt; were introduced in Autoconf
2.62. Generally, they should not be specified; they exist for
fine-tuning of the wrapping.
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AS_HELP_STRING([--option],
[description of option]) --option description
of option AS_HELP_STRING([--option], [description of option],
[15], [30]) --option description of option
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_DISABLE_OPTION_CHECKING">
<prototype>
</prototype>
<synopsis>
&lt;/P&gt;&lt;P&gt;
By default, disable warnings related to any unrecognized
&lt;samp&gt;--with-&lt;VAR&gt;package&lt;/VAR&gt;&lt;/samp&gt;
or
&lt;samp&gt;--enable-&lt;VAR&gt;feature&lt;/VAR&gt;&lt;/samp&gt;
options. This is implied by
&lt;CODE&gt;AC_CONFIG_SUBDIRS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
The installer can override this behavior by passing
&lt;samp&gt;--enable-option-checking&lt;/samp&gt; (enable
warnings) or
&lt;samp&gt;--enable-option-checking=fatal&lt;/samp&gt; (enable
errors) to &lt;CODE&gt;configure&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_ARG_PROGRAM">
<prototype>
</prototype>
<synopsis>
Place in output variable
&lt;CODE&gt;program_transform_name&lt;/CODE&gt; a sequence of
&lt;CODE&gt;sed&lt;/CODE&gt; commands for changing the names of
installed programs.&lt;/P&gt;&lt;P&gt;
If any of the options described below are given to
&lt;CODE&gt;configure&lt;/CODE&gt;, program names are
transformed accordingly. Otherwise, if
&lt;CODE&gt;AC_CANONICAL_TARGET&lt;/CODE&gt; has been called and
a &lt;samp&gt;--target&lt;/samp&gt; value is given, the target
type followed by a dash is used as a prefix. Otherwise, no
program name transformation is done.
</synopsis>
</macro>
<macro id="AC_AIX">
<prototype>
</prototype>
<synopsis>
This macro is a platform-specific subset of
&lt;CODE&gt;AC_USE_SYSTEM_EXTENSIONS&lt;/CODE&gt;
(AC_USE_SYSTEM_EXTENSIONS).
</synopsis>
</macro>
<macro id="AC_ALLOCA">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_ALLOCA&lt;/CODE&gt;
(AC_FUNC_ALLOCA).
</synopsis>
</macro>
<macro id="AC_ARG_ARRAY">
<prototype>
</prototype>
<synopsis>
Removed because of limited usefulness.
</synopsis>
</macro>
<macro id="AC_C_CROSS">
<prototype>
</prototype>
<synopsis>
This macro is obsolete; it does nothing.
</synopsis>
</macro>
<macro id="AC_C_LONG_DOUBLE">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;long
double&lt;/CODE&gt; type with more range or precision than the
&lt;CODE&gt;double&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_LONG_DOUBLE&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
You should use &lt;CODE&gt;AC_TYPE_LONG_DOUBLE&lt;/CODE&gt; or
&lt;CODE&gt;AC_TYPE_LONG_DOUBLE_WIDER&lt;/CODE&gt; instead. .
</synopsis>
</macro>
<macro id="AC_CANONICAL_SYSTEM">
<prototype>
</prototype>
<synopsis>
Determine the system type and set output variables to the names
of the canonical system types. , for details about the
variables this macro sets.&lt;/P&gt;&lt;P&gt;
The user is encouraged to use either
&lt;CODE&gt;AC_CANONICAL_BUILD&lt;/CODE&gt;, or
&lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt;, or
&lt;CODE&gt;AC_CANONICAL_TARGET&lt;/CODE&gt;, depending on the
needs. Using &lt;CODE&gt;AC_CANONICAL_TARGET&lt;/CODE&gt; is
enough to run the two other macros (Canonicalizing).
</synopsis>
</macro>
<macro id="AC_CHAR_UNSIGNED">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_C_CHAR_UNSIGNED&lt;/CODE&gt;
(AC_C_CHAR_UNSIGNED).
</synopsis>
</macro>
<macro id="AC_CHECKING">
<prototype>
<parameter content="feature-description"/>
</prototype>
<synopsis>
Same as&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_MSG_NOTICE([checking
&lt;VAR&gt;feature-description&lt;/VAR&gt;&lt;small&gt;...&lt;/small&gt;]
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.
</synopsis>
</macro>
<macro id="AC_COMPILE_CHECK">
<prototype>
<parameter content="echo-text"/>
<parameter content="includes"/>
<parameter content="@ function-body"/>
<parameter content="action-if-true"/>
<parameter content="[action-if-false]"/>
</prototype>
<synopsis>
This is an obsolete version of
&lt;CODE&gt;AC_TRY_COMPILE&lt;/CODE&gt; itself replaced by
&lt;CODE&gt;AC_COMPILE_IFELSE&lt;/CODE&gt; (Running the
Compiler), with the addition that it prints &lt;samp&gt;checking
for &lt;VAR&gt;echo-text&lt;/VAR&gt;&lt;/samp&gt; to the
standard output first, if &lt;VAR&gt;echo-text&lt;/VAR&gt; is
non-empty. Use &lt;CODE&gt;AC_MSG_CHECKING&lt;/CODE&gt; and
&lt;CODE&gt;AC_MSG_RESULT&lt;/CODE&gt; instead to print messages
(Printing Messages).
</synopsis>
</macro>
<macro id="AC_CONST">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_C_CONST&lt;/CODE&gt; (AC_C_CONST).
</synopsis>
</macro>
<macro id="AC_CROSS_CHECK">
<prototype>
</prototype>
<synopsis>
Same as &lt;CODE&gt;AC_C_CROSS&lt;/CODE&gt;, which is obsolete
too, and does nothing &lt;CODE&gt;:-)&lt;/CODE&gt;.
</synopsis>
</macro>
<macro id="AC_CYGWIN">
<prototype>
</prototype>
<synopsis>
Check for the Cygwin environment in which case the shell
variable &lt;CODE&gt;CYGWIN&lt;/CODE&gt; is set to
&lt;samp&gt;yes&lt;/samp&gt;. Don't use this macro, the
dignified means to check the nature of the host is using
&lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt; (Canonicalizing). As
a matter of fact this macro is defined as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl case $host_os in *cygwin*
) CYGWIN=yes;; * ) CYGWIN=no;; esac
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Beware that the variable CYGWIN has a special meaning when
running Cygwin, and should not be changed. That's yet another
reason not to use this macro.
</synopsis>
</macro>
<macro id="AC_DECL_SYS_SIGLIST">
<prototype>
</prototype>
<synopsis>
Same as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_DECLS([sys_siglist], [],
[], [#include &lt;signal.h&gt; /* NetBSD declares sys_siglist in
unistd.h. */ #ifdef HAVE_UNISTD_H # include &lt;unistd.h&gt;
#endif ]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.
</synopsis>
</macro>
<macro id="AC_DECL_YYTEXT">
<prototype>
</prototype>
<synopsis>
Does nothing, now integrated in
&lt;CODE&gt;AC_PROG_LEX&lt;/CODE&gt; (AC_PROG_LEX).
</synopsis>
</macro>
<macro id="AC_DIR_HEADER">
<prototype>
</prototype>
<synopsis>
Like calling &lt;CODE&gt;AC_FUNC_CLOSEDIR_VOID&lt;/CODE&gt;
(AC_FUNC_CLOSEDIR_VOID) and
&lt;CODE&gt;AC_HEADER_DIRENT&lt;/CODE&gt; (AC_HEADER_DIRENT),
but defines a different set of C preprocessor macros to indicate
which header file is found:&lt;/P&gt;&lt;P&gt;
@multitable {&lt;TT&gt;sys/ndir.h&lt;/TT&gt;} {Old Symbol}
{&lt;CODE&gt;HAVE_SYS_NDIR_H&lt;/CODE&gt;} &lt;LI&gt; Header
@tab Old Symbol @tab New Symbol &lt;LI&gt;
&lt;TT&gt;dirent.h&lt;/TT&gt; @tab
&lt;CODE&gt;DIRENT&lt;/CODE&gt; @tab
&lt;CODE&gt;HAVE_DIRENT_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;sys/ndir.h&lt;/TT&gt; @tab
&lt;CODE&gt;SYSNDIR&lt;/CODE&gt; @tab
&lt;CODE&gt;HAVE_SYS_NDIR_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;sys/dir.h&lt;/TT&gt; @tab
&lt;CODE&gt;SYSDIR&lt;/CODE&gt; @tab
&lt;CODE&gt;HAVE_SYS_DIR_H&lt;/CODE&gt; &lt;LI&gt;
&lt;TT&gt;ndir.h&lt;/TT&gt; @tab
&lt;CODE&gt;NDIR&lt;/CODE&gt; @tab
&lt;CODE&gt;HAVE_NDIR_H&lt;/CODE&gt; @end multitable
</synopsis>
</macro>
<macro id="AC_DYNIX_SEQ">
<prototype>
</prototype>
<synopsis>
If on DYNIX/ptx, add &lt;samp&gt;-lseq&lt;/samp&gt; to output
variable &lt;CODE&gt;LIBS&lt;/CODE&gt;. This macro used to be
defined as&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_LIB([seq], [getmntent],
[LIBS="-lseq $LIBS"])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
now it is just &lt;CODE&gt;AC_FUNC_GETMNTENT&lt;/CODE&gt;
(AC_FUNC_GETMNTENT).
</synopsis>
</macro>
<macro id="AC_EXEEXT">
<prototype>
</prototype>
<synopsis>
Defined the output variable &lt;CODE&gt;EXEEXT&lt;/CODE&gt;
based on the output of the compiler, which is now done
automatically. Typically set to empty string if Posix and
&lt;samp&gt;.exe&lt;/samp&gt; if a DOS variant.
</synopsis>
</macro>
<macro id="AC_EMXOS2">
<prototype>
</prototype>
<synopsis>
Similar to &lt;CODE&gt;AC_CYGWIN&lt;/CODE&gt; but checks for
the EMX environment on OS/2 and sets
&lt;CODE&gt;EMXOS2&lt;/CODE&gt;. Don't use this macro, the
dignified means to check the nature of the host is using
&lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt; (Canonicalizing).
</synopsis>
</macro>
<macro id="AC_ENABLE">
<prototype>
<parameter content="feature"/>
<parameter content="action-if-given"/>
<parameter content="@ [action-if-not-given]"/>
</prototype>
<synopsis>
This is an obsolete version of
&lt;CODE&gt;AC_ARG_ENABLE&lt;/CODE&gt; that does not support
providing a help string (AC_ARG_ENABLE).
</synopsis>
</macro>
<macro id="AC_ERROR">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_MSG_ERROR&lt;/CODE&gt;
(AC_MSG_ERROR).
</synopsis>
</macro>
<macro id="AC_FIND_X">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PATH_X&lt;/CODE&gt; (AC_PATH_X).
</synopsis>
</macro>
<macro id="AC_FIND_XTRA">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PATH_XTRA&lt;/CODE&gt;
(AC_PATH_XTRA).
</synopsis>
</macro>
<macro id="AC_FOREACH">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;m4_foreach_w&lt;/CODE&gt;
(m4_foreach_w).
</synopsis>
</macro>
<macro id="AC_FUNC_CHECK">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_FUNC&lt;/CODE&gt;
(AC_CHECK_FUNC).
</synopsis>
</macro>
<macro id="AC_FUNC_SETVBUF_REVERSED">
<prototype>
</prototype>
<synopsis>
Do nothing. Formerly, this macro checked whether
&lt;CODE&gt;setvbuf&lt;/CODE&gt; takes the buffering type as its
second argument and the buffer pointer as the third, instead of
the other way around, and defined
&lt;CODE&gt;SETVBUF_REVERSED&lt;/CODE&gt;. However, the last
systems to have the problem were those based on SVR2, which
became obsolete in 1987, and the macro is no longer needed.
</synopsis>
</macro>
<macro id="AC_FUNC_WAIT3">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;wait3&lt;/CODE&gt; is found and fills in the
contents of its third argument (a &lt;samp&gt;struct rusage
*&lt;/samp&gt;), which HP-UX does not do, define
&lt;CODE&gt;HAVE_WAIT3&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
These days portable programs should use
&lt;CODE&gt;waitpid&lt;/CODE&gt;, not
&lt;CODE&gt;wait3&lt;/CODE&gt;, as
&lt;CODE&gt;wait3&lt;/CODE&gt; has been removed from Posix.
</synopsis>
</macro>
<macro id="AC_GCC_TRADITIONAL">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PROG_GCC_TRADITIONAL&lt;/CODE&gt;
(AC_PROG_GCC_TRADITIONAL).
</synopsis>
</macro>
<macro id="AC_GETGROUPS_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_GETGROUPS&lt;/CODE&gt;
(AC_TYPE_GETGROUPS).
</synopsis>
</macro>
<macro id="AC_GETLOADAVG">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_GETLOADAVG&lt;/CODE&gt;
(AC_FUNC_GETLOADAVG).
</synopsis>
</macro>
<macro id="AC_GNU_SOURCE">
<prototype>
</prototype>
<synopsis>
This macro is a platform-specific subset of
&lt;CODE&gt;AC_USE_SYSTEM_EXTENSIONS&lt;/CODE&gt;
(AC_USE_SYSTEM_EXTENSIONS).
</synopsis>
</macro>
<macro id="AC_HAVE_FUNCS">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_FUNCS&lt;/CODE&gt;
(AC_CHECK_FUNCS).
</synopsis>
</macro>
<macro id="AC_HAVE_HEADERS">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_HEADERS&lt;/CODE&gt;
(AC_CHECK_HEADERS).
</synopsis>
</macro>
<macro id="AC_HAVE_LIBRARY">
<prototype>
<parameter content="library"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
<parameter content="[other-libraries]"/>
</prototype>
<synopsis>
This macro is equivalent to calling
&lt;CODE&gt;AC_CHECK_LIB&lt;/CODE&gt; with a
&lt;VAR&gt;function&lt;/VAR&gt; argument of
&lt;CODE&gt;main&lt;/CODE&gt;. In addition,
&lt;VAR&gt;library&lt;/VAR&gt; can be written as any of
&lt;samp&gt;foo&lt;/samp&gt;, &lt;samp&gt;-lfoo&lt;/samp&gt;, or
&lt;samp&gt;libfoo.a&lt;/samp&gt;. In all of those cases, the
compiler is passed &lt;samp&gt;-lfoo&lt;/samp&gt;. However,
&lt;VAR&gt;library&lt;/VAR&gt; cannot be a shell variable; it
must be a literal name. .
</synopsis>
</macro>
<macro id="AC_HAVE_POUNDBANG">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_SYS_INTERPRETER&lt;/CODE&gt;
(AC_SYS_INTERPRETER).
</synopsis>
</macro>
<macro id="AC_HEADER_CHECK">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_HEADER&lt;/CODE&gt;
(AC_CHECK_HEADER).
</synopsis>
</macro>
<macro id="AC_HEADER_EGREP">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_EGREP_HEADER&lt;/CODE&gt;
(AC_EGREP_HEADER).
</synopsis>
</macro>
<macro id="AC_HELP_STRING">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AS_HELP_STRING&lt;/CODE&gt;
(AS_HELP_STRING).
</synopsis>
</macro>
<macro id="AC_INLINE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_C_INLINE&lt;/CODE&gt; (AC_C_INLINE).
</synopsis>
</macro>
<macro id="AC_INT_16_BITS">
<prototype>
</prototype>
<synopsis>
If the C type &lt;CODE&gt;int&lt;/CODE&gt; is 16 bits wide,
define &lt;CODE&gt;INT_16_BITS&lt;/CODE&gt;. Use
&lt;samp&gt;AC_CHECK_SIZEOF(int)&lt;/samp&gt; instead
(AC_CHECK_SIZEOF).
</synopsis>
</macro>
<macro id="AC_IRIX_SUN">
<prototype>
</prototype>
<synopsis>
If on IRIX (Silicon Graphics Unix), add
&lt;samp&gt;-lsun&lt;/samp&gt; to output
&lt;CODE&gt;LIBS&lt;/CODE&gt;. If you were using it to get
&lt;CODE&gt;getmntent&lt;/CODE&gt;, use
&lt;CODE&gt;AC_FUNC_GETMNTENT&lt;/CODE&gt; instead. If you used
it for the NIS versions of the password and group functions, use
&lt;samp&gt;AC_CHECK_LIB(sun, getpwnam)&lt;/samp&gt;. Up to
Autoconf 2.13, it used to be&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_LIB([sun], [getmntent],
[LIBS="-lsun $LIBS"])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
now it is defined as&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_FUNC_GETMNTENT
AC_CHECK_LIB([sun], [getpwnam])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
See AC_FUNC_GETMNTENT and AC_CHECK_LIB.
</synopsis>
</macro>
<macro id="AC_ISC_POSIX">
<prototype>
</prototype>
<synopsis>
This macro adds &lt;samp&gt;-lcposix&lt;/samp&gt; to output
variable &lt;CODE&gt;LIBS&lt;/CODE&gt; if necessary for Posix
facilities. Sun dropped support for the obsolete INTERACTIVE
Systems Corporation Unix on 2006-07-23. New programs need not
use this macro. It is implemented as
&lt;CODE&gt;AC_SEARCH_LIBS([strerror], [cposix])&lt;/CODE&gt;
(AC_SEARCH_LIBS).
</synopsis>
</macro>
<macro id="AC_LANG_C">
<prototype>
</prototype>
<synopsis>
Same as &lt;samp&gt;AC_LANG([C])&lt;/samp&gt; (AC_LANG).
</synopsis>
</macro>
<macro id="AC_LANG_CPLUSPLUS">
<prototype>
</prototype>
<synopsis>
Same as &lt;samp&gt;AC_LANG([C++])&lt;/samp&gt; (AC_LANG).
</synopsis>
</macro>
<macro id="AC_LANG_FORTRAN77">
<prototype>
</prototype>
<synopsis>
Same as &lt;samp&gt;AC_LANG([Fortran 77])&lt;/samp&gt;
(AC_LANG).
</synopsis>
</macro>
<macro id="AC_LANG_RESTORE">
<prototype>
</prototype>
<synopsis>
Select the &lt;VAR&gt;language&lt;/VAR&gt; that is saved on the
top of the stack, as set by
&lt;CODE&gt;AC_LANG_SAVE&lt;/CODE&gt;, remove it from the stack,
and call
&lt;CODE&gt;AC_LANG(&lt;VAR&gt;language&lt;/VAR&gt;)&lt;/CODE&gt;.
, for the preferred way to change languages.
</synopsis>
</macro>
<macro id="AC_LANG_SAVE">
<prototype>
</prototype>
<synopsis>
Remember the current language (as set by
&lt;CODE&gt;AC_LANG&lt;/CODE&gt;) on a stack. The current
language does not change. &lt;CODE&gt;AC_LANG_PUSH&lt;/CODE&gt;
is preferred (AC_LANG_PUSH).
</synopsis>
</macro>
<macro id="AC_LINK_FILES">
<prototype>
<parameter content="source..."/>
<parameter content="dest..."/>
</prototype>
<synopsis>
This is an obsolete version of
&lt;CODE&gt;AC_CONFIG_LINKS&lt;/CODE&gt; (AC_CONFIG_LINKS. An
updated version of:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LINK_FILES(config/$machine.h
config/$obj_format.h, host.h object.h)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
is:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt;
AC_CONFIG_LINKS([host.h:config/$machine.h
object.h:config/$obj_format.h])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_LN_S">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PROG_LN_S&lt;/CODE&gt;
(AC_PROG_LN_S).
</synopsis>
</macro>
<macro id="AC_LONG_64_BITS">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;LONG_64_BITS&lt;/CODE&gt; if the C type
&lt;CODE&gt;long int&lt;/CODE&gt; is 64 bits wide. Use the
generic macro &lt;samp&gt;AC_CHECK_SIZEOF([long
int])&lt;/samp&gt; instead (AC_CHECK_SIZEOF).
</synopsis>
</macro>
<macro id="AC_LONG_DOUBLE">
<prototype>
</prototype>
<synopsis>
If the C compiler supports a working &lt;CODE&gt;long
double&lt;/CODE&gt; type with more range or precision than the
&lt;CODE&gt;double&lt;/CODE&gt; type, define
&lt;CODE&gt;HAVE_LONG_DOUBLE&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
You should use &lt;CODE&gt;AC_TYPE_LONG_DOUBLE&lt;/CODE&gt; or
&lt;CODE&gt;AC_TYPE_LONG_DOUBLE_WIDER&lt;/CODE&gt; instead. .
</synopsis>
</macro>
<macro id="AC_LONG_FILE_NAMES">
<prototype>
</prototype>
<synopsis>
Replaced by
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_SYS_LONG_FILE_NAMES
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; .
</synopsis>
</macro>
<macro id="AC_MAJOR_HEADER">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_HEADER_MAJOR&lt;/CODE&gt;
(AC_HEADER_MAJOR).
</synopsis>
</macro>
<macro id="AC_MEMORY_H">
<prototype>
</prototype>
<synopsis>
Used to define &lt;CODE&gt;NEED_MEMORY_H&lt;/CODE&gt; if the
&lt;CODE&gt;mem&lt;/CODE&gt; functions were defined in
&lt;TT&gt;memory.h&lt;/TT&gt;. Today it is equivalent to
&lt;samp&gt;AC_CHECK_HEADERS([memory.h])&lt;/samp&gt;
(AC_CHECK_HEADERS). Adjust your code to depend upon
&lt;CODE&gt;HAVE_MEMORY_H&lt;/CODE&gt;, not
&lt;CODE&gt;NEED_MEMORY_H&lt;/CODE&gt;; see Standard Symbols.
</synopsis>
</macro>
<macro id="AC_MINGW32">
<prototype>
</prototype>
<synopsis>
Similar to &lt;CODE&gt;AC_CYGWIN&lt;/CODE&gt; but checks for
the MinGW compiler environment and sets
&lt;CODE&gt;MINGW32&lt;/CODE&gt;. Don't use this macro, the
dignified means to check the nature of the host is using
&lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt; (Canonicalizing).
</synopsis>
</macro>
<macro id="AC_MINIX">
<prototype>
</prototype>
<synopsis>
This macro is a platform-specific subset of
&lt;CODE&gt;AC_USE_SYSTEM_EXTENSIONS&lt;/CODE&gt;
(AC_USE_SYSTEM_EXTENSIONS).
</synopsis>
</macro>
<macro id="AC_MINUS_C_MINUS_O">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PROG_CC_C_O&lt;/CODE&gt;
(AC_PROG_CC_C_O).
</synopsis>
</macro>
<macro id="AC_MMAP">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_MMAP&lt;/CODE&gt;
(AC_FUNC_MMAP).
</synopsis>
</macro>
<macro id="AC_MODE_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_MODE_T&lt;/CODE&gt;
(AC_TYPE_MODE_T).
</synopsis>
</macro>
<macro id="AC_OBJEXT">
<prototype>
</prototype>
<synopsis>
Defined the output variable &lt;CODE&gt;OBJEXT&lt;/CODE&gt;
based on the output of the compiler, after .c files have been
excluded. Typically set to &lt;samp&gt;o&lt;/samp&gt; if Posix,
&lt;samp&gt;obj&lt;/samp&gt; if a DOS variant. Now the compiler
checking macros handle this automatically.
</synopsis>
</macro>
<macro id="AC_OBSOLETE">
<prototype>
<parameter content="this-macro-name"/>
<parameter content="[suggestion]"/>
</prototype>
<synopsis>
Make M4 print a message to the standard error output warning
that &lt;VAR&gt;this-macro-name&lt;/VAR&gt; is obsolete, and
giving the file and line number where it was called.
&lt;VAR&gt;this-macro-name&lt;/VAR&gt; should be the name of the
macro that is calling &lt;CODE&gt;AC_OBSOLETE&lt;/CODE&gt;. If
&lt;VAR&gt;suggestion&lt;/VAR&gt; is given, it is printed at the
end of the warning message; for example, it can be a suggestion
for what to use instead of
&lt;VAR&gt;this-macro-name&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
For instance&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_OBSOLETE([$0], [; use
AC_CHECK_HEADERS(unistd.h) instead])dnl
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
You are encouraged to use &lt;CODE&gt;AU_DEFUN&lt;/CODE&gt;
instead, since it gives better services to the user (AU_DEFUN).
</synopsis>
</macro>
<macro id="AC_OFF_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_OFF_T&lt;/CODE&gt;
(AC_TYPE_OFF_T).
</synopsis>
</macro>
<macro id="AC_OUTPUT_COMMANDS">
<prototype>
<parameter content="extra-cmds"/>
<parameter content="[init-cmds]"/>
</prototype>
<synopsis>
Specify additional shell commands to run at the end of
&lt;TT&gt;config.status&lt;/TT&gt;, and shell commands to
initialize any variables from
&lt;CODE&gt;configure&lt;/CODE&gt;. This macro may be called
multiple times. It is obsolete, replaced by
&lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt;
(AC_CONFIG_COMMANDS).&lt;/P&gt;&lt;P&gt;
Here is an unrealistic example:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; fubar=27 AC_OUTPUT_COMMANDS([echo
this is extra $fubar, and so on.],
[fubar=$fubar]) AC_OUTPUT_COMMANDS([echo this is another, extra,
bit], [echo init bit])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Aside from the fact that
&lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt; requires an
additional key, an important difference is that
&lt;CODE&gt;AC_OUTPUT_COMMANDS&lt;/CODE&gt; is quoting its
arguments twice, unlike
&lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt;. This means that
&lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt; can safely be given
macro calls as arguments:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CONFIG_COMMANDS(foo, [my_FOO()])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Conversely, where one level of quoting was enough for literal
strings with &lt;CODE&gt;AC_OUTPUT_COMMANDS&lt;/CODE&gt;, you
need two with &lt;CODE&gt;AC_CONFIG_COMMANDS&lt;/CODE&gt;. The
following lines are equivalent:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group AC_OUTPUT_COMMANDS([echo
"Square brackets: []"]) AC_CONFIG_COMMANDS([default], [[echo
"Square brackets: []"]]) @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_PID_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_PID_T&lt;/CODE&gt;
(AC_TYPE_PID_T).
</synopsis>
</macro>
<macro id="AC_PREFIX">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PREFIX_PROGRAM&lt;/CODE&gt;
(AC_PREFIX_PROGRAM).
</synopsis>
</macro>
<macro id="AC_PROGRAMS_CHECK">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_PROGS&lt;/CODE&gt;
(AC_CHECK_PROGS).
</synopsis>
</macro>
<macro id="AC_PROGRAMS_PATH">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PATH_PROGS&lt;/CODE&gt;
(AC_PATH_PROGS).
</synopsis>
</macro>
<macro id="AC_PROGRAM_CHECK">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_PROG&lt;/CODE&gt;
(AC_CHECK_PROG).
</synopsis>
</macro>
<macro id="AC_PROGRAM_EGREP">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_EGREP_CPP&lt;/CODE&gt;
(AC_EGREP_CPP).
</synopsis>
</macro>
<macro id="AC_PROGRAM_PATH">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PATH_PROG&lt;/CODE&gt;
(AC_PATH_PROG).
</synopsis>
</macro>
<macro id="AC_REMOTE_TAPE">
<prototype>
</prototype>
<synopsis>
Removed because of limited usefulness.
</synopsis>
</macro>
<macro id="AC_RESTARTABLE_SYSCALLS">
<prototype>
</prototype>
<synopsis>
This macro was renamed
&lt;CODE&gt;AC_SYS_RESTARTABLE_SYSCALLS&lt;/CODE&gt;. However,
these days portable programs should use
&lt;CODE&gt;sigaction&lt;/CODE&gt; with
&lt;CODE&gt;SA_RESTART&lt;/CODE&gt; if they want restartable
system calls. They should not rely on
&lt;CODE&gt;HAVE_RESTARTABLE_SYSCALLS&lt;/CODE&gt;, since
nowadays whether a system call is restartable is a dynamic
issue, not a configuration-time issue.
</synopsis>
</macro>
<macro id="AC_RETSIGTYPE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_SIGNAL&lt;/CODE&gt;
(AC_TYPE_SIGNAL), which itself is obsolete when assuming C89 or
better.
</synopsis>
</macro>
<macro id="AC_RSH">
<prototype>
</prototype>
<synopsis>
Removed because of limited usefulness.
</synopsis>
</macro>
<macro id="AC_SCO_INTL">
<prototype>
</prototype>
<synopsis>
If on SCO Unix, add &lt;samp&gt;-lintl&lt;/samp&gt; to output
variable &lt;CODE&gt;LIBS&lt;/CODE&gt;. This macro used to do
this:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_LIB([intl], [strftime],
[LIBS="-lintl $LIBS"])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
Now it just calls &lt;CODE&gt;AC_FUNC_STRFTIME&lt;/CODE&gt;
instead (AC_FUNC_STRFTIME).
</synopsis>
</macro>
<macro id="AC_SETVBUF_REVERSED">
<prototype>
</prototype>
<synopsis>
Replaced by
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_FUNC_SETVBUF_REVERSED
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; .
</synopsis>
</macro>
<macro id="AC_SET_MAKE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_PROG_MAKE_SET&lt;/CODE&gt;
(AC_PROG_MAKE_SET).
</synopsis>
</macro>
<macro id="AC_SIZEOF_TYPE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_SIZEOF&lt;/CODE&gt;
(AC_CHECK_SIZEOF).
</synopsis>
</macro>
<macro id="AC_SIZE_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_SIZE_T&lt;/CODE&gt;
(AC_TYPE_SIZE_T).
</synopsis>
</macro>
<macro id="AC_STAT_MACROS_BROKEN">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_HEADER_STAT&lt;/CODE&gt;
(AC_HEADER_STAT).
</synopsis>
</macro>
<macro id="AC_STDC_HEADERS">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_HEADER_STDC&lt;/CODE&gt;
(AC_HEADER_STDC).
</synopsis>
</macro>
<macro id="AC_STRCOLL">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_STRCOLL&lt;/CODE&gt;
(AC_FUNC_STRCOLL).
</synopsis>
</macro>
<macro id="AC_STRUCT_ST_BLKSIZE">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;struct stat&lt;/CODE&gt; contains an
&lt;CODE&gt;st_blksize&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_STAT_ST_BLKSIZE&lt;/CODE&gt;. The
former name, &lt;CODE&gt;HAVE_ST_BLKSIZE&lt;/CODE&gt; is to be
avoided, as its support will cease in the future. This macro is
obsoleted, and should be replaced by&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_MEMBERS([struct
stat.st_blksize])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; .
</synopsis>
</macro>
<macro id="AC_STRUCT_ST_RDEV">
<prototype>
</prototype>
<synopsis>
If &lt;CODE&gt;struct stat&lt;/CODE&gt; contains an
&lt;CODE&gt;st_rdev&lt;/CODE&gt; member, define
&lt;CODE&gt;HAVE_STRUCT_STAT_ST_RDEV&lt;/CODE&gt;. The former
name for this macro, &lt;CODE&gt;HAVE_ST_RDEV&lt;/CODE&gt;, is
to be avoided as it will cease to be supported in the future.
Actually, even the new macro is obsolete and should be replaced
by: &lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_CHECK_MEMBERS([struct
stat.st_rdev]) &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
.
</synopsis>
</macro>
<macro id="AC_ST_BLKSIZE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_MEMBERS&lt;/CODE&gt;
(AC_CHECK_MEMBERS).
</synopsis>
</macro>
<macro id="AC_ST_BLOCKS">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_STRUCT_ST_BLOCKS&lt;/CODE&gt;
(AC_STRUCT_ST_BLOCKS).
</synopsis>
</macro>
<macro id="AC_ST_RDEV">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_CHECK_MEMBERS&lt;/CODE&gt;
(AC_CHECK_MEMBERS).
</synopsis>
</macro>
<macro id="AC_SYS_RESTARTABLE_SYSCALLS">
<prototype>
</prototype>
<synopsis>
If the system automatically restarts a system call that is
interrupted by a signal, define
&lt;CODE&gt;HAVE_RESTARTABLE_SYSCALLS&lt;/CODE&gt;. This macro
does not check whether system calls are restarted in
general---it checks whether a signal handler installed with
&lt;CODE&gt;signal&lt;/CODE&gt; (but not
&lt;CODE&gt;sigaction&lt;/CODE&gt;) causes system calls to be
restarted. It does not check whether system calls can be
restarted when interrupted by signals that have no handler.&lt;/P&gt;&lt;P&gt;
These days portable programs should use
&lt;CODE&gt;sigaction&lt;/CODE&gt; with
&lt;CODE&gt;SA_RESTART&lt;/CODE&gt; if they want restartable
system calls. They should not rely on
&lt;CODE&gt;HAVE_RESTARTABLE_SYSCALLS&lt;/CODE&gt;, since
nowadays whether a system call is restartable is a dynamic
issue, not a configuration-time issue.
</synopsis>
</macro>
<macro id="AC_SYS_SIGLIST_DECLARED">
<prototype>
</prototype>
<synopsis>
This macro was renamed
&lt;CODE&gt;AC_DECL_SYS_SIGLIST&lt;/CODE&gt;. However, even
that name is obsolete, as the same functionality is now acheived
via &lt;CODE&gt;AC_CHECK_DECLS&lt;/CODE&gt; (AC_CHECK_DECLS).
</synopsis>
</macro>
<macro id="AC_TEST_CPP">
<prototype>
</prototype>
<synopsis>
This macro was renamed &lt;CODE&gt;AC_TRY_CPP&lt;/CODE&gt;,
which in turn was replaced by
&lt;CODE&gt;AC_PREPROC_IFELSE&lt;/CODE&gt; (AC_PREPROC_IFELSE).
</synopsis>
</macro>
<macro id="AC_TEST_PROGRAM">
<prototype>
</prototype>
<synopsis>
This macro was renamed &lt;CODE&gt;AC_TRY_RUN&lt;/CODE&gt;,
which in turn was replaced by
&lt;CODE&gt;AC_RUN_IFELSE&lt;/CODE&gt; (AC_RUN_IFELSE).
</synopsis>
</macro>
<macro id="AC_TIMEZONE">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_STRUCT_TIMEZONE&lt;/CODE&gt;
(AC_STRUCT_TIMEZONE).
</synopsis>
</macro>
<macro id="AC_TIME_WITH_SYS_TIME">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_HEADER_TIME&lt;/CODE&gt;
(AC_HEADER_TIME).
</synopsis>
</macro>
<macro id="AC_TRY_COMPILE">
<prototype>
<parameter content="includes"/>
<parameter content="function-body"/>
<parameter content="@ [action-if-true]"/>
<parameter content="[action-if-false]"/>
</prototype>
<synopsis>
Same as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[&lt;VAR&gt;includes&lt;/VAR&gt;]],
[[&lt;VAR&gt;function-body&lt;/VAR&gt;]])],
[&lt;VAR&gt;action-if-true&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-false&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.&lt;/P&gt;&lt;P&gt;
This macro double quotes both &lt;VAR&gt;includes&lt;/VAR&gt;
and &lt;VAR&gt;function-body&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
For C and C++, &lt;VAR&gt;includes&lt;/VAR&gt; is any
&lt;CODE&gt;#include&lt;/CODE&gt; statements needed by the code
in &lt;VAR&gt;function-body&lt;/VAR&gt;
(&lt;VAR&gt;includes&lt;/VAR&gt; is ignored if the currently
selected language is Fortran or Fortran 77). The compiler and
compilation flags are determined by the current language
(Language Choice).
</synopsis>
</macro>
<macro id="AC_TRY_CPP">
<prototype>
<parameter content="input"/>
<parameter content="[action-if-true]"/>
<parameter content="[action-if-false]"/>
</prototype>
<synopsis>
Same as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_PREPROC_IFELSE(
[AC_LANG_SOURCE([[&lt;VAR&gt;input&lt;/VAR&gt;]])],
[&lt;VAR&gt;action-if-true&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-false&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.&lt;/P&gt;&lt;P&gt;
This macro double quotes the &lt;VAR&gt;input&lt;/VAR&gt;.
</synopsis>
</macro>
<macro id="AC_TRY_LINK">
<prototype>
<parameter content="includes"/>
<parameter content="function-body"/>
<parameter content="@ [action-if-true]"/>
<parameter content="[action-if-false]"/>
</prototype>
<synopsis>
Same as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[&lt;VAR&gt;includes&lt;/VAR&gt;]],
[[&lt;VAR&gt;function-body&lt;/VAR&gt;]])],
[&lt;VAR&gt;action-if-true&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-false&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.&lt;/P&gt;&lt;P&gt;
This macro double quotes both &lt;VAR&gt;includes&lt;/VAR&gt;
and &lt;VAR&gt;function-body&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
Depending on the current language (Language Choice), create a
test program to see whether a function whose body consists of
&lt;VAR&gt;function-body&lt;/VAR&gt; can be compiled and linked.
If the file compiles and links successfully, run shell commands
&lt;VAR&gt;action-if-found&lt;/VAR&gt;, otherwise run
&lt;VAR&gt;action-if-not-found&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
This macro double quotes both &lt;VAR&gt;includes&lt;/VAR&gt;
and &lt;VAR&gt;function-body&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
For C and C++, &lt;VAR&gt;includes&lt;/VAR&gt; is any
&lt;CODE&gt;#include&lt;/CODE&gt; statements needed by the code
in &lt;VAR&gt;function-body&lt;/VAR&gt;
(&lt;VAR&gt;includes&lt;/VAR&gt; is ignored if the currently
selected language is Fortran or Fortran 77). The compiler and
compilation flags are determined by the current language
(Language Choice), and in addition
&lt;CODE&gt;LDFLAGS&lt;/CODE&gt; and
&lt;CODE&gt;LIBS&lt;/CODE&gt; are used for linking.
</synopsis>
</macro>
<macro id="AC_TRY_LINK_FUNC">
<prototype>
<parameter content="function"/>
<parameter content="[action-if-found]"/>
<parameter content="@ [action-if-not-found]"/>
</prototype>
<synopsis>
This macro is equivalent to
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_LINK_IFELSE([AC_LANG_CALL([],
[&lt;VAR&gt;function&lt;/VAR&gt;])],
[&lt;VAR&gt;action-if-found&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-not-found&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; .
</synopsis>
</macro>
<macro id="AC_TRY_RUN">
<prototype>
<parameter content="program"/>
<parameter content="[action-if-true]"/>
<parameter content="@ [action-if-false]"/>
<parameter content="[action-if-cross-compiling]"/>
</prototype>
<synopsis>
Same as:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_RUN_IFELSE(
[AC_LANG_SOURCE([[&lt;VAR&gt;program&lt;/VAR&gt;]])],
[&lt;VAR&gt;action-if-true&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-false&lt;/VAR&gt;],
[&lt;VAR&gt;action-if-cross-compiling&lt;/VAR&gt;])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
.
</synopsis>
</macro>
<macro id="AC_TYPE_SIGNAL">
<prototype>
</prototype>
<synopsis>
signal.h If &lt;TT&gt;signal.h&lt;/TT&gt; declares
&lt;CODE&gt;signal&lt;/CODE&gt; as returning a pointer to a
function returning &lt;CODE&gt;void&lt;/CODE&gt;, define
&lt;CODE&gt;RETSIGTYPE&lt;/CODE&gt; to be
&lt;CODE&gt;void&lt;/CODE&gt;; otherwise, define it to be
&lt;CODE&gt;int&lt;/CODE&gt;. These days, it is portable to
assume C89, and that signal handlers return
&lt;CODE&gt;void&lt;/CODE&gt;, without needing to use this macro
or &lt;CODE&gt;RETSIGTYPE&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
When targetting older K&amp;R C, it is possible to define signal
handlers as returning type &lt;CODE&gt;RETSIGTYPE&lt;/CODE&gt;,
and omit a return statement:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; @group RETSIGTYPE hup_handler ()
&lt;small&gt;...&lt;/small&gt; @ @end group
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</synopsis>
</macro>
<macro id="AC_UID_T">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_TYPE_UID_T&lt;/CODE&gt;
(AC_TYPE_UID_T).
</synopsis>
</macro>
<macro id="AC_UNISTD_H">
<prototype>
</prototype>
<synopsis>
Same as &lt;samp&gt;AC_CHECK_HEADERS([unistd.h])&lt;/samp&gt;
(AC_CHECK_HEADERS).
</synopsis>
</macro>
<macro id="AC_USG">
<prototype>
</prototype>
<synopsis>
Define &lt;CODE&gt;USG&lt;/CODE&gt; if the BSD string
functions are defined in &lt;TT&gt;strings.h&lt;/TT&gt;. You
should no longer depend upon &lt;CODE&gt;USG&lt;/CODE&gt;, but
on &lt;CODE&gt;HAVE_STRING_H&lt;/CODE&gt;; see Standard Symbols.
</synopsis>
</macro>
<macro id="AC_UTIME_NULL">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_UTIME_NULL&lt;/CODE&gt;
(AC_FUNC_UTIME_NULL).
</synopsis>
</macro>
<macro id="AC_VALIDATE_CACHED_SYSTEM_TUPLE">
<prototype>
<parameter content="[cmd]"/>
</prototype>
<synopsis>
If the cache file is inconsistent with the current host, target
and build system types, it used to execute
&lt;VAR&gt;cmd&lt;/VAR&gt; or print a default error message.
This is now handled by default.
</synopsis>
</macro>
<macro id="AC_VERBOSE">
<prototype>
<parameter content="result-description"/>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_MSG_RESULT&lt;/CODE&gt;
(AC_MSG_RESULT).
</synopsis>
</macro>
<macro id="AC_VFORK">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_FORK&lt;/CODE&gt;
(AC_FUNC_FORK).
</synopsis>
</macro>
<macro id="AC_VPRINTF">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_FUNC_VPRINTF&lt;/CODE&gt;
(AC_FUNC_VPRINTF).
</synopsis>
</macro>
<macro id="AC_WAIT3">
<prototype>
</prototype>
<synopsis>
This macro was renamed &lt;CODE&gt;AC_FUNC_WAIT3&lt;/CODE&gt;.
However, these days portable programs should use
&lt;CODE&gt;waitpid&lt;/CODE&gt;, not
&lt;CODE&gt;wait3&lt;/CODE&gt;, as
&lt;CODE&gt;wait3&lt;/CODE&gt; has been removed from Posix.
</synopsis>
</macro>
<macro id="AC_WARN">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_MSG_WARN&lt;/CODE&gt; (AC_MSG_WARN).
</synopsis>
</macro>
<macro id="AC_WITH">
<prototype>
<parameter content="package"/>
<parameter content="action-if-given"/>
<parameter content="@ [action-if-not-given]"/>
</prototype>
<synopsis>
This is an obsolete version of
&lt;CODE&gt;AC_ARG_WITH&lt;/CODE&gt; that does not support
providing a help string (AC_ARG_WITH).
</synopsis>
</macro>
<macro id="AC_WORDS_BIGENDIAN">
<prototype>
</prototype>
<synopsis>
Replaced by &lt;CODE&gt;AC_C_BIGENDIAN&lt;/CODE&gt;
(AC_C_BIGENDIAN).
</synopsis>
</macro>
<macro id="AC_XENIX_DIR">
<prototype>
</prototype>
<synopsis>
This macro used to add &lt;samp&gt;-lx&lt;/samp&gt; to output
variable &lt;CODE&gt;LIBS&lt;/CODE&gt; if on Xenix. Also, if
&lt;TT&gt;dirent.h&lt;/TT&gt; is being checked for, added
&lt;samp&gt;-ldir&lt;/samp&gt; to &lt;CODE&gt;LIBS&lt;/CODE&gt;.
Now it is merely an alias of
&lt;CODE&gt;AC_HEADER_DIRENT&lt;/CODE&gt; instead, plus some
code to detect whether running XENIX on which you should not
depend:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AC_MSG_CHECKING([for Xenix])
AC_EGREP_CPP([yes], [#if defined M_XENIX &amp;&amp; !defined
M_UNIX yes #endif], [AC_MSG_RESULT([yes]);
XENIX=yes], [AC_MSG_RESULT([no]); XENIX=])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; Don't use this
macro, the dignified means to check the nature of the host is
using &lt;CODE&gt;AC_CANONICAL_HOST&lt;/CODE&gt;
(Canonicalizing).
</synopsis>
</macro>
<macro id="AC_YYTEXT_POINTER">
<prototype>
</prototype>
<synopsis>
This macro was renamed &lt;CODE&gt;AC_DECL_YYTEXT&lt;/CODE&gt;,
which in turn was integrated into
&lt;CODE&gt;AC_PROG_LEX&lt;/CODE&gt; (AC_PROG_LEX).
</synopsis>
</macro>
<macro id="AT_INIT">
<prototype>
<parameter content="[name]"/>
</prototype>
<synopsis>
Initialize Autotest. Giving a &lt;VAR&gt;name&lt;/VAR&gt; to
the test suite is encouraged if your package includes several
test suites. Before this macro is called,
&lt;CODE&gt;AT_PACKAGE_STRING&lt;/CODE&gt; and
&lt;CODE&gt;AT_PACKAGE_BUGREPORT&lt;/CODE&gt; must be defined,
which are used to display information about the testsuite to the
user. Typically, these macros are provided by a file
&lt;TT&gt;package.m4&lt;/TT&gt; built by
&lt;CODE&gt;make&lt;/CODE&gt; (Making testsuite Scripts), in
order to inherit the package name, version, and bug reporting
address from &lt;TT&gt;configure.ac&lt;/TT&gt;.
</synopsis>
</macro>
<macro id="AT_COPYRIGHT">
<prototype>
<parameter content="copyright-notice"/>
</prototype>
<synopsis>
Notice State that, in addition to the Free Software
Foundation's copyright on the Autotest macros, parts of your
test suite are covered by
&lt;VAR&gt;copyright-notice&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
The &lt;VAR&gt;copyright-notice&lt;/VAR&gt; shows up in both the
head of &lt;CODE&gt;testsuite&lt;/CODE&gt; and in
&lt;samp&gt;testsuite --version&lt;/samp&gt;.
</synopsis>
</macro>
<macro id="AT_ARG_OPTION">
<prototype>
<parameter content="options"/>
<parameter content="help-text"/>
<parameter content="@ [action-if-given]"/>
<parameter content="[action-if-not-given]"/>
</prototype>
<synopsis>
Accept options from the space-separated list
&lt;VAR&gt;options&lt;/VAR&gt;, a list that has leading dashes
removed from the options. Long options will be prefixed with
&lt;samp&gt;--&lt;/samp&gt;, single-character options with
&lt;samp&gt;-&lt;/samp&gt;. The first word in this list is the
primary &lt;VAR&gt;option&lt;/VAR&gt;, any others are assumed to
be short-hand aliases. The variable associated with it is
&lt;CODE&gt;at_arg_&lt;VAR&gt;option&lt;/VAR&gt;&lt;/CODE&gt;,
with any dashes in &lt;VAR&gt;option&lt;/VAR&gt; replaced with
underscores.&lt;/P&gt;&lt;P&gt;
If the user passes
&lt;samp&gt;--&lt;VAR&gt;option&lt;/VAR&gt;&lt;/samp&gt; to the
&lt;CODE&gt;testsuite&lt;/CODE&gt;, the variable will be set to
&lt;samp&gt;:&lt;/samp&gt;. If the user does not pass the
option, or passes
&lt;samp&gt;--no-&lt;VAR&gt;option&lt;/VAR&gt;&lt;/samp&gt;,
then the variable will be set to &lt;samp&gt;false&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;action-if-given&lt;/VAR&gt; is run each time the
option is encountered; here, the variable
&lt;CODE&gt;at_optarg&lt;/CODE&gt; will be set to
&lt;samp&gt;:&lt;/samp&gt; or &lt;samp&gt;false&lt;/samp&gt; as
appropriate. &lt;CODE&gt;at_optarg&lt;/CODE&gt; is actually
just a copy of
&lt;CODE&gt;at_arg_&lt;VAR&gt;option&lt;/VAR&gt;&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;action-if-not-given&lt;/VAR&gt; will be run once
after option parsing is complete and if no option from
&lt;VAR&gt;options&lt;/VAR&gt; was used.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;help-text&lt;/VAR&gt; is added to the end of the list
of options shown in &lt;CODE&gt;testsuite --help&lt;/CODE&gt;
(AS_HELP_STRING).&lt;/P&gt;&lt;P&gt;
It it recommended that you use a package-specific prefix to
&lt;VAR&gt;options&lt;/VAR&gt; names in order to avoid clashes
with future Autotest built-in options.
</synopsis>
</macro>
<macro id="AT_ARG_OPTION_ARG">
<prototype>
<parameter content="options"/>
<parameter content="help-text"/>
<parameter content="@ [action-if-given]"/>
<parameter content="[action-if-not-given]"/>
</prototype>
<synopsis>
Accept options with arguments from the space-separated list
&lt;VAR&gt;options&lt;/VAR&gt;, a list that has leading dashes
removed from the options. Long options will be prefixed with
&lt;samp&gt;--&lt;/samp&gt;, single-character options with
&lt;samp&gt;-&lt;/samp&gt;. The first word in this list is the
primary &lt;VAR&gt;option&lt;/VAR&gt;, any others are assumed to
be short-hand aliases. The variable associated with it is
&lt;CODE&gt;at_arg_&lt;VAR&gt;option&lt;/VAR&gt;&lt;/CODE&gt;,
with any dashes in &lt;VAR&gt;option&lt;/VAR&gt; replaced with
underscores.&lt;/P&gt;&lt;P&gt;
If the user passes
&lt;samp&gt;--&lt;VAR&gt;option&lt;/VAR&gt;=&lt;VAR&gt;arg&lt;/VAR&gt;&lt;/samp&gt;
or &lt;samp&gt;--&lt;VAR&gt;option&lt;/VAR&gt;
&lt;VAR&gt;arg&lt;/VAR&gt;&lt;/samp&gt; to the
&lt;CODE&gt;testsuite&lt;/CODE&gt;, the variable will be set to
&lt;samp&gt;&lt;VAR&gt;arg&lt;/VAR&gt;&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;action-if-given&lt;/VAR&gt; is run each time the
option is encountered; here, the variable
&lt;CODE&gt;at_optarg&lt;/CODE&gt; will be set to
&lt;samp&gt;&lt;VAR&gt;arg&lt;/VAR&gt;&lt;/samp&gt;.
&lt;CODE&gt;at_optarg&lt;/CODE&gt; is actually just a copy of
&lt;CODE&gt;at_arg_&lt;VAR&gt;option&lt;/VAR&gt;&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;action-if-not-given&lt;/VAR&gt; will be run once
after option parsing is complete and if no option from
&lt;VAR&gt;options&lt;/VAR&gt; was used.&lt;/P&gt;&lt;P&gt;
&lt;VAR&gt;help-text&lt;/VAR&gt; is added to the end of the list
of options shown in &lt;CODE&gt;testsuite --help&lt;/CODE&gt;
(AS_HELP_STRING).&lt;/P&gt;&lt;P&gt;
It it recommended that you use a package-specific prefix to
&lt;VAR&gt;options&lt;/VAR&gt; names in order to avoid clashes
with future Autotest built-in options.
</synopsis>
</macro>
<macro id="AT_COLOR_TESTS">
<prototype>
</prototype>
<synopsis>
Enable colored test results by default when the output is
connected to a terminal.
</synopsis>
</macro>
<macro id="AT_TESTED">
<prototype>
<parameter content="executables"/>
</prototype>
<synopsis>
Log the file name and answer to
&lt;samp&gt;--version&lt;/samp&gt; of each program in
space-separated list &lt;VAR&gt;executables&lt;/VAR&gt;.
Several invocations register new executables, in other words,
don't fear registering one program several times.&lt;/P&gt;&lt;P&gt;
Autotest test suites rely on PATH to find the tested program.
This avoids the need to generate absolute names of the various
tools, and makes it possible to test installed programs.
Therefore, knowing which programs are being exercised is crucial
to understanding problems in the test suite itself, or its
occasional misuses. It is a good idea to also subscribe foreign
programs you depend upon, to avoid incompatible diagnostics.
</synopsis>
</macro>
<macro id="AT_BANNER">
<prototype>
<parameter content="test-category-name"/>
</prototype>
<synopsis>
This macro identifies the start of a category of related test
groups. When the resulting &lt;TT&gt;testsuite&lt;/TT&gt; is
invoked with more than one test group to run, its output will
include a banner containing
&lt;VAR&gt;test-category-name&lt;/VAR&gt; prior to any tests run
from that category. The banner should be no more than about 40
or 50 characters. A blank banner indicates uncategorized tests;
an empty line will be inserted after tests from an earlier
category, effectively ending that category.
</synopsis>
</macro>
<macro id="AT_SETUP">
<prototype>
<parameter content="test-group-name"/>
</prototype>
<synopsis>
This macro starts a group of related tests, all to be executed
in the same subshell. It accepts a single argument, which holds
a few words (no more than about 30 or 40 characters) quickly
describing the purpose of the test group being started.
&lt;VAR&gt;test-group-name&lt;/VAR&gt; must not expand to
unbalanced quotes, although quadrigraphs can be used.
</synopsis>
</macro>
<macro id="AT_KEYWORDS">
<prototype>
<parameter content="keywords"/>
</prototype>
<synopsis>
Associate the space-separated list of
&lt;VAR&gt;keywords&lt;/VAR&gt; to the enclosing test group.
This makes it possible to run ``slices'' of the test suite. For
instance, if some of your test groups exercise some
&lt;samp&gt;foo&lt;/samp&gt; feature, then using
&lt;samp&gt;AT_KEYWORDS(foo)&lt;/samp&gt; lets you run
&lt;samp&gt;./testsuite -k foo&lt;/samp&gt; to run exclusively
these test groups. The &lt;VAR&gt;test-group-name&lt;/VAR&gt;
of the test group is automatically recorded to
&lt;CODE&gt;AT_KEYWORDS&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Several invocations within a test group accumulate new keywords.
In other words, don't fear registering the same keyword several
times in a test group.
</synopsis>
</macro>
<macro id="AT_CAPTURE_FILE">
<prototype>
<parameter content="file"/>
</prototype>
<synopsis>
If the current test group fails, log the contents of
&lt;VAR&gt;file&lt;/VAR&gt;. Several identical calls within one
test group have no additional effect.
</synopsis>
</macro>
<macro id="AT_FAIL_IF">
<prototype>
<parameter content="shell-condition"/>
</prototype>
<synopsis>
Make the test group fail and skip the rest of its execution, if
&lt;VAR&gt;shell-condition&lt;/VAR&gt; is true.
&lt;VAR&gt;shell-condition&lt;/VAR&gt; is a shell expression
such as a &lt;CODE&gt;test&lt;/CODE&gt; command. Tests before
&lt;CODE&gt;AT_FAIL_IF&lt;/CODE&gt; will be executed and may
still cause the test group to be skipped. You can instantiate
this macro many times from within the same test group.&lt;/P&gt;&lt;P&gt;
You should use this macro only for very simple failure
conditions. If the &lt;VAR&gt;shell-condition&lt;/VAR&gt; could
emit any kind of output you should instead use
&lt;CODE&gt;AT_CHECK&lt;/CODE&gt; like
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AT_CHECK([if
&lt;VAR&gt;shell-condition&lt;/VAR&gt;; then exit 99; fi])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; so that such
output is properly recorded in the
&lt;TT&gt;testsuite.log&lt;/TT&gt; file.
</synopsis>
</macro>
<macro id="AT_SKIP_IF">
<prototype>
<parameter content="shell-condition"/>
</prototype>
<synopsis>
Determine whether the test should be skipped because it
requires features that are unsupported on the machine under
test. &lt;VAR&gt;shell-condition&lt;/VAR&gt; is a shell
expression such as a &lt;CODE&gt;test&lt;/CODE&gt; command.
Tests before &lt;CODE&gt;AT_SKIP_IF&lt;/CODE&gt; will be
executed and may still cause the test group to fail. You can
instantiate this macro many times from within the same test
group.&lt;/P&gt;&lt;P&gt;
You should use this macro only for very simple skip conditions.
If the &lt;VAR&gt;shell-condition&lt;/VAR&gt; could emit any
kind of output you should instead use
&lt;CODE&gt;AT_CHECK&lt;/CODE&gt; like
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AT_CHECK([if
&lt;VAR&gt;shell-condition&lt;/VAR&gt;; then exit 77; fi])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; so that such
output is properly recorded in the
&lt;TT&gt;testsuite.log&lt;/TT&gt; file.
</synopsis>
</macro>
<macro id="AT_XFAIL_IF">
<prototype>
<parameter content="shell-condition"/>
</prototype>
<synopsis>
Determine whether the test is expected to fail because it is a
known bug (for unsupported features, you should skip the test).
&lt;VAR&gt;shell-condition&lt;/VAR&gt; is a shell expression
such as a &lt;CODE&gt;test&lt;/CODE&gt; command; you can
instantiate this macro many times from within the same test
group, and one of the conditions is enough to turn the test into
an expected failure.
</synopsis>
</macro>
<macro id="AT_CLEANUP">
<prototype>
</prototype>
<synopsis>
End the current test group.
</synopsis>
</macro>
<macro id="AT_DATA">
<prototype>
<parameter content="file"/>
<parameter content="contents"/>
</prototype>
<synopsis>
Initialize an input data &lt;VAR&gt;file&lt;/VAR&gt; with given
&lt;VAR&gt;contents&lt;/VAR&gt;. Of course, the
&lt;VAR&gt;contents&lt;/VAR&gt; have to be properly quoted
between square brackets to protect against included commas or
spurious M4 expansion. &lt;VAR&gt;contents&lt;/VAR&gt; must be
empty or end with a newline. &lt;VAR&gt;file&lt;/VAR&gt; must be
a single shell word that expands into a single file name.
</synopsis>
</macro>
<macro id="AT_CHECK">
<prototype>
<parameter content="commands"/>
<parameter content="[status= 0]"/>
<parameter content="[stdout]"/>
<parameter content="@ [stderr]"/>
<parameter content="[run-if-fail]"/>
<parameter content="[run-if-pass]"/>
</prototype>
<prototype>
</prototype>
<synopsis>
stderr, run-if-fail, run-if-pass) Execute a test by
performing given shell &lt;VAR&gt;commands&lt;/VAR&gt; in a
subshell. &lt;VAR&gt;commands&lt;/VAR&gt; is output as-is, so
shell expansions are honored. These commands should normally
exit with &lt;VAR&gt;status&lt;/VAR&gt;, while producing
expected &lt;VAR&gt;stdout&lt;/VAR&gt; and
&lt;VAR&gt;stderr&lt;/VAR&gt; contents. If
&lt;VAR&gt;commands&lt;/VAR&gt; exit with unexpected status 77,
then the rest of the test group is skipped. If
&lt;VAR&gt;commands&lt;/VAR&gt; exit with unexpected status 99,
then the test group is immediately failed. Otherwise, if this
test fails, run shell commands
&lt;VAR&gt;run-if-fail&lt;/VAR&gt; or, if this test passes, run
shell commands &lt;VAR&gt;run-if-pass&lt;/VAR&gt;, both inside
the current shell execution environment. At the beginning of
&lt;VAR&gt;run-if-fail&lt;/VAR&gt; and
&lt;VAR&gt;run-if-pass&lt;/VAR&gt;, the status of
&lt;VAR&gt;commands&lt;/VAR&gt; is available in the
&lt;CODE&gt;at_status&lt;/CODE&gt; shell variable.&lt;/P&gt;&lt;P&gt;
This macro must be invoked in between
&lt;CODE&gt;AT_SETUP&lt;/CODE&gt; and
&lt;CODE&gt;AT_CLEANUP&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
If &lt;VAR&gt;status&lt;/VAR&gt; is the literal
&lt;samp&gt;ignore&lt;/samp&gt;, then the corresponding exit
status is not checked, except for the special cases of 77 (skip)
and 99 (hard failure). The existence of hard failures allows
one to mark a test as an expected failure with
&lt;CODE&gt;AT_XFAIL_IF&lt;/CODE&gt; because a feature has not
yet been implemented, but to still distinguish between
gracefully handling the missing feature and dumping core. A
hard failure also inhibits post-test actions in
&lt;VAR&gt;run-if-fail&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
If the value of the &lt;VAR&gt;stdout&lt;/VAR&gt; or
&lt;VAR&gt;stderr&lt;/VAR&gt; parameter is one of the literals
in the following table, then the test treats the output
according to the rules of that literal. Otherwise, the value of
the parameter is treated as text that must exactly match the
output given by &lt;VAR&gt;commands&lt;/VAR&gt; on standard
output and standard error (including an empty parameter for no
output); any differences are captured in the testsuite log and
the test is failed (unless an unexpected exit status of 77
skipped the test instead). The difference between
&lt;CODE&gt;AT_CHECK&lt;/CODE&gt; and
&lt;CODE&gt;AT_CHECK_UNQUOTED&lt;/CODE&gt; is that only the
latter performs shell variable expansion
(&lt;samp&gt;$&lt;/samp&gt;), command substitution
(&lt;samp&gt;`&lt;/samp&gt;), and backslash escaping
(&lt;samp&gt;\&lt;/samp&gt;) on comparison text given in the
&lt;VAR&gt;stdout&lt;/VAR&gt; and &lt;VAR&gt;stderr&lt;/VAR&gt;
arguments; if the text includes a trailing newline, this would
be the same as if it were specified via an unquoted
here-document. (However, there is no difference in the
interpretation of &lt;VAR&gt;commands&lt;/VAR&gt;).&lt;/P&gt;&lt;P&gt;
&lt;DL&gt; &lt;DT&gt;'&lt;SAMP&gt;ignore&lt;/SAMP&gt;'
&lt;DD&gt; The content of the output is ignored, but still
captured in the test group log (if the testsuite is run with
option &lt;samp&gt;-v&lt;/samp&gt;, the test group log is
displayed as the test is run; if the test group later fails, the
test group log is also copied into the overall testsuite log).
This action is valid for both &lt;VAR&gt;stdout&lt;/VAR&gt; and
&lt;VAR&gt;stderr&lt;/VAR&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;ignore-nolog&lt;/SAMP&gt;' &lt;DD&gt; The
content of the output is ignored, and nothing is captured in the
log files. If &lt;VAR&gt;commands&lt;/VAR&gt; are likely to
produce binary output (including long lines) or large amounts of
output, then logging the output can make it harder to locate
details related to subsequent tests within the group, and could
potentially corrupt terminal display of a user running
&lt;CODE&gt;testsuite -v&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;stdout&lt;/SAMP&gt;' &lt;DD&gt; For the
&lt;VAR&gt;stdout&lt;/VAR&gt; parameter, capture the content of
standard output to both the file &lt;TT&gt;stdout&lt;/TT&gt; and
the test group log. Subsequent commands in the test group can
then post-process the file. This action is often used when it
is desired to use &lt;CODE&gt;grep&lt;/CODE&gt; to look for a
substring in the output, or when the output must be
post-processed to normalize error messages into a common form.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;stderr&lt;/SAMP&gt;' &lt;DD&gt; Like
&lt;samp&gt;stdout&lt;/samp&gt;, except that it only works for
the &lt;VAR&gt;stderr&lt;/VAR&gt; parameter, and the standard
error capture file will be named &lt;TT&gt;stderr&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;stdout-nolog&lt;/SAMP&gt;' &lt;DD&gt;
&lt;DT&gt;'&lt;SAMP&gt;x stderr-nolog&lt;/SAMP&gt;' &lt;DD&gt;
Like &lt;samp&gt;stdout&lt;/samp&gt; or
&lt;samp&gt;stderr&lt;/samp&gt;, except that the captured output
is not duplicated into the test group log. This action is
particularly useful for an intermediate check that produces
large amounts of data, which will be followed by another check
that filters down to the relevant data, as it makes it easier to
locate details in the log.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;expout&lt;/SAMP&gt;' &lt;DD&gt; For the
&lt;VAR&gt;stdout&lt;/VAR&gt; parameter, compare standard output
contents with the previously created file
&lt;TT&gt;expout&lt;/TT&gt;, and list any differences in the
testsuite log.&lt;/P&gt;&lt;P&gt;
&lt;DT&gt;'&lt;SAMP&gt;experr&lt;/SAMP&gt;' &lt;DD&gt; Like
&lt;samp&gt;expout&lt;/samp&gt;, except that it only works for
the &lt;VAR&gt;stderr&lt;/VAR&gt; parameter, and the standard
error contents are compared with &lt;TT&gt;experr&lt;/TT&gt;.
&lt;/DL&gt;
</synopsis>
</macro>
<macro id="AT_CHECK_EUNIT">
<prototype>
<parameter content="module"/>
<parameter content="test-spec"/>
<parameter content="[erlflags]"/>
<parameter content="@ [run-if-fail]"/>
<parameter content="[run-if-pass]"/>
</prototype>
<synopsis>
Initialize and execute an Erlang module named
&lt;VAR&gt;module&lt;/VAR&gt; that performs tests following the
&lt;VAR&gt;test-spec&lt;/VAR&gt; EUnit test specification.
&lt;VAR&gt;test-spec&lt;/VAR&gt; must be a valid EUnit test
specification, as defined in the
http://@/erlang.org/@/doc/@/apps/@/eunit/@/index.html, EUnit
Reference Manual. &lt;VAR&gt;erlflags&lt;/VAR&gt; are optional
command-line options passed to the Erlang interpreter to execute
the test Erlang module. Typically,
&lt;VAR&gt;erlflags&lt;/VAR&gt; defines at least the paths to
directories containing the compiled Erlang modules under test,
as &lt;samp&gt;-pa path1 path2 ...&lt;/samp&gt;.&lt;/P&gt;&lt;P&gt;
For example, the unit tests associated with Erlang module
&lt;samp&gt;testme&lt;/samp&gt;, which compiled code is in
subdirectory &lt;TT&gt;src&lt;/TT&gt;, can be performed with:&lt;/P&gt;&lt;P&gt;
&lt;TABLE&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td
class=example&gt;&lt;pre&gt; AT_CHECK_EUNIT([testme_testsuite],
[module, testme@], [-pa
"$abs_top_builddir@/src"])
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/P&gt;&lt;P&gt;
This macro must be invoked in between
&lt;CODE&gt;AT_SETUP&lt;/CODE&gt; and
&lt;CODE&gt;AT_CLEANUP&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;
Variables &lt;CODE&gt;ERL&lt;/CODE&gt;,
&lt;CODE&gt;ERLC&lt;/CODE&gt;, and (optionally)
&lt;CODE&gt;ERLCFLAGS&lt;/CODE&gt; must be defined as the path
of the Erlang interpreter, the path of the Erlang compiler, and
the command-line flags to pass to the compiler, respectively.
Those variables should be configured in
&lt;TT&gt;configure.ac&lt;/TT&gt; using the
&lt;CODE&gt;AC_ERLANG_PATH_ERL&lt;/CODE&gt; and
&lt;CODE&gt;AC_ERLANG_PATH_ERLC&lt;/CODE&gt; macros, and the
configured values of those variables are automatically defined
in the testsuite. If &lt;CODE&gt;ERL&lt;/CODE&gt; or
&lt;CODE&gt;ERLC&lt;/CODE&gt; is not defined, the test group is
skipped.&lt;/P&gt;&lt;P&gt;
If the EUnit library cannot be found, i.e. if module
&lt;CODE&gt;eunit&lt;/CODE&gt; cannot be loaded, the test group
is skipped. Otherwise, if &lt;VAR&gt;test-spec&lt;/VAR&gt; is
an invalid EUnit test specification, the test group fails.
Otherwise, if the EUnit test passes, shell commands
&lt;VAR&gt;run-if-pass&lt;/VAR&gt; are executed or, if the EUnit
test fails, shell commands &lt;VAR&gt;run-if-fail&lt;/VAR&gt;
are executed and the test group fails.&lt;/P&gt;&lt;P&gt;
Only the generated test Erlang module is automatically compiled
and executed. If &lt;VAR&gt;test-spec&lt;/VAR&gt; involves
testing other Erlang modules, e.g. module
&lt;samp&gt;testme&lt;/samp&gt; in the example above, those
modules must be already compiled.&lt;/P&gt;&lt;P&gt;
If the testsuite is run in verbose mode, with option
&lt;samp&gt;--verbose&lt;/samp&gt;, EUnit is also run in verbose
mode to output more details about individual unit tests.
</synopsis>
</macro>
<macro id="AC_CONFIG_TESTDIR">
<prototype>
<parameter content="directory"/>
<parameter content="[test-path= directory]"/>
</prototype>
<synopsis>
An Autotest test suite is to be configured in
&lt;VAR&gt;directory&lt;/VAR&gt;. This macro causes
&lt;TT&gt;&lt;VAR&gt;directory&lt;/VAR&gt;/atconfig&lt;/TT&gt;
to be created by &lt;CODE&gt;config.status&lt;/CODE&gt; and sets
the default &lt;CODE&gt;AUTOTEST_PATH&lt;/CODE&gt; to
&lt;VAR&gt;test-path&lt;/VAR&gt; (testsuite Invocation).
</synopsis>
</macro>
</macros>