cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NSS and configure and pkg-config

From: Guenter <lists_at_gknw.net>
Date: Tue, 01 Sep 2009 00:24:11 +0200

Hi Daniel,
Daniel Stenberg schrieb:
> Haha, I don't know about "guru" but I have written quite a large amount
> of configure tests over the years.
nevertheless: you are a guru!

> Attached here is my first take:
>
> 1 - use nss-config if pkg-config is absent in an attempt to figure out how
> to use nss when building with it
>
> 2 - make pkg-config get used even for cross-compiles
>
> This thus assumes you setup PKG_CONFIG_PATH properly before you invoke
> configure when you build it cross-compiled.
>
> Oh: apply the patch to a fresh CVS, then run ./buildconf and it should
> be able to detect nss. I did some basic testing on my host and it seemed
> fine.
works like a charm! Configure called with:
export PKG_CONFIG_PATH=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
./configure --host=i686-pc-mingw32 \
--with-random=notused --with-zlib --enable-sspi --enable-ipv6
--disable-shared --without-ssl --with-nss

From config.log:
configure:26523: checking for pkg-config
configure:26542: found /usr/bin/pkg-config
configure:26555: result: /usr/bin/pkg-config
configure:26565: checking for nss options with pkg-config
configure:26573: result: found
configure:26601: checking for PK11_CreateGenericObject in -lnss3
configure:26633: i686-pc-mingw32-gcc -o conftest.exe -g0 -O2
-Wno-system-headers conftest.c -lnss3 -lssh2 -lwldap32 -lws2_32 -lz >&5
configure:26640: $? = 0
configure:26661: result: yes
configure:26685: checking for NSS_Initialize in -lnss3
configure:26717: i686-pc-mingw32-gcc -o conftest.exe -g0 -O2
-Wno-system-headers -I/usr/i686-pc-mingw32/sys-root/mingw/include/nss3
-I/usr/i686-pc-mingw32/sys-root/mingw/include/nspr4 conftest.c -lnss3
 -lssh2 -lwldap32 -lws2_32 -lz
-L/usr/i686-pc-mingw32/sys-root/mingw/lib -lssl3 -lsmime3 -lnss3
-lnssutil3 -lplds4 -lplc4 -lnspr4 >&5
configure:26724: $? = 0
configure:26745: result: yes
configure:26769: detected NSS version 3.12.3
configure:26775: Added /usr/i686-pc-mingw32/sys-root/mingw/lib to
LD_LIBRARY_PATH

and finally the binary:
wine curl.exe -V
curl 7.19.7-CVS (i686-pc-mingw32) libcurl/7.19.7-CVS NSS/3.12.3
zlib/1.2.3 libidn/1.9 libssh2/1.0
Protocols: tftp ftp telnet dict ldap http file https ftps scp sftp
Features: IDN Largefile NTLM SSL SSPI libz

will tomorrow give it a try with gnutls - but for NSS it looks already
great!

thanks, Gün.
Received on 2009-09-01