You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@apache.org> on 2011/12/28 19:38:01 UTC

Re: svn commit: r1222775 - in /perl/modperl/trunk: Changes lib/Apache2/Build.pm

On 11-12-24 19:08 , Philip M. Gollucci wrote:
> Apache 2.4 will not be using apr 2.x which is is still apr trunk.
> 
> Apche 2.4 *will* require 1.4.x of apr-util over 1.3.

So, my problem here is figuring out when to look for apr-2-config vs.
apr-1-config, knowing only about httpd's version at that point.

I guess the approach could be similar to the one httpd's ./configure
uses and just check for apr-2-config, then apr-1-config, then apr-config
every time around and pick the first that's found.

Sounds like a good way to go about it ?

> On 12/23/11 1:20 PM, gozer@apache.org wrote:
>> Author: gozer
>> Date: Fri Dec 23 18:20:27 2011
>> New Revision: 1222775
>>
>> URL: http://svn.apache.org/viewvc?rev=1222775&view=rev
>> Log:
>> Discover apr-2-config from Apache 2.4 onwards.
>>
>>
>> Modified:
>>      perl/modperl/trunk/Changes
>>      perl/modperl/trunk/lib/Apache2/Build.pm
>>
>> Modified: perl/modperl/trunk/Changes
>> URL:
>> http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1222775&r1=1222774&r2=1222775&view=diff
>>
>> ==============================================================================
>>
>> --- perl/modperl/trunk/Changes (original)
>> +++ perl/modperl/trunk/Changes Fri Dec 23 18:20:27 2011
>> @@ -12,6 +12,8 @@ Also refer to the Apache::Test changes l
>>
>>   =item 2.0.6-dev
>>
>> +Discover apr-2-config from Apache 2.4 onwards. [Gozer]
>> +
>>   Apache 2.4 and onwards doesn't require linking the MPM module
>> directly in
>>   the httpd binary anymore. APXS lost the MPM_NAME query, so we can't
>> assume
>>   a given MPM anymore. Introduce a fake MPM 'dynamic' to represent this.
>>
>> Modified: perl/modperl/trunk/lib/Apache2/Build.pm
>> URL:
>> http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Build.pm?rev=1222775&r1=1222774&r2=1222775&view=diff
>>
>> ==============================================================================
>>
>> --- perl/modperl/trunk/lib/Apache2/Build.pm (original)
>> +++ perl/modperl/trunk/lib/Apache2/Build.pm Fri Dec 23 18:20:27 2011
>> @@ -1153,7 +1153,18 @@ sub apr_bindir {
>>
>>   sub apr_generation {
>>       my ($self) = @_;
>> -    return $self->httpd_version_as_int =~ m/2[1-9]\d+/ ? 1 : 0;
>> +
>> +    my $httpd_v = $self->httpd_version_as_int;
>> +
>> +    if ($httpd_v =~ m/2[4-9]\d+/) {
>> +        return 2;
>> +    }
>> +    elsif ($httpd_v =~ m/2[1-3]\d+/) {
>> +        return 1;
>> +    }
>> +    else {
>> +        return;
>> +    }
>>   }
>>
>>   # returns an array of apr/apu linking flags (--link-ld --libs) if found
>> @@ -1213,7 +1224,8 @@ sub apru_config_path {
>>           $self->{$key} = $self->{$mp_key};
>>       }
>>
>> -    my $config = $self->apr_generation ? "$what-1-config" :
>> "$what-config";
>> +    my $apr_generation = $self->apr_generation;
>> +    my $config = $apr_generation ? "$what-${apr_generation}-config" :
>> "$what-config";
>>
>>       if (!$self->{$key}) {
>>           my @tries = ();
>>
>>
> 
> 


-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/