diff -Naur mpfr-3.1.2/acinclude.m4 mpfr-3.1.2-p/acinclude.m4 --- mpfr-3.1.2/acinclude.m4 2013-03-13 19:37:46.000000000 +0400 +++ mpfr-3.1.2-p/acinclude.m4 2013-03-18 07:13:02.093333305 +0400 @@ -783,7 +783,7 @@ [AC_REQUIRE([AC_CANONICAL_HOST]) AC_SUBST(MPFR_LIBM,'') case $host in - *-*-beos* | *-*-cygwin* | *-*-pw32*) + *-*-beos* | *-*-cygwin* | *-*-msys* | *-*-pw32*) # According to libtool AC CHECK LIBM, these systems don't have libm ;; *-*-solaris*) diff -Naur mpfr-3.1.2/compile mpfr-3.1.2-p/compile --- mpfr-3.1.2/compile 2013-03-13 19:38:21.000000000 +0400 +++ mpfr-3.1.2-p/compile 2013-03-18 07:13:02.103333233 +0400 @@ -54,7 +54,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) diff -Naur mpfr-3.1.2/configure.ac mpfr-3.1.2-p/configure.ac --- mpfr-3.1.2/configure.ac 2013-03-13 19:37:46.000000000 +0400 +++ mpfr-3.1.2-p/configure.ac 2013-03-18 07:13:02.149999846 +0400 @@ -359,7 +359,7 @@ AC_SUBST(LIBMPFR_LDFLAGS) AC_LIBTOOL_WIN32_DLL case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2*) AC_MSG_CHECKING(for DLL/static GMP) if test "$enable_shared" = yes; then MPFR_LDFLAGS="$MPFR_LDFLAGS -no-undefined"