httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject svn commit: r662072 - in /httpd/apreq/trunk/win32: Configure.pl libapreq2.mak
Date Sat, 31 May 2008 20:08:48 GMT
Author: randyk
Date: Sat May 31 13:08:48 2008
New Revision: 662072

URL: http://svn.apache.org/viewvc?rev=662072&view=rev
Log:
win32 build may pick wrong apr and aprutil libs if apx isn't installed:
   http://marc.info/?l=apreq-dev&m=121122424811997&w=2
Patch supplied by Nikolay Ananiev

Modified:
    httpd/apreq/trunk/win32/Configure.pl
    httpd/apreq/trunk/win32/libapreq2.mak

Modified: httpd/apreq/trunk/win32/Configure.pl
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/win32/Configure.pl?rev=662072&r1=662071&r2=662072&view=diff
==============================================================================
--- httpd/apreq/trunk/win32/Configure.pl (original)
+++ httpd/apreq/trunk/win32/Configure.pl Sat May 31 13:08:48 2008
@@ -37,12 +37,16 @@
 generate_tests($apreq_home, \@tests);
 
 my %apr_libs;
-my %map = (apr => 'libapr.lib', apu => 'libaprutil.lib');
+my $prog = apache_prog_name($apache);
+my @httpd_ver = httpd_version($prog);
 my $devnull = devnull();
+my %map = (
+    apr => $httpd_ver[1] == 2 ? 'libapr-1.lib' : 'libapr.lib',
+    apu => $httpd_ver[1] == 2 ? 'libaprutil-1.lib' : 'libaprutil.lib'
+);
 
-my $prog = apache_prog_name($apache);
 foreach my $what (qw(apr apu)) {
-    my $ap = ($prog eq 'httpd.exe') ?
+    my $ap = ($httpd_ver[1] == 2) ?
         "$what-1-config.bat" : "$what-config.bat";
     my $cfg = catfile $apache, 'bin', $ap;
     my $lib;
@@ -308,6 +312,14 @@
     return;
 }
 
+sub httpd_version {
+    my $prog = shift;
+    my $vers = qx{$prog -v};
+    die qq{Could not parse "$apache" version}
+        unless $vers =~ m!Apache/2.(\d).(\d)!;
+    return (2, $1, $2);
+}
+
 sub generate_defs {
     my $preamble =<<'END';
 LIBRARY

Modified: httpd/apreq/trunk/win32/libapreq2.mak
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/win32/libapreq2.mak?rev=662072&r1=662071&r2=662072&view=diff
==============================================================================
--- httpd/apreq/trunk/win32/libapreq2.mak (original)
+++ httpd/apreq/trunk/win32/libapreq2.mak Sat May 31 13:08:48 2008
@@ -68,9 +68,7 @@
 	"$(INTDIR)\module_custom.obj" \
 	"$(INTDIR)\module_cgi.obj" \
 	"$(INTDIR)\error.obj" \
-	"$(INTDIR)\libapreq.res \
-	"$(APR_LIB)" \
-	"$(APU_LIB)"
+	"$(INTDIR)\libapreq.res"
 
 !IF  "$(CFG)" == "libapreq2 - Win32 Release"
 
@@ -87,7 +85,7 @@
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapreq2.bsc" 
 LINK32=link.exe
 MANIFEST=$(OUTDIR)\libapreq2.dll.manifest
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /machine:I386
/out:"$(OUTDIR)\libapreq2.dll" /implib:"$(OUTDIR)\libapreq2.lib" 
+LINK32_FLAGS="$(APR_LIB)" "$(APU_LIB)" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll
/incremental:no /machine:I386 /out:"$(OUTDIR)\libapreq2.dll" /implib:"$(OUTDIR)\libapreq2.lib"
 
 "$(OUTDIR)\libapreq2.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<



Mime
View raw message