On Friday 06 of November 2009 00:11:08 David Byron wrote:
> When I rename /usr/bin/pkg-config to pkg-config.off I get a configure
> failure trying to use my hand-built openssl:
>
> configure: set PKG_CONFIG_LIBDIR to "<abs_path_to>/openssl/lib/pkgconfig"
> checking for pkg-config... no
> checking for CRYPTO_lock in -lcrypto... yes
> checking for SSL_connect in -lssl... no
> checking for ssl with RSAglue/rsaref libs in use... checking for
> SSL_connect in -lssl... (cached) no
> no
>
> which is basically the same thing I got before. Looking in config.log the
> reason is unresolved externs to stuff in libdl.
This works fairly well. If there is no pkg-config, the configure script does
not try to use it.
> @@ -1162,14 +1163,25 @@
> ;;
> *)
> dnl check the given --with-ssl spot
> - PKGTEST="no"
> PREFIX_OPENSSL=$OPT_SSL
> + if test x$cross_compiling != xyes; then
> + dnl only do pkg-config magic when not cross-compiling
> + PKGTEST="yes"
I think we can remove the cross_compiling condition and always try to use
pkg-config. If we force the PKG_CONFIG_LIBDIR, there is no chance to break
the cross-compilation by taking system libs accidentally.
About two months ago we were fighting with a similar problem while
cross-compiling against NSS:
http://permalink.gmane.org/gmane.comp.web.curl.library/24878
http://curl.haxx.se/cvs.cgi/curl/acinclude.m4?r1=1.237&r2=1.238
> + dnl but be careful and only look where we've been told
> + dnl to look
> + export PKG_CONFIG_LIBDIR=$OPT_SSL/lib/pkgconfig
Please split the exports into two lines. I am not sure if some platforms
actually need it. Nevertheless it's good to stay consistent with rest
of the file.
I can see yet another (hopefully last :-) ) possible problem. If we have
working pkg-config, but the build of OpenSSL does not contain pkgconfig
files, it fails with the following message:
configure: error: OpenSSL libs and/or directories were not found where
specified
We should check whether at least the directory $OPT_SSL/lib/pkgconfig (or
maybe better the openssl.pc inside) exists and eventually fall back to
fixed paths approach (PKGTEST="no"). This should keep working what used
to work before.
Thanks for being patient!
Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-08