You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by ra...@apache.org on 2006/05/16 07:03:46 UTC

svn commit: r406838 - /httpd/apreq/trunk/win32/util.pl

Author: randyk
Date: Mon May 15 22:03:45 2006
New Revision: 406838

URL: http://svn.apache.org/viewcvs?rev=406838&view=rev
Log:
Enable check routine to handle Apache/2.2, which changed the name of the Apache binary under Win32 to httpd.exe.

Modified:
    httpd/apreq/trunk/win32/util.pl

Modified: httpd/apreq/trunk/win32/util.pl
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/win32/util.pl?rev=406838&r1=406837&r2=406838&view=diff
==============================================================================
--- httpd/apreq/trunk/win32/util.pl (original)
+++ httpd/apreq/trunk/win32/util.pl Mon May 15 22:03:45 2006
@@ -17,15 +17,21 @@
     exit;
 }
 
+require File::Spec;
 sub check {
     my $apache = shift;
     die qq{No libhttpd library found under $apache/lib}
         unless -e qq{$apache/lib/libhttpd.lib};
     die qq{No httpd header found under $apache/include}
         unless -e qq{$apache/include/httpd.h};
-    my $vers = qx{"$apache/bin/Apache.exe" -v};
-    die qq{"$apache" does not appear to be version 2.0}
-        unless $vers =~ m!Apache/2.0!;
+    for my $b(qw(Apache.exe httpd.exe)) {
+        my $binary = File::Spec->catfile($apache, 'bin', $b);
+        next unless -x $binary;
+        my $vers = qx{$binary -v};
+        die qq{"$apache" does not appear to be version 2.x}
+            unless $vers =~ m!Apache/2.!;
+        last;
+    }
     return 1;
 }