stas        2003/08/12 13:46:57

  Modified:    lib/Apache Build.pm
  Log:
  when building against the source tree parse config_vars.mk to figure out
  what MPM_NAME is used
  
  Revision  Changes    Path
  1.133     +17 -0     modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- Build.pm  12 Aug 2003 17:47:52 -0000      1.132
  +++ Build.pm  12 Aug 2003 20:46:57 -0000      1.133
  @@ -166,6 +166,23 @@
       return $self->{mpm_name} = 'winnt' if WIN32;
   
       my $mpm_name = $self->apxs('-q' => 'MPM_NAME');
  +
  +    # building against the httpd source dir
  +    unless ($mpm_name and exists $self->{dir}) {
  +        my $config_vars_file = catfile $self->{dir},
  +            "build", "config_vars.mk";
  +        if (open my $fh, $config_vars_file) {
  +            while(<$fh>) {
  +                if(/MPM_NAME = (\w+)/) {
  +                    $mpm_name = $1;
  +                    last;
  +                }
  +                last if /^=item/;
  +            }
  +            close $fh;
  +        }
  +    }
  +
       die "Failed to obtain the MPM name" unless $mpm_name;
       return $self->{mpm_name} = $mpm_name;
   }
  
  
  

Reply via email to