perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [patch] xs/APR/APR/Makefile.PL
Date Wed, 27 Nov 2002 01:18:37 GMT
Doug MacEachern wrote:
> note that ap[ur]-config will be required, as there may be other libs such 
> as -lgdbm.  i've disabled the linking for the moment.  i suppose if you 
> patch was modified to enable only if -x $apr_config && -x $apu_config, 
> that'd be ok.  we just won't support older versions of apr or platforms 
> that don't have the script for the moment.  still, low priority, unlikely 
> anybody will need this functionality in the near future.

are we good now?

Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.5
diff -u -r1.5 Makefile.PL
--- xs/APR/APR/Makefile.PL      26 Nov 2002 17:09:03 -0000      1.5
+++ xs/APR/APR/Makefile.PL      27 Nov 2002 01:17:17 -0000
@@ -4,16 +4,15 @@

  my $prefix = ModPerl::MM::build_config()->apxs(-q => 'PREFIX');

-my $libdir = "$prefix/lib";
-
-my @libs = map "-l$_", qw(apr aprutil);
+# XXX: this works only with libapr 0.9.2+ (not on win32)
+my @libs = grep $_, map { -x $_ && qx{$_ --link-ld} }
+    map { qx{$prefix/bin/$_-config} } qw(apr apu);
+chomp @libs;
+my $define = @libs ? '-DMP_HAVE_APR_LIBS' : '';

  ModPerl::MM::WriteMakefile(
      'NAME'        => 'APR',
      'VERSION_FROM' => 'APR.pm',
-#XXX: no longer works with apr's goofy versioning scheme
-#low priority to fix as nobody is using Perl APR bindings
-#outside of httpd
-#    'LIBS'         => ["-L$libdir @libs"],
-#    'DEFINE'       => '-DMP_HAVE_APR_LIBS', #only if @libs are found
+    'LIBS'         => \@libs,
+    'DEFINE'       => $define,
  );



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message