Author: pgollucci
Date: Fri Sep  8 00:32:49 2006
New Revision: 441414

URL: http://svn.apache.org/viewvc?view=rev&rev=441414
Log:
This seems to work for integration with mp2 Dynamic builds.

Note: this requires corresponding changes in mp2's top-level Makefile.PL

TODO:
  Static builds

Modified:
    perl/Apache-SizeLimit/trunk/Makefile.PL

Modified: perl/Apache-SizeLimit/trunk/Makefile.PL
URL: 
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Makefile.PL?view=diff&rev=441414&r1=441413&r2=441414
==============================================================================
--- perl/Apache-SizeLimit/trunk/Makefile.PL (original)
+++ perl/Apache-SizeLimit/trunk/Makefile.PL Fri Sep  8 00:32:49 2006
@@ -6,11 +6,18 @@
 my %mp2 = ( mod_perl2 => 1.99022 );
 my %mp1 = ( mod_perl  => 0 );
 
+my $mp_gen;
+if ($ENV{MOD_PERL_2_BUILD}) {
+    push @ARGV, "-apxs $ENV{MP_APXS}";
+    my $mp_gen = satisfy_mp_generation(2);
+}
+else {
+    $mp_gen = satisfy_mp_generation();
+}
 
-my $mp_gen = satisfy_mp_generation();
 %prereqs = ($mp_gen == 1 ? %mp1 : %mp2);
 
-unless ( $ARGV[0] eq '--dist' ) {
+unless ( $ARGV[0] eq '--dist' || $ENV{MOD_PERL_2_BUILD} ) {
     if ( $Config{'osname'} eq 'linux' ) {
         $prereqs{'Linux::Pid'} = 0;
         if ( -e '/proc/self/smaps' ) {
@@ -52,6 +59,9 @@
                               );
 }
 
+if ($ENV{MOD_PERL_2_BUILD}) {
+    pop @ARGV;
+}
 
 sub check_for_apache_test {
     return unless eval {


Reply via email to