tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfrederic.cl...@fujitsu-siemens.com>
Subject Re: jk2/apr patch
Date Mon, 03 Nov 2003 08:38:52 GMT
Kurt Miller wrote:
> From: "jean-frederic clere" <jfrederic.clere@fujitsu-siemens.com>
> 
>>Kurt Miller wrote:
>>
>>>Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got
> 
> a
> 
>>>question or two.... I think there are two cases:
>>>
>>>1) when --with-apr is specified
>>>2) when --with-apr-include and --with-apr-lib are specified
>>>
>>>In case one the apr src directory is given and jk2 builds apr using the
>>>apr-build target in the native2 makefile. The apr-build target does a
>>>./configure && make for apr when building jk2. When configuring jk2,
>>>apr-config is not guaranteed to be available.
>>
>>Right apr-config is not available before configuring apr.
>>
>>
>>>The webapp connector required apr to be built from source for Apache13
> 
> and
> 
>>>configured apr while configuring itself. Should jk2 also make this
>>>requirement?
>>
>>Yes.
>>
>>
>>>It appears the webapp connector did it to ensure the same
>>>complier was used and that apr was configured without threads for
> 
> Apache13.
> 
>>>In the second case the apr src dir is not specified, so apr-config is
> 
> not
> 
>>>available again. The webap connector used it to get the lib name. I'm
> 
> not
> 
>>>sure what the best method for determining the lib name in this case.
>>>Currently the the lib name is hardcoded to libapr.a for apache13 and
>>>libapr-0 for apache2. Any suggestions?
>>
>>find + awk?
>>+++
>>NUMVERAPR=`find ${tempval} -name "*.la" | awk -F - '{ print $2 }' | awk -F
> 
> . '{
> 
>>print $1 }'
>>APR_LDFLAGS="-lapr-${NUMVERAPR} -L${tempval}"
>>+++
> 
> 
> Before I start making a patch, I'd like to make sure I've got the new
> behavior nailed down...
> 
> It seems like there is some conflicting stuff going on. Apr may need to be
> configured without threads at times (without for Apache13 on OpenBSD and
> Apache2 on FreeBSD 4.7 (pre fork MPM)). When using --with-apr currently it
> doesn't specify with or without threads while configuring apr. So it just
> guesses and will likely be with threads at times it shouldn't be.
> 
> I'd like to add a new configure argument called --with-apr-threads that will
> indicated if apr should be with or without threads. This argument will
> ignored, unless -with-apr is also specified and will used to configure apr.
> Not sure what the default should be.

It is possible to configure apr with --enable-threads=pthread or 
--enable-threads=system_threads.

> 
> Currently --with-apr-include and --with-apr-lib override --with-apr. So I'm
> thinking after all three arguments have been processed do the following if
> APR_BUILD is not empty:
>     1) For Apache13 and Apache2 get the compiler used by apxs.
>     2) configure apr with --enable-static --disable-shared (override
>         compiler for Apache13 and Apache2) --with-threads or
>         --without-threads based on the --with-apr-threads argument.
>     3) Use apr-config to get lib name.
> 
> In --with-apr-lib processing set the lib name using your find + awk
> technique.
> 
> Does the above sound acceptable so far?

For Apache13 yes. For Apache2 no, Apache2 contains a compiled apr we must use 
this one. (And may be give an error when using 
--with-apr-include/-with-apr-lib/--with-apr and --with-apxs2).

> 
> Hummm, if neither --with-apr or --with-apr-lib is specified what do we do
> for the lib name (it may be there already for Apache2)?
> 
> -Kurt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message