Author: gozer Date: Tue Dec 20 17:22:31 2011 New Revision: 1221359 URL: http://svn.apache.org/viewvc?rev=1221359&view=rev Log: Apache 2.4 and onwards doesn't require linking the MPM module directly in the httpd binary anymore. APXS lost the MPM_NAME query, so we can't assume a given MPM anymore. Introduce a fake MPM 'dynamic' to represent this.
Borrowed from the 2.4 branch Modified: perl/modperl/trunk/Changes perl/modperl/trunk/lib/Apache2/Build.pm Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1221359&r1=1221358&r2=1221359&view=diff ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Tue Dec 20 17:22:31 2011 @@ -12,6 +12,11 @@ Also refer to the Apache::Test changes l =item 2.0.6-dev +Apache 2.4 and onwards doesn't require linking the MPM module directly in +the httpd binary anymore. APXS lost the MPM_NAME query, so we can't assume +a given MPM anymore. Introduce a fake MPM 'dynamic' to represent this. +[Torsten Foertsch, Gozer] + Perl 5.14 brought a few changes in Perl_sv_dup() that made a threaded apache segfault while cloning interpreters. [Torsten Foertsch] Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Build.pm?rev=1221359&r1=1221358&r2=1221359&view=diff ============================================================================== --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Tue Dec 20 17:22:31 2011 @@ -276,7 +276,8 @@ sub caller_package { } my %threaded_mpms = map { $_ => 1 } - qw(worker winnt beos mpmt_os2 netware leader perchild threadpool); + qw(worker winnt beos mpmt_os2 netware leader perchild threadpool + dynamic); sub mpm_is_threaded { my $self = shift; my $mpm_name = $self->mpm_name(); @@ -291,7 +292,15 @@ sub mpm_name { # XXX: hopefully apxs will work on win32 one day return $self->{mpm_name} = 'winnt' if WIN32; - my $mpm_name = $self->apxs('-q' => 'MPM_NAME'); + my $mpm_name; + + # httpd >= 2.3 + if ($self->httpd_version_as_int =~ m/^2[3-9]\d+/) { + $mpm_name = 'dynamic'; + } + else { + $mpm_name = $self->apxs('-q' => 'MPM_NAME'); + } # building against the httpd source dir unless (($mpm_name and $self->httpd_is_source_tree)) {