/[Apache-SVN]/perl/modperl/docs/trunk/src/docs/1.0/os/win32/mpinstall
ViewVC logotype

Diff of /perl/modperl/docs/trunk/src/docs/1.0/os/win32/mpinstall

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- perl/modperl/docs/trunk/src/docs/1.0/os/win32/mpinstall	2006/05/16 04:44:00	406828
+++ perl/modperl/docs/trunk/src/docs/1.0/os/win32/mpinstall	2006/05/16 04:46:37	406829
@@ -20,7 +20,7 @@ require File::Spec;
 die "This only works for Win32" unless $^O =~ /Win32/i;
 die "No mod_perl ppm package available for this Perl" if ($] < 5.006001);
 
-my ($apache2, $apache);
+my ($apache2, $apache, $apache22);
 my @drives = drives();
 
 # find a possible Apache2 directory
@@ -72,9 +72,17 @@ if ($apache or $apache2) {
             unless $vers =~ m!Apache/1.3!;
     }
     else {
-        $vers = qx{"$apache2/bin/apache.exe" -v};
-        die qq{"$apache2" does not appear to be version 2.0}
-            unless $vers =~ m!Apache/2.0!;
+        my $vers;
+        for my $binary(qw(Apache.exe httpd.exe)) {
+            my $b = File::Spec->catfile($apache2, 'bin', $binary);
+            next unless -x $b;
+            $vers = qx{$b -v};
+            last;
+	}
+        die qq{Cannot determine the Apache version} unless $vers;
+        die qq{"$apache2" does not appear to be version 2.x}
+            unless $vers =~ m!Apache/2.!;
+        $apache22 = 1 if $vers =~ m!Apache/2.2!;
     }
 }
 # prompt to get an Apache installation directory
@@ -143,14 +151,21 @@ else {
     if ($apache2) {
         my $ans = prompt('Do you want the latest mod_perl 2 development version?', 'no');
         if ($ans =~ /^n/i) {
-            $ppdfile = 'mod_perl.ppd';
-            $tgzfile = 'mod_perl.tar.gz';
-            $so_fake = 'mod_perl.so';
-       }
+            if ($apache22) {
+                $ppdfile = 'mod_perl-2.2.ppd';
+                $tgzfile = 'mod_perl-2.2.tar.gz';
+                $so_fake = 'mod_perl-2.2.so';
+            }
+            else {
+                $ppdfile = 'mod_perl.ppd';
+                $tgzfile = 'mod_perl.tar.gz';
+                $so_fake = 'mod_perl.so';
+            }
+        }
         else {
             $ppdfile = 'mod_perl-dev.ppd';
             $tgzfile = 'mod_perl-dev.tar.gz';
-            $so_fake = 'mod_perl-dev.so';            
+            $so_fake = 'mod_perl-dev.so';
         }
         $ppd = $ppms . $ppdfile;
         $tgz = $ppmsx86 . $tgzfile;

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26