diff -Naur subversion-1.8.0-orig/build/ac-macros/apache.m4 subversion-1.8.0/build/ac-macros/apache.m4
--- subversion-1.8.0-orig/build/ac-macros/apache.m4	2013-04-30 08:01:28.000000000 +0400
+++ subversion-1.8.0/build/ac-macros/apache.m4	2013-06-24 09:18:54.663086000 +0400
@@ -141,7 +141,7 @@
     INSTALL_APACHE_MODS=true
 
     case $host in
-      *-*-cygwin*)
+      *-*-cygwin* | *-*-msys*)
         APACHE_LDFLAGS="-shrext .so"
         ;;
     esac
diff -Naur subversion-1.8.0-orig/build/ac-macros/sqlite.m4 subversion-1.8.0/build/ac-macros/sqlite.m4
--- subversion-1.8.0-orig/build/ac-macros/sqlite.m4	2013-04-20 08:00:52.000000000 +0400
+++ subversion-1.8.0/build/ac-macros/sqlite.m4	2013-06-24 10:09:37.107421900 +0400
@@ -256,7 +256,7 @@
 AC_DEFUN(_SVN_SQLITE_DSO_LIBS,
 [
   case $host_os in
-  beos* | mingw* | pw32* | cegcc* | cygwin*)
+  beos* | mingw* | pw32* | cegcc* | cygwin* | msys*)
     svn_sqlite_dso_ldflags=
     ;;
 
diff -Naur subversion-1.8.0-orig/build/config.guess subversion-1.8.0/build/config.guess
--- subversion-1.8.0-orig/build/config.guess	2013-06-13 13:07:11.000000000 +0400
+++ subversion-1.8.0/build/config.guess	2013-06-24 09:18:54.678711000 +0400
@@ -803,6 +803,9 @@
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
@@ -843,6 +846,9 @@
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	echo x86_64-unknown-msys
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
 	exit ;;
diff -Naur subversion-1.8.0-orig/configure.ac subversion-1.8.0/configure.ac
--- subversion-1.8.0-orig/configure.ac	2013-06-24 09:05:45.530273500 +0400
+++ subversion-1.8.0/configure.ac	2013-06-24 09:18:54.928711000 +0400
@@ -313,7 +313,7 @@
 dnl So we only turn it on for platforms where we know we really need it.
 AC_MSG_CHECKING([whether libtool needs -no-undefined])
 case $host in
-  *-*-cygwin*)
+  *-*-cygwin* | *-*-msys*)
     AC_MSG_RESULT([yes])
     LT_NO_UNDEFINED="-no-undefined"
     ;;
diff -Naur subversion-1.8.0-orig/subversion/bindings/swig/perl/native/Makefile.PL.in subversion-1.8.0/subversion/bindings/swig/perl/native/Makefile.PL.in
--- subversion-1.8.0-orig/subversion/bindings/swig/perl/native/Makefile.PL.in	2012-12-14 10:05:48.000000000 +0400
+++ subversion-1.8.0/subversion/bindings/swig/perl/native/Makefile.PL.in	2013-06-24 09:18:54.944336000 +0400
@@ -65,7 +65,7 @@
 # According to the log of r7937, the flags guarded by the conditional break
 # the build on FreeBSD if not conditionalized.
 my $apr_ldflags = '@SVN_APR_LIBS@'
-   if $^O eq 'darwin' or $^O eq 'cygwin';
+   if $^O eq 'darwin' or $^O eq 'cygwin' or $^O eq 'msys';
 
 chomp $apr_shlib_path_var;
 
diff -Naur subversion-1.8.0-orig/Makefile.in subversion-1.8.0/Makefile.in
--- subversion-1.8.0-orig/Makefile.in	2009-11-19 22:25:52.000000000 +0300
+++ subversion-1.8.0/Makefile.in	2013-06-24 09:18:54.944336000 +0400
@@ -936,7 +936,7 @@
 	@for f in $(SWIG_PY_SRC_DIR)/*.py $(SWIG_PY_DIR)/*.py; do \
 	  ! [ -f "$$f" ] || cp -pf $$f $(SWIG_PY_DIR)/libsvn; \
 	done
-	@cd $(SWIG_PY_DIR)/libsvn;ln -sf ../.libs/*.so .
+	@cd $(SWIG_PY_DIR)/libsvn;ln -sf ../.libs/*.dll .
 	@touch $(SWIG_PY_DIR)/libsvn/__init__.py
 
 swig-py: autogen-swig-py copy-swig-py
