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 2005/05/01 22:40:53 UTC

svn commit: r165539 - /httpd/apreq/trunk/Makefile.PL

Author: randyk
Date: Sun May  1 13:40:53 2005
New Revision: 165539

URL: http://svn.apache.org/viewcvs?rev=165539&view=rev
Log:
For Win32, have the top-level Makefile.PL also accept the
with-apache2-apxs, with-apache2-httpd, with-apr-config, and
with-apu-config options, and convert those into the expected
with-apache2 option.

Modified:
    httpd/apreq/trunk/Makefile.PL

Modified: httpd/apreq/trunk/Makefile.PL
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/Makefile.PL?rev=165539&r1=165538&r2=165539&view=diff
==============================================================================
--- httpd/apreq/trunk/Makefile.PL (original)
+++ httpd/apreq/trunk/Makefile.PL Sun May  1 13:40:53 2005
@@ -46,6 +46,19 @@
 $args{"with-perl-opts"} = "@ARGV" if @ARGV;
 
 if (WIN32) {
+    require File::Basename;
+    my @candidates = qw(with-apache2-apxs with-apache2-httpd
+                        with-apr-config with-apu-config);
+    unless ($args{'with-apache2'}) {
+        foreach my $opt(@candidates) {
+            (my $d = File::Basename::dirname($args{$opt})) =~ s{(\\|/)bin}{};
+            if (-d $d) {
+                delete $args{$opt};
+                $args{'with-apache2'} = $d;
+                last;
+            }
+        }
+    }
     my @opts = map{qq/--$_="$args{$_}"/} keys %args;
     my @args = (PERL_PATH, 'win32/Configure.pl', @opts);
     print "@args\n";