6712ef
diff -uap subversion-1.7.0/build.conf.rpath subversion-1.7.0/build.conf
6712ef
--- subversion-1.7.0/build.conf.rpath	2011-08-04 21:18:50.000000000 +0100
6712ef
+++ subversion-1.7.0/build.conf	2011-10-12 09:23:43.844525530 +0100
6712ef
@@ -478,7 +478,7 @@ type = swig_lib
6712ef
 lang = python
6712ef
 path = subversion/bindings/swig/python/libsvn_swig_py
6712ef
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
6712ef
-link-cmd = $(LINK)
6712ef
+link-cmd = $(LINK_LIB)
6712ef
 install = swig-py-lib
6712ef
 # need special build rule to include -DSWIGPYTHON
6712ef
 compile-cmd = $(COMPILE_SWIG_PY)
6712ef
@@ -501,7 +501,7 @@ type = swig_lib
6712ef
 lang = ruby
6712ef
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
6712ef
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
6712ef
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
6712ef
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
6712ef
 install = swig-rb-lib
6712ef
 # need special build rule to include
6712ef
 compile-cmd = $(COMPILE_SWIG_RB)
6712ef
diff -uap subversion-1.7.0/build/generator/gen_base.py.rpath subversion-1.7.0/build/generator/gen_base.py
6712ef
--- subversion-1.7.0/build/generator/gen_base.py.rpath	2011-06-22 17:44:54.000000000 +0100
6712ef
+++ subversion-1.7.0/build/generator/gen_base.py	2011-10-12 09:23:15.368649375 +0100
6712ef
@@ -506,6 +506,10 @@ class TargetLib(TargetLinked):
6712ef
     self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
6712ef
     self.msvc_export = options.get('msvc-export', '').split()
6712ef
 
6712ef
+    ### hmm. this is Makefile-specific
6712ef
+    if self.link_cmd == '$(LINK)':
6712ef
+      self.link_cmd = '$(LINK_LIB)'
6712ef
+
6712ef
 class TargetApacheMod(TargetLib):
6712ef
 
6712ef
   def __init__(self, name, options, gen_obj):
6712ef
diff -uap subversion-1.7.0/Makefile.in.rpath subversion-1.7.0/Makefile.in
6712ef
--- subversion-1.7.0/Makefile.in.rpath	2011-07-16 12:50:53.000000000 +0100
6712ef
+++ subversion-1.7.0/Makefile.in	2011-10-12 09:24:36.165524732 +0100
6712ef
@@ -203,8 +203,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
6712ef
 COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
6712ef
 COMPILE_JAVAHL_JAVAH = $(JAVAH)
6712ef
 
6712ef
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
6712ef
-LINK_LIB = $(LINK) $(LT_SO_VERSION)
6712ef
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
6712ef
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
6712ef
 LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
6712ef
 LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
6712ef