> >Thanks Nick. Committed with a few minor tweaks. >
The following patch fixes the linking of Apache2:: and ModPerl:: extensions on Cygwin, when building a static mod_perl.a.
Some notes on the patch: We have to link Apache2::* and ModPerl::* to mod_perl.a and DynaLoader.a, but -lmod_perl and -lDynaLoader don't work, and we can't supply the full paths, because MakeMaker doesn't allow this. I workaround this by making a symlink to mod_perl.a (called libmod_perl.a) and copy DynaLoader.a to libDynaLoader.a (I don't create a symlink, because, when running make clean, the real DynaLoader.a may get deleted). The APR::* extensions are not affected, because in both cases we link them against aprext. Also other small fixes are added.
Note: This path still doesn't fix the dynamic build on Cygwin.
Nick, I really don't mind to put whatever you think it takes to get things working on cygwin, in the cygwin-specific code. But the bit below worries me:
Index: lib/Apache2/Build.pm
===================================================================
--- lib/Apache2/Build.pm (revision 167901)
+++ lib/Apache2/Build.pm (working copy)
@@ -1059,6 +1059,10 @@
for ($self->apu_config_path, $self->apr_config_path) {
if (my $link = $_ && -x $_ && qx{$_ --link-ld --libs}) {
chomp $link;
+
+ # Change '/path/to/libanything.la' to '-L/path/to -lanything'
+ $link =~ s|(\S*)/lib([^.\s]+)\.\S+|-L$1 -l$2|g;
It changes apru_link_flags(). Now I don't know whether this won't create problems on other platforms/compilers. So if you can make that CYGWIN specific change, I'll gladly put it in.
Thanks Nick.
-- __________________________________________________________________ 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]
