Author: stas
Date: Thu Mar 16 16:40:43 2006
New Revision: 386498
URL: http://svn.apache.org/viewcvs?rev=386498&view=rev
Log:
Make sure that LIBS and other MakeMaker command line flags are not
ignored by the top level Makefile.PL and xs/APR/APR/Makefile.PL
Modified:
perl/modperl/trunk/Changes
perl/modperl/trunk/lib/ModPerl/BuildMM.pm
perl/modperl/trunk/xs/APR/APR/Makefile.PL
Modified: perl/modperl/trunk/Changes
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=386498&r1=386497&r2=386498&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Mar 16 16:40:43 2006
@@ -12,6 +12,9 @@
=item 2.0.3-dev
+Make sure that LIBS and other MakeMaker command line flags are not
+ignored by the top level Makefile.PL and xs/APR/APR/Makefile.PL [Stas]
+
Corrected a typo that would cause the corruption of $), the
effective group id as Perl sees it [Gozer]
Modified: perl/modperl/trunk/lib/ModPerl/BuildMM.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/ModPerl/BuildMM.pm?rev=386498&r1=386497&r2=386498&view=diff
==============================================================================
--- perl/modperl/trunk/lib/ModPerl/BuildMM.pm (original)
+++ perl/modperl/trunk/lib/ModPerl/BuildMM.pm Thu Mar 16 16:40:43 2006
@@ -75,7 +75,9 @@
$build ||= build_config();
ModPerl::MM::my_import(__PACKAGE__);
- my $inc = $build->inc;
+ my $inc;
+ $inc = $args{INC} if $args{INC};
+ $inc = " " . $build->inc;
if (my $glue_inc = $build->{MP_XS_GLUE_DIR}) {
for (split /\s+/, $glue_inc) {
$inc .= " -I$_";
@@ -84,6 +86,7 @@
my $libs;
my @libs = ();
+ push @libs, $args{LIBS} if $args{LIBS};
if (Apache2::Build::BUILD_APREXT) {
# in order to decouple APR/APR::* from mod_perl.so,
# link these modules against the static MP_APR_LIB lib,
@@ -105,18 +108,33 @@
}
$libs = join ' ', @libs;
- my $ccflags = $build->perl_ccopts . $build->ap_ccopts;
+ my $ccflags;
+ $ccflags = $args{CCFLAGS} if $args{CCFLAGS};
+ $ccflags = " " . $build->perl_ccopts . $build->ap_ccopts;
+
+ my $optimize;
+ $optimize = $args{OPTIMIZE} if $args{OPTIMIZE};
+ $optimize = " " . $build->perl_config('optimize');
+
+ my $lddlflags;
+ $lddlflags = $args{LDDLFLAGS} if $args{LDDLFLAGS};
+ $lddlflags = " " . $build->perl_config('lddlflags');
+
+ my %dynamic_lib;
+ %dynamic_lib = %{ $args{dynamic_lib}||{} } if $args{dynamic_lib};
+ $dynamic_lib{OTHERLDFLAGS} = $build->otherldflags;
my @opts = (
- INC => $inc,
- CCFLAGS => $ccflags,
- OPTIMIZE => $build->perl_config('optimize'),
- LDDLFLAGS => $build->perl_config('lddlflags'),
- LIBS => $libs,
- dynamic_lib => { OTHERLDFLAGS => $build->otherldflags },
+ INC => $inc,
+ CCFLAGS => $ccflags,
+ OPTIMIZE => $optimize,
+ LDDLFLAGS => $lddlflags,
+ LIBS => $libs,
+ dynamic_lib => \%dynamic_lib,
);
my @typemaps;
+ push @typemaps, $args{TYPEMAPS} if $args{TYPEMAPS};
my $pwd = Cwd::fastcwd();
for ('xs', $pwd, "$pwd/..") {
my $typemap = $build->file_path("$_/typemap");
Modified: perl/modperl/trunk/xs/APR/APR/Makefile.PL
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/APR/APR/Makefile.PL?rev=386498&r1=386497&r2=386498&view=diff
==============================================================================
--- perl/modperl/trunk/xs/APR/APR/Makefile.PL (original)
+++ perl/modperl/trunk/xs/APR/APR/Makefile.PL Thu Mar 16 16:40:43 2006
@@ -13,12 +13,16 @@
use constant SOLARIS => $^O eq 'solaris';
use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT;
-my %args = (
- 'NAME' => 'APR',
- 'VERSION_FROM' => 'APR.pm',
-);
+my %args;
+
+%args = map { split /=/, $_ } @ARGV;
+
+$args{NAME} = 'APR';
+$args{VERSION_FROM} = 'APR.pm';
my $libs = '';
+$libs = delete $args{LIBS} if $args{LIBS};
+
my $build = ModPerl::BuildMM::build_config();
my @apru_link_flags = $build->apru_link_flags;
@@ -53,7 +57,9 @@
# -R makes sure that these paths will be used
$extralddflags =~ s{-L(\S+)}{-L$1 -R$1}g;
- $args{LDDLFLAGS} = $extralddflags . " " . $build->perl_config('lddlflags');
+ $args{LDDLFLAGS} = "" unless exists $args{LDDLFLAGS};
+ $args{LDDLFLAGS} = join " ", $args{LDDLFLAGS}, $extralddflags,
+ $build->perl_config('lddlflags');
# -R are now copied to LDDFLAGS, but leave -L's in LIBS --
# EU::MM needs it.