cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: configure finding system openssl instead of my own

From: Linus Nordberg <linus_at_nordberg.se>
Date: Mon, 05 Sep 2016 09:09:35 +0200

Daniel Stenberg <daniel_at_haxx.se> wrote
Mon, 5 Sep 2016 00:06:19 +0200 (CEST):

>>> Then of course that works against you when you have OpenSSL in two
>>> places and that directory shouldn't be used for OpenSSL but should
>>> be used for one of the other libraries...
>
>> A workaround would be to, for each library checked for, specify a
>> separate installation directory, or disable the library. Cumbersome
>> but should work.
>
> I think we generally should not set LDFLAGS and LIBS after we detect a
> library but just *store* the info so that each library is detected
> separatedly and then as a last operation in configure build the final
> LDFLAGS and LIBS contents based on all individual tests. Then the test
> for zlib won't "contaminate" the OpenSSL test like it did for you.

It will not contaminate the test, but there's still a crux in how to
build the final list of `-L' (and `-I') used for linking (and
compiling). If any two libraries reside in the same directory and that
directory ends up before another "more specific" directory, we'll link
against the wrong library.

A nice effect of the current way it's being done is that a mistake is
spotted early (configure time) rather than late (link editor time or
runtime) or never.
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-09-05