httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar Brand <>
Subject Re: Linking mod_ssl with a specific OpenSSL version
Date Thu, 16 Aug 2012 18:36:31 GMT
On 12.8.12 20:01, Ben Laurie wrote:
> On Sun, Aug 12, 2012 at 5:23 PM, Kaspar Brand <> wrote:
>> a workaround is to call configure with
>> suitable {CPP,LD}FLAGS, i.e.
>>   CPPFLAGS=-I${openssl_build_dir}/include \
>>   LDFLAGS=-L${openssl_build_dir} \
>>   ./configure ...
>> (when using the shared libssl/libcrypto libraries, adding
>> "-Wl,-R${openssl_build_dir}" or similar to LDFLAGS might make sense)
> I haven't had time to retest it, but I think the problem with this
> approach is that the default version of OpenSSL gets included first if
> anything else uses /usr/local/{include,lib}. IIRC, this was the basis
> of all my problems.

Ok, but then we're talking about a current limitation of the build
system, I think: the compile commands are put together in build/
like this:

> [...]
> # Compile commands

Both $EXTRA_CPPFLAGS and $EXTRA_INCLUDES are assembled by configure,
where each module can contribute its stuff (appended with APR_ADDTO,
usually). I.e., if you happen to configure mod_deflate with a zlib
in /usr/local, then you end up with $EXTRA_INCLUDES where mod_deflate's
-I/usr/local precedes -I/path/to/openssl/build/dir (since
modules/filter/config.m4 is run before modules/ssl/config.m4).

Similarly, for linking we have:

> [...]
> LINK     = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS)  $(LT_LDFLAGS) $(ALL_LDFLAGS) -o

I wonder if we should add support for module-specific CFLAGS etc.,
which would always appear before the EXTRA_XXX stuff in the compile
and link commands, i.e. in we would have:



A particular module could then set its specific MOD_CFLAGS etc. in, and these would always have priority over those possibly
inserted by other modules.


View raw message