cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NSS and configure and pkg-config

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Sep 2009 17:35:42 +0200 (CEST)

On Wed, 2 Sep 2009, Guenter wrote:

> I think the configure check should then look like (pseudo code):
>
> if crosscompile; then
> if ${host}-pkg-config found and executable; then
> pkgconfig=${host}-pkg-config
> else if PKG_CONFIG_PATH set and is directory; then
> pkgconfig=pkg-config

PKG_CONFIG_PATH can be any number of directories. Besides, can we really know
for what system pkg-config (without PKG_CONFIG_PATH set) is for? I mean, in a
setup you could easily make your PATH only point to the pkg-config made for
your target and then PKG_CONFIG_PATH isn't needed.

Can I instead suggest that we do the entire pkg-config check like this:

pkgconfig="no"
if crosscompile; then
   if ${host}-pkg-config found and executable; then
     pkgconfig=${host}-pkg-config
   endfi
endif

if $pkgconfig = "no"; then
   pkgconfig = pkg-config if present in the path
endif

if $pkgconfig != "no"; then
   if $pkgconfig supports the module we want to play with; then
     return $pkgconfig;
   endif
endif

return "no"

-- 
  / daniel.haxx.se
Received on 2009-09-02