On Sunday, November 8, 2009, Kamil Dudka wrote:
> 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.
I agree. Done.
> > + export PKG_CONFIG_LIBDIR=$OPT_SSL/lib/pkgconfig
>
> Please split the exports into two lines.
Done.
> 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
Yes, I can duplicate this error by renaming openssl.pc to something else or
making it so the specific the PKG_CONFIG_LIBDIR doesn't exist.
> 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.
Just to be clear, you don't want to find the system openssl, but you want
configure to keep going with it's guess of what to use for SSL_LIBS,
SSL_LDFLAGS and SSL_CPPFLAGS as though pkg-config wasn't installed at all?
Doesn't the script do that already when it can't find openssl via
pkg-config? My configure output looks like this:
configure: set PKG_CONFIG_LIBDIR to
"/home/dbyron/src/ams/trunk/install/openssl/lib/pkgconfig"
checking for pkg-config... /usr/bin/pkg-config
checking for openssl options with 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
configure: error: OpenSSL libs and/or directories were not found where
specified!
If pkg-config found openssl, we'd see the output from these three lines in
configure.ac:
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
which we don't see there. Maybe I should change the output so it's clear
what SSL_LDFLAGS and SSL_CPPFLAGS are even when pkg-config isn't used?
I could see improving the error message since in case the pkgconfig info is
missing, the trouble isn't that openssl wasn't found, it's that we don't
know how to compile/link against it properly. Is that what you're asking
for?
Here's an updated patch with the two easy changes done.
-DB
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-11