On Sun, 9 Sep 2001, Doug MacEachern wrote:
> On Mon, 10 Sep 2001, Stas Bekman wrote:
>
> > the problem is that $code->generate($build); is running in
> > post_configure(), which means that I don't know $libmodperl (which is
> > $build->{'MODPERL_LIB'}) during MY::post_initialize.
>
> oh right. you can use this instead:
> join '.', $build->{MP_LIBNAME}, $Config{dlext};
But MODPERL_LIB will have .a extension if we make a static build. and
$Config{dlext} "hardcodes" dynamic lib extension. Or we don't care now?
another thing I'm not quit about is using 'src/modules/perl' -- is it
fine to hardcode this path (I know it's a source dir, so it should be
the same all the time) and '/' -- shouldn't we use catfile everywhere?
anyway, here is the new patch (I cannot reach cvs.apache.org now :( ) :
--- test/Makefile.PL Thu Aug 9 00:38:07 2001
+++ registry/Makefile.PL Mon Sep 10 13:13:30 2001
@@ -23,9 +23,11 @@
NAME => 'mod_perl',
VERSION => $VERSION,
macro => {
- MODPERL_SRC => $code->path,
- PERL => $build->perl_config('perlpath'),
- MOD_INSTALL => ModPerl::MM::mod_install(),
+ MODPERL_SRC => $code->path,
+ PERL => $build->perl_config('perlpath'),
+ MOD_INSTALL => ModPerl::MM::mod_install(),
+ APACHE_PREFIX => $build->apxs('-q' => 'prefix'),
+ APACHE_LIBDIR => $build->apxs('-q' => 'libexecdir'),
},
clean => {
FILES => "@{ clean_files() }",
@@ -193,6 +195,8 @@
package MY;
+use Config;
+
sub MY::top_targets {
my $self = shift;
my $string = $self->MM::top_targets;
@@ -239,9 +243,14 @@
sub MY::post_initialize {
my $self = shift;
+
+ my $MODPERL_LIB = join '.', $build->{MP_LIBNAME}, $Config{dlext};
+
#up one from the Apache2/ subdir
#so it can be found for 'use Apache2 ()'
$self->{PM}->{'lib/Apache2.pm'} = "blib/lib/Apache2.pm";
+ $self->{PM}->{"src/modules/perl/$MODPERL_LIB"} =
+ "\$(APACHE_LIBDIR)/$MODPERL_LIB";
'';
}
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]