perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1503135 - /perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL
Date Mon, 15 Jul 2013 08:34:26 GMT
Author: stevehay
Date: Mon Jul 15 08:34:26 2013
New Revision: 1503135

URL: http://svn.apache.org/r1503135
Log:
Fix the problem of "-laprutil-1" not being found when running xs/APR/APR/Makefile.PL on Windows

The Apache2::Build module provides apache_libs() which locates this library (and others, which
the linker will quietly ignore if not required) for Windows and Cygwin so use that, inspired
by what is done in ModPerl::BuildMM::WriteMakefile().

Perhaps implementing apache_libs() on other OSes would resolve the FIXME regarding other OSes
in xs/APR/APR/Makefile.PL?

Modified:
    perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL

Modified: perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL?rev=1503135&r1=1503134&r2=1503135&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL (original)
+++ perl/modperl/branches/httpd24/xs/APR/APR/Makefile.PL Mon Jul 15 08:34:26 2013
@@ -25,19 +25,21 @@ $libs = delete $args{LIBS} if $args{LIBS
 
 my $build = ModPerl::BuildMM::build_config();
 
-my @apru_link_flags = $build->apru_link_flags;
-$libs .= join ' ', @apru_link_flags if @apru_link_flags;
-
-if (WIN32) {
-    $libs =~ s{/libpath:}{-L}g;
-    $libs =~ s{(\S+)\.lib}{-l$1}g;
+if (WIN32 || CYGWIN) {
+    $libs .= $build->apache_libs;
+}
+else {
+    my @apru_link_flags = $build->apru_link_flags;
+    $libs .= join ' ', @apru_link_flags if @apru_link_flags;
+    # FIXME: This should be done automatically somewhere in Apache2::Build
+    $libs .= qq{ -laprutil-1 };
 }
 
 if (BUILD_APREXT) {
     my $mp_apr_lib = $build->mp_apr_lib;
 
     if (CYGWIN) {
-        # For Cygwin compatibility, set $mp_apr_lib before the apru flags
+        # For Cygwin compatibility, set $mp_apr_lib before the apache libs
         $libs = qq{ $mp_apr_lib } . $libs;
     } else {
         $libs .= qq{ $mp_apr_lib };
@@ -66,8 +68,6 @@ if (SOLARIS && $libs) {
     $libs =~ s{-R\S+}{}g;
 }
 
-# FIXME: This should be done automatically somewhere in Apache2::Build
-$libs .= qq{ -laprutil-1 };
 $args{LIBS} = [$libs] if $libs;
 
 my $srcdir = '../../../src/modules/perl';



Mime
View raw message