From: Eric Blake Date: Sun, 19 Jul 2009 22:53:16 GMT Subject: Re: [PATCH] Re: configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIB Message-ID: In-Reply-To: <7v3a8szm4q.fsf@alter.siamese.dyndns.org> Junio C Hamano pobox.com> writes: > The autoconf documentation does not give much confidence either way: > > AC_CHECK_LIB requires some care in usage, and should be avoided in > some common cases. > > It is unclear what these "some" are, and is sufficiently unclear for us to > decide if our situation falls into these "some common cases." The only > problem it cites is that alternative libraries may contain a variant > implementation of the same function found in a more common library, in > which case you may not want to use such an alternative implementation, and > I do not think "basename() in -lgen" falls into that category. Please report that as a bug to the autoconf lists, then. > If autoconf people say AC_SEARCH_LIBS() should be preferred over > AC_CHECK_LIB(), it probably is the right thing to do. But I want to have > a warmer-and-fuzzier feeling that we understand why it went wrong, rather > than blindly doing what the documentation says because the documentation > tells us to. As autoconf maintainer (and hoping to release autoconf 2.64 soon), yes, I can definitively say that AC_SEARCH_LIBS is nicer than AC_CHECK_LIB. -- Eric Blake