randyk      2003/12/15 18:39:00

  Modified:    lib/Apache Build.pm
  Log:
  Reviewed by:  stas
  In testing for the existence of the apxs and apr-config utilities, Win32 needs
  candidates to have a .bat extension for the -x file test to succeed.
  
  Revision  Changes    Path
  1.153     +16 -2     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.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- Build.pm  16 Dec 2003 01:46:13 -0000      1.152
  +++ Build.pm  16 Dec 2003 02:39:00 -0000      1.153
  @@ -105,6 +105,13 @@
                   $ENV{MP_APXS},
                   catfile $self->{MP_AP_PREFIX}, 'bin', 'apxs');
   
  +    if (WIN32) {
  +        my $ext = '.bat';
  +        for (@trys) {
  +            $_ .= $ext if ($_ and $_ !~ /$ext$/);
  +        }
  +    }
  +
       unless (IS_MOD_PERL_BUILD) {
           #if we are building mod_perl via apxs, apxs should already be known
           #these extra tries are for things built outside of mod_perl
  @@ -832,8 +839,15 @@
                   if exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX};
           }
   
  -        for (@tries) {
  -            my $try = catfile $_, "apr-config";
  +        @tries = map { catfile $_, "apr-config" } @tries;
  +        if (WIN32) {
  +            my $ext = '.bat';
  +            for (@tries) {
  +                $_ .= $ext if ($_ and $_ !~ /$ext$/);
  +            }
  +        }
  +
  +        for my $try (@tries) {
               next unless -x $try;
               $self->{apr_config_path} = $try;
           }
  
  
  

Reply via email to