httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] configuring APR threads fix
Date Tue, 31 Oct 2000 21:56:26 GMT
On Tue, Oct 31, 2000 at 08:57:00AM -0800, rbb@covalent.net wrote:
> On Mon, 30 Oct 2000, Joe Orton wrote:
> > The APR configure script seems to be caching whether --enable-threads
> > was passed, which is confusing. This fixes that and simplifies a bit,
> > replacing the cache variable and enable_apr_threads with a single
> > enable_threads variable:
> 
> I realize that this is confusing, but it is also correct.  The problem is
> that we have to be able to decide based on which MPM was chosen how to
> configure APR.  For example, if Apache uses the prefork MPM, then we don't
> want threads, but if Apache uses mpmt_pthread or dexter or perchild, then
> we do want threads.  I have not been able to find a way to force APR to be
> configured differently based on how Apache is configured unless Apache
> sets a condition in the cache.

You can pass additional command-line switches to the APR configure. This is
not a problem to do (and I do it in Subversion). In fact, I made a patch a
while back to apr_common.m4::RUN_SUBDIR_CONFIG_NOW() so that it can take
these extra args.

> This could be solved much cleaner if Autoconf would allow us to specify
> flags to sub-project configure scripts, but I haven't seen a way to do
> that yet.

Already done :-) ... we just need the MPM config portion to pass the right
flag to APR.

> That is why we have to check the cache.  I applied this patch, and it does
> detect threads properly, but I ALWAYS configure with prefork, because it
> is easier to debug the protocol code with that MPM, and APR all of a
> sudden was being configured with threads, which breaks all sorts of
> compile-time things.

As Ben points out, we must be able to have threads and prefork at the same
time. It is entirely possible that a third-party module uses threads for its
operation. Maybe by default, we won't enable them, but if --enable-threads
is passed, then we should have threads enabled, despite the choice of MPM.

So... we should apply Joe's patch, but there are some other choices for how
Apache calls the APR config.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message