Re: [mp2] Installation problem with static build

[prev] [thread] [next] [Date index for 2005/01/22]

From: Stas Bekman
Subject: Re: [mp2] Installation problem with static build
Date: 20:59 on 22 Jan 2005
Nick Wellnhofer wrote:
> 
> When I run "perl Makefile.PL" to configure a static mod_perl2 build and 
> have an older version of Apache already installed in the --prefix 
> directory, I get the following error message:
> 
> Configuring Apache/2.0.52 mod_perl/1.999.21 Perl/v5.8.5
> [  error] Can't find apr include/ directory,
> [  error] use MP_APR_CONFIG=/path/to/apr-config
> 
> Looking at lib/Apache/Build.pm the following code in subroutine dir 
> seems to be the culprit:
> 
>     if (IS_MOD_PERL_BUILD) {
>         my $build = $self->build_config;
> 
>         if ($dir = $build->{'dir'}) {
>             for ($dir, "../$dir", "../../$dir") {
>                 last if -d ($dir = $_);
>             }
>         }
>     }
> 
>     $dir ||= $self->{MP_AP_PREFIX};
> 
> If the right directory isn't found in the for loop $dir still contains a 
> value, so the ||= has no effect.
> 
> Everything works as expected with the attached patch.

Thanks Nick, applied with a few small tweaks.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

[mp2] Installation problem with static build
Nick Wellnhofer 20:10 on 22 Jan 2005

Re: [mp2] Installation problem with static build
Stas Bekman 20:59 on 22 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52