Author: randyk
Date: Sun May 21 17:33:00 2006
New Revision: 408538

URL: http://svn.apache.org/viewvc?rev=408538&view=rev
Log:
On Win32, fix the location of apxs and the names of the apr and aprutil 
libraries to enable building against Apache/2.2.

Modified:
    httpd/apreq/trunk/CHANGES
    httpd/apreq/trunk/Makefile.PL
    httpd/apreq/trunk/win32/Configure.pl

Modified: httpd/apreq/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/httpd/apreq/trunk/CHANGES?rev=408538&r1=408537&r2=408538&view=diff
==============================================================================
--- httpd/apreq/trunk/CHANGES (original)
+++ httpd/apreq/trunk/CHANGES Sun May 21 17:33:00 2006
@@ -4,6 +4,10 @@
 
 @section v2_08 Changes with libapreq2-2.08 (under development)
 
+- Build [Randy Kobes]
+  Fix the location of apxs and the names of the apr and aprutil
+  libraries on Win32 to enable building against Apache/2.2.
+
 - Perl Glue docs [Philip M. Gollucci]
   Fix the 'docs_install' make target to actually install
   the docs for the perl glue.

Modified: httpd/apreq/trunk/Makefile.PL
URL: 
http://svn.apache.org/viewvc/httpd/apreq/trunk/Makefile.PL?rev=408538&r1=408537&r2=408538&view=diff
==============================================================================
--- httpd/apreq/trunk/Makefile.PL (original)
+++ httpd/apreq/trunk/Makefile.PL Sun May 21 17:33:00 2006
@@ -55,6 +55,7 @@
 
 if (WIN32) {
     require File::Basename;
+    require File::Spec;
     unless ($args{'with-apache2'}) {
         my @candidates = qw(with-apache2-apxs with-apache2-httpd
                             with-apr-config with-apu-config);
@@ -75,6 +76,10 @@
                 $args{'with-apache2'} = $mp_ap_prefix;
             }
         }
+    }
+    unless (defined $args{'with-apache2-apxs'}) {
+      $args{'with-apache2-apxs'} =
+         File::Spec->catfile($args{'with-apache2'}, 'bin', 'apxs.bat');
     }
     my @opts = map{qq/--$_="$args{$_}"/} keys %args;
     push @opts, (split ' ', $opts);

Modified: httpd/apreq/trunk/win32/Configure.pl
URL: 
http://svn.apache.org/viewvc/httpd/apreq/trunk/win32/Configure.pl?rev=408538&r1=408537&r2=408538&view=diff
==============================================================================
--- httpd/apreq/trunk/win32/Configure.pl (original)
+++ httpd/apreq/trunk/win32/Configure.pl Sun May 21 17:33:00 2006
@@ -11,9 +11,10 @@
 use Archive::Tar;
 use File::Path;
 use LWP::Simple;
-my ($apache, $debug, $help, $no_perl, $perl, $with_perl);
+my ($apache, $apxs, $debug, $help, $no_perl, $perl, $with_perl);
 my $VERSION = '2.08';
 my $result = GetOptions( 'with-apache2=s' => \$apache,
+                        'with-apache2-apxs=s' => \$apxs,
                         'debug' => \$debug,
                         'help' => \$help,
                          'with-perl=s' => \$perl,
@@ -41,15 +42,15 @@
 my %map = (apr => 'libapr.lib', apu => 'libaprutil.lib');
 my $devnull = devnull();
 foreach (qw(apr apu)) {
-    my $cfg = catfile $apache, 'bin', "$_.bat";
-    $cfg =~ s!\\!/!g;
+    my $cfg = catfile $apache, 'bin', "$_-config.bat";
     my $lib;
     eval {$lib = qx{"$cfg" --$_-lib-file 2>$devnull;}};
     if ($@ or not $lib or $lib =~ /usage/i) {
         $apr_libs{$_} = catfile $apache, 'lib', $map{$_};
     }
     else {
-        $apr_libs{$_} = chomp $lib;
+        chomp $lib;
+        $apr_libs{$_} = $lib;
     }
 }
 
@@ -81,10 +82,12 @@
 
 print $make $_ while (<DATA>);
 
-my $apxs_trial = catfile $apache, 'bin', 'apxs.bat';
-my $apxs = (-e $apxs_trial) ? $apxs_trial : which('apxs');
-unless ($apxs) {
-    $apxs = fetch_apxs() ? which('apxs') : '';
+unless (-x $apxs) {
+    my $apxs_trial = catfile $apache, 'bin', 'apxs.bat';
+    $apxs = (-e $apxs_trial) ? $apxs_trial : which('apxs');
+    unless ($apxs) {
+        $apxs = fetch_apxs() ? which('apxs') : '';
+    }
 }
 
 my $test = << 'END';


Reply via email to