diff -Naur readline-6.3-orig/configure readline-6.3/configure --- readline-6.3-orig/configure 2013-03-13 18:14:53.000000000 +0400 +++ readline-6.3/configure 2014-02-28 06:55:23.119200000 +0400 @@ -2404,7 +2404,7 @@ CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) diff -Naur readline-6.3-orig/configure.ac readline-6.3/configure.ac --- readline-6.3-orig/configure.ac 2014-02-12 02:12:39.000000000 +0400 +++ readline-6.3/configure.ac 2014-02-28 06:55:23.493600000 +0400 @@ -77,7 +77,7 @@ CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in - *-cygwin*) + *-cygwin* | *-msys*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) diff -Naur readline-6.3-orig/support/config.guess readline-6.3/support/config.guess --- readline-6.3-orig/support/config.guess 2013-12-17 01:02:33.000000000 +0400 +++ readline-6.3/support/config.guess 2014-02-28 06:55:23.493600000 +0400 @@ -866,6 +866,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 readline-6.3-orig/support/config.rpath readline-6.3/support/config.rpath --- readline-6.3-orig/support/config.rpath 2008-08-20 17:21:09.000000000 +0400 +++ readline-6.3/support/config.rpath 2014-02-28 06:55:23.493600000 +0400 @@ -108,7 +108,7 @@ hardcode_minus_L=no case "$host_os" in - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -148,7 +148,7 @@ ld_shlibs=no fi ;; - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -267,7 +267,7 @@ ;; bsdi4*) ;; - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -439,7 +439,7 @@ ;; bsdi4*) ;; - cygwin* | mingw* | pw32*) + cygwin* | msys* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) diff -Naur readline-6.3-orig/support/shlib-install readline-6.3/support/shlib-install --- readline-6.3-orig/support/shlib-install 2012-07-10 23:58:08.000000000 +0400 +++ readline-6.3/support/shlib-install 2014-02-28 06:55:23.509200000 +0400 @@ -75,9 +75,9 @@ if [ -z "$uninstall" ]; then chmod 555 ${INSTALLDIR}/${LIBNAME} fi ;; -cygwin*|mingw*) +cygwin*|msys*|mingw*) IMPLIBNAME=`echo ${LIBNAME} \ - | sed -e 's,^cyg,lib,' -e 's,[0-9]*.dll$,.dll.a,'` + | sed -e 's,^msys-,lib,' -e 's,[0-9]*.dll$,.dll.a,'` if [ -z "$uninstall" ]; then ${echo} $RM ${BINDIR}/${LIBNAME}.${OLDSUFF} if [ -f "$BINDIR/$LIBNAME" ]; then @@ -194,7 +194,7 @@ fi ;; -cygwin*|mingw*) +cygwin*|msys*|mingw*) # Links to .dlls don't work. Hence shobj-conf used DLLVERSION.dll # instead of so.SHLIB_MAJOR.SHLIB_MINOR. The postinstall above # took care of everything else. diff -Naur readline-6.3-orig/support/shobj-conf readline-6.3/support/shobj-conf --- readline-6.3-orig/support/shobj-conf 2014-02-24 06:06:29.000000000 +0400 +++ readline-6.3/support/shobj-conf 2014-02-28 06:55:23.509200000 +0400 @@ -535,6 +535,24 @@ fi ;; +msys*) + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' + SHLIB_LIBPREF='msys-' + SHLIB_LIBSUFF='dll' + SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' + SHLIB_LIBS='$(TERMCAP_LIB)' + + SHLIB_DOT= + # For official cygwin releases, DLLVERSION will be defined in the + # environment of configure, and will be incremented any time the API + # changes in a non-backwards compatible manner. Otherwise, it is just + # SHLIB_MAJOR. + if [ -n "$DLLVERSION" ] ; then + SHLIB_DLLVERSION="$DLLVERSION" + fi + ;; + mingw*) SHOBJ_LD='$(CC)' SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'