Stas just discovered that when building static, mod_perl's header files ended up
being installed in httpd's build tree. That had 2 bad effects. First, 3rd party
modules wouldn't find the headers. Second, thus polluted, the httpd source tree
wouldn't build anymore, confused by header files that shouldn't be there.
The following patch _fixes_ that problem, but the only way I could manage to do
it was by peeking at config_vars.mk. It did make me think about how we could make
use of config_vars.mk ourselves more directly and not rely on system(apxs) as much
in the future.
Anyways, here is the patch itself.
thanks philippe, please see comments below:
Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 111148)
+++ Makefile.PL (working copy)
@@ -66,6 +66,8 @@
my @exe_files = map "bin/$_", qw(mp2doc mp2bug);
+my $include_dir = $build->ap_exp_includedir() || $build->ap_includedir();
why do we need expose that on the top level and complicate things? why not have ap_includedir() call that internally?
ModPerl::BuildMM::WriteMakefile(
NAME => 'mod_perl',
VERSION => $VERSION,
@@ -78,7 +80,7 @@
MODPERL_MAKEFILE => basename($build->default_file('makefile')),
PERL => $build->perl_config('perlpath'),
MOD_INSTALL => ModPerl::BuildMM::mod_install(),
- MODPERL_AP_INCLUDEDIR => $build->ap_includedir(),
+ MODPERL_AP_INCLUDEDIR => $include_dir,
MODPERL_XS_H_FILES => join(" \\\n\t", @xs_h_files),
},
clean => {
Index: lib/Apache/Build.pm
===================================================================
--- lib/Apache/Build.pm (revision 111148)
+++ lib/Apache/Build.pm (working copy)
@@ -946,6 +946,22 @@
$self->{ap_includedir} = $d;
}
+sub ap_exp_includedir {
+ my ($self) = @_;
+ return unless $self->should_build_apache;
+ my $build_vars = File::Spec->catfile($self->{MP_AP_PREFIX}, + 'build', 'config_vars.mk');
+ open my $vars, "<$build_vars" || die "Couldn't open $build_vars $!";
must be 'or' and not '||', with || it's the same as:
open my $vars, "<$build_vars";
because of the higher precendence of ||.
-- __________________________________________________________________ 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]
