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
@@ -144,6 +144,7 @@
 GOOGLEMOCK_LIB_INCLUDES = -I@GOOGLEMOCK_SRCDIR@/googlemock -I@GOOGLEMOCK_SRCDIR@/googletest $(GOOGLEMOCK_INCLUDES)
 
 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
@@ -107,7 +107,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])
@@ -296,6 +297,7 @@
     fi
   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
@@ -494,7 +494,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
 
@@ -502,7 +502,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
@@ -511,7 +511,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
@@ -520,7 +520,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
@@ -529,7 +529,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
@@ -538,7 +538,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
@@ -547,7 +547,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
@@ -556,13 +556,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
