cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] find libssh2 with pkg-config

From: Guenter <lists_at_gknw.net>
Date: Thu, 03 Sep 2009 00:22:12 +0200

Hi,
Daniel Stenberg schrieb:
> Libs.private:
> This line should list any private libraries in use. Private
> libraries are libraries which are not exposed through your library, but
> are needed in the case of static linking.
yes, but very strange - also mentioned clearly here:
http://people.freedesktop.org/~dbn/pkg-config-guide.html
no idea why the --debug then claims about unknown keyword.

>> also I think the dependency to either OpenSSL or libgcrypt should be
>> done with a 'Requires' line, f.e.:
>
> Does anything care about that line? I see that libcurl doesn't use it...
output from 'pkg-config --debug nss':
Looking for package 'nss'
Looking for package 'nss-uninstalled'
Reading 'nss' from file '/usr/lib64/pkgconfig/nss.pc'
Parsing package file '/usr/lib64/pkgconfig/nss.pc'
  line>prefix=/usr
 Variable declaration, 'prefix' has value '/usr'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/usr'
  line>libdir=/usr/lib64
 Variable declaration, 'libdir' has value '/usr/lib64'
  line>includedir=${prefix}/include/nss3
 Variable declaration, 'includedir' has value '/usr/include/nss3'
  line>
  line>Name: NSS
  line>Description: Network Security Services
  line>Version: 3.12.4
  line>Requires: nspr >= 4.8
Looking for package 'nspr'
Looking for package 'nspr-uninstalled'
Reading 'nspr' from file '/usr/lib64/pkgconfig/nspr.pc'
Parsing package file '/usr/lib64/pkgconfig/nspr.pc'
  line>prefix=/usr
 Variable declaration, 'prefix' has value '/usr'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/usr'
  line>libdir=/usr/lib64
 Variable declaration, 'libdir' has value '/usr/lib64'
  line>includedir=/usr/include/nspr4
 Variable declaration, 'includedir' has value '/usr/include/nspr4'
  line>
  line>Name: NSPR
  line>Description: The Netscape Portable Runtime
  line>Version: 4.8.0
  line>Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
  line>Cflags: -I${includedir}
  line>
  line>
Path position of 'NSPR' is 1
Package NSPR has -L/usr/lib64 in Libs
Removing -L/usr/lib64 from libs for nspr
Adding 'nspr' to list of known packages, returning as package 'nspr'
  line>Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
  line>Cflags: -I${includedir}
Path position of 'NSS' is 1
Adding 'nss' to list of known packages, returning as package 'nss'

so seems that pkg-config does on its own lookup the 'nspr' package
because its mentioned as 'Requires: nspr >= 4.8' ...
and if you then query 'pkg-config --libs nss':
-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
this shows that both 'Libs' from nss and nspr are then combined...

but please take my comments only as 'mentioned' - I dont have enough
pkg-config experience to suggest that we do it this or that way...
I did only mention what I found so far when testing with pkg-config.

Gün.
Received on 2009-09-03