[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Document traps of AC_CHECK_LIB for standard functions

From: Stepan Kasal
Subject: Re: [PATCH] Document traps of AC_CHECK_LIB for standard functions
Date: Thu, 9 Dec 2004 09:20:47 +0100
User-agent: Mutt/1.4.1i


On Mon, Dec 06, 2004 at 07:37:59PM -0800, Noah Misch wrote:
> On Tue, Dec 07, 2004 at 01:59:32AM +0100, Stepan Kasal wrote:
> > Perhaps the right solution would be to grep for the message in the
> > compilers output and taking it as a failure if the message is found.
> [...]  On @sc{unicos}, linking with a
> +nonexistent library does not produce an error, so testing for a function
> +definition actually present in a standard library in some other library
> +always succeeds.  [...]

I think we don't have to add this to the documentation; fixing the test to
grep for the message should be enough.

Perhaps we should change the description of the AC_CHECK_LIB:
it should be defined as a check for the _library_, not for the function.
The function name is only provided as an aid to test whether the library
is what we expect.  Users should choose a function which represents the
library and is not available from elsewhere.

Below is a quick patch implementing the suggestion.

I'm afraid that for good integration with your changes, the whole
description should be a bit rearranged.  Noah, would you volunteer for that?

Paul, Noah, what do you think about these two suggestions?

Have a nice day,

Index: doc/autoconf.texi
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.847
diff -u -r1.847 autoconf.texi
--- doc/autoconf.texi   6 Dec 2004 21:24:20 -0000       1.847
+++ doc/autoconf.texi   9 Dec 2004 08:14:55 -0000
@@ -3583,10 +3583,10 @@
 @defmac AC_CHECK_LIB (@var{library}, @var{function}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{other-libraries})
-Depending on the current language(@pxref{Language Choice}), try to
-ensure that the C, C++, or Fortran function @var{function} is
-available by checking whether a test program can be linked with the
-library @var{library} to get the function.  @var{library} is the base
+Test whether the library @var{library} is available; try to link
+a test program calling function @var{function} with the library.
+Thusly, @var{function} should be a function provided by the library.
address@hidden is the base
 name of the library; e.g., to check for @option{-lmp}, use @samp{mp} as
 the @var{library} argument.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]