httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject apxs calls on Win32
Date Sun, 05 Dec 2004 05:23:02 GMT
If apxs is installed on Win32, it is usually specified as a
.bat file. In querying apxs in apxs() of Apache::TestConfig,
however, Win32 needs both the path to cmd.exe (for running a
.bat command) and to Perl (in order to run apxs.bat) in
order to get something from
   $val = qx($apxs -q $q 2>$devnull);
This diff:
==========================================================
Index: lib/Apache/TestConfig.pm
===================================================================
--- lib/Apache/TestConfig.pm	(revision 109825)
+++ lib/Apache/TestConfig.pm	(working copy)
@@ -1658,6 +1658,12 @@
     my $val;
     unless (exists $self->{_apxs}{$q}) {
         local @ENV{ qw(PATH IFS CDPATH ENV BASH_ENV) };
+        # need path to Perl and to cmd.exe on Win32
+        if (WIN32) {
+            $ENV{PATH} = sprintf("%s;%s",
+                                 dirname($ENV{COMSPEC}),
+                                 dirname($self->{vars}->{perl}));
+        }
         my $devnull = devnull();
         my $apxs = shell_ready($self->{APXS});
         $val = qx($apxs -q $q 2>$devnull);

=================================================================
populates $ENV{PATH} with the needed paths so that these
calls succeeed.

-- 
best regards,
randy

Mime
View raw message