stas        2003/08/11 13:01:03

  Modified:    .        Changes
               lib/Apache Build.pm
  Log:
  Apache::Build now tries to use the new APR_BINDIR query string to find
  the location of apr-config.
  
  Revision  Changes    Path
  1.207     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.206
  retrieving revision 1.207
  diff -u -r1.206 -r1.207
  --- Changes   8 Aug 2003 20:38:20 -0000       1.206
  +++ Changes   11 Aug 2003 20:01:03 -0000      1.207
  @@ -12,6 +12,9 @@
   
   =item 1.99_10-dev
   
  +Apache::Build now tries to use the new APR_BINDIR query string to find
  +the location of apr-config. [Stas]
  +
   new package Apache::porting to make it easier to port mp1 code to mp2
   [Stas]
   
  
  
  
  1.131     +13 -8     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.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- Build.pm  7 Aug 2003 16:29:18 -0000       1.130
  +++ Build.pm  11 Aug 2003 20:01:03 -0000      1.131
  @@ -6,7 +6,7 @@
   
   use Config;
   use Cwd ();
  -use File::Spec::Functions qw(catfile);
  +use File::Spec::Functions qw(catfile catdir);
   use File::Basename;
   use ExtUtils::Embed ();
   
  @@ -715,6 +715,8 @@
       $self->{apr_bindir};
   }
   
  +# XXX: we assume that apr-config and apu-config reside in the same
  +# directory
   sub apr_config_path {
       my ($self) = @_;
   
  @@ -726,13 +728,16 @@
       }
   
       if (!$self->{apr_config_path}) {
  -        if (exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX}) {
  -            my $try = catfile $self->{MP_AP_PREFIX}, "bin", "apr-config";
  -            $self->{apr_config_path} = $try if -x $try;
  -        }
  -        elsif (my $bindir = $self->apxs(-q => 'BINDIR')) {
  -            my $try = catfile $bindir, "apr-config";
  -            $self->{apr_config_path} = $try if -x $try;
  +        # APR_BINDIR was added only at httpd-2.0.46
  +        my @tries = grep length,
  +            map $self->apxs(-q => $_), qw(APR_BINDIR BINDIR);
  +        push @tries, catdir $self->{MP_AP_PREFIX}, "bin"
  +            if exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX};
  +
  +        for (@tries) {
  +            my $try = catfile $_, "apr-config";
  +            next unless -x $try;
  +            $self->{apr_config_path} = $try;
           }
       }
   
  
  
  

Reply via email to