autoconf
[Top][All Lists]
Advanced

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

Re: [autoconf] Re: pkg-config wisdom


From: Tim Post
Subject: Re: [autoconf] Re: pkg-config wisdom
Date: Mon, 26 Oct 2009 23:05:12 +0800

On Fri, 2009-10-23 at 12:36 +0900, address@hidden wrote:

> >* Their custom built library is not used, the system's is.
> 
> Indeed. It might be popular when default pkg-config prefix
> is differnt from the prefix that users install their own
> libraries. Have you experienced the troubles that pkg-config
> in configure process detects the correct location of custom
> built library but the system's is used in building process?

Yes, but only on occasions where the user themselves installed
pkg-config (in /usr/local). This ties in with random headaches
encountered when its used on older systems.

> >* pkg-config did not locate an installed library, due to the library not
> >installing the files that pkg-config needs to work
> 
> I'm not sure if this trouble is popular. It sounds as if
> the author of Makefile.in (or Makefile.am) slipped to
> add (or break) appropriate target to install xxx.pc files,
> or install to wrong directory that pkg-config does not
> search.

It really depends on the library and if its author even considered
supporting pkg-config. For libraries that are now commonplace on most
systems, the file was probably included years ago after someone filed a
bug to request it.

Even after using GNU software and libraries for over 10 years now, I
have not tried every single library. I'm not sure if even all GNU libs
(though I suspect they all do by now) install the .pc file by default.

If you find some interesting math or string library written by a lone
author or a small team, there's a good chance no .pc file is installed
by default.

In this case, the only good way to check for that is to try and compile
a program using it. This takes into consideration that the user might
already have it, which saves you from (1) shipping it as part of your
program and (2) confusing them into thinking they're missing something
that they obviously installed.

Since a lot of my programs depend on libraries that aren't so popular or
widely used, I just avoid pkg-config and run my tests the usual way.

In another 5 or so years, when even backyard gems ship with .pc files to
install, I'll re-visit using pkg-config to get some speed up in my
configure scripts. I don't have anything inherently against it, it just
doesn't work for me in many scenarios.

Cheers,
--Tim

-- 
Monkey + Typewriter = Echoreply ( http://echoreply.us )





reply via email to

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