Kermit Tensmeyer wrote:
regarding changes in Build.pm to support threading.
In Apache::Build::mpm_name, gets the name by calling $self->apxs('-q' => 'MPM_NAME');
How does apxs (either standalone or Apache::Build::apxs) figure out MPM_NAME?
/usr/local/apache2/bin/apxs -q MPM_NAME
I assume that it would get it from the config file (the modperl version
being freeze of the $self object)
As near as I can gather, neither the Apache2 version of the config
file, nor the modperl-2.0 version of the file, contain the information.
$self->build_config loads every value listed in the file into ----- symptoms -----
perl Makefile.PL
Reading Makefile.PL args from /home/kermit/.makepl_args.mod_perl2
MP_AP_PREFIX = /usr/local/apache2
MP_DEBUG = 1
MP_INST_APACHE2 = 1
Configuring Apache/2.1.0-dev mod_perl/1.99_10-dev Perl/v5.8.0
Failed to obtain the MPM name at lib/Apache/Build.pm line 169.
I bet it's using the wrong apxs. do you have something in /usr/local/apache?
Apache::Build::apxs() seems pretty suboptimal to me. I've taken a few looks at it, trying to figure out how to make it better, but I haven't come across the perfect solution yet. when I use MP_APXS in my build arguments, it generally picks the proper apxs, though.
Most likely you have the problem because you are building against the source tree. The following patch should get you going.
However I don't think we should put that in. I think we should not support the build against the source tree. There are too many problems with supporting it. e.g. libapr/libaprutil libs won't be found for the standalone build.
On the other hand we may need to support it once we go for the static build. Ah, ok, I'll commit that for now.
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.132
diff -u -r1.132 Build.pm
--- lib/Apache/Build.pm 12 Aug 2003 17:47:52 -0000 1.132
+++ lib/Apache/Build.pm 12 Aug 2003 20:42:48 -0000
@@ -166,6 +166,23 @@
return $self->{mpm_name} = 'winnt' if WIN32; my $mpm_name = $self->apxs('-q' => 'MPM_NAME');
+
+ # building against the httpd source dir
+ unless ($mpm_name and exists $self->{dir}) {
+ my $config_vars_file = catfile $self->{dir},
+ "build", "config_vars.mk";
+ if (open my $fh, $config_vars_file) {
+ while(<$fh>) {
+ if(/MPM_NAME = (\w+)/) {
+ $mpm_name = $1;
+ last;
+ }
+ last if /^=item/;
+ }
+ close $fh;
+ }
+ }
+
die "Failed to obtain the MPM name" unless $mpm_name;
return $self->{mpm_name} = $mpm_name;
}__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
