libtool
[Top][All Lists]
Advanced

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

Re: no .pc file


From: Mike Frysinger
Subject: Re: no .pc file
Date: Sat, 27 Oct 2012 02:47:39 -0400
User-agent: KMail/1.13.7 (Linux/3.6.3; KDE/4.6.5; x86_64; ; )

On Friday 26 October 2012 14:27:32 Bob Friesenhahn wrote:
> On Fri, 26 Oct 2012, Yaroslav Bulatov wrote:
> > Oops my bad....that was a bad paste from some auto-generated code.
> > 
> > This is basically a modified version of .pc file I get when building
> > zlib. Not sure how useful this is because you need to update "prefix"
> > in this file manually each time you rebuild libtool. Ideally the .pc
> > file would be generated automatically by configure/make
> 
> If it is not clear, package config files are operating system and/or
> operating system distribution and/or operating system release version
> specific.  One reason for this is that each operating system
> distribution uses its own names for pkg-config package definitions.
> Using zlib as an example is not useful since zlib does not depend on
> any other packages.  Most packages depend on other packages and so
> there is an OS-distribution (or even site-specific) list of packages
> that this package depends on.
> 
> While many packages do produce sample pkg-config files (based on
> guess-work or assumption of a partiticular OS distribuiton), it is
> common practice for the default offering to be modified by the OS
> package distribution maintainer because the OS uses a different name
> for a similar thing.

i'm not sure how much (if any) of this is true.  projects that use .pc files 
use the same name all the time regardless of the OS and/or distro and/or 
os/distro version.  since that name is static, other .pc files can rely on it.  
the name tends to have direct correlation to the project name, so collisions 
are generally avoided (and certainly isn't any different from having a 
collision in the e.g. /usr/lib/lib<foo>.so "namespace").  some projects will 
vary the name slightly with their own version number, but that is package-
specific (i.e. the GNOME project likes to version their libraries with major 
numbers, so the .pc files will include that as well).

as an example, there is a SDL_net package that brings common network 
functionality to the common gaming SDL package.  the SDL library provides a 
"sdl.pc" file regardless of the OS/distro.  then SDL_net provides a 
"SDL_net.pc" that includes a line that states:
        Requires: sdl >= 1.2.14
this tells us that SDL_net.pc requires sdl.pc.  and the behavior will be the 
same regardless of distro/OS/version.

> with a hand-edited/non-portable framework like pkg-config.

i don't think this is true either.  most .pc files are generated dynamically 
based on input/detection from configure (or whatever equivalent build system 
that is in use).  when it comes to the libraries in use, it's really no 
different in this regard from the generated libtool linker script (.la) files 
that libtool produces.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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