--- /dev/null
+diff -urN subversion-0.33.1.org/subversion/bindings/swig/perl/Makefile.PL subversion-0.33.1/subversion/bindings/swig/perl/Makefile.PL
+--- subversion-0.33.1.org/subversion/bindings/swig/perl/Makefile.PL 2003-11-30 10:35:26.391367742 +0100
++++ subversion-0.33.1/subversion/bindings/swig/perl/Makefile.PL 2003-11-30 10:37:38.074975507 +0100
+@@ -2,14 +2,17 @@
+ use ExtUtils::MakeMaker;
+
+ my @modules = qw/client delta fs ra repos wc/;
++my @ldpaths = ('../.libs', map {"../../../libsvn_$_/.libs"} (@modules, qw/diff subr/));
+ my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/subr/);
+
+ my $apr_config = $ENV{APR_CONFIG} || '/usr/local/lib/apache2/apr-config';
+ $apr_config = 'apr-config' unless -e $apr_config;
+
++my $apr_shlib_path_var = `$apr_config --shlib-path-var`;
+ my $apr_cflags = `$apr_config --includes`;
+-my $apr_ldflags = `$apr_config --cflags --libs`;
++my $apr_ldflags = `$apr_config --cflags --link-ld --libs`;
+
++chomp $apr_shlib_path_var;
+ chomp $apr_cflags;
+ chomp $apr_ldflags;
+
+@@ -19,7 +22,7 @@
+ ' -I.. -I../../../include -g'),
+ OBJECT => q/$(O_FILES)/,
+ dynamic_lib => {
+- OTHERLDFLAGS => join(' ', $apr_ldflags, '-L/usr/local/lib',
++ OTHERLDFLAGS => join(' ', $apr_ldflags, (map {"-L$_"} @ldpaths),
+ @ldmodules, '-lsvn_swig_perl-1',
+ `swig -perl -ldflags`),
+ },
+@@ -66,6 +69,7 @@
+ (map {"\nsvn_$_.c : ../svn_$_.i ra_plugin.hi ra_reporter.hi delta_editor.hi\n".
+ "\tswig -c -nopm -perl -I.. -I../../../include $apr_cflags -module SVN::_".main::perlish($_)." -o svn_$_.c ../svn_$_.i\n"}
+ @modules),
+-
++ "\nFULLPERLRUN=$apr_shlib_path_var=",join(':',@ldpaths),
++ " \$(FULLPERL)\n",
+ );
+ }