autoconf
[Top][All Lists]
Advanced

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

Re: pkg-config wisdom


From: Bob Friesenhahn
Subject: Re: pkg-config wisdom
Date: Sat, 24 Oct 2009 10:23:08 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Fri, 23 Oct 2009, John Calcote wrote:

If your project uses libxml's API, then you as the maintainer should be very aware of requisite dependencies of that library. The AC_CHECK_LIB macro accepts a fifth argument, other-libraries, which is a whitespace-separated list of dependent libraries (actually command-line options, e.g., [-lzlib -lpthread -lX11]) that are required by the primary library that you're checking for. Note, however, that if you've already tested for the presence of any of these 2nd and 3rd level libraries in previous AC_CHECK_LIB tests, then these references will already be in the LIBS variable, and thus used in this test automatically.

Unfortunately, the libraries used by the library being tested may be only optionally used and assuming that the library is used may result in an uneeded library being added to the build. There may be an option of using several other libraries (e.g. an XML library like libxml2 or expat) to perform a function and it is easy to guess wrong if both option libraries happen to be on the system.

In this case life would be better if all libraries had a ".la" file and if Autoconf used libtool type functionality (e.g. consult the .la files) as part of its testing.

I don't know of any flavor of Unix that has "interlibrary dependencies" as you describe them here - at least most people don't use those linker options. Additionally, most people on this list are not necessarily pro-Linux, and anti-Solaris/BSD/MacOSX/AIX, and so on. The Autotools attempts to be Unix-flavor agnostic, which is one of the strengths of these tools.

The Linux linker does seem to automatically inject library dependencies, which tends to paper over any configuration problems.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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