I think this should be part of the documented API, just
as it is already documented for AC_CHECK_LIB.
It makes little sense to check libraries in a different
order than from the lowest level to the higher ones.
OK?
Thanks,
Ralf
manual: AC_SEARCH_LIBS also prepends to LIBS.
* doc/autoconf.texi (Libraries): Document that AC_SEARCH_LIBS
prepends to LIBS, just like AC_CHECK_LIB.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 01ce214..2f83ca1 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4417,7 +4417,7 @@ Libraries
@samp{AC_LINK_IFELSE([AC_LANG_CALL([], [...@var{function}])])} first with
no libraries, then for each library listed in @var{search-libs}.
-Add @option...@var{library}} to @code{LIBS} for the first library found
+Prepend @option...@var{library}} to @code{LIBS} for the first library found
to contain @var{function}, and run @var{action-if-found}. If the
function is not found, run @var{action-if-not-found}.
@@ -4431,7 +4431,7 @@ Libraries
The result of this test is cached in the
@code{ac_cv_sear...@var{function}} variable as @samp{no}, if no library
containing @var{function} was found, otherwise as the
-...@option{-l@var{library}} option that needs to be added to @code{LIBS}.
+...@option{-l@var{library}} option that needs to be prepended to @code{LIBS}.
@end defmac