------------------------------------------------------------------------------
+* Make AC_CHECK_LIB check whether the function is already available
+ before checking for the library. This might involve adding another
+ kind of cache variable to indicate whether a given function needs a
+ given library. The current ac_cv_func_ variables are intended to
+ indicate whether the function is in the default libraries, but
+ actually also take into account whatever value LIBS had when they
+ were checked for.
+
+------------------------------------------------------------------------------
+
* Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX,
Minix, ISC, etc.
(a consistent ANSI C/POSIX.1 environment). Lessons learned.
Advantages to not requiring special external libraries or config
files or programs.
- Mention site files in install.texi.
------------------------------------------------------------------------------
* Make autoconf diagnose giving too few or too many arguments to macros.
+Maybe even use a scheme that supports naming the formals.
------------------------------------------------------------------------------
@defmac AC_CHECK_LIB (@var{library}, @var{function} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]})
@maindex CHECK_LIB
-See whether a test C program can be linked with the library
-@var{library}. @var{function} should be the name of a function that the
-library contains, to force the linker to try to link with the library to
-resolve the name. @var{library} is the base name of the library;
-e.g., to check for @samp{-lmp}, use @samp{mp} as the @var{library}
-argument.
+Try to ensure that C function @var{function} is available by checking
+whether a test C program can be linked with the library @var{library} to
+get the function. @var{library} is the base name of the library; e.g.,
+to check for @samp{-lmp}, use @samp{mp} as the @var{library} argument.
@var{action-if-found} is a list of shell commands to run if the link
-succeeds (which means that the library is present);
-@var{action-if-not-found} is a list of shell commands to run if the link
-fails. If @var{action-if-found} and @var{action-if-not-found} are not
-specified, the default action is to add @samp{-l@var{library}} to
-@code{LIBS} and define @samp{HAVE_LIB@var{library}}.
+with the library succeeds; @var{action-if-not-found} is a list of shell
+commands to run if the link fails. If @var{action-if-found} and
+@var{action-if-not-found} are not specified, the default action is to
+add @samp{-l@var{library}} to @code{LIBS} and define
+@samp{HAVE_LIB@var{library}} (in all capitals).
If linking with @var{library} results in unresolved symbols, which would
be resolved by linking with additional libraries, give those libraries
@maindex CHECK_FUNCS
@cvindex HAVE_@var{function}
For each given @var{function} in the whitespace-separated argument list
-that is available, define @code{HAVE_@var{function}} (in all caps). If
+that is available, define @code{HAVE_@var{function}} (in all capitals). If
@var{action-if-found} 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} to break out of the loop on the first match. If
@cvindex HAVE_@var{header}
For each given system header file @var{header-file} in the
whitespace-separated argument list that exists, define
-@code{HAVE_@var{header-file}} (in all caps). If @var{action-if-found}
+@code{HAVE_@var{header-file}} (in all capitals). If @var{action-if-found}
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} to break out of
the loop on the first match. If @var{action-if-not-found} is given, it
@defmac AC_CHECK_LIB (@var{library}, @var{function} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]})
@maindex CHECK_LIB
-See whether a test C program can be linked with the library
-@var{library}. @var{function} should be the name of a function that the
-library contains, to force the linker to try to link with the library to
-resolve the name. @var{library} is the base name of the library;
-e.g., to check for @samp{-lmp}, use @samp{mp} as the @var{library}
-argument.
+Try to ensure that C function @var{function} is available by checking
+whether a test C program can be linked with the library @var{library} to
+get the function. @var{library} is the base name of the library; e.g.,
+to check for @samp{-lmp}, use @samp{mp} as the @var{library} argument.
@var{action-if-found} is a list of shell commands to run if the link
-succeeds (which means that the library is present);
-@var{action-if-not-found} is a list of shell commands to run if the link
-fails. If @var{action-if-found} and @var{action-if-not-found} are not
-specified, the default action is to add @samp{-l@var{library}} to
-@code{LIBS} and define @samp{HAVE_LIB@var{library}}.
+with the library succeeds; @var{action-if-not-found} is a list of shell
+commands to run if the link fails. If @var{action-if-found} and
+@var{action-if-not-found} are not specified, the default action is to
+add @samp{-l@var{library}} to @code{LIBS} and define
+@samp{HAVE_LIB@var{library}} (in all capitals).
If linking with @var{library} results in unresolved symbols, which would
be resolved by linking with additional libraries, give those libraries
@maindex CHECK_FUNCS
@cvindex HAVE_@var{function}
For each given @var{function} in the whitespace-separated argument list
-that is available, define @code{HAVE_@var{function}} (in all caps). If
+that is available, define @code{HAVE_@var{function}} (in all capitals). If
@var{action-if-found} 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} to break out of the loop on the first match. If
@cvindex HAVE_@var{header}
For each given system header file @var{header-file} in the
whitespace-separated argument list that exists, define
-@code{HAVE_@var{header-file}} (in all caps). If @var{action-if-found}
+@code{HAVE_@var{header-file}} (in all capitals). If @var{action-if-found}
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} to break out of
the loop on the first match. If @var{action-if-not-found} is given, it