diff -Naur subversion-1.2.0_orig/Makefile.in subversion-1.2.0/Makefile.in
--- subversion-1.2.0_orig/Makefile.in	2005-03-31 01:48:42.000000000 +0200
+++ subversion-1.2.0/Makefile.in	2005-04-08 14:21:52.000000000 +0200
@@ -577,7 +577,7 @@
 $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
 	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
 
-swig-pl_DEPS = libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_ra libsvn_repos libsvn_subr libsvn_wc libsvn_swig_perl $(SWIG_PL_DIR)/native/Makefile
+swig-pl_DEPS = libsvn_swig_perl $(SWIG_PL_DIR)/native/Makefile
 swig-pl: $(swig-pl_DEPS)
 	cd $(SWIG_PL_DIR)/native; $(MAKE)
 
diff -Naur subversion-1.2.0_orig/ac-helpers/ltmain.sh subversion-1.2.0/ac-helpers/ltmain.sh
--- subversion-1.2.0_orig/ac-helpers/ltmain.sh	2005-04-05 01:45:29.000000000 +0200
+++ subversion-1.2.0/ac-helpers/ltmain.sh	2005-04-08 14:25:27.000000000 +0200
@@ -4906,7 +4906,7 @@
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-relink_command=\"$relink_command\"
+relink_command=\"\"
 
 # This environment variable determines our operation mode.
 if test \"\$libtool_install_magic\" = \"$magic\"; then
@@ -5303,7 +5303,7 @@
 libdir='$install_libdir'"
 	  if test "$installed" = no && test "$need_relink" = yes; then
 	    $echo >> $output "\
-relink_command=\"$relink_command\""
+relink_command=\"\""
 	  fi
 	done
       fi
diff -Naur subversion-1.2.0_orig/build/generator/gen_make.py subversion-1.2.0/build/generator/gen_make.py
--- subversion-1.2.0_orig/build/generator/gen_make.py	2005-03-22 16:08:25.000000000 +0100
+++ subversion-1.2.0/build/generator/gen_make.py	2005-04-08 15:24:29.000000000 +0200
@@ -5,6 +5,7 @@
 import os
 import sys
 import string
+import ConfigParser
 
 import gen_base
 
@@ -39,6 +40,13 @@
     install_deps = self.graph.get_deps(gen_base.DT_INSTALL)
     install_sources = self.graph.get_all_sources(gen_base.DT_INSTALL)
 
+    cp = ConfigParser.ConfigParser()
+    cp.read('gen-make.opts')
+    if cp.has_option('options', '--installed-libs'):
+      self.installed_libs = cp.get('options', '--installed-libs').split(',')
+    else:
+      self.installed_libs = []
+
     # ensure consistency between runs
     install_deps.sort()
     install_sources.sort(lambda s1, s2: cmp(s1.name, s2.name))
@@ -54,11 +62,17 @@
 
         # construct a list of the other .la libs to link against
         retreat = build_path_retreat(target.path)
-        deps = [ target.filename ]
-        link = [ build_path_join(retreat, target.filename) ]
+        if target.name in self.installed_libs:
+          deps = []
+          link = [ '-l%s-%s' % (target.name[3:], self.version) ]
+        else:
+           deps = [ target.filename ]
+           link = [ build_path_join(retreat, target.filename) ]
         for source in self.graph.get_sources(gen_base.DT_LINK, target.name):
           if not isinstance(source, gen_base.TargetLib) or source.external_lib:
             continue
+          elif source.name in self.installed_libs:
+            continue
           deps.append(source.filename)
           link.append(build_path_join(retreat, source.filename))
 
@@ -136,6 +150,8 @@
         elif isinstance(link_dep, gen_base.TargetLinked):
           if link_dep.external_lib:
             libs.append(link_dep.external_lib)
+          elif link_dep.name in self.installed_libs:
+            libs.append('-l%s-%s' % (link_dep.name[3:], self.version))
           else:
             # append the output of the target to our stated dependencies
             deps.append(link_dep.filename)
diff -Naur subversion-1.2.0_orig/gen-make.py subversion-1.2.0/gen-make.py
--- subversion-1.2.0_orig/gen-make.py	2005-01-31 13:11:57.000000000 +0100
+++ subversion-1.2.0/gen-make.py	2005-04-08 14:45:18.000000000 +0200
@@ -81,6 +81,13 @@
   print
   print "           The default generator type is 'make'"
   print
+  print "  UNIX-specific options:"
+  print
+  print "  --installed-libs"
+  print "           Comma-separated list of Subversion libraries to find"
+  print "           pre-installed instead of building (probably only"
+  print "           useful for packagers)"
+  print
   print "  Windows-specific options:"
   print
   print "  --with-apr=DIR"
@@ -176,6 +183,7 @@
                                 'enable-nls',
                                 'enable-bdb-in-apr-util',
                                 'vsnet-version=',
+                                'installed-libs=',
                                 ])
     if len(args) > 1:
       _usage_exit()
diff -Naur subversion-1.2.0_orig/subversion/bindings/swig/perl/native/Makefile.PL.in subversion-1.2.0/subversion/bindings/swig/perl/native/Makefile.PL.in
--- subversion-1.2.0_orig/subversion/bindings/swig/perl/native/Makefile.PL.in	2005-03-22 10:31:58.000000000 +0100
+++ subversion-1.2.0/subversion/bindings/swig/perl/native/Makefile.PL.in	2005-04-08 15:12:47.000000000 +0200
@@ -3,7 +3,7 @@
 use Config;
 use Cwd 'abs_path';
 
-my $perl_path = $Config{perlpath};
+my $perl_path = $^X;
 if ($^O ne 'VMS') {
   $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
 }
@@ -105,7 +105,6 @@
 
    my $swig_modules_command = join ('',
                               map {"\nsvn_$_.c : $swig_srcdir/svn_$_.i ".
-                                   "$svnlib_builddir/libsvn_$_/libsvn_$_-1.la ".
                                    "ra_plugin.hi ra_reporter.hi ".
                                    "delta_editor.hi\n" .
                                    "\t$swig_command".
diff -Naur subversion-1.2.0_orig/svn-config.in subversion-1.2.0/svn-config.in
--- subversion-1.2.0_orig/svn-config.in	2003-12-16 17:41:14.000000000 +0100
+++ subversion-1.2.0/svn-config.in	2005-04-08 14:46:56.000000000 +0200
@@ -22,10 +22,10 @@
 libdir="@libdir@"
 includedir="@includedir@"
 
-LIBS="@NEON_LIBS@ @SVN_APRUTIL_EXPORT_LIBS@ @SVN_APR_EXPORT_LIBS@ @SVN_DB_LIBS@ @LIBS@"
+LIBS="@NEON_LIBS@ @SVN_APRUTIL_EXPORT_LIBS@ @SVN_APR_EXPORT_LIBS@ @LIBS@"
 CFLAGS="@CFLAGS@"
 CPPFLAGS="@CPPFLAGS@"
-INCLUDES="@SVN_NEON_INCLUDES@ @SVN_DB_INCLUDES@ @SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@"
+INCLUDES="@SVN_NEON_INCLUDES@ @SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@"
 LDFLAGS="@LDFLAGS@"
 
 SVN_SOURCE_DIR="@abs_srcdir@"
