cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NSS and configure and pkg-config

From: Guenter <lists_at_gknw.net>
Date: Mon, 31 Aug 2009 21:12:02 +0200

Hi Daniel,
Daniel Stenberg schrieb:
> This isn't really a NSS nor autotool problem. I can write autotool
> checks for all this just fine if we can just write down the solution in
> plain english.
I'll try as good as my english is :)
so you are a configure guru too? hey! great!
I'll try to follow up; just came home from shopping, and got my beer :D

> In general the problem with pkg-config for cross-compiles AFAIK, is that
> pkg-config has a central "database" and for a given system that holds
> the native libs.
yes, but you can specify the "database" dir with PKG_CONFIG_PATH, and
both my MinGW32 and MinGW64 cross compilers have different dirs holding
their *.pc files.
See also my first post of this thread where I posted a simple shell
script to proof that pkg-config works for the MinGW* cross compilers.

> To ask pkg-config for info about a particular package for _another_
> system than the local, you have to either find another pkg-config
> installation or figure out how to tell pkg-config to use another database.
see above.

> Perhaps we simply need a new option to configure to specify what
> pkg-config to use?
yes, but not which pkg-config, but only which PKG_CONFIG_PATH ...
the two paths I have for the MinGW* cross compilers are:
PKG_CONFIG_PATH=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
PKG_CONFIG_PATH=/usr/x86_64-pc-mingw32/sys-root/mingw/lib/pkgconfig

there we have expactly the same folder name in the path as what I pass
to configure with --host= ; so I think we should check for something
like that:
if [ -d "$pkg_config_path" -a "$pkg_config_path" == *"$host_os"* ]; then
  echo "we have got a valid PKG_CONFIG_PATH for platform $host_os"
  # tell configure to use pkg-config!
fi

although a configure option would really be fine - currently the real
thing which prevents pkg-config from working is that PKGCONFIG=no is
always set when cross-compile is detected; the PKG_CONFIG_PATH could be
taken from environment ...

would be very great if you could give this a try ...

thanks, Gün.
Received on 2009-08-31