Build for multiple python versions.  Patch from Matthias Klose
<doko@debian.org> via Ubuntu.  Mostly, rename libsvn_swig_py to
libsvn_swig_py2.x.

Submitted upstream: http://svn.haxx.se/dev/archive-2008-05/0361.shtml

--- a/Makefile.in
+++ b/Makefile.in
@@ -140,6 +140,7 @@
 GMOCK_INCLUDES = -I@GMOCK_SRCDIR@
 
 SWIG = @SWIG@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
 SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py
 SWIG_PY_COMPILE = @SWIG_PY_COMPILE@
 SWIG_PY_LINK = @SWIG_PY_LINK@
--- a/build/ac-macros/swig.m4
+++ b/build/ac-macros/swig.m4
@@ -109,7 +109,8 @@
     AC_CACHE_CHECK([for Python includes], [ac_cv_python_includes],[
       ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`"
     ])
-    SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes"
+    PYTHON_INCLUDES="$ac_cv_python_includes"
+    SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) \$(PYTHON_INCLUDES)"
 
     if test "$ac_cv_python_includes" = "none"; then
       AC_MSG_WARN([python bindings cannot be built without distutils module])
@@ -295,6 +296,7 @@
       AC_MSG_RESULT([$SWIG_RB_TEST_VERBOSE])
   fi
   AC_SUBST(SWIG)
+  AC_SUBST(PYTHON_INCLUDES)
   AC_SUBST(SWIG_PY_INCLUDES)
   AC_SUBST(SWIG_PY_COMPILE)
   AC_SUBST(SWIG_PY_LINK)
--- a/build.conf
+++ b/build.conf
@@ -487,7 +487,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = core.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_diff libsvn_subr apr
 description = Subversion core library bindings
 
@@ -495,7 +495,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_client.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_client libsvn_subr apr
 nonlibs = swig_core
 description = Subversion client library bindings
@@ -504,7 +504,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_delta.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_delta libsvn_subr apr
 nonlibs = swig_core
 description = Subversion delta library bindings
@@ -513,7 +513,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_diff.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_diff libsvn_subr apr
 nonlibs = swig_core
 description = Subversion diff library bindings
@@ -522,7 +522,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_fs.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_fs libsvn_subr apr
 nonlibs = swig_core
 description = Subversion FS library bindings
@@ -531,7 +531,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_ra.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_ra libsvn_subr apr
 nonlibs = swig_core
 description = Subversion RA library bindings
@@ -540,7 +540,7 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_repos.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_repos libsvn_subr apr
 nonlibs = swig_core
 description = Subversion repository library bindings
@@ -549,13 +549,13 @@
 type = swig
 path = subversion/bindings/swig
 sources = svn_wc.i
-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
+libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby
        libsvn_wc libsvn_subr apr
 nonlibs = swig_core
 description = Subversion WC library bindings
 
 # SWIG utility library for Python modules
-[libsvn_swig_py]
+[libsvn_swig_py$(PYVER)]
 type = swig_lib
 lang = python
 path = subversion/bindings/swig/python/libsvn_swig_py
