<!-- 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="unique-file-in-source-dir"/> </prototype> <synopsis> Process any command-line arguments and find the source code directory. <VAR>unique-file-in-source-dir</VAR> is some file that is in the package's source directory; <CODE>configure</CODE> 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 <samp>--srcdir</samp>; this is a safety check. , for more information. </synopsis> </macro> <macro id="AC_CONFIG_AUX_DIR"> <prototype> <parameter content="dir"/> </prototype> <synopsis> Use the <TT>install-sh</TT>, <TT>config.sub</TT>, <TT>config.guess</TT>, and Cygnus <CODE>configure</CODE> scripts that are in directory <VAR>dir</VAR>. These are auxiliary files used in configuration. <VAR>dir</VAR> can be either absolute or relative to <TT><VAR>srcdir</VAR></TT>. The default is <TT><VAR>srcdir</VAR></TT> or <TT><VAR>srcdir</VAR>/..</TT> or <TT><VAR>srcdir</VAR>/../..</TT>, whichever is the first that contains <TT>install-sh</TT>. The other files are not checked for, so that using <CODE>AC_PROG_INSTALL</CODE> does not automatically require distributing the other auxiliary files. It checks for <TT>install.sh</TT> also, but that name is obsolete because some <CODE>make</CODE> programs have a rule that creates <TT>install</TT> from it if there is no <TT>Makefile</TT>. </synopsis> </macro> <macro id="AC_OUTPUT"> <prototype> <parameter content="[file... ["/> <parameter content="extra-cmds ["/> <parameter content="init-cmds]]]"/> </prototype> <synopsis> Create output files. Call this macro once, at the end of <TT>configure.in</TT>. The <VAR>file</VAR><small>...</small> argument is a whitespace-separated list of output files; it may be empty. This macro creates each file <TT><VAR>file</VAR></TT> by copying an input file (by default named <TT><VAR>file</VAR>.in</TT>), substituting the output variable values. , 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 (but not the parents of that directory). Usually, <TT>Makefile</TT>s are created this way, but other files, such as <TT>.gdbinit</TT>, can be specified as well.</P><P> If <CODE>AC_CONFIG_HEADER</CODE>, <CODE>AC_LINK_FILES</CODE>, or <CODE>AC_CONFIG_SUBDIRS</CODE> has been called, this macro also creates the files named as their arguments.</P><P> A typical call to <CODE>AC_OUTPUT</CODE> looks like this: <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_OUTPUT(Makefile src/Makefile man/Makefile X/Imakefile) </pre></td></tr></table></P><P> You can override an input file name by appending to <VAR>file</VAR> a colon-separated list of input files. Examples: <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_OUTPUT(Makefile:templates/top.mk lib/Makefile:templates/lib.mk) AC_OUTPUT(Makefile:templates/vars.mk:Makefile.in:templates/rules.mk) </pre></td></tr></table> Doing this allows you to keep your file names acceptable to MS-DOS, or to prepend and/or append boilerplate to the file.</P><P> If you pass <VAR>extra-cmds</VAR>, those commands will be inserted into <TT>config.status</TT> to be run after all its other processing. If <VAR>init-cmds</VAR> are given, they are inserted just before <VAR>extra-cmds</VAR>, with shell variable, command, and backslash substitutions performed on them in <CODE>configure</CODE>. You can use <VAR>init-cmds</VAR> to pass variables from <CODE>configure</CODE> to the <VAR>extra-cmds</VAR>. If <CODE>AC_OUTPUT_COMMANDS</CODE> has been called, the commands given to it are run just before the commands passed to this macro. </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 <TT>config.status</TT>, and shell commands to initialize any variables from <CODE>configure</CODE>. This macro may be called multiple times. Here is an unrealistic example:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> 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]) </pre></td></tr></table> </synopsis> </macro> <macro id="AC_PROG_MAKE_SET"> <prototype> </prototype> <synopsis> If <CODE>make</CODE> predefines the variable <CODE>MAKE</CODE>, define output variable <CODE>SET_MAKE</CODE> to be empty. Otherwise, define <CODE>SET_MAKE</CODE> to contain <samp>MAKE=make</samp>. Calls <CODE>AC_SUBST</CODE> for <CODE>SET_MAKE</CODE>. </synopsis> </macro> <macro id="AC_CONFIG_HEADER"> <prototype> <parameter content="header-to-create ..."/> </prototype> <synopsis> Make <CODE>AC_OUTPUT</CODE> create the file(s) in the whitespace-separated list <VAR>header-to-create</VAR> containing C preprocessor <CODE>#define</CODE> statements, and replace <samp>@@DEFS@@</samp> in generated files with <samp>-DHAVE_CONFIG_H</samp> instead of the value of <CODE>DEFS</CODE>. The usual name for <VAR>header-to-create</VAR> is <TT>config.h</TT>.</P><P> If <VAR>header-to-create</VAR> already exists and its contents are identical to what <CODE>AC_OUTPUT</CODE> would put in it, it is left alone. Doing this allows some changes in configuration without needlessly causing object files that depend on the header file to be recompiled.</P><P> Usually the input file is named <TT><VAR>header-to-create</VAR>.in</TT>; however, you can override the input file name by appending to <VAR>header-to-create</VAR>, a colon-separated list of input files. Examples: <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_CONFIG_HEADER(defines.h:defines.hin) AC_CONFIG_HEADER(defines.h:defs.pre:defines.h.in:defs.post) </pre></td></tr></table> Doing this allows you to keep your file names acceptable to MS-DOS, or to prepend and/or append boilerplate to the file. </synopsis> </macro> <macro id="AC_CONFIG_SUBDIRS"> <prototype> <parameter content="dir ..."/> </prototype> <synopsis> Make <CODE>AC_OUTPUT</CODE> run <CODE>configure</CODE> in each subdirectory <VAR>dir</VAR> in the given whitespace-separated list. If a given <VAR>dir</VAR> is not found, no error is reported, so a <CODE>configure</CODE> script can configure whichever parts of a large source tree are present. If a given <VAR>dir</VAR> contains <TT>configure.in</TT> but no <CODE>configure</CODE>, the Cygnus <CODE>configure</CODE> script found by <CODE>AC_CONFIG_AUXDIR</CODE> is used.</P><P> The subdirectory <CODE>configure</CODE> scripts are given the same command line options that were given to this <CODE>configure</CODE> script, with minor changes if needed (e.g., to adjust a relative path for the cache file or source directory). This macro also sets the output variable <CODE>subdirs</CODE> to the list of directories <samp><VAR>dir</VAR> <small>...</small></samp>. <TT>Makefile</TT> rules can use this variable to determine which subdirectories to recurse into. 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 <VAR>prefix</VAR> instead of <TT>/usr/local</TT>. </synopsis> </macro> <macro id="AC_PREFIX_PROGRAM"> <prototype> <parameter content="program"/> </prototype> <synopsis> If the user did not specify an installation prefix (using the <samp>--prefix</samp> option), guess a value for it by looking for <VAR>program</VAR> in <CODE>PATH</CODE>, the way the shell does. If <VAR>program</VAR> is found, set the prefix to the parent of the directory containing <VAR>program</VAR>; otherwise leave the prefix specified in <TT>Makefile.in</TT> unchanged. For example, if <VAR>program</VAR> is <CODE>gcc</CODE> and the <CODE>PATH</CODE> contains <TT>/usr/local/gnu/bin/gcc</TT>, set the prefix to <TT>/usr/local/gnu</TT>. </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 <CODE>configure</CODE> is earlier than <VAR>version</VAR>, print an error message on the standard error output and do not create <CODE>configure</CODE>. For example:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_PREREQ(1.8) </pre></td></tr></table></P><P> This macro is useful if your <TT>configure.in</TT> relies on non-obvious behavior that changed between Autoconf releases. If it merely needs recently added macros, then <CODE>AC_PREREQ</CODE> is less useful, because the <CODE>autoconf</CODE> program already tells the user which macros are not found. The same thing happens if <TT>configure.in</TT> is processed by a version of Autoconf older than when <CODE>AC_PREREQ</CODE> was added. </synopsis> </macro> <macro id="AC_REVISION"> <prototype> <parameter content="revision-info"/> </prototype> <synopsis> Copy revision stamp <VAR>revision-info</VAR> into the <CODE>configure</CODE> script, with any dollar signs or double-quotes removed. This macro lets you put a revision stamp from <TT>configure.in</TT> into <CODE>configure</CODE> without RCS or CVS changing it when you check in <CODE>configure</CODE>. That way, you can determine easily which revision of <TT>configure.in</TT> a particular <CODE>configure</CODE> corresponds to.</P><P> It is a good idea to call this macro before <CODE>AC_INIT</CODE> so that the revision number is near the top of both <TT>configure.in</TT> and <CODE>configure</CODE>. To support doing that, the <CODE>AC_REVISION</CODE> output begins with <samp>#! /bin/sh</samp>, like the normal start of a <CODE>configure</CODE> script does.</P><P> For example, this line in <TT>configure.in</TT>:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_REVISION($Revision: 1.1 $)dnl </pre></td></tr></table></P><P> produces this in <CODE>configure</CODE>:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> #! /bin/sh # From configure.in Revision: 1.30 </pre></td></tr></table> </synopsis> </macro> <macro id="AC_DECL_YYTEXT"> <prototype> </prototype> <synopsis> Define <CODE>YYTEXT_POINTER</CODE> if <CODE>yytext</CODE> is a <samp>char *</samp> instead of a <samp>char []</samp>. Also set output variable <CODE>LEX_OUTPUT_ROOT</CODE> to the base of the file name that the lexer generates; usually <TT>lex.yy</TT>, but sometimes something else. These results vary according to whether <CODE>lex</CODE> or <CODE>flex</CODE> is being used. </synopsis> </macro> <macro id="AC_PROG_AWK"> <prototype> </prototype> <synopsis> Check for <CODE>mawk</CODE>, <CODE>gawk</CODE>, <CODE>nawk</CODE>, and <CODE>awk</CODE>, in that order, and set output variable <CODE>AWK</CODE> to the first one that it finds. It tries <CODE>mawk</CODE> first because that is reported to be the fastest implementation. </synopsis> </macro> <macro id="AC_PROG_CC"> <prototype> </prototype> <synopsis> Determine a C compiler to use. If <CODE>CC</CODE> is not already set in the environment, check for <CODE>gcc</CODE>, and use <CODE>cc</CODE> if that's not found. Set output variable <CODE>CC</CODE> to the name of the compiler found.</P><P> If using the GNU C compiler, set shell variable <CODE>GCC</CODE> to <samp>yes</samp>, empty otherwise. If output variable <CODE>CFLAGS</CODE> was not already set, set it to <samp>-g -O2</samp> for the GNU C compiler (<samp>-O2</samp> on systems where GCC does not accept <samp>-g</samp>), or <samp>-g</samp> for other compilers.</P><P> If the C compiler being used does not produce executables that can run on the system where <CODE>configure</CODE> is being run, set the shell variable <CODE>cross_compiling</CODE> to <samp>yes</samp>, otherwise <samp>no</samp>. In other words, this tests whether the build system type is different from the host system type (the target system type is irrelevant to this test). , for more on support for cross compiling. </synopsis> </macro> <macro id="AC_PROG_CC_C_O"> <prototype> </prototype> <synopsis> If the C compiler does not accept the <samp>-c</samp> and <samp>-o</samp> options simultaneously, define <CODE>NO_MINUS_C_MINUS_O</CODE>. </synopsis> </macro> <macro id="AC_PROG_CPP"> <prototype> </prototype> <synopsis> Set output variable <CODE>CPP</CODE> to a command that runs the C preprocessor. If <samp>$CC -E</samp> doesn't work, it uses <TT>/lib/cpp</TT>. It is only portable to run <CODE>CPP</CODE> on files with a <TT>.c</TT> extension.</P><P> If the current language is C (Language Choice), many of the specific test macros use the value of <CODE>CPP</CODE> indirectly by calling <CODE>AC_TRY_CPP</CODE>, <CODE>AC_CHECK_HEADER</CODE>, <CODE>AC_EGREP_HEADER</CODE>, or <CODE>AC_EGREP_CPP</CODE>. </synopsis> </macro> <macro id="AC_PROG_CXX"> <prototype> </prototype> <synopsis> Determine a C++ compiler to use. Check if the environment variable <CODE>CXX</CODE> or <CODE>CCC</CODE> (in that order) is set; if so, set output variable <CODE>CXX</CODE> to its value. Otherwise search for a C++ compiler under likely names (<CODE>c++</CODE>, <CODE>g++</CODE>, <CODE>gcc</CODE>, <CODE>CC</CODE>, <CODE>cxx</CODE>, and <CODE>cc++</CODE>). If none of those checks succeed, as a last resort set <CODE>CXX</CODE> to <CODE>gcc</CODE>.</P><P> If using the GNU C++ compiler, set shell variable <CODE>GXX</CODE> to <samp>yes</samp>, empty otherwise. If output variable <CODE>CXXFLAGS</CODE> was not already set, set it to <samp>-g -O2</samp> for the GNU C++ compiler (<samp>-O2</samp> on systems where G++ does not accept <samp>-g</samp>), or <samp>-g</samp> for other compilers.</P><P> If the C++ compiler being used does not produce executables that can run on the system where <CODE>configure</CODE> is being run, set the shell variable <CODE>cross_compiling</CODE> to <samp>yes</samp>, otherwise <samp>no</samp>. In other words, this tests whether the build system type is different from the host system type (the target system type is irrelevant to this test). , for more on support for cross compiling. </synopsis> </macro> <macro id="AC_PROG_CXXCPP"> <prototype> </prototype> <synopsis> Set output variable <CODE>CXXCPP</CODE> to a command that runs the C++ preprocessor. If <samp>$CXX -E</samp> doesn't work, it uses <TT>/lib/cpp</TT>. It is only portable to run <CODE>CXXCPP</CODE> on files with a <TT>.c</TT>, <TT>.C</TT>, or <TT>.cc</TT> extension.</P><P> If the current language is C++ (Language Choice), many of the specific test macros use the value of <CODE>CXXCPP</CODE> indirectly by calling <CODE>AC_TRY_CPP</CODE>, <CODE>AC_CHECK_HEADER</CODE>, <CODE>AC_EGREP_HEADER</CODE>, or <CODE>AC_EGREP_CPP</CODE>. </synopsis> </macro> <macro id="AC_PROG_F77"> <prototype> </prototype> <synopsis> Determine a Fortran 77 compiler to use. If <CODE>F77</CODE> is not already set in the environment, check for <CODE>g77</CODE>, <CODE>f77</CODE> and <CODE>f2c</CODE>, in that order. Set the output variable <CODE>F77</CODE> to the name of the compiler found.</P><P> If using <CODE>g77</CODE> (the GNU Fortran 77 compiler), then <CODE>AC_PROG_F77</CODE> will set the shell variable <CODE>G77</CODE> to <samp>yes</samp>, and empty otherwise. If the output variable <CODE>FFLAGS</CODE> was not already set in the environment, then set it to <samp>-g -02</samp> for <CODE>g77</CODE> (or <samp>-O2</samp> where <CODE>g77</CODE> does not accept <samp>-g</samp>). Otherwise, set <CODE>FFLAGS</CODE> to <samp>-g</samp> for all other Fortran 77 compilers. </synopsis> </macro> <macro id="AC_PROG_F77_C_O"> <prototype> </prototype> <synopsis> Test if the Fortran 77 compiler accepts the options <samp>-c</samp> and <samp>-o</samp> simultaneously, and define <CODE>F77_NO_MINUS_C_MINUS_O</CODE> if it does not. </synopsis> </macro> <macro id="AC_PROG_GCC_TRADITIONAL"> <prototype> </prototype> <synopsis> Add <samp>-traditional</samp> to output variable <CODE>CC</CODE> if using the GNU C compiler and <CODE>ioctl</CODE> does not work properly without <samp>-traditional</samp>. That usually happens when the fixed header files have not been installed on an old system. Since recent versions of the GNU C compiler fix the header files automatically when installed, this is becoming a less prevalent problem. </synopsis> </macro> <macro id="AC_PROG_INSTALL"> <prototype> </prototype> <synopsis> Set output variable <CODE>INSTALL</CODE> to the path of a BSD compatible <CODE>install</CODE> program, if one is found in the current <CODE>PATH</CODE>. Otherwise, set <CODE>INSTALL</CODE> to <samp><VAR>dir</VAR>/install-sh -c</samp>, checking the directories specified to <CODE>AC_CONFIG_AUX_DIR</CODE> (or its default directories) to determine <VAR>dir</VAR> (Output). Also set the variables <CODE>INSTALL_PROGRAM</CODE> and <CODE>INSTALL_SCRIPT</CODE> to <samp>$INSTALL@</samp> and <CODE>INSTALL_DATA</CODE> to <samp>$INSTALL@</samp> -m 644.</P><P> This macro screens out various instances of <CODE>install</CODE> known to not work. It prefers to find a C program rather than a shell script, for speed. Instead of <TT>install-sh</TT>, it can also use <TT>install.sh</TT>, but that name is obsolete because some <CODE>make</CODE> programs have a rule that creates <TT>install</TT> from it if there is no <TT>Makefile</TT>.</P><P> A copy of <TT>install-sh</TT> which you may use comes with Autoconf. If you use <CODE>AC_PROG_INSTALL</CODE>, you must include either <TT>install-sh</TT> or <TT>install.sh</TT> in your distribution, or <CODE>configure</CODE> will produce an error message saying it can't find them---even if the system you're on has a good <CODE>install</CODE> 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 <CODE>install</CODE> program.</P><P> If you need to use your own installation program because it has features not found in standard <CODE>install</CODE> programs, there is no reason to use <CODE>AC_PROG_INSTALL</CODE>; just put the pathname of your program into your <TT>Makefile.in</TT> files. </synopsis> </macro> <macro id="AC_PROG_LEX"> <prototype> </prototype> <synopsis> If <CODE>flex</CODE> is found, set output variable <CODE>LEX</CODE> to <samp>flex</samp> and <CODE>LEXLIB</CODE> to <samp>-lfl</samp>, if that library is in a standard place. Otherwise set <CODE>LEX</CODE> to <samp>lex</samp> and <CODE>LEXLIB</CODE> to <samp>-ll</samp>. </synopsis> </macro> <macro id="AC_PROG_LN_S"> <prototype> </prototype> <synopsis> If <samp>ln -s</samp> works on the current filesystem (the operating system and filesystem support symbolic links), set output variable <CODE>LN_S</CODE> to <samp>ln -s</samp>, otherwise set it to <samp>ln</samp>.</P><P> If the link is put in a directory other than the current directory, its meaning depends on whether <samp>ln</samp> or <samp>ln -s</samp> is used. To safely create links using <samp>$(LN_S)</samp>, either find out which form is used and adjust the arguments, or always invoke <CODE>ln</CODE> in the directory where the link is to be created.</P><P> In other words, it does not work to do <TABLE><tr><td>&nbsp;</td><td class=example><pre> $(LN_S) foo /x/bar </pre></td></tr></table></P><P> Instead, do</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> (cd /x && $(LN_S) foo bar) </pre></td></tr></table> </synopsis> </macro> <macro id="AC_PROG_RANLIB"> <prototype> </prototype> <synopsis> Set output variable <CODE>RANLIB</CODE> to <samp>ranlib</samp> if <CODE>ranlib</CODE> is found, otherwise to <samp>:</samp> (do nothing). </synopsis> </macro> <macro id="AC_PROG_YACC"> <prototype> </prototype> <synopsis> If <CODE>bison</CODE> is found, set output variable <CODE>YACC</CODE> to <samp>bison -y</samp>. Otherwise, if <CODE>byacc</CODE> is found, set <CODE>YACC</CODE> to <samp>byacc</samp>. Otherwise set <CODE>YACC</CODE> to <samp>yacc</samp>. </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 <VAR>file</VAR> exists on the native system. If it is found, execute <VAR>action-if-found</VAR>, otherwise do <VAR>action-if-not-found</VAR>, if given. </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 <CODE>AC_CHECK_FILE</CODE> once for each file listed in <VAR>files</VAR>. Additionally, defines <samp>HAVE<VAR>file</VAR></samp> for each file found, set to 1. </synopsis> </macro> <macro id="AC_CHECK_PROG"> <prototype> <parameter content="variable"/> <parameter content="prog-to-check-for"/> <parameter content="value-if-found ["/> <parameter content="value-if-not-found ["/> <parameter content="path"/> <parameter content="[ reject ]]]"/> </prototype> <synopsis> Check whether program <VAR>prog-to-check-for</VAR> exists in <CODE>PATH</CODE>. If it is found, set <VAR>variable</VAR> to <VAR>value-if-found</VAR>, otherwise to <VAR>value-if-not-found</VAR>, if given. Always pass over <VAR>reject</VAR> (an absolute file name) even if it is the first found in the search path; in that case, set <VAR>variable</VAR> using the absolute file name of the <VAR>prog-to-check-for</VAR> found that is not <VAR>reject</VAR>. If <VAR>variable</VAR> was already set, do nothing. Calls <CODE>AC_SUBST</CODE> for <VAR>variable</VAR>. </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]]"/> </prototype> <synopsis> Check for each program in the whitespace-separated list <VAR>progs-to-check-for</VAR> exists in <CODE>PATH</CODE>. If it is found, set <VAR>variable</VAR> 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 <VAR>variable</VAR> to <VAR>value-if-not-found</VAR>; if <VAR>value-if-not-found</VAR> is not specified, the value of <VAR>variable</VAR> is not changed. Calls <CODE>AC_SUBST</CODE> for <VAR>variable</VAR>. </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]]"/> </prototype> <synopsis> Like <CODE>AC_CHECK_PROG</CODE>, but first looks for <VAR>prog-to-check-for</VAR> with a prefix of the host type as determined by <CODE>AC_CANONICAL_HOST</CODE>, followed by a dash (Canonicalizing). For example, if the user runs <samp>configure --host=i386-gnu</samp>, then this call: <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_CHECK_TOOL(RANLIB, ranlib, :) </pre></td></tr></table> sets <CODE>RANLIB</CODE> to <TT>i386-gnu-ranlib</TT> if that program exists in <CODE>PATH</CODE>, or to <samp>ranlib</samp> if that program exists in <CODE>PATH</CODE>, or to <samp>:</samp> if neither program exists. </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]]"/> </prototype> <synopsis> Like <CODE>AC_CHECK_PROG</CODE>, but set <VAR>variable</VAR> to the entire path of <VAR>prog-to-check-for</VAR> if found. </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]]"/> </prototype> <synopsis> Like <CODE>AC_CHECK_PROGS</CODE>, but if any of <VAR>progs-to-check-for</VAR> are found, set <VAR>variable</VAR> to the entire path of the program found. </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> Depending on the current language(Language Choice), try to ensure that the C, C++ or Fortran 77 function <VAR>function</VAR> is available by checking whether a test program can be linked with the library <VAR>library</VAR> to get the function. <VAR>library</VAR> is the base name of the library; e.g., to check for <samp>-lmp</samp>, use <samp>mp</samp> as the <VAR>library</VAR> argument.</P><P> <VAR>action-if-found</VAR> is a list of shell commands to run if the link with the library succeeds; <VAR>action-if-not-found</VAR> is a list of shell commands to run if the link fails. If <VAR>action-if-found</VAR> is not specified, the default action will add <samp>-l<VAR>library</VAR></samp> to <CODE>LIBS</CODE> and define <samp>HAVE_LIB<VAR>library</VAR></samp> (in all capitals).</P><P> If linking with <VAR>library</VAR> results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries as the <VAR>other-libraries</VAR> argument, separated by spaces: <samp>-lXt -lX11</samp>. Otherwise this macro will fail to detect that <VAR>library</VAR> is present, because linking the test program will always fail with unresolved symbols. </synopsis> </macro> <macro id="AC_HAVE_LIBRARY"> <prototype> <parameter content="library"/> <parameter content="["/> <parameter content="action-if-found ["/> <parameter content="action-if-not-found ["/> <parameter content="other-libraries]]]"/> </prototype> <synopsis> This macro is equivalent to calling <CODE>AC_CHECK_LIB</CODE> with a <VAR>function</VAR> argument of <CODE>main</CODE>. In addition, <VAR>library</VAR> can be written as any of <samp>foo</samp>, <samp>-lfoo</samp>, or <samp>libfoo.a</samp>. In all of those cases, the compiler is passed <samp>-lfoo</samp>. However, <VAR>library</VAR> can not be a shell variable; it must be a literal name. This macro is considered obsolete. </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 <VAR>function</VAR>, if it's not already available. This equates to calling <CODE>AC_TRY_LINK_FUNC</CODE> first with no libraries, then for each library listed in <VAR>search-libs</VAR>.</P><P> If the function is found, run <VAR>action-if-found</VAR>, otherwise run <VAR>action-if-not-found</VAR>.</P><P> If linking with <VAR>library</VAR> results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries as the <VAR>other-libraries</VAR> argument, separated by spaces: <samp>-lXt -lX11</samp>. Otherwise this macro will fail to detect that <VAR>function</VAR> is present, because linking the test program will always fail with unresolved symbols. </synopsis> </macro> <macro id="AC_FUNC_ALLOCA"> <prototype> </prototype> <synopsis> Check how to get <CODE>alloca</CODE>. Tries to get a builtin version by checking for <TT>alloca.h</TT> or the predefined C preprocessor macros <CODE>__GNUC__</CODE> and <CODE>_AIX</CODE>. If this macro finds <TT>alloca.h</TT>, it defines <CODE>HAVE_ALLOCA_H</CODE>.</P><P> If those attempts fail, it looks for the function in the standard C library. If any of those methods succeed, it defines <CODE>HAVE_ALLOCA</CODE>. Otherwise, it sets the output variable <CODE>ALLOCA</CODE> to <samp>alloca.o</samp> and defines <CODE>C_ALLOCA</CODE> (so programs can periodically call <samp>alloca(0)</samp> to garbage collect). This variable is separate from <CODE>LIBOBJS</CODE> so multiple programs can share the value of <CODE>ALLOCA</CODE> without needing to create an actual library, in case only some of them use the code in <CODE>LIBOBJS</CODE>.</P><P> This macro does not try to get <CODE>alloca</CODE> from the System V R3 <TT>libPW</TT> or the System V R4 <TT>libucb</TT> because those libraries contain some incompatible functions that cause trouble. Some versions do not even contain <CODE>alloca</CODE> or contain a buggy version. If you still want to use their <CODE>alloca</CODE>, use <CODE>ar</CODE> to extract <TT>alloca.o</TT> from them instead of compiling <TT>alloca.c</TT>.</P><P> Source files that use <CODE>alloca</CODE> should start with a piece of code like the following, to declare it properly. In some versions of AIX, the declaration of <CODE>alloca</CODE> must precede everything else except for comments and preprocessor directives. The <CODE>#pragma</CODE> directive is indented so that pre-ANSI C compilers will ignore it, rather than choke on it.</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # if HAVE_ALLOCA_H # include <alloca.h> # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif @end group </pre></td></tr></table> </synopsis> </macro> <macro id="AC_FUNC_CLOSEDIR_VOID"> <prototype> </prototype> <synopsis> If the <CODE>closedir</CODE> function does not return a meaningful value, define <CODE>CLOSEDIR_VOID</CODE>. Otherwise, callers ought to check its return value for an error indicator. </synopsis> </macro> <macro id="AC_FUNC_FNMATCH"> <prototype> </prototype> <synopsis> If the <CODE>fnmatch</CODE> function is available and works (unlike the one on SunOS 5.4), define <CODE>HAVE_FNMATCH</CODE>. </synopsis> </macro> <macro id="AC_FUNC_GETLOADAVG"> <prototype> </prototype> <synopsis> Check how to get the system load averages. If the system has the <CODE>getloadavg</CODE> function, this macro defines <CODE>HAVE_GETLOADAVG</CODE>, and adds to <CODE>LIBS</CODE> any libraries needed to get that function.</P><P> Otherwise, it adds <samp>getloadavg.o</samp> to the output variable <CODE>LIBOBJS</CODE>, and possibly defines several other C preprocessor macros and output variables:</P><P> <OL> <LI> It defines <CODE>SVR4</CODE>, <CODE>DGUX</CODE>, <CODE>UMAX</CODE>, or <CODE>UMAX4_3</CODE> if on those systems.</P><P> <LI> If it finds <TT>nlist.h</TT>, it defines <CODE>NLIST_STRUCT</CODE>.</P><P> <LI> If <samp>struct nlist</samp> has an <samp>n_un</samp> member, it defines <CODE>NLIST_NAME_UNION</CODE>.</P><P> <LI> If compiling <TT>getloadavg.c</TT> defines <CODE>LDAV_PRIVILEGED</CODE>, programs need to be installed specially on this system for <CODE>getloadavg</CODE> to work, and this macro defines <CODE>GETLOADAVG_PRIVILEGED</CODE>.</P><P> <LI> This macro sets the output variable <CODE>NEED_SETGID</CODE>. The value is <samp>true</samp> if special installation is required, <samp>false</samp> if not. If <CODE>NEED_SETGID</CODE> is <samp>true</samp>, this macro sets <CODE>KMEM_GROUP</CODE> to the name of the group that should own the installed program. </OL> </synopsis> </macro> <macro id="AC_FUNC_GETMNTENT"> <prototype> </prototype> <synopsis> Check for <CODE>getmntent</CODE> in the <TT>sun</TT>, <TT>seq</TT>, and <TT>gen</TT> libraries, for Irix 4, PTX, and Unixware, respectively. Then, if <CODE>getmntent</CODE> is available, define <CODE>HAVE_GETMNTENT</CODE>. </synopsis> </macro> <macro id="AC_FUNC_GETPGRP"> <prototype> </prototype> <synopsis> If <CODE>getpgrp</CODE> takes no argument (the POSIX.1 version), define <CODE>GETPGRP_VOID</CODE>. Otherwise, it is the BSD version, which takes a process ID as an argument. This macro does not check whether <CODE>getpgrp</CODE> exists at all; if you need to work in that situation, first call <CODE>AC_CHECK_FUNC</CODE> for <CODE>getpgrp</CODE>. </synopsis> </macro> <macro id="AC_FUNC_MEMCMP"> <prototype> </prototype> <synopsis> If the <CODE>memcmp</CODE> function is not available, or does not work on 8-bit data (like the one on SunOS 4.1.3), add <samp>memcmp.o</samp> to output variable <CODE>LIBOBJS</CODE>. </synopsis> </macro> <macro id="AC_FUNC_MMAP"> <prototype> </prototype> <synopsis> If the <CODE>mmap</CODE> function exists and works correctly, define <CODE>HAVE_MMAP</CODE>. Only checks private fixed mapping of already-mapped memory. </synopsis> </macro> <macro id="AC_FUNC_SELECT_ARGTYPES"> <prototype> </prototype> <synopsis> Determines the correct type to be passed to each of the <CODE>select</CODE> function's arguments, and defines those types in <CODE>SELECT_TYPE_ARG1</CODE>, <CODE>SELECT_TYPE_ARG234</CODE>, and <CODE>SELECT_TYPE_ARG5</CODE> respectively. <CODE>SELECT_TYPE_ARG1</CODE> defaults to <samp>int</samp>, <CODE>SELECT_TYPE_ARG234</CODE> defaults to <samp>int *</samp>, and <CODE>SELECT_TYPE_ARG5</CODE> defaults to <samp>struct timeval *</samp>. </synopsis> </macro> <macro id="AC_FUNC_SETPGRP"> <prototype> </prototype> <synopsis> If <CODE>setpgrp</CODE> takes no argument (the POSIX.1 version), define <CODE>SETPGRP_VOID</CODE>. Otherwise, it is the BSD version, which takes two process ID as arguments. This macro does not check whether <CODE>setpgrp</CODE> exists at all; if you need to work in that situation, first call <CODE>AC_CHECK_FUNC</CODE> for <CODE>setpgrp</CODE>. </synopsis> </macro> <macro id="AC_FUNC_SETVBUF_REVERSED"> <prototype> </prototype> <synopsis> If <CODE>setvbuf</CODE> takes the buffering type as its second argument and the buffer pointer as the third, instead of the other way around, define <CODE>SETVBUF_REVERSED</CODE>. This is the case on System V before release 3. </synopsis> </macro> <macro id="AC_FUNC_STRCOLL"> <prototype> </prototype> <synopsis> If the <CODE>strcoll</CODE> function exists and works correctly, define <CODE>HAVE_STRCOLL</CODE>. This does a bit more than <samp>AC_CHECK_FUNCS(strcoll)</samp>, because some systems have incorrect definitions of <CODE>strcoll</CODE>, which should not be used. </synopsis> </macro> <macro id="AC_FUNC_STRFTIME"> <prototype> </prototype> <synopsis> Check for <CODE>strftime</CODE> in the <TT>intl</TT> library, for SCO UNIX. Then, if <CODE>strftime</CODE> is available, define <CODE>HAVE_STRFTIME</CODE>. </synopsis> </macro> <macro id="AC_FUNC_UTIME_NULL"> <prototype> </prototype> <synopsis> If <samp>utime(<VAR>file</VAR>, NULL)</samp> sets <VAR>file</VAR>'s timestamp to the present, define <CODE>HAVE_UTIME_NULL</CODE>. </synopsis> </macro> <macro id="AC_FUNC_VFORK"> <prototype> </prototype> <synopsis> If <TT>vfork.h</TT> is found, define <CODE>HAVE_VFORK_H</CODE>. If a working <CODE>vfork</CODE> is not found, define <CODE>vfork</CODE> to be <CODE>fork</CODE>. This macro checks for several known errors in implementations of <CODE>vfork</CODE> and considers the system to not have a working <CODE>vfork</CODE> if it detects any of them. It is not considered to be an implementation error if a child's invocation of <CODE>signal</CODE> modifies the parent's signal handler, since child processes rarely change their signal handlers. </synopsis> </macro> <macro id="AC_FUNC_VPRINTF"> <prototype> </prototype> <synopsis> If <CODE>vprintf</CODE> is found, define <CODE>HAVE_VPRINTF</CODE>. Otherwise, if <CODE>_doprnt</CODE> is found, define <CODE>HAVE_DOPRNT</CODE>. (If <CODE>vprintf</CODE> is available, you may assume that <CODE>vfprintf</CODE> and <CODE>vsprintf</CODE> are also available.) </synopsis> </macro> <macro id="AC_FUNC_WAIT3"> <prototype> </prototype> <synopsis> If <CODE>wait3</CODE> is found and fills in the contents of its third argument (a <samp>struct rusage *</samp>), which HP-UX does not do, define <CODE>HAVE_WAIT3</CODE>. </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 <VAR>function</VAR> is available, run shell commands <VAR>action-if-found</VAR>, otherwise <VAR>action-if-not-found</VAR>. If you just want to define a symbol if the function is available, consider using <CODE>AC_CHECK_FUNCS</CODE> instead. This macro checks for functions with C linkage even when <CODE>AC_LANG_CPLUSPLUS</CODE> has been called, since C++ is more standardized than C is. (Language Choice, for more information about selecting the language for checks.) </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 given <VAR>function</VAR> in the whitespace-separated argument list that is available, define <CODE>HAVE_<VAR>function</VAR></CODE> (in all capitals). If <VAR>action-if-found</VAR> is given, it is additional shell code to execute when one of the functions is found. You can give it a value of <samp>break</samp> to break out of the loop on the first match. If <VAR>action-if-not-found</VAR> is given, it is executed when one of the functions is not found. </synopsis> </macro> <macro id="AC_REPLACE_FUNCS"> <prototype> <parameter content="function..."/> </prototype> <synopsis> Like calling <CODE>AC_CHECK_FUNCS</CODE> using an <VAR>action-if-not-found</VAR> that adds <samp><VAR>function</VAR>.o</samp> to the value of the output variable <CODE>LIBOBJS</CODE>. You can declare a function for which your replacement version is used by enclosing the prototype in <samp>#ifndef HAVE_<VAR>function</VAR></samp>. 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_DECL_SYS_SIGLIST"> <prototype> </prototype> <synopsis> Define <CODE>SYS_SIGLIST_DECLARED</CODE> if the variable <CODE>sys_siglist</CODE> is declared in a system header file, either <TT>signal.h</TT> or <TT>unistd.h</TT>. </synopsis> </macro> <macro id="AC_DIR_HEADER"> <prototype> </prototype> <synopsis> Like calling <CODE>AC_HEADER_DIRENT</CODE> and <CODE>AC_FUNC_CLOSEDIR_VOID</CODE>, but defines a different set of C preprocessor macros to indicate which header file is found. This macro and the names it defines are considered obsolete. The names it defines are:</P><P> @table @file <LI> dirent.h <CODE>DIRENT</CODE> <LI> sys/ndir.h <CODE>SYSNDIR</CODE> <LI> sys/dir.h <CODE>SYSDIR</CODE> <LI> ndir.h <CODE>NDIR</CODE> </DL></P><P> In addition, if the <CODE>closedir</CODE> function does not return a meaningful value, define <CODE>VOID_CLOSEDIR</CODE>. </synopsis> </macro> <macro id="AC_HEADER_DIRENT"> <prototype> </prototype> <synopsis> Check for the following header files, and for the first one that is found and defines <samp>DIR</samp>, define the listed C preprocessor macro:</P><P> @table @file <LI> dirent.h <CODE>HAVE_DIRENT_H</CODE> <LI> sys/ndir.h <CODE>HAVE_SYS_NDIR_H</CODE> <LI> sys/dir.h <CODE>HAVE_SYS_DIR_H</CODE> <LI> ndir.h <CODE>HAVE_NDIR_H</CODE> </DL></P><P> The directory library declarations in the source code should look something like the following:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group #if HAVE_DIRENT_H # include <dirent.h> # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include <sys/ndir.h> # endif # if HAVE_SYS_DIR_H # include <sys/dir.h> # endif # if HAVE_NDIR_H # include <ndir.h> # endif #endif @end group </pre></td></tr></table></P><P> Using the above declarations, the program would declare variables to be type <CODE>struct dirent</CODE>, not <CODE>struct direct</CODE>, and would access the length of a directory entry name by passing a pointer to a <CODE>struct dirent</CODE> to the <CODE>NAMLEN</CODE> macro.</P><P> This macro also checks for the SCO Xenix <TT>dir</TT> and <TT>x</TT> libraries. </synopsis> </macro> <macro id="AC_HEADER_MAJOR"> <prototype> </prototype> <synopsis> If <TT>sys/types.h</TT> does not define <CODE>major</CODE>, <CODE>minor</CODE>, and <CODE>makedev</CODE>, but <TT>sys/mkdev.h</TT> does, define <CODE>MAJOR_IN_MKDEV</CODE>; otherwise, if <TT>sys/sysmacros.h</TT> does, define <CODE>MAJOR_IN_SYSMACROS</CODE>. </synopsis> </macro> <macro id="AC_HEADER_STDC"> <prototype> </prototype> <synopsis> Define <CODE>STDC_HEADERS</CODE> if the system has ANSI C header files. Specifically, this macro checks for <TT>stdlib.h</TT>, <TT>stdarg.h</TT>, <TT>string.h</TT>, and <TT>float.h</TT>; if the system has those, it probably has the rest of the ANSI C header files. This macro also checks whether <TT>string.h</TT> declares <CODE>memchr</CODE> (and thus presumably the other <CODE>mem</CODE> functions), whether <TT>stdlib.h</TT> declare <CODE>free</CODE> (and thus presumably <CODE>malloc</CODE> and other related functions), and whether the <TT>ctype.h</TT> macros work on characters with the high bit set, as ANSI C requires.</P><P> Use <CODE>STDC_HEADERS</CODE> instead of <CODE>__STDC__</CODE> to determine whether the system has ANSI-compliant header files (and probably C library functions) because many systems that have GCC do not have ANSI C header files.</P><P> On systems without ANSI C 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 systems contain a mix of functions ANSI and BSD; some are mostly ANSI but lack <samp>memmove</samp>; some define the BSD functions as macros in <TT>string.h</TT> or <TT>strings.h</TT>; some have only the BSD functions but <TT>string.h</TT>; some declare the memory functions in <TT>memory.h</TT>, some in <TT>string.h</TT>; etc. It is probably sufficient to check for one string function and one memory function; if the library has the ANSI versions of those then it probably has most of the others. If you put the following in <TT>configure.in</TT>:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_HEADER_STDC AC_CHECK_FUNCS(strchr memcpy) </pre></td></tr></table></P><P> then, in your code, you can put declarations like this:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group #if STDC_HEADERS # include <string.h> #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 </pre></td></tr></table></P><P> If you use a function like <CODE>memchr</CODE>, <CODE>memset</CODE>, <CODE>strtok</CODE>, or <CODE>strspn</CODE>, which have no BSD equivalent, then macros won't suffice; 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 <CODE>memchr</CODE> for example, put it in <TT>memchr.c</TT> and use <samp>AC_REPLACE_FUNCS(memchr)</samp>. </synopsis> </macro> <macro id="AC_HEADER_SYS_WAIT"> <prototype> </prototype> <synopsis> If <TT>sys/wait.h</TT> exists and is compatible with POSIX.1, define <CODE>HAVE_SYS_WAIT_H</CODE>. Incompatibility can occur if <TT>sys/wait.h</TT> does not exist, or if it uses the old BSD <CODE>union wait</CODE> instead of <CODE>int</CODE> to store a status value. If <TT>sys/wait.h</TT> is not POSIX.1 compatible, then instead of including it, define the POSIX.1 macros with their usual interpretations. Here is an example:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group #include <sys/types.h> #if HAVE_SYS_WAIT_H # include <sys/wait.h> #endif #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif @end group </pre></td></tr></table> </synopsis> </macro> <macro id="AC_MEMORY_H"> <prototype> </prototype> <synopsis> Define <CODE>NEED_MEMORY_H</CODE> if <CODE>memcpy</CODE>, <CODE>memcmp</CODE>, etc. are not declared in <TT>string.h</TT> and <TT>memory.h</TT> exists. This macro is obsolete; instead, use <CODE>AC_CHECK_HEADERS(memory.h)</CODE>. See the example for <CODE>AC_HEADER_STDC</CODE>. </synopsis> </macro> <macro id="AC_UNISTD_H"> <prototype> </prototype> <synopsis> Define <CODE>HAVE_UNISTD_H</CODE> if the system has <TT>unistd.h</TT>. This macro is obsolete; instead, use <samp>AC_CHECK_HEADERS(unistd.h)</samp>.</P><P> The way to check if the system supports POSIX.1 is:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group #if HAVE_UNISTD_H # include <sys/types.h> # include <unistd.h> #endif</P><P> #ifdef _POSIX_VERSION /* Code for POSIX.1 systems. */ #endif @end group </pre></td></tr></table></P><P> <CODE>_POSIX_VERSION</CODE> is defined when <TT>unistd.h</TT> is included on POSIX.1 systems. If there is no <TT>unistd.h</TT>, it is definitely not a POSIX.1 system. However, some non-POSIX.1 systems do have <TT>unistd.h</TT>. </synopsis> </macro> <macro id="AC_USG"> <prototype> </prototype> <synopsis> Define <CODE>USG</CODE> if the system does not have <TT>strings.h</TT>, <CODE>rindex</CODE>, <CODE>bzero</CODE>, etc. This implies that it has <TT>string.h</TT>, <CODE>strrchr</CODE>, <CODE>memset</CODE>, etc.</P><P> The symbol <CODE>USG</CODE> is obsolete. Instead of this macro, see the example for <CODE>AC_HEADER_STDC</CODE>. </synopsis> </macro> <macro id="AC_CHECK_HEADER"> <prototype> <parameter content="header-file"/> <parameter content="[action-if-found ["/> <parameter content="action-if-not-found]]"/> </prototype> <synopsis> If the system header file <VAR>header-file</VAR> exists, execute shell commands <VAR>action-if-found</VAR>, otherwise execute <VAR>action-if-not-found</VAR>. If you just want to define a symbol if the header file is available, consider using <CODE>AC_CHECK_HEADERS</CODE> instead. </synopsis> </macro> <macro id="AC_CHECK_HEADERS"> <prototype> <parameter content="header-file... ["/> <parameter content="action-if-found ["/> <parameter content="action-if-not-found]]"/> </prototype> <synopsis> For each given system header file <VAR>header-file</VAR> in the whitespace-separated argument list that exists, define <CODE>HAVE_<VAR>header-file</VAR></CODE> (in all capitals). If <VAR>action-if-found</VAR> is given, it is additional shell code to execute when one of the header files is found. You can give it a value of <samp>break</samp> to break out of the loop on the first match. If <VAR>action-if-not-found</VAR> is given, it is executed when one of the header files is not found. </synopsis> </macro> <macro id="AC_HEADER_STAT"> <prototype> </prototype> <synopsis> If the macros <CODE>S_ISDIR</CODE>, <CODE>S_ISREG</CODE> et al. defined in <TT>sys/stat.h</TT> do not work properly (returning false positives), define <CODE>STAT_MACROS_BROKEN</CODE>. This is the case on Tektronix UTekV, Amdahl UTS and Motorola System V/88. </synopsis> </macro> <macro id="AC_HEADER_TIME"> <prototype> </prototype> <synopsis> If a program may include both <TT>time.h</TT> and <TT>sys/time.h</TT>, define <CODE>TIME_WITH_SYS_TIME</CODE>. On some older systems, <TT>sys/time.h</TT> includes <TT>time.h</TT>, but <TT>time.h</TT> is not protected against multiple inclusion, so programs should not explicitly include both files. This macro is useful in programs that use, for example, <CODE>struct timeval</CODE> or <CODE>struct timezone</CODE> as well as <CODE>struct tm</CODE>. It is best used in conjunction with <CODE>HAVE_SYS_TIME_H</CODE>, which can be checked for using <CODE>AC_CHECK_HEADERS(sys/time.h)</CODE>.</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group #if TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h> #else # if HAVE_SYS_TIME_H # include <sys/time.h> # else # include <time.h> # endif #endif @end group </pre></td></tr></table> </synopsis> </macro> <macro id="AC_STRUCT_ST_BLKSIZE"> <prototype> </prototype> <synopsis> If <CODE>struct stat</CODE> contains an <CODE>st_blksize</CODE> member, define <CODE>HAVE_ST_BLKSIZE</CODE>. </synopsis> </macro> <macro id="AC_STRUCT_ST_BLOCKS"> <prototype> </prototype> <synopsis> If <CODE>struct stat</CODE> contains an <CODE>st_blocks</CODE> member, define <CODE>HAVE_ST_BLOCKS</CODE>. Otherwise, add <samp>fileblocks.o</samp> to the output variable <CODE>LIBOBJS</CODE>. </synopsis> </macro> <macro id="AC_STRUCT_ST_RDEV"> <prototype> </prototype> <synopsis> If <CODE>struct stat</CODE> contains an <CODE>st_rdev</CODE> member, define <CODE>HAVE_ST_RDEV</CODE>. </synopsis> </macro> <macro id="AC_STRUCT_TM"> <prototype> </prototype> <synopsis> If <TT>time.h</TT> does not define <CODE>struct tm</CODE>, define <CODE>TM_IN_SYS_TIME</CODE>, which means that including <TT>sys/time.h</TT> had better define <CODE>struct tm</CODE>. </synopsis> </macro> <macro id="AC_STRUCT_TIMEZONE"> <prototype> </prototype> <synopsis> Figure out how to get the current timezone. If <CODE>struct tm</CODE> has a <CODE>tm_zone</CODE> member, define <CODE>HAVE_TM_ZONE</CODE>. Otherwise, if the external array <CODE>tzname</CODE> is found, define <CODE>HAVE_TZNAME</CODE>. </synopsis> </macro> <macro id="AC_TYPE_GETGROUPS"> <prototype> </prototype> <synopsis> Define <CODE>GETGROUPS_T</CODE> to be whichever of <CODE>gid_t</CODE> or <CODE>int</CODE> is the base type of the array argument to <CODE>getgroups</CODE>. </synopsis> </macro> <macro id="AC_TYPE_MODE_T"> <prototype> </prototype> <synopsis> If <CODE>mode_t</CODE> is not defined, define <CODE>mode_t</CODE> to be <CODE>int</CODE>. </synopsis> </macro> <macro id="AC_TYPE_OFF_T"> <prototype> </prototype> <synopsis> If <CODE>off_t</CODE> is not defined, define <CODE>off_t</CODE> to be <CODE>long</CODE>. </synopsis> </macro> <macro id="AC_TYPE_PID_T"> <prototype> </prototype> <synopsis> If <CODE>pid_t</CODE> is not defined, define <CODE>pid_t</CODE> to be <CODE>int</CODE>. </synopsis> </macro> <macro id="AC_TYPE_SIGNAL"> <prototype> </prototype> <synopsis> If <TT>signal.h</TT> declares <CODE>signal</CODE> as returning a pointer to a function returning <CODE>void</CODE>, define <CODE>RETSIGTYPE</CODE> to be <CODE>void</CODE>; otherwise, define it to be <CODE>int</CODE>.</P><P> Define signal handlers as returning type <CODE>RETSIGTYPE</CODE>:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @group RETSIGTYPE hup_handler () <small>...</small> @ @end group </pre></td></tr></table> </synopsis> </macro> <macro id="AC_TYPE_SIZE_T"> <prototype> </prototype> <synopsis> If <CODE>size_t</CODE> is not defined, define <CODE>size_t</CODE> to be <CODE>unsigned</CODE>. </synopsis> </macro> <macro id="AC_TYPE_UID_T"> <prototype> </prototype> <synopsis> If <CODE>uid_t</CODE> is not defined, define <CODE>uid_t</CODE> to be <CODE>int</CODE> and <CODE>gid_t</CODE> to be <CODE>int</CODE>. </synopsis> </macro> <macro id="AC_CHECK_TYPE"> <prototype> <parameter content="type"/> <parameter content="default"/> </prototype> <synopsis> If the type <VAR>type</VAR> is not defined in <TT>sys/types.h</TT>, or <TT>stdlib.h</TT> or <TT>stddef.h</TT> if they exist, define it to be the C (or C++) builtin type <VAR>default</VAR>; e.g., <samp>short</samp> or <samp>unsigned</samp>. </synopsis> </macro> <macro id="AC_C_BIGENDIAN"> <prototype> </prototype> <synopsis> If words are stored with the most significant byte first (like Motorola and SPARC, but not Intel and VAX, CPUs), define <CODE>WORDS_BIGENDIAN</CODE>. </synopsis> </macro> <macro id="AC_C_CONST"> <prototype> </prototype> <synopsis> If the C compiler does not fully support the keyword <CODE>const</CODE>, define <CODE>const</CODE> to be empty. Some C compilers that do not define <CODE>__STDC__</CODE> do support <CODE>const</CODE>; some compilers that define <CODE>__STDC__</CODE> do not completely support <CODE>const</CODE>. Programs can simply use <CODE>const</CODE> as if every C compiler supported it; for those that don't, the <TT>Makefile</TT> or configuration header file will define it as empty. </synopsis> </macro> <macro id="AC_C_INLINE"> <prototype> </prototype> <synopsis> If the C compiler supports the keyword <CODE>inline</CODE>, do nothing. Otherwise define <CODE>inline</CODE> to <CODE>__inline__</CODE> or <CODE>__inline</CODE> if it accepts one of those, otherwise define <CODE>inline</CODE> to be empty. </synopsis> </macro> <macro id="AC_C_CHAR_UNSIGNED"> <prototype> </prototype> <synopsis> If the C type <CODE>char</CODE> is unsigned, define <CODE>__CHAR_UNSIGNED__</CODE>, unless the C compiler predefines it. </synopsis> </macro> <macro id="AC_C_LONG_DOUBLE"> <prototype> </prototype> <synopsis> If the C compiler supports the <CODE>long double</CODE> type, define <CODE>HAVE_LONG_DOUBLE</CODE>. Some C compilers that do not define <CODE>__STDC__</CODE> do support the <CODE>long double</CODE> type; some compilers that define <CODE>__STDC__</CODE> do not support <CODE>long double</CODE>. </synopsis> </macro> <macro id="AC_C_STRINGIZE"> <prototype> </prototype> <synopsis> If the C preprocessor supports the stringizing operator, define <CODE>HAVE_STRINGIZE</CODE>. The stringizing operator is <samp>#</samp> and is found in macros such as this:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> #define x(y) #y </pre></td></tr></table> </synopsis> </macro> <macro id="AC_CHECK_SIZEOF"> <prototype> <parameter content="type ["/> <parameter content="cross-size]"/> </prototype> <synopsis> Define <CODE>SIZEOF_<VAR>uctype</VAR></CODE> to be the size in bytes of the C (or C++) builtin type <VAR>type</VAR>, e.g. <samp>int</samp> or <samp>char *</samp>. If <samp>type</samp> is unknown to the compiler, it gets a size of 0. <VAR>uctype</VAR> is <VAR>type</VAR>, with lowercase converted to uppercase, spaces changed to underscores, and asterisks changed to <samp>P</samp>. If cross-compiling, the value <VAR>cross-size</VAR> is used if given, otherwise <CODE>configure</CODE> exits with an error message.</P><P> For example, the call <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_CHECK_SIZEOF(int *) </pre></td></tr></table> defines <CODE>SIZEOF_INT_P</CODE> to be 8 on DEC Alpha AXP systems. </synopsis> </macro> <macro id="AC_INT_16_BITS"> <prototype> </prototype> <synopsis> If the C type <CODE>int</CODE> is 16 bits wide, define <CODE>INT_16_BITS</CODE>. This macro is obsolete; it is more general to use <samp>AC_CHECK_SIZEOF(int)</samp> instead. </synopsis> </macro> <macro id="AC_LONG_64_BITS"> <prototype> </prototype> <synopsis> If the C type <CODE>long int</CODE> is 64 bits wide, define <CODE>LONG_64_BITS</CODE>. This macro is obsolete; it is more general to use <samp>AC_CHECK_SIZEOF(long)</samp> instead. </synopsis> </macro> <macro id="AC_F77_LIBRARY_LDFLAGS"> <prototype> </prototype> <synopsis> Determine the linker flags (e.g. <samp>-L</samp> and <samp>-l</samp>) for the Fortran 77 intrinsic and run-time libraries that are required to successfully link a Fortran 77 program or shared library. The output variable <CODE>FLIBS</CODE> is set to these flags.</P><P> This macro is intended to be used in those situations when it is necessary to mix, e.g. C++ and Fortran 77 source code into a single program or shared library (Mixing Fortran 77 With C and C++, , , automake, GNU Automake).</P><P> For example, if object files from a C++ and Fortran 77 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.).</P><P> However, the Fortran 77 intrinsic and run-time 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, the macro <CODE>AC_F77_LIBRARY_LDFLAGS</CODE> was created to determine these Fortran 77 libraries. </synopsis> </macro> <macro id="AC_CYGWIN"> <prototype> </prototype> <synopsis> Checks for the Cygwin environment. If present, sets shell variable <CODE>CYGWIN</CODE> to <samp>yes</samp>. If not present, sets <CODE>CYGWIN</CODE> to the empty string. </synopsis> </macro> <macro id="AC_EXEEXT"> <prototype> </prototype> <synopsis> Defines substitute variable <CODE>EXEEXT</CODE> based on the output of the compiler, after .c, .o, and .obj files have been excluded. Typically set to empty string if Unix, <samp>.exe</samp> or <samp>.EXE</samp> if Win32. </synopsis> </macro> <macro id="AC_OBJEXT"> <prototype> </prototype> <synopsis> Defines substitute variable <CODE>OBJEXT</CODE> based on the output of the compiler, after .c files have been excluded. Typically set to <samp>.o</samp> if Unix, <samp>.obj</samp> if Win32. </synopsis> </macro> <macro id="AC_MINGW32"> <prototype> </prototype> <synopsis> Checks for the MingW32 compiler environment. If present, sets shell variable <CODE>MINGW32</CODE> to <samp>yes</samp>. If not present, sets <CODE>MINGW32</CODE> to the empty string. </synopsis> </macro> <macro id="AC_PATH_X"> <prototype> </prototype> <synopsis> Try to locate the X Window System include files and libraries. If the user gave the command line options <samp>--x-includes=<VAR>dir</VAR></samp> and <samp>--x-libraries=<VAR>dir</VAR></samp>, use those directories. If either or both were not given, get the missing values by running <CODE>xmkmf</CODE> on a trivial <TT>Imakefile</TT> and examining the <TT>Makefile</TT> that it produces. If that fails (such as if <CODE>xmkmf</CODE> is not present), look for them in several directories where they often reside. If either method is successful, set the shell variables <CODE>x_includes</CODE> and <CODE>x_libraries</CODE> to their locations, unless they are in directories the compiler searches by default.</P><P> If both methods fail, or the user gave the command line option <samp>--without-x</samp>, set the shell variable <CODE>no_x</CODE> to <samp>yes</samp>; otherwise set it to the empty string. </synopsis> </macro> <macro id="AC_PATH_XTRA"> <prototype> </prototype> <synopsis> An enhanced version of <CODE>AC_PATH_X</CODE>. It adds the C compiler flags that X needs to output variable <CODE>X_CFLAGS</CODE>, and the X linker flags to <CODE>X_LIBS</CODE>. If X is not available, adds <samp>-DX_DISPLAY_MISSING</samp> to <CODE>X_CFLAGS</CODE>.</P><P> 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 <CODE>X_EXTRA_LIBS</CODE>. And it checks for special X11R6 libraries that need to be linked with before <samp>-lX11</samp>, and adds any found to the output variable <CODE>X_PRE_LIBS</CODE>.</P><P> </synopsis> </macro> <macro id="AC_SYS_INTERPRETER"> <prototype> </prototype> <synopsis> Check whether the system supports starting scripts with a line of the form <samp>#! /bin/csh</samp> to select the interpreter to use for the script. After running this macro, shell code in <CODE>configure.in</CODE> can check the shell variable <CODE>interpval</CODE>; it will be set to <samp>yes</samp> if the system supports <samp>#!</samp>, <samp>no</samp> if not. </synopsis> </macro> <macro id="AC_SYS_LONG_FILE_NAMES"> <prototype> </prototype> <synopsis> If the system supports file names longer than 14 characters, define <CODE>HAVE_LONG_FILE_NAMES</CODE>. </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 <CODE>HAVE_RESTARTABLE_SYSCALLS</CODE>. </synopsis> </macro> <macro id="AC_AIX"> <prototype> </prototype> <synopsis> If on AIX, define <CODE>_ALL_SOURCE</CODE>. Allows the use of some BSD functions. Should be called before any macros that run the C compiler. </synopsis> </macro> <macro id="AC_DYNIX_SEQ"> <prototype> </prototype> <synopsis> If on Dynix/PTX (Sequent UNIX), add <samp>-lseq</samp> to output variable <CODE>LIBS</CODE>. This macro is obsolete; instead, use <CODE>AC_FUNC_GETMNTENT</CODE>. </synopsis> </macro> <macro id="AC_IRIX_SUN"> <prototype> </prototype> <synopsis> If on IRIX (Silicon Graphics UNIX), add <samp>-lsun</samp> to output variable <CODE>LIBS</CODE>. This macro is obsolete. If you were using it to get <CODE>getmntent</CODE>, use <CODE>AC_FUNC_GETMNTENT</CODE> instead. If you used it for the NIS versions of the password and group functions, use <samp>AC_CHECK_LIB(sun, getpwnam)</samp>. </synopsis> </macro> <macro id="AC_ISC_POSIX"> <prototype> </prototype> <synopsis> If on a POSIXized ISC UNIX, define <CODE>_POSIX_SOURCE</CODE> and add <samp>-posix</samp> (for the GNU C compiler) or <samp>-Xp</samp> (for other C compilers) to output variable <CODE>CC</CODE>. This allows the use of POSIX facilities. Must be called after <CODE>AC_PROG_CC</CODE> and before any other macros that run the C compiler. </synopsis> </macro> <macro id="AC_MINIX"> <prototype> </prototype> <synopsis> If on Minix, define <CODE>_MINIX</CODE> and <CODE>_POSIX_SOURCE</CODE> and define <CODE>_POSIX_1_SOURCE</CODE> to be 2. This allows the use of POSIX facilities. Should be called before any macros that run the C compiler. </synopsis> </macro> <macro id="AC_SCO_INTL"> <prototype> </prototype> <synopsis> If on SCO UNIX, add <samp>-lintl</samp> to output variable <CODE>LIBS</CODE>. This macro is obsolete; instead, use <CODE>AC_FUNC_STRFTIME</CODE>. </synopsis> </macro> <macro id="AC_XENIX_DIR"> <prototype> </prototype> <synopsis> If on Xenix, add <samp>-lx</samp> to output variable <CODE>LIBS</CODE>. Also, if <TT>dirent.h</TT> is being used, add <samp>-ldir</samp> to <CODE>LIBS</CODE>. This macro is obsolete; use <CODE>AC_HEADER_DIRENT</CODE> instead. </synopsis> </macro> <macro id="AC_TRY_CPP"> <prototype> <parameter content="includes"/> <parameter content="[action-if-true ["/> <parameter content="action-if-false]]"/> </prototype> <synopsis> <VAR>includes</VAR> is C or C++ <CODE>#include</CODE> statements and declarations, on which shell variable, backquote, and backslash substitutions are performed. (Actually, it can be any C program, but other statements are probably not useful.) If the preprocessor produces no error messages while processing it, run shell commands <VAR>action-if-true</VAR>. Otherwise run shell commands <VAR>action-if-false</VAR>.</P><P> This macro uses <CODE>CPPFLAGS</CODE>, but not <CODE>CFLAGS</CODE>, because <samp>-g</samp>, <samp>-O</samp>, etc. are not valid options to many C preprocessors. </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 <VAR>header-file</VAR> matches the <CODE>egrep</CODE> regular expression <VAR>pattern</VAR>, execute shell commands <VAR>action-if-found</VAR>, otherwise execute <VAR>action-if-not-found</VAR>. </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> <VAR>program</VAR> is the text of a C or C++ program, on which shell variable, backquote, and backslash substitutions are performed. If the output of running the preprocessor on <VAR>program</VAR> matches the <CODE>egrep</CODE> regular expression <VAR>pattern</VAR>, execute shell commands <VAR>action-if-found</VAR>, otherwise execute <VAR>action-if-not-found</VAR>.</P><P> This macro calls <CODE>AC_PROG_CPP</CODE> or <CODE>AC_PROG_CXXCPP</CODE> (depending on which language is current, Language Choice), if it hasn't been called already. </synopsis> </macro> <macro id="AC_TRY_COMPILE"> <prototype> <parameter content="includes"/> <parameter content="function-body"/> <parameter content="[action-if-found ["/> <parameter content="action-if-not-found]]"/> </prototype> <synopsis> Create a C, C++ or Fortran 77 test program (depending on which language is current, Language Choice), to see whether a function whose body consists of <VAR>function-body</VAR> can be compiled.</P><P> For C and C++, <VAR>includes</VAR> is any <CODE>#include</CODE> statements needed by the code in <VAR>function-body</VAR> (<VAR>includes</VAR> will be ignored if the currently selected language is Fortran 77). This macro also uses <CODE>CFLAGS</CODE> or <CODE>CXXFLAGS</CODE> if either C or C++ is the currently selected language, as well as <CODE>CPPFLAGS</CODE>, when compiling. If Fortran 77 is the currently selected language then <CODE>FFLAGS</CODE> will be used when compiling.</P><P> If the file compiles successfully, run shell commands <VAR>action-if-found</VAR>, otherwise run <VAR>action-if-not-found</VAR>.</P><P> This macro does not try to link; use <CODE>AC_TRY_LINK</CODE> if you need to do that (Examining Libraries). </synopsis> </macro> <macro id="AC_TRY_LINK"> <prototype> <parameter content="includes"/> <parameter content="function-body"/> <parameter content="[action-if-found ["/> <parameter content="action-if-not-found]]"/> </prototype> <synopsis> Depending on the current language (Language Choice), create a test program to see whether a function whose body consists of <VAR>function-body</VAR> can be compiled and linked.</P><P> For C and C++, <VAR>includes</VAR> is any <CODE>#include</CODE> statements needed by the code in <VAR>function-body</VAR> (<VAR>includes</VAR> will be ignored if the currently selected language is Fortran 77). This macro also uses <CODE>CFLAGS</CODE> or <CODE>CXXFLAGS</CODE> if either C or C++ is the currently selected language, as well as <CODE>CPPFLAGS</CODE>, when compiling. If Fortran 77 is the currently selected language then <CODE>FFLAGS</CODE> will be used when compiling. However, both <CODE>LDFLAGS</CODE> and <CODE>LIBS</CODE> will be used during linking in all cases.</P><P> If the file compiles and links successfully, run shell commands <VAR>action-if-found</VAR>, otherwise run <VAR>action-if-not-found</VAR>. </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> Depending on the current language (Language Choice), create a test program to see whether a program whose body consists of a prototype of and a call to <VAR>function</VAR> can be compiled and linked.</P><P> If the file compiles and links successfully, run shell commands <VAR>action-if-found</VAR>, otherwise run <VAR>action-if-not-found</VAR>. </synopsis> </macro> <macro id="AC_COMPILE_CHECK"> <prototype> <parameter content="echo-text"/> <parameter content="includes"/> <parameter content="function-body"/> <parameter content="action-if-found ["/> <parameter content="action-if-not-found]"/> </prototype> <synopsis> This is an obsolete version of <CODE>AC_TRY_LINK</CODE>, with the addition that it prints <samp>checking for <VAR>echo-text</VAR></samp> to the standard output first, if <VAR>echo-text</VAR> is non-empty. Use <CODE>AC_MSG_CHECKING</CODE> and <CODE>AC_MSG_RESULT</CODE> instead to print messages (Printing Messages). </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> <VAR>program</VAR> is the text of a C program, on which shell variable and backquote substitutions are performed. If it compiles and links successfully and returns an exit status of 0 when executed, run shell commands <VAR>action-if-true</VAR>. Otherwise run shell commands <VAR>action-if-false</VAR>; the exit status of the program is available in the shell variable <samp>$?</samp>. This macro uses <CODE>CFLAGS</CODE> or <CODE>CXXFLAGS</CODE>, <CODE>CPPFLAGS</CODE>, <CODE>LDFLAGS</CODE>, and <CODE>LIBS</CODE> when compiling.</P><P> If the C compiler being used does not produce executables that run on the system where <CODE>configure</CODE> is being run, then the test program is not run. If the optional shell commands <VAR>action-if-cross-compiling</VAR> are given, they are run instead. Otherwise, <CODE>configure</CODE> prints an error message and exits. </synopsis> </macro> <macro id="AC_C_CROSS"> <prototype> </prototype> <synopsis> This macro is obsolete; it does nothing. </synopsis> </macro> <macro id="AC_LANG_C"> <prototype> </prototype> <synopsis> Do compilation tests using <CODE>CC</CODE> and <CODE>CPP</CODE> and use extension <TT>.c</TT> for test programs. Set the shell variable <CODE>cross_compiling</CODE> to the value computed by <CODE>AC_PROG_CC</CODE> if it has been run, empty otherwise. </synopsis> </macro> <macro id="AC_LANG_CPLUSPLUS"> <prototype> </prototype> <synopsis> Do compilation tests using <CODE>CXX</CODE> and <CODE>CXXCPP</CODE> and use extension <TT>.C</TT> for test programs. Set the shell variable <CODE>cross_compiling</CODE> to the value computed by <CODE>AC_PROG_CXX</CODE> if it has been run, empty otherwise. </synopsis> </macro> <macro id="AC_LANG_FORTRAN77"> <prototype> </prototype> <synopsis> Do compilation tests using <CODE>F77</CODE> and use extension <TT>.f</TT> for test programs. Set the shell variable <CODE>cross_compiling</CODE> to the value computed by <CODE>AC_PROG_F77</CODE> if it has been run, empty otherwise. </synopsis> </macro> <macro id="AC_LANG_SAVE"> <prototype> </prototype> <synopsis> Remember the current language (as set by <CODE>AC_LANG_C</CODE>, <CODE>AC_LANG_CPLUSPLUS</CODE> or <CODE>AC_LANG_FORTRAN77</CODE>) on a stack. Does not change which language is current. Use this macro and <CODE>AC_LANG_RESTORE</CODE> in macros that need to temporarily switch to a particular language. </synopsis> </macro> <macro id="AC_LANG_RESTORE"> <prototype> </prototype> <synopsis> Select the language that is saved on the top of the stack, as set by <CODE>AC_LANG_SAVE</CODE>, and remove it from the stack. This macro is equivalent to either <CODE>AC_LANG_C</CODE>, <CODE>AC_LANG_CPLUSPLUS</CODE> or <CODE>AC_LANG_FORTRAN77</CODE>, whichever had been run most recently when <CODE>AC_LANG_SAVE</CODE> was last called.</P><P> Do not call this macro more times than <CODE>AC_LANG_SAVE</CODE>. </synopsis> </macro> <macro id="AC_REQUIRE_CPP"> <prototype> </prototype> <synopsis> Ensure that whichever preprocessor would currently be used for tests has been found. Calls <CODE>AC_REQUIRE</CODE> (Prerequisite Macros) with an argument of either <CODE>AC_PROG_CPP</CODE> or <CODE>AC_PROG_CXXCPP</CODE>, depending on which language is current. </synopsis> </macro> <macro id="AC_DEFINE"> <prototype> <parameter content="variable ["/> <parameter content="value ["/> <parameter content="description]]"/> </prototype> <synopsis> Define C preprocessor variable <VAR>variable</VAR>. If <VAR>value</VAR> is given, set <VAR>variable</VAR> to that value (verbatim), otherwise set it to 1. <VAR>value</VAR> should not contain literal newlines, and if you are not using <CODE>AC_CONFIG_HEADER</CODE> it should not contain any <samp>#</samp> characters, as <CODE>make</CODE> tends to eat them. To use a shell variable (which you need to do in order to define a value containing the <CODE>m4</CODE> quote characters <samp>[</samp> or <samp>]</samp>), use <CODE>AC_DEFINE_UNQUOTED</CODE> instead. <VAR>description</VAR> is only useful if you are using <CODE>AC_CONFIG_HEADER</CODE>. In this case, <VAR>description</VAR> is put into the generated <TT>config.h.in</TT> as the comment before the macro define; the macro need not be mentioned in <TT>acconfig.h</TT>. The following example defines the C preprocessor variable <CODE>EQUATION</CODE> to be the string constant <samp>"$a > $b"</samp>:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_DEFINE(EQUATION, "$a > $b") </pre></td></tr></table> </synopsis> </macro> <macro id="AC_DEFINE_UNQUOTED"> <prototype> <parameter content="variable ["/> <parameter content="value ["/> <parameter content="description]]"/> </prototype> <synopsis> Like <CODE>AC_DEFINE</CODE>, but three shell expansions are performed---once---on <VAR>variable</VAR> and <VAR>value</VAR>: variable expansion (<samp>$</samp>), command substitution (<samp>`</samp>), and backslash escaping (<samp>\</samp>). Single and double quote characters in the value have no special meaning. Use this macro instead of <CODE>AC_DEFINE</CODE> when <VAR>variable</VAR> or <VAR>value</VAR> is a shell variable. Examples:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_DEFINE_UNQUOTED(config_machfile, "$machfile@") AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) AC_DEFINE_UNQUOTED($ac_tr_hdr@) </pre></td></tr></table> </synopsis> </macro> <macro id="AC_SUBST"> <prototype> <parameter content="variable"/> </prototype> <synopsis> Create an output variable from a shell variable. Make <CODE>AC_OUTPUT</CODE> substitute the variable <VAR>variable</VAR> into output files (typically one or more <TT>Makefile</TT>s). This means that <CODE>AC_OUTPUT</CODE> will replace instances of <samp>@@<VAR>variable</VAR>@@</samp> in input files with the value that the shell variable <VAR>variable</VAR> has when <CODE>AC_OUTPUT</CODE> is called. The value of <VAR>variable</VAR> should not contain literal newlines. </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 <CODE>AC_OUTPUT</CODE> insert (without substitutions) the contents of the file named by shell variable <VAR>variable</VAR> into output files. This means that <CODE>AC_OUTPUT</CODE> will replace instances of <samp>@@<VAR>variable</VAR>@@</samp> in output files (such as <TT>Makefile.in</TT>) with the contents of the file that the shell variable <VAR>variable</VAR> names when <CODE>AC_OUTPUT</CODE> is called. Set the variable to <TT>/dev/null</TT> for cases that do not have a file to insert.</P><P> This macro is useful for inserting <TT>Makefile</TT> fragments containing special dependencies or other <CODE>make</CODE> directives for particular host or target types into <TT>Makefile</TT>s. For example, <TT>configure.in</TT> could contain:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_SUBST_FILE(host_frag)dnl host_frag=$srcdir/conf/sun4.mh </pre></td></tr></table></P><P> and then a <TT>Makefile.in</TT> could contain:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> @@host_frag@@ </pre></td></tr></table> </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 <VAR>cache-id</VAR> are available. If the results of the check were in the cache file that was read, and <CODE>configure</CODE> was not given the <samp>--quiet</samp> or <samp>--silent</samp> option, print a message saying that the result was cached; otherwise, run the shell commands <VAR>commands-to-set-it</VAR>. Those commands should have no side effects except for setting the variable <VAR>cache-id</VAR>. In particular, they should not call <CODE>AC_DEFINE</CODE>; the code that follows the call to <CODE>AC_CACHE_VAL</CODE> should do that, based on the cached value. Also, they should not print any messages, for example with <CODE>AC_MSG_CHECKING</CODE>; do that before calling <CODE>AC_CACHE_VAL</CODE>, so the messages are printed regardless of whether the results of the check are retrieved from the cache or determined by running the shell commands. If the shell commands are run to determine the value, the value will be saved in the cache file just before <CODE>configure</CODE> creates its output files. , for how to choose the name of the <VAR>cache-id</VAR> variable. </synopsis> </macro> <macro id="AC_CACHE_CHECK"> <prototype> <parameter content="message"/> <parameter content="cache-id"/> <parameter content="commands"/> </prototype> <synopsis> A wrapper for <CODE>AC_CACHE_VAL</CODE> that takes care of printing the messages. This macro provides a convenient shorthand for the most common way to use these macros. It calls <CODE>AC_MSG_CHECKING</CODE> for <VAR>message</VAR>, then <CODE>AC_CACHE_VAL</CODE> with the <VAR>cache-id</VAR> and <VAR>commands</VAR> arguments, and <CODE>AC_MSG_RESULT</CODE> with <VAR>cache-id</VAR>. </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 <CODE>AC_INIT</CODE>. </synopsis> </macro> <macro id="AC_CACHE_SAVE"> <prototype> </prototype> <synopsis> Flushes all cached values to the cache file. Called automatically from <CODE>AC_OUTPUT</CODE>, but it can be quite useful to call <CODE>AC_CACHE_SAVE</CODE> at key points in configure.in. Doing so checkpoints the cache in case of an early configure script abort. </synopsis> </macro> <macro id="AC_MSG_CHECKING"> <prototype> <parameter content="feature-description"/> </prototype> <synopsis> Notify the user that <CODE>configure</CODE> is checking for a particular feature. This macro prints a message that starts with <samp>checking </samp> and ends with <samp>...</samp> and no newline. It must be followed by a call to <CODE>AC_MSG_RESULT</CODE> to print the result of the check and the newline. The <VAR>feature-description</VAR> should be something like <samp>whether the Fortran compiler accepts C++ comments</samp> or <samp>for c89</samp>.</P><P> This macro prints nothing if <CODE>configure</CODE> is run with the <samp>--quiet</samp> or <samp>--silent</samp> option. </synopsis> </macro> <macro id="AC_MSG_RESULT"> <prototype> <parameter content="result-description"/> </prototype> <synopsis> Notify the user of the results of a check. <VAR>result-description</VAR> is almost always the value of the cache variable for the check, typically <samp>yes</samp>, <samp>no</samp>, or a file name. This macro should follow a call to <CODE>AC_MSG_CHECKING</CODE>, and the <VAR>result-description</VAR> should be the completion of the message printed by the call to <CODE>AC_MSG_CHECKING</CODE>.</P><P> This macro prints nothing if <CODE>configure</CODE> is run with the <samp>--quiet</samp> or <samp>--silent</samp> option. </synopsis> </macro> <macro id="AC_MSG_ERROR"> <prototype> <parameter content="error-description"/> </prototype> <synopsis> Notify the user of an error that prevents <CODE>configure</CODE> from completing. This macro prints an error message on the standard error output and exits <CODE>configure</CODE> with a nonzero status. <VAR>error-description</VAR> should be something like <samp>invalid value $HOME for \$HOME</samp>. </synopsis> </macro> <macro id="AC_MSG_WARN"> <prototype> <parameter content="problem-description"/> </prototype> <synopsis> Notify the <CODE>configure</CODE> user of a possible problem. This macro prints the message on the standard error output; <CODE>configure</CODE> continues running afterward, so macros that call <CODE>AC_MSG_WARN</CODE> should provide a default (back-up) behavior for the situations they warn about. <VAR>problem-description</VAR> should be something like <samp>ln -s seems to make hard links</samp>. </synopsis> </macro> <macro id="AC_CHECKING"> <prototype> <parameter content="feature-description"/> </prototype> <synopsis> This macro is similar to <CODE>AC_MSG_CHECKING</CODE>, except that it prints a newline after the <VAR>feature-description</VAR>. It is useful mainly to print a general description of the overall purpose of a group of feature checks, e.g.,</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_CHECKING(if stack overflow is detectable) </pre></td></tr></table> </synopsis> </macro> <macro id="AC_VERBOSE"> <prototype> <parameter content="result-description"/> </prototype> <synopsis> This macro is similar to <CODE>AC_MSG_RESULT</CODE>, except that it is meant to follow a call to <CODE>AC_CHECKING</CODE> instead of <CODE>AC_MSG_CHECKING</CODE>; it starts the message it prints with a tab. It is considered obsolete. </synopsis> </macro> <macro id="AC_REQUIRE"> <prototype> <parameter content="macro-name"/> </prototype> <synopsis> If the <CODE>m4</CODE> macro <VAR>macro-name</VAR> has not already been called, call it (without any arguments). Make sure to quote <VAR>macro-name</VAR> with square brackets. <VAR>macro-name</VAR> must have been defined using <CODE>AC_DEFUN</CODE> or else contain a call to <CODE>AC_PROVIDE</CODE> to indicate that it has been called. </synopsis> </macro> <macro id="AC_PROVIDE"> <prototype> <parameter content="this-macro-name"/> </prototype> <synopsis> Record the fact that <VAR>this-macro-name</VAR> has been called. <VAR>this-macro-name</VAR> should be the name of the macro that is calling <CODE>AC_PROVIDE</CODE>. An easy way to get it is from the <CODE>m4</CODE> builtin variable <CODE>$0</CODE>, like this:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_PROVIDE([$0]) </pre></td></tr></table> </synopsis> </macro> <macro id="AC_BEFORE"> <prototype> <parameter content="this-macro-name"/> <parameter content="called-macro-name"/> </prototype> <synopsis> Make <CODE>m4</CODE> print a warning message on the standard error output if <VAR>called-macro-name</VAR> has already been called. <VAR>this-macro-name</VAR> should be the name of the macro that is calling <CODE>AC_BEFORE</CODE>. The macro <VAR>called-macro-name</VAR> must have been defined using <CODE>AC_DEFUN</CODE> or else contain a call to <CODE>AC_PROVIDE</CODE> to indicate that it has been called. </synopsis> </macro> <macro id="AC_OBSOLETE"> <prototype> <parameter content="this-macro-name ["/> <parameter content="suggestion]"/> </prototype> <synopsis> Make <CODE>m4</CODE> print a message on the standard error output warning that <VAR>this-macro-name</VAR> is obsolete, and giving the file and line number where it was called. <VAR>this-macro-name</VAR> should be the name of the macro that is calling <CODE>AC_OBSOLETE</CODE>. If <VAR>suggestion</VAR> 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 <VAR>this-macro-name</VAR>. </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. </synopsis> </macro> <macro id="AC_CANONICAL_HOST"> <prototype> </prototype> <synopsis> Perform only the subset of <CODE>AC_CANONICAL_SYSTEM</CODE> relevant to the host type. This is all that is needed for programs that are not part of a compiler toolchain. </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, execute <VAR>cmd</VAR> or print a default error message. </synopsis> </macro> <macro id="AC_LINK_FILES"> <prototype> <parameter content="source..."/> <parameter content="dest..."/> </prototype> <synopsis> Make <CODE>AC_OUTPUT</CODE> link each of the existing files <VAR>source</VAR> to the corresponding link name <VAR>dest</VAR>. Makes a symbolic link if possible, otherwise a hard link. The <VAR>dest</VAR> and <VAR>source</VAR> names should be relative to the top level source or build directory. This macro may be called multiple times.</P><P> For example, this call:</P><P> <TABLE><tr><td>&nbsp;</td><td class=example><pre> AC_LINK_FILES(config/$machine@.h config/$obj_format@.h, host.h object.h) </pre></td></tr></table></P><P> creates in the current directory <TT>host.h</TT>, which is a link to <TT><VAR>srcdir</VAR>/config/$machine@</TT>.h, and <TT>object.h</TT>, which is a link to <TT><VAR>srcdir</VAR>/config/$obj_format@</TT>.h. </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 <CODE>configure</CODE> the option <samp>--with-<VAR>package</VAR></samp> or <samp>--without-<VAR>package</VAR></samp>, run shell commands <VAR>action-if-given</VAR>. If neither option was given, run shell commands <VAR>action-if-not-given</VAR>. The name <VAR>package</VAR> indicates another software package that this program should work with. It should consist only of alphanumeric characters and dashes.</P><P> The option's argument is available to the shell commands <VAR>action-if-given</VAR> in the shell variable <CODE>withval</CODE>, which is actually just the value of the shell variable <CODE>with_<VAR>package</VAR></CODE>, with any <samp>-</samp> characters changed into <samp>_</samp>. You may use that variable instead, if you wish.</P><P> The argument <VAR>help-string</VAR> is a description of the option which looks like this: <TABLE><tr><td>&nbsp;</td><td class=example><pre> --with-readline support fancy command line editing </pre></td></tr></table> <VAR>help-string</VAR> may be more than one line long, if more detail is needed. Just make sure the columns line up in <samp>configure --help</samp>. Avoid tabs in the help string. You'll need to enclose it in <samp>[</samp> and <samp>]</samp> in order to produce the leading spaces. </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 <CODE>AC_ARG_WITH</CODE> that does not support providing a help string. </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 <CODE>configure</CODE> the option <samp>--enable-<VAR>feature</VAR></samp> or <samp>--disable-<VAR>feature</VAR></samp>, run shell commands <VAR>action-if-given</VAR>. If neither option was given, run shell commands <VAR>action-if-not-given</VAR>. The name <VAR>feature</VAR> indicates an optional user-level facility. It should consist only of alphanumeric characters and dashes.</P><P> The option's argument is available to the shell commands <VAR>action-if-given</VAR> in the shell variable <CODE>enableval</CODE>, which is actually just the value of the shell variable <CODE>enable_<VAR>feature</VAR></CODE>, with any <samp>-</samp> characters changed into <samp>_</samp>. You may use that variable instead, if you wish. The <VAR>help-string</VAR> argument is like that of <CODE>AC_ARG_WITH</CODE> (External Software). </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 <CODE>AC_ARG_ENABLE</CODE> that does not support providing a help string. </synopsis> </macro> <macro id="AC_ARG_PROGRAM"> <prototype> </prototype> <synopsis> Place in output variable <CODE>program_transform_name</CODE> a sequence of <CODE>sed</CODE> commands for changing the names of installed programs.</P><P> If any of the options described below are given to <CODE>configure</CODE>, program names are transformed accordingly. Otherwise, if <CODE>AC_CANONICAL_SYSTEM</CODE> has been called and a <samp>--target</samp> value is given that differs from the host type (specified with <samp>--host</samp> or defaulted by <CODE>config.sub</CODE>), the target type followed by a dash is used as a prefix. Otherwise, no program name transformation is done. </synopsis> </macro> </macros>