gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated (edf692a6 -> b6f9ef42)


From: gnunet
Subject: [libmicrohttpd] branch master updated (edf692a6 -> b6f9ef42)
Date: Mon, 10 Apr 2023 19:13:42 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from edf692a6 Implemented and used new function MHD_pool_deallocate()
     new 2854eab9 Updated libtool fixes
     new 420468d3 Removed autotools files from git
     new d2919a6e Added autoconf patches and fixes
     new b6f9ef42 contrib/make-dist.sh: added new helper script

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |   12 +-
 Makefile.am                                        |   11 +-
 build-aux/config.rpath                             |  684 ----------
 .../0003-Pass-various-flags-to-GCC.patch           |   20 -
 ...us-runtime-library-flags-to-GCC.mingw-mod.patch |   30 -
 .../0009-libtool-2.4.2.418-msysize-mod.patch       |  443 ------
 contrib/autotools-patches/apply-all.sh             |   38 -
 contrib/fixes-autoconf/apply-all.sh                |   53 +
 contrib/fixes-autoconf/c_backported.m4             |  565 ++++++++
 ...us-runtime-library-flags-to-GCC.mingw.mod.patch |   31 +
 .../0006-Fix-strict-ansi-vs-posix.patch}           |   10 +-
 .../0009-libtool-2.4.2.418-msysize.patch           | 1403 ++++++++++++++++++++
 .../0010-libtool-2.4.2-include-process-h.patch}    |   12 +
 ...ng_rt-static-archives-compiler-internal-l.patch |    0
 ...nse-files-over-linker-scripts-for-mingw-.patch} |    6 +-
 ...ally-linking-compiler-support-libraries-.patch} |    6 +-
 .../0014-Support-llvm-objdump-f-output.patch}      |    6 +-
 contrib/fixes-libtool/apply-all.sh                 |   65 +
 contrib/make-dist.sh                               |   96 ++
 m4/.gitignore                                      |    1 +
 20 files changed, 2251 insertions(+), 1241 deletions(-)
 delete mode 100755 build-aux/config.rpath
 delete mode 100644 
contrib/autotools-patches/0003-Pass-various-flags-to-GCC.patch
 delete mode 100644 
contrib/autotools-patches/0003-Pass-various-runtime-library-flags-to-GCC.mingw-mod.patch
 delete mode 100644 
contrib/autotools-patches/0009-libtool-2.4.2.418-msysize-mod.patch
 delete mode 100755 contrib/autotools-patches/apply-all.sh
 create mode 100755 contrib/fixes-autoconf/apply-all.sh
 create mode 100644 contrib/fixes-autoconf/c_backported.m4
 create mode 100644 
contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
 rename contrib/{autotools-patches/0006-Fix-strict-ansi-vs-posix-mod.patch => 
fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch} (76%)
 create mode 100644 contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch
 rename 
contrib/{autotools-patches/0010-libtool-2.4.2-include-process-h-mod.patch => 
fixes-libtool/0010-libtool-2.4.2-include-process-h.patch} (50%)
 rename contrib/{autotools-patches => 
fixes-libtool}/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch 
(100%)
 rename 
contrib/{autotools-patches/0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
 => 
fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch} 
(97%)
 rename 
contrib/{autotools-patches/0013-Allow-statically-linking-compiler-support-libraries-mod.patch
 => 
fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch} 
(91%)
 rename contrib/{autotools-patches/0014-Support-llvm-objdump-f-output-mod.patch 
=> fixes-libtool/0014-Support-llvm-objdump-f-output.patch} (93%)
 create mode 100755 contrib/fixes-libtool/apply-all.sh
 create mode 100755 contrib/make-dist.sh

diff --git a/.gitignore b/.gitignore
index 62ce5a08..7fd8e8ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,17 +13,7 @@ Makefile
 /config.log
 /app.info
 /debug
-/build-aux/texinfo.tex
-/build-aux/config.sub
-/build-aux/depcomp
-/build-aux/install-sh
-/build-aux/ltmain.sh
-/build-aux/mdate-sh
-/build-aux/test-driver
-/build-aux/config.guess
-/build-aux/config.rpath
-/build-aux/compile
-/build-aux/missing
+/build-aux/*
 /exclude
 /autom4te.cache
 /scripts
diff --git a/Makefile.am b/Makefile.am
index 91f58ad4..c2bb9005 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,7 +48,7 @@ pkgconfig_DATA = libmicrohttpd.pc
 EXTRA_DIST += pre-dist-hook-dummy
 MOSTLYCLEANFILES = pre-dist-hook-dummy
 DISTCLEANFILES = 
-MAINTAINERCLEANFILES = 
+MAINTAINERCLEANFILES = m4/c_backported.m4
 
 pre-dist-hook-dummy: pre-dist-hook Makefile
        @echo "dummy" > $@
@@ -57,6 +57,15 @@ dist-hook: dist-po
        @chmod u+w '$(distdir)/pre-dist-hook-dummy' && \
          rm -f '$(distdir)/pre-dist-hook-dummy'
        @rm -f pre-dist-hook-dummy
+       @if test -w '$(distdir)/m4/c_backported.m4'; then \
+         echo "Use empty m4/c_backported.m4 for dist target"; \
+         touch -r '$(distdir)/m4/c_backported.m4' 
'$(distdir)/m4/c_backported.m4-tmst' && \
+           echo '# Not used for distribution' > 
'$(distdir)/m4/c_backported.m4' && \
+           touch -r '$(distdir)/m4/c_backported.m4-tmst' 
'$(distdir)/m4/c_backported.m4' && \
+           rm -f '$(distdir)/m4/c_backported.m4-tmst'; \
+       else \
+         true; \
+       fi
 
 pre-dist-hook: pre-dist-hook-doc
        @echo "Preparing to make dist"
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
deleted file mode 100755
index 24be79cf..00000000
--- a/build-aux/config.rpath
+++ /dev/null
@@ -1,684 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-#   Copyright 1996-2020 Free Software Foundation, Inc.
-#   Taken from GNU libtool, 2001
-#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-#   This file is free software; the Free Software Foundation gives
-#   unlimited permission to copy and/or distribute it, with or without
-#   modifications, as long as this notice is preserved.
-#
-# The first argument passed to this file is the canonical host specification,
-#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-#   than 256 bytes, otherwise the compiler driver will dump core. The only
-#   known workaround is to choose shorter directory names for the build
-#   directory and/or the installation directory.
-
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's _LT_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
-  wl='-Wl,'
-else
-  case "$host_os" in
-    aix*)
-      wl='-Wl,'
-      ;;
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      ;;
-    hpux9* | hpux10* | hpux11*)
-      wl='-Wl,'
-      ;;
-    irix5* | irix6* | nonstopux*)
-      wl='-Wl,'
-      ;;
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
-      case $cc_basename in
-        ecc*)
-          wl='-Wl,'
-          ;;
-        icc* | ifort*)
-          wl='-Wl,'
-          ;;
-        lf95*)
-          wl='-Wl,'
-          ;;
-        nagfor*)
-          wl='-Wl,-Wl,,'
-          ;;
-        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-          wl='-Wl,'
-          ;;
-        ccc*)
-          wl='-Wl,'
-          ;;
-        xl* | bgxl* | bgf* | mpixl*)
-          wl='-Wl,'
-          ;;
-        como)
-          wl='-lopt='
-          ;;
-        *)
-          case `$CC -V 2>&1 | sed 5q` in
-            *Sun\ F* | *Sun*Fortran*)
-              wl=
-              ;;
-            *Sun\ C*)
-              wl='-Wl,'
-              ;;
-          esac
-          ;;
-      esac
-      ;;
-    newsos6)
-      ;;
-    *nto* | *qnx*)
-      ;;
-    osf3* | osf4* | osf5*)
-      wl='-Wl,'
-      ;;
-    rdos*)
-      ;;
-    solaris*)
-      case $cc_basename in
-        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-          wl='-Qoption ld '
-          ;;
-        *)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
-    sunos4*)
-      wl='-Qoption ld '
-      ;;
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      wl='-Wl,'
-      ;;
-    sysv4*MP*)
-      ;;
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      wl='-Wl,'
-      ;;
-    unicos*)
-      wl='-Wl,'
-      ;;
-    uts4*)
-      ;;
-  esac
-fi
-
-# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # 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++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # Set some defaults for GNU ld with shared library support. These
-  # are reset later if shared libraries are not supported. Putting them
-  # here allows them to be overridden if necessary.
-  # Unlike libtool, we use -rpath here, not --rpath, since the documented
-  # option of GNU ld is called -rpath, not --rpath.
-  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-  case "$host_os" in
-    aix[3-9]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-        ld_shlibs=no
-      fi
-      ;;
-    amigaos*)
-      case "$host_cpu" in
-        powerpc)
-          ;;
-        m68k)
-          hardcode_libdir_flag_spec='-L$libdir'
-          hardcode_minus_L=yes
-          ;;
-      esac
-      ;;
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    cygwin* | mingw* | pw32* | cegcc*)
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    haiku*)
-      ;;
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      ;;
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    netbsd*)
-      ;;
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-        ld_shlibs=no
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-          ld_shlibs=no
-          ;;
-        *)
-          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
-            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-rpath,$libdir`'
-          else
-            ld_shlibs=no
-          fi
-          ;;
-      esac
-      ;;
-    sunos4*)
-      hardcode_direct=yes
-      ;;
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-  esac
-  if test "$ld_shlibs" = no; then
-    hardcode_libdir_flag_spec=
-  fi
-else
-  case "$host_os" in
-    aix3*)
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes; then
-        # Neither direct hardcoding nor static linking is supported with a
-        # broken collect2.
-        hardcode_direct=unsupported
-      fi
-      ;;
-    aix[4-9]*)
-      if test "$host_cpu" = ia64; then
-        # On IA64, the linker does run time linking by default, so we don't
-        # have to do anything special.
-        aix_use_runtimelinking=no
-      else
-        aix_use_runtimelinking=no
-        # Test if we are trying to use run time linking or normal
-        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-        # need to do runtime linking.
-        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-          for ld_flag in $LDFLAGS; do
-            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-              aix_use_runtimelinking=yes
-              break
-            fi
-          done
-          ;;
-        esac
-      fi
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      if test "$GCC" = yes; then
-        case $host_os in aix4.[012]|aix4.[012].*)
-          collect2name=`${CC} -print-prog-name=collect2`
-          if test -f "$collect2name" && \
-            strings "$collect2name" | grep resolve_lib_name >/dev/null
-          then
-            # We have reworked collect2
-            :
-          else
-            # We have old collect2
-            hardcode_direct=unsupported
-            hardcode_minus_L=yes
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_libdir_separator=
-          fi
-          ;;
-        esac
-      fi
-      # Begin _LT_AC_SYS_LIBPATH_AIX.
-      echo 'int main () { return 0; }' > conftest.c
-      ${CC} ${LDFLAGS} conftest.c -o conftest
-      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      if test -z "$aix_libpath"; then
-        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      fi
-      if test -z "$aix_libpath"; then
-        aix_libpath="/usr/lib:/lib"
-      fi
-      rm -f conftest.c conftest
-      # End _LT_AC_SYS_LIBPATH_AIX.
-      if test "$aix_use_runtimelinking" = yes; then
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-      else
-        if test "$host_cpu" = ia64; then
-          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-        else
-          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        fi
-      fi
-      ;;
-    amigaos*)
-      case "$host_cpu" in
-        powerpc)
-          ;;
-        m68k)
-          hardcode_libdir_flag_spec='-L$libdir'
-          hardcode_minus_L=yes
-          ;;
-      esac
-      ;;
-    bsdi[45]*)
-      ;;
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      libext=lib
-      ;;
-    darwin* | rhapsody*)
-      hardcode_direct=no
-      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; 
then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    dgux*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    freebsd2.[01]*)
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    freebsd* | dragonfly*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    hpux9*)
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      ;;
-    hpux10*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        hardcode_direct=yes
-        # hardcode_minus_L: Not really in the search PATH,
-        # but as the default location of the library.
-        hardcode_minus_L=yes
-      fi
-      ;;
-    hpux11*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        case $host_cpu in
-          hppa*64*|ia64*)
-            hardcode_direct=no
-            ;;
-          *)
-            hardcode_direct=yes
-            # hardcode_minus_L: Not really in the search PATH,
-            # but as the default location of the library.
-            hardcode_minus_L=yes
-            ;;
-        esac
-      fi
-      ;;
-    irix5* | irix6* | nonstopux*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    netbsd*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    newsos6)
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    *nto* | *qnx*)
-      ;;
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-        hardcode_direct=yes
-        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-        else
-          case "$host_os" in
-            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-              hardcode_libdir_flag_spec='-R$libdir'
-              ;;
-            *)
-              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-              ;;
-          esac
-        fi
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      ;;
-    osf3*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    osf4* | osf5*)
-      if test "$GCC" = yes; then
-        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-        # Both cc and cxx compiler support -rpath directly
-        hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
-    solaris*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      ;;
-    sunos4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    sysv4)
-      case $host_vendor in
-        sni)
-          hardcode_direct=yes # is this really true???
-          ;;
-        siemens)
-          hardcode_direct=no
-          ;;
-        motorola)
-          hardcode_direct=no #Motorola manual says yes, but my tests say they 
lie
-          ;;
-      esac
-      ;;
-    sysv4.3*)
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-        ld_shlibs=yes
-      fi
-      ;;
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | 
sco3.2v5.0.[024]*)
-      ;;
-    sysv5* | sco3.2v5* | sco5v6*)
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      ;;
-    uts4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    *)
-      ld_shlibs=no
-      ;;
-  esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec=      # the last element of library_names_spec in libtool.m4
-libname_spec='lib$name'
-case "$host_os" in
-  aix3*)
-    library_names_spec='$libname.a'
-    ;;
-  aix[4-9]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  amigaos*)
-    case "$host_cpu" in
-      powerpc*)
-        library_names_spec='$libname$shrext' ;;
-      m68k)
-        library_names_spec='$libname.a' ;;
-    esac
-    ;;
-  beos*)
-    library_names_spec='$libname$shrext'
-    ;;
-  bsdi[45]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  cygwin* | mingw* | pw32* | cegcc*)
-    shrext=.dll
-    library_names_spec='$libname.dll.a $libname.lib'
-    ;;
-  darwin* | rhapsody*)
-    shrext=.dylib
-    library_names_spec='$libname$shrext'
-    ;;
-  dgux*)
-    library_names_spec='$libname$shrext'
-    ;;
-  freebsd[23].*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  freebsd* | dragonfly*)
-    library_names_spec='$libname$shrext'
-    ;;
-  gnu*)
-    library_names_spec='$libname$shrext'
-    ;;
-  haiku*)
-    library_names_spec='$libname$shrext'
-    ;;
-  hpux9* | hpux10* | hpux11*)
-    case $host_cpu in
-      ia64*)
-        shrext=.so
-        ;;
-      hppa*64*)
-        shrext=.sl
-        ;;
-      *)
-        shrext=.sl
-        ;;
-    esac
-    library_names_spec='$libname$shrext'
-    ;;
-  interix[3-9]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  irix5* | irix6* | nonstopux*)
-    library_names_spec='$libname$shrext'
-    case "$host_os" in
-      irix5* | nonstopux*)
-        libsuff= shlibsuff=
-        ;;
-      *)
-        case $LD in
-          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
-          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 
shlibsuff=N32 ;;
-          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
-          *) libsuff= shlibsuff= ;;
-        esac
-        ;;
-    esac
-    ;;
-  linux*oldld* | linux*aout* | linux*coff*)
-    ;;
-  linux* | k*bsd*-gnu | kopensolaris*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  knetbsd*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  netbsd*)
-    library_names_spec='$libname$shrext'
-    ;;
-  newsos6)
-    library_names_spec='$libname$shrext'
-    ;;
-  *nto* | *qnx*)
-    library_names_spec='$libname$shrext'
-    ;;
-  openbsd*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  os2*)
-    libname_spec='$name'
-    shrext=.dll
-    library_names_spec='$libname.a'
-    ;;
-  osf3* | osf4* | osf5*)
-    library_names_spec='$libname$shrext'
-    ;;
-  rdos*)
-    ;;
-  solaris*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sunos4*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  sysv4 | sysv4.3*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv4*MP*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-    library_names_spec='$libname$shrext'
-    ;;
-  tpf*)
-    library_names_spec='$libname$shrext'
-    ;;
-  uts4*)
-    library_names_spec='$libname$shrext'
-    ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 
's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
diff --git a/contrib/autotools-patches/0003-Pass-various-flags-to-GCC.patch 
b/contrib/autotools-patches/0003-Pass-various-flags-to-GCC.patch
deleted file mode 100644
index 6833f297..00000000
--- a/contrib/autotools-patches/0003-Pass-various-flags-to-GCC.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
-index 21e5e078..ddd6e36f 100755
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -7369,11 +7369,14 @@ func_mode_link ()
-       # -fsanitize=*         Clang/GCC memory and address sanitizer
-       # -fuse-ld=*           Linker select flags for GCC
-       # -static-*            direct GCC to link specific libraries statically
-+      # -shared-*            direct GCC to link shared version of specific 
libraries
-       # -fcilkplus           Cilk Plus language extension features for C/C++
-       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-       
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-       
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
--      -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
-+      -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-shared-*|-fcilkplus| \
-+      -ftree-parallelize-loops=*|-fgnu-tm|-ffast-math| \
-+      -funsafe-math-optimizations|-fvtable-verify*)
-         func_quote_for_eval "$arg"
-       arg=$func_quote_for_eval_result
-         func_append compile_command " $arg"
diff --git 
a/contrib/autotools-patches/0003-Pass-various-runtime-library-flags-to-GCC.mingw-mod.patch
 
b/contrib/autotools-patches/0003-Pass-various-runtime-library-flags-to-GCC.mingw-mod.patch
deleted file mode 100644
index f4815d78..00000000
--- 
a/contrib/autotools-patches/0003-Pass-various-runtime-library-flags-to-GCC.mingw-mod.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-[PATCH 3/6] Pass various runtime library flags to GCC.
-* build-aux/ltmain.in (func_mode_link): Pass the
--shared-libgcc and -static-lib* flags along to GCC.
----
- build-aux/ltmain.sh |    5 ++++-
- 1 files changed, 4 insertions(+), 1 deletions(-)
-
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
-index 1821779..eda7790 100644
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -5084,9 +5084,14 @@ func_mode_link ()
-       # --sysroot=*          for sysroot support
-       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
-       # -stdlib=*            select c++ std lib with clang
-+      # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
-+      #                      link against specified runtime library
-       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-       
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
--      
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
-+      
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-+      -ftree-parallelize-loops=*|-fcilkplus|-fgnu-tm|-ffast-math| \
-+      -funsafe-math-optimizations|-fvtable-verify*| \
-+      -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++)
-         func_quote_for_eval "$arg"
-       arg=$func_quote_for_eval_result
-         func_append compile_command " $arg"
--- 
-1.7.1
-
diff --git a/contrib/autotools-patches/0009-libtool-2.4.2.418-msysize-mod.patch 
b/contrib/autotools-patches/0009-libtool-2.4.2.418-msysize-mod.patch
deleted file mode 100644
index 4d44cf63..00000000
--- a/contrib/autotools-patches/0009-libtool-2.4.2.418-msysize-mod.patch
+++ /dev/null
@@ -1,443 +0,0 @@
-diff --git a/build-aux/config.guess b/build-aux/config.guess
-index f50dcdb6..cd89e459 100755
---- a/build-aux/config.guess
-+++ b/build-aux/config.guess
-@@ -883,6 +883,9 @@ EOF
-     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
-+      echo x86_64-unknown-msys
-+      exit ;;
-     prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 
's/[^.]*//'`"
-       exit ;;
-diff -Naur libtool-2.4.2.418-orig/build-aux/ltmain.sh 
libtool-2.4.2.418/build-aux/ltmain.sh
---- libtool-2.4.2.418-orig/build-aux/ltmain.sh 2013-10-27 02:53:58.000000000 
+0400
-+++ libtool-2.4.2.418/build-aux/ltmain.sh      2014-09-02 10:29:08.840800000 
+0400
-@@ -2315,7 +2315,7 @@
-     case $host in
-       # Solaris2 added to fix 
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
-       # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
--      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-+      *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-         # don't eliminate duplications in $postdeps and $predeps
-         opt_duplicate_compiler_generated_deps=:
-         ;;
-@@ -3328,7 +3328,7 @@
- 
-     # On Cygwin there's no "real" PIC flag so we must build both object types
-     case $host_os in
--    cygwin* | mingw* | pw32* | os2* | cegcc*)
-+    cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
-       pic_mode=default
-       ;;
-     esac
-@@ -4201,7 +4201,7 @@
-             'exit $?'
-         tstripme=$stripme
-         case $host_os in
--        cygwin* | mingw* | pw32* | cegcc*)
-+        cygwin* | msys* | mingw* | pw32* | cegcc*)
-           case $realname in
-           *.dll.a)
-             tstripme=
-@@ -4307,7 +4307,7 @@
- 
-       # Do a test to see if this is really a libtool program.
-       case $host in
--      *cygwin* | *mingw*)
-+      *cygwin* | *msys* | *mingw*)
-           if func_ltwrapper_executable_p "$file"; then
-             func_ltwrapper_scriptname "$file"
-             wrapper=$func_ltwrapper_scriptname_result
-@@ -4382,7 +4382,7 @@
-       # remove .exe since cygwin /usr/bin/install will append another
-       # one anyway
-       case $install_prog,$host in
--      */usr/bin/install*,*cygwin*)
-+      */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
-         case $file:$destfile in
-         *.exe:*.exe)
-           # this is ok
-@@ -4535,7 +4535,7 @@
-             $RM $export_symbols
-             eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< 
"$nlist" > "$export_symbols"'
-             case $host in
--            *cygwin* | *mingw* | *cegcc* )
-+            *cygwin* | *msys* | *mingw* | *cegcc* )
-                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                 eval 'cat "$export_symbols" >> 
"$output_objdir/$outputname.def"'
-               ;;
-@@ -4547,7 +4547,7 @@
-             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > 
"$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-             case $host in
--              *cygwin* | *mingw* | *cegcc* )
-+              *cygwin* | *msys* | *mingw* | *cegcc* )
-                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                 ;;
-@@ -4561,7 +4561,7 @@
-         func_basename "$dlprefile"
-         name=$func_basename_result
-           case $host in
--          *cygwin* | *mingw* | *cegcc* )
-+          *cygwin* | *msys* | *mingw* | *cegcc* )
-             # if an import library, we need to obtain dlname
-             if func_win32_import_lib_p "$dlprefile"; then
-               func_tr_sh "$dlprefile"
-@@ -4736,7 +4736,7 @@
-       # Transform the symbol file into the correct name.
-       symfileobj=$output_objdir/${my_outputname}S.$objext
-       case $host in
--      *cygwin* | *mingw* | *cegcc* )
-+      *cygwin* | *msys* | *mingw* | *cegcc* )
-         if test -f "$output_objdir/$my_outputname.def"; then
-           compile_command=`$ECHO "$compile_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-           finalize_command=`$ECHO "$finalize_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-@@ -5629,7 +5629,7 @@
-       {
- EOF
-           case $host in
--            *mingw* | *cygwin* )
-+            *mingw* | *cygwin* | *msys* )
-               # make stdout use "unix" line endings
-               echo "          setmode(1,_O_BINARY);"
-               ;;
-@@ -6350,7 +6350,7 @@
-     $debug_cmd
- 
-     case $host in
--    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-+    *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-       # It is impossible to link a dll without this setting, and
-       # we shouldn't force the makefile maintainer to figure out
-       # what system we are compiling for in order to pass an extra
-@@ -6843,7 +6843,7 @@
-         ;;
-       esac
-       case $host in
--      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-+      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-@@ -6863,7 +6863,7 @@
-       -l*)
-       if test X-lc = "X$arg" || test X-lm = "X$arg"; then
-         case $host in
--        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | 
*-*-haiku*)
-+        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
-           # These systems don't actually have a C or math library (as such)
-           continue
-           ;;
-@@ -6946,7 +6946,7 @@
- 
-       -no-install)
-       case $host in
--      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | 
*-cegcc*)
-+      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-darwin* | *-cegcc*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # and Darwin in order for the loader to find any dlls it needs.
-         func_warning "'-no-install' is ignored for $host"
-@@ -7812,7 +7812,7 @@
-         fi
-         case $host in
-           # special handling for platforms with PE-DLLs.
--          *cygwin* | *mingw* | *cegcc* )
-+          *cygwin* | *msys* | *mingw* | *cegcc* )
-             # Linker will automatically link against shared library if both
-             # static and shared are present.  Therefore, ensure we extract
-             # symbols from the import library if a shared library is present
-@@ -7956,7 +7956,7 @@
-       if test -n "$library_names" &&
-          { test no = "$use_static_libs" || test -z "$old_library"; }; then
-         case $host in
--        *cygwin* | *mingw* | *cegcc* | *os2*)
-+        *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
-             # No point in relinking DLLs because paths are not encoded
-             func_append notinst_deplibs " $lib"
-             need_relink=no
-@@ -8026,7 +8026,7 @@
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
--            *cygwin* | mingw* | *cegcc* | *os2*)
-+            *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
-               func_arith $current - $age
-               major=$func_arith_result
-               versuffix=-$major
-@@ -8899,7 +8899,7 @@
-       if test yes = "$build_libtool_libs"; then
-       if test -n "$rpath"; then
-         case $host in
--        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
-+        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-beos* | *-cegcc* | *-*-haiku*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-@@ -9413,7 +9413,7 @@
- 
-       orig_export_symbols=
-       case $host_os in
--      cygwin* | mingw* | cegcc*)
-+      cygwin* | *msys* | mingw* | cegcc*)
-         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
-           # exporting using user supplied symfile
-           func_dll_def_p "$export_symbols" || {
-@@ -9970,7 +9970,7 @@
- 
-     prog)
-       case $host in
--      *cygwin*) func_stripname '' '.exe' "$output"
-+      *cygwin* | *msys*) func_stripname '' '.exe' "$output"
-                 output=$func_stripname_result.exe;;
-       esac
-       test -n "$vinfo" && \
-@@ -10081,7 +10081,7 @@
-         esac
-       fi
-       case $host in
--      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-+      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-@@ -10159,7 +10159,7 @@
-         # Disable wrappers for cegcc and mingw32ce hosts, we are cross 
compiling anyway.
-         wrappers_required=false
-         ;;
--      *cygwin* | *mingw* )
-+      *cygwin* | *msys* | *mingw* )
-         test yes = "$build_libtool_libs" || wrappers_required=false
-         ;;
-       *)
-@@ -10305,14 +10305,14 @@
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
--        *cygwin*)
-+        *cygwin* | *msys*)
-           exeext=.exe
-           func_stripname '' '.exe' "$outputname"
-           outputname=$func_stripname_result ;;
-         *) exeext= ;;
-       esac
-       case $host in
--        *cygwin* | *mingw* )
-+        *cygwin* | *msys* | *mingw* )
-           func_dirname_and_basename "$output" "" "."
-           output_name=$func_basename_result
-           output_path=$func_dirname_result
-@@ -10644,7 +10644,7 @@
-         # tests/bindir.at for full details.
-         tdlname=$dlname
-         case $host,$output,$installed,$module,$dlname in
--          *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | 
*cegcc*,*lai,yes,no,*.dll)
-+          *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | 
*mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
-             # If a -bindir argument was supplied, place the dll there.
-             if test -n "$bindir"; then
-               func_relative_path "$install_libdir" "$bindir"
-diff -Naur libtool-2.4.2.418-orig/m4/libtool.m4 libtool-2.4.2.418/m4/libtool.m4
---- libtool-2.4.2.418-orig/m4/libtool.m4       2013-10-26 03:37:46.000000000 
+0400
-+++ libtool-2.4.2.418/m4/libtool.m4    2014-09-02 10:19:40.084800000 +0400
-@@ -1665,7 +1665,7 @@
-     lt_cv_sys_max_cmd_len=-1;
-     ;;
- 
--  cygwin* | mingw* | cegcc*)
-+  cygwin* | msys* | mingw* | cegcc*)
-     # On Win9x/ME, this test blows up -- it succeeds, but takes
-     # about 5 minutes as the teststring grows exponentially.
-     # Worse, since 9x/ME are not pre-emptively multitasking,
-@@ -1913,7 +1913,7 @@
-     lt_cv_dlopen_libs=
-     ;;
- 
--  cygwin*)
-+  cygwin* | msys*)
-     lt_cv_dlopen=dlopen
-     lt_cv_dlopen_libs=
-     ;;
-@@ -2399,7 +2399,7 @@
-   # libtool to hard-code these into programs
-   ;;
- 
--cygwin* | mingw* | pw32* | cegcc*)
-+cygwin* | msys* | mingw* | pw32* | cegcc*)
-   version_type=windows
-   shrext_cmds=.dll
-   need_version=no
-@@ -2431,6 +2431,12 @@
- m4_if([$1], [],[
-       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
-       ;;
-+    msys*)
-+      # MSYS DLLs use 'msys-' prefix rather than 'lib'
-+      soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
-+m4_if([$1], [],[
-+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
-+      ;;
-     mingw* | cegcc*)
-       # MinGW DLLs use traditional 'lib' prefix
-       soname_spec='$libname`echo $release | $SED -e 
's/[[.]]/-/g'`$versuffix$shared_ext'
-@@ -2465,7 +2471,7 @@
-       # Convert to MSYS style.
-       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 
's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
-       ;;
--    cygwin*)
-+    cygwin* | msys*)
-       # Convert to unix form, then to dos form, then back to unix form
-       # but this time dos style (no spaces!) so that the unix form looks
-       # like /cygdrive/c/PROGRA~1:/cygdr...
-@@ -3203,7 +3209,7 @@
- esac
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- case $host_os in
--  cygwin* | mingw* | pw32* | cegcc*)
-+  cygwin* | msys* | mingw* | pw32* | cegcc*)
-     if test yes != "$GCC"; then
-       reload_cmds=false
-     fi
-@@ -3259,7 +3265,7 @@
-   lt_cv_file_magic_test_file=/shlib/libc.so
-   ;;
- 
--cygwin*)
-+cygwin* | msys*)
-   # func_win32_libid is a shell function defined in ltmain.sh
-   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-   lt_cv_file_magic_cmd='func_win32_libid'
-@@ -3564,7 +3570,7 @@
- [lt_cv_sharedlib_from_linklib_cmd='unknown'
- 
- case $host_os in
--cygwin* | mingw* | pw32* | cegcc*)
-+cygwin* | msys* | mingw* | pw32* | cegcc*)
-   # two different shell functions defined in ltmain.sh;
-   # decide which one to use based on capabilities of $DLLTOOL
-   case `$DLLTOOL --help 2>&1` in
-@@ -3634,7 +3640,7 @@
- [AC_REQUIRE([AC_CANONICAL_HOST])dnl
- LIBM=
- case $host in
--*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
-+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | 
*-*-darwin*)
-   # These system don't have libm, or don't need it
-   ;;
- *-ncr-sysv4.3*)
-@@ -3709,7 +3715,7 @@
- aix*)
-   symcode='[[BCDT]]'
-   ;;
--cygwin* | mingw* | pw32* | cegcc*)
-+cygwin* | msys* | mingw* | pw32* | cegcc*)
-   symcode='[[ABCDGISTW]]'
-   ;;
- hpux*)
-@@ -4015,7 +4021,7 @@
-     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-       # PIC is the default for these OSes.
-       ;;
--    mingw* | cygwin* | os2* | pw32* | cegcc*)
-+    mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       # Although the cygwin gcc ignores -fPIC, still need this for old-style
-@@ -4086,7 +4092,7 @@
-         ;;
-       esac
-       ;;
--      mingw* | cygwin* | os2* | pw32* | cegcc*)
-+      mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       m4_if([$1], [GCJ], [],
-@@ -4334,7 +4340,7 @@
-       # PIC is the default for these OSes.
-       ;;
- 
--    mingw* | cygwin* | pw32* | os2* | cegcc*)
-+    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       # Although the cygwin gcc ignores -fPIC, still need this for old-style
-@@ -4433,7 +4439,7 @@
-       esac
-       ;;
- 
--    mingw* | cygwin* | pw32* | os2* | cegcc*)
-+    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       m4_if([$1], [GCJ], [],
-@@ -4699,7 +4705,7 @@
-   pw32*)
-     _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
-     ;;
--  cygwin* | mingw* | cegcc*)
-+  cygwin* | msys* | mingw* | cegcc*)
-     case $cc_basename in
-     cl*)
-       _LT_TAGVAR(exclude_expsyms, 
$1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-@@ -4757,7 +4763,7 @@
-   extract_expsyms_cmds=
- 
-   case $host_os in
--  cygwin* | mingw* | pw32* | cegcc*)
-+  cygwin* | msys* | mingw* | pw32* | cegcc*)
-     # 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++.
-@@ -4872,7 +4878,7 @@
-       fi
-       ;;
- 
--    cygwin* | mingw* | pw32* | cegcc*)
-+    cygwin* | msys* | mingw* | pw32* | cegcc*)
-       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-       # as there is no search path for DLLs.
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-@@ -5247,7 +5253,7 @@
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-       ;;
- 
--    cygwin* | mingw* | pw32* | cegcc*)
-+    cygwin* | msys* | mingw* | pw32* | cegcc*)
-       # When not using gcc, we currently assume that we are using
-       # Microsoft Visual C++.
-       # hardcode_libdir_flag_spec is actually meaningless, as there is
-@@ -6241,7 +6247,7 @@
-         esac
-         ;;
- 
--      cygwin* | mingw* | pw32* | cegcc*)
-+      cygwin* | msys* | mingw* | pw32* | cegcc*)
-       case $GXX,$cc_basename in
-       ,cl* | no,cl*)
-         # Native MSVC
-@@ -7937,7 +7943,7 @@
-       *-*-mingw* ) # actually msys
-         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
-         ;;
--      *-*-cygwin* )
-+      *-*-cygwin* | *-*-msys* )
-         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
-         ;;
-       * ) # otherwise, assume *nix
-@@ -7945,12 +7951,12 @@
-         ;;
-     esac
-     ;;
--  *-*-cygwin* )
-+  *-*-cygwin* | *-*-msys* )
-     case $build in
-       *-*-mingw* ) # actually msys
-         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
-         ;;
--      *-*-cygwin* )
-+      *-*-cygwin* | *-*-msys* )
-         lt_cv_to_host_file_cmd=func_convert_file_noop
-         ;;
-       * ) # otherwise, assume *nix
diff --git a/contrib/autotools-patches/apply-all.sh 
b/contrib/autotools-patches/apply-all.sh
deleted file mode 100755
index 87e7edec..00000000
--- a/contrib/autotools-patches/apply-all.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-#
-# This file applies optional libtool patches mainly for better MSys2 
compatibility,
-# especially for MSys2/Clang{64,32} toolchains.
-# It's a pity that these patches haven't been sent upstream.
-#
-# Based on Debian SID baseline files as of December 2021.
-#
-
-patchesdir="$(dirname "$BASH_SOURCE")" || exit 2
-test -n "$patchesdir" || exit 2
-
-patches=(
-  0003-Pass-various-flags-to-GCC.patch
-  0006-Fix-strict-ansi-vs-posix-mod.patch
-  0009-libtool-2.4.2.418-msysize-mod.patch
-  0010-libtool-2.4.2-include-process-h-mod.patch
-  0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
-  0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
-  0013-Allow-statically-linking-compiler-support-libraries-mod.patch
-  0014-Support-llvm-objdump-f-output-mod.patch
-)
-
-failed=( )
-
-cd "${patchesdir}/../.." || exit 1
-
-for patch in ${patches[@]}; do
-  patch -N -p1 --no-backup-if-mismatch -r - -i "${patchesdir}/${patch}" || 
failed+=("$patch")
-done
-
-if [[ -n "${failed[@]}" ]]; then
-  printf 'Failed patch: %s\n' "${failed[@]}" >&2
-  exit 2
-fi
-
-exit 0
diff --git a/contrib/fixes-autoconf/apply-all.sh 
b/contrib/fixes-autoconf/apply-all.sh
new file mode 100755
index 00000000..1a9d725b
--- /dev/null
+++ b/contrib/fixes-autoconf/apply-all.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+#
+# This file applies optional Autoconf patches for better MSys2 and new
+# compiler compatibility.
+#
+# Based on Debian SID baseline files as of April 2023.
+#
+
+patchesdir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$patchesdir" || exit 2
+cd "$patchesdir" || exit 2
+patchesdir=$(pwd) || exit 2
+
+patches=(
+ # No patches currently
+)
+
+failed=( )
+
+cd "${patchesdir}/../.." || exit 1
+
+patch_params="-Nf -p1 --no-backup-if-mismatch -r - --read-only=fail"
+
+for patch in ${patches[@]}; do
+  patchfile="${patchesdir}/${patch}"
+  echo "*** Applying $patch..."
+  if echo "$patch_data" | patch $patch_params -i "$patchfile"
+  then
+    echo "** $patch successfully applied."
+  else
+    echo "** $patch failed."
+    failed+=("$patch")
+  fi
+  unset patch_data
+done
+
+
+addl_file="c_backported.m4"
+echo "*** Copying $addl_file"
+cp -fT "${patchesdir}/$addl_file" "m4/$addl_file" || exit 2
+echo "$addl_file copied."
+
+echo ''
+
+if [[ -n "${failed[@]}" ]]; then
+  printf '* Failed patch: %s\n' "${failed[@]}" >&2
+  exit 2
+else
+  echo "* All patches have been successfully applied."
+fi
+
+exit 0
diff --git a/contrib/fixes-autoconf/c_backported.m4 
b/contrib/fixes-autoconf/c_backported.m4
new file mode 100644
index 00000000..c0e7aabc
--- /dev/null
+++ b/contrib/fixes-autoconf/c_backported.m4
@@ -0,0 +1,565 @@
+# Backported macros from autoconf git master + a few custom patches
+
+# This file is part of Autoconf.                       -*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001-2017, 2020-2023 Free Software Foundation, Inc.
+
+# This file is part of Autoconf.  This program is free
+# software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# Under Section 7 of GPL version 3, you are granted additional
+# permissions described in the Autoconf Configure Script Exception,
+# version 3.0, as published by the Free Software Foundation.
+#
+# You should have received a copy of the GNU General Public License
+# and a copy of the Autoconf Configure Script Exception along with
+# this program; see the files COPYINGv3 and COPYING.EXCEPTION
+# respectively.  If not, see <https://www.gnu.org/licenses/>.
+
+# Written by David MacKenzie, with help from
+# Akim Demaille, Paul Eggert,
+# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# ---- Backported macros only ----
+
+AC_DEFUN([_AC_C_C89_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+   Do not test the value of __STDC__, because some compilers set it to 0
+   while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (char **p, int i)
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting.  Exercises some of the corner cases that
+   e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not \xHH hex character constants.
+   These do not provoke an error unfortunately, instead are silently treated
+   as an "x".  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
+   array size at least.  It is necessary to write \x00 == 0 to get something
+   that is true only with -std.  */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+               int, int);'
+]])])
+
+
+AC_DEFUN([_AC_C_C99_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+extern void free (void *);
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+  #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str = "";
+  int number = 0;
+  float fnumber = 0;
+
+  while (*format)
+    {
+      switch (*format++)
+       {
+       case '\''s'\'': // string
+         str = va_arg (args_copy, const char *);
+         break;
+       case '\''d'\'': // int
+         number = va_arg (args_copy, int);
+         break;
+       case '\''f'\'': // float
+         fnumber = va_arg (args_copy, double);
+         break;
+       default:
+         break;
+       }
+    }
+  va_end (args_copy);
+  va_end (args);
+
+  return *str && number && fnumber;
+}
+'
+]])])
+
+
+AC_DEFUN([_AC_C_C11_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+  int_alignment = _Alignof (int),
+  int_array_alignment = _Alignof (int[100]),
+  char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+_Noreturn int does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+  int x;
+  _Static_assert (sizeof (int) <= sizeof (long int),
+                  "_Static_assert does not work in struct");
+  long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+  union {
+    struct { int i; int j; };
+    struct { int k; long int l; } w;
+  };
+  int m;
+} v1;
+'
+]])])
+
+
+# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
+# -----------------------------------
+# Avoid conflicting decl of main.
+m4_define([AC_LANG_CALL(C)],
+[AC_LANG_PROGRAM([$1
+m4_if([$2], [main], ,
+[/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 (void);])], [return $2 ();])])
+
+
+# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
+# ----------------------------------
+# Don't include <ctype.h> because on OSF/1 3.0 it includes
+# <sys/types.h> which includes <sys/select.h> which contains a
+# prototype for select.  Similarly for bzero.
+#
+# This test used to merely assign f=$1 in main(), but that was
+# optimized away by HP unbundled cc A.05.36 for ia64 under +O3,
+# presumably on the basis that there's no need to do that store if the
+# program is about to exit.  Conversely, the AIX linker optimizes an
+# unused external declaration that initializes f=$1.  So this test
+# program has both an external initialization of f, and a use of f in
+# main that affects the exit status.
+#
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
+[AC_LANG_PROGRAM(
+[/* Define $1 to an innocuous variant, in case <limits.h> declares $1.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $1 innocuous_$1
+
+/* System header to define __stub macros and hopefully few prototypes,
+   which can conflict with char $1 (void); below.  */
+
+#include <limits.h>
+#undef $1
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $1 (void);
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$1 || defined __stub___$1
+choke me
+#endif
+], [return $1 ();])])
+
+
+# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN],
+#                 [ACTION-IF-UNIVERSAL])
+# -------------------------------------------------------------------------
+AC_DEFUN([AC_C_BIGENDIAN],
+[AH_VERBATIM([WORDS_BIGENDIAN],
+[/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+#  undef WORDS_BIGENDIAN
+# endif
+#endif])dnl
+ AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian],
+   [ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    AC_COMPILE_IFELSE(
+        [AC_LANG_SOURCE(
+           [[#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+           ]])],
+        [
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done])
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+            #include <sys/param.h>
+          ]],
+          [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+          ]])],
+       [# It does; now see whether it defined to BIG_ENDIAN or not.
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <sys/types.h>
+               #include <sys/param.h>
+             ]],
+             [[#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+             ]])],
+          [ac_cv_c_bigendian=yes],
+          [ac_cv_c_bigendian=no])])
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., 
Solaris).
+      AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <limits.h>
+          ]],
+          [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+          ]])],
+       [# It does; now see whether it defined to _BIG_ENDIAN or not.
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <limits.h>
+             ]],
+             [[#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+             ]])],
+          [ac_cv_c_bigendian=yes],
+          [ac_cv_c_bigendian=no])])
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+          [[
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+          ]])],
+       [ac_cv_c_bigendian=no],
+       [ac_cv_c_bigendian=yes],
+       [# Try to guess by grepping values from an object file.
+        AC_LINK_IFELSE(
+          [AC_LANG_SOURCE(
+             [[unsigned short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               unsigned short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               unsigned short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               unsigned short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               int
+               main (int argc, char **argv)
+               {
+                 /* Intimidate the compiler so that it does not
+                    optimize the arrays away.  */
+                 char *p = argv[0];
+                 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+                 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+                 return use_ascii (argc) == use_ebcdic (*p);
+               }]])],
+          [if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi])])
+    fi])
+ case $ac_cv_c_bigendian in #(
+   yes)
+     m4_default([$1],
+       [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #(
+   no)
+     $2 ;; #(
+   universal)
+dnl Note that AC_APPLE_UNIVERSAL_BUILD sorts less than WORDS_BIGENDIAN;
+dnl this is a necessity for proper config header operation.  Warn if
+dnl the user did not specify a config header but is relying on the
+dnl default behavior for universal builds.
+     m4_default([$4],
+       [AC_CONFIG_COMMANDS_PRE([m4_ifset([AH_HEADER], [],
+        [m4_warn([obsolete],
+          [AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS])])])dnl
+       AC_DEFINE([AC_APPLE_UNIVERSAL_BUILD],1,
+         [Define if building universal (internal helper macro)])])
+     ;; #(
+   *)
+     m4_default([$3],
+       [AC_MSG_ERROR([unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help])]) ;;
+ esac
+])# AC_C_BIGENDIAN
+
+
+# AC_C_VARARRAYS
+# --------------
+# Check whether the C compiler supports variable-length arrays.
+AC_DEFUN([AC_C_VARARRAYS],
+[
+  AC_CACHE_CHECK([for variable-length arrays],
+    ac_cv_c_vararrays,
+    [AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[[     #ifndef __STDC_NO_VLA__
+       #error __STDC_NO_VLA__ not defined
+       #endif
+]])],
+       [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
+       [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* Test for VLA support.  This test is partly inspired
+                 from examples in the C standard.  Use at least two VLA
+                 functions to detect the GCC 3.4.3 bug described in:
+                 
https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
+                 */
+              #ifdef __STDC_NO_VLA__
+               syntax error;
+              #else
+                extern int n;
+                static int B[100];
+                int fvla (int m, int C[m][m]);
+
+                static int
+                simple (int count, int all[static count])
+                {
+                  return all[count - 1];
+                }
+
+                int
+                fvla (int m, int C[m][m])
+                {
+                  typedef int VLA[m][m];
+                  VLA x;
+                  int D[m];
+                  static int (*q)[m] = &B;
+                  int (*s)[n] = q;
+                  return C && &x[0][0] == &D[0] && &D[0] == s[0];
+                }
+              #endif
+              ]])],
+         [ac_cv_c_vararrays=yes],
+         [ac_cv_c_vararrays=no])])])
+  if test "$ac_cv_c_vararrays" = yes; then
+    dnl This is for compatibility with Autoconf 2.61-2.69.
+    AC_DEFINE([HAVE_C_VARARRAYS], 1,
+      [Define to 1 if C supports variable-length arrays.])
+  elif test "$ac_cv_c_vararrays" = no; then
+    AC_DEFINE([__STDC_NO_VLA__], 1,
+      [Define to 1 if C does not support variable-length arrays, and
+       if the compiler does not already define this.])
+  fi
+])
+
diff --git 
a/contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
 
b/contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
new file mode 100644
index 00000000..4207374e
--- /dev/null
+++ 
b/contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
@@ -0,0 +1,31 @@
+The patch below was modified to work on top of Debian patches
+
+[PATCH 3/6] Pass various runtime library flags to GCC.
+* build-aux/ltmain.in (func_mode_link): Pass the
+-shared-libgcc and -static-lib* flags along to GCC.
+
+diff -urN libtool-2.4.7/build-aux/ltmain.in.orig 
libtool-2.4.7/build-aux/ltmain.in
+--- libtool-2.4.7/build-aux/ltmain.in.orig     2022-05-25 13:57:50.311734300 
+0200
++++ libtool-2.4.7/build-aux/ltmain.in  2022-05-25 14:01:54.621866600 +0200
+@@ -7559,15 +7559,19 @@
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+       # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
++      # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
++      #                      link against specified runtime library
+       # -fsanitize=*         Clang/GCC memory and address sanitizer
+       # -fuse-ld=*           Linker select flags for GCC
+-      # -static-*            direct GCC to link specific libraries statically
+       # -fcilkplus           Cilk Plus language extension features for C/C++
+       # -Wa,*                Pass flags directly to the assembler
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+       
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-      -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
++      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-ftree-parallelize-loops=*| \
++      -fcilkplus|-fgnu-tm|-ffast-math|-funsafe-math-optimizations| \
++      -fvtable-verify*|-shared-libgcc|-static-libgcc|-static-libgfortran| \
++      -static-libstdc++)
+         func_quote_arg pretty "$arg"
+       arg=$func_quote_arg_result
+         func_append compile_command " $arg"
diff --git a/contrib/autotools-patches/0006-Fix-strict-ansi-vs-posix-mod.patch 
b/contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch
similarity index 76%
rename from contrib/autotools-patches/0006-Fix-strict-ansi-vs-posix-mod.patch
rename to contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch
index 61a1cc56..486ad761 100644
--- a/contrib/autotools-patches/0006-Fix-strict-ansi-vs-posix-mod.patch
+++ b/contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch
@@ -2,13 +2,13 @@
 * build-aux/ltmain.in (func_mode_link): Also check for _POSIX
 as well as __STRICT_ANSI__ to avoid re-definitions.
 ---
- build-aux/ltmain.sh |    4 +++-
+ build-aux/ltmain.in |    4 +++-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
 index af46cb8..244bb5b 100644
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
 @@ -3382,7 +3382,7 @@
  
  /* declarations of non-ANSI functions */
@@ -19,4 +19,4 @@ index af46cb8..244bb5b 100644
  # endif
  #elif defined __CYGWIN__
 -- 
-1.7.0.2.msysgit.0
+1.7.0.2.msysgit.0
\ No newline at end of file
diff --git a/contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch 
b/contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch
new file mode 100644
index 00000000..1997342f
--- /dev/null
+++ b/contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch
@@ -0,0 +1,1403 @@
+diff -urN libtool-2.4.7/build-aux/config.guess.orig 
libtool-2.4.7/build-aux/config.guess
+--- libtool-2.4.7/build-aux/config.guess.orig  2022-05-25 14:18:47.388587800 
+0200
++++ libtool-2.4.7/build-aux/config.guess       2022-05-25 14:21:50.720326000 
+0200
+@@ -950,6 +950,9 @@
+     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       GUESS=x86_64-pc-cygwin
+       ;;
++    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
++      GUESS=x86_64-pc-msys
++      ;;
+     prep*:SunOS:5.*:*)
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=powerpcle-unknown-solaris2$SUN_REL
+
+diff -Naur libtool-2.4.3-orig/build-aux/ltmain.in 
libtool-2.4.3/build-aux/ltmain.in
+--- libtool-2.4.3-orig/build-aux/ltmain.in     2014-09-02 09:54:56.481600000 
+0400
++++ libtool-2.4.3/build-aux/ltmain.in  2014-09-02 10:14:04.809600000 +0400
+@@ -497,7 +497,7 @@
+     case $host in
+       # Solaris2 added to fix 
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+       # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+-      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
++      *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+         # don't eliminate duplications in $postdeps and $predeps
+         opt_duplicate_compiler_generated_deps=:
+         ;;
+@@ -1510,7 +1510,7 @@
+ 
+     # On Cygwin there's no "real" PIC flag so we must build both object types
+     case $host_os in
+-    cygwin* | mingw* | pw32* | os2* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
+       pic_mode=default
+       ;;
+     esac
+@@ -2383,7 +2383,7 @@
+             'exit $?'
+         tstripme=$stripme
+         case $host_os in
+-        cygwin* | mingw* | pw32* | cegcc*)
++        cygwin* | msys* | mingw* | pw32* | cegcc*)
+           case $realname in
+           *.dll.a)
+             tstripme=
+@@ -2489,7 +2489,7 @@
+ 
+       # Do a test to see if this is really a libtool program.
+       case $host in
+-      *cygwin* | *mingw*)
++      *cygwin* | *msys* | *mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+@@ -2564,7 +2564,7 @@
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway
+       case $install_prog,$host in
+-      */usr/bin/install*,*cygwin*)
++      */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+@@ -2717,7 +2717,7 @@
+             $RM $export_symbols
+             eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< 
"$nlist" > "$export_symbols"'
+             case $host in
+-            *cygwin* | *mingw* | *cegcc* )
++            *cygwin* | *msys* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$export_symbols" >> 
"$output_objdir/$outputname.def"'
+               ;;
+@@ -2729,7 +2729,7 @@
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > 
"$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+-              *cygwin* | *mingw* | *cegcc* )
++              *cygwin* | *msys* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+@@ -2743,7 +2743,7 @@
+         func_basename "$dlprefile"
+         name=$func_basename_result
+           case $host in
+-          *cygwin* | *mingw* | *cegcc* )
++          *cygwin* | *msys* | *mingw* | *cegcc* )
+             # if an import library, we need to obtain dlname
+             if func_win32_import_lib_p "$dlprefile"; then
+               func_tr_sh "$dlprefile"
+@@ -2918,7 +2918,7 @@
+       # Transform the symbol file into the correct name.
+       symfileobj=$output_objdir/${my_outputname}S.$objext
+       case $host in
+-      *cygwin* | *mingw* | *cegcc* )
++      *cygwin* | *msys* | *mingw* | *cegcc* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "$compile_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+@@ -3811,7 +3811,7 @@
+       {
+ EOF
+           case $host in
+-            *mingw* | *cygwin* )
++            *mingw* | *cygwin* | *msys* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+@@ -4567,7 +4567,7 @@
+     $debug_cmd
+ 
+     case $host in
+-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++    *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+       # It is impossible to link a dll without this setting, and
+       # we shouldn't force the makefile maintainer to figure out
+       # what system we are compiling for in order to pass an extra
+@@ -5060,7 +5060,7 @@
+         ;;
+       esac
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+@@ -5080,7 +5080,7 @@
+       -l*)
+       if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+         case $host in
+-        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | 
*-*-haiku*)
++        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+@@ -5163,7 +5163,7 @@
+ 
+       -no-install)
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | 
*-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-darwin* | *-cegcc*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "'-no-install' is ignored for $host"
+@@ -6034,7 +6034,7 @@
+         fi
+         case $host in
+           # special handling for platforms with PE-DLLs.
+-          *cygwin* | *mingw* | *cegcc* )
++          *cygwin* | *msys* | *mingw* | *cegcc* )
+             # Linker will automatically link against shared library if both
+             # static and shared are present.  Therefore, ensure we extract
+             # symbols from the import library if a shared library is present
+@@ -6178,7 +6178,7 @@
+       if test -n "$library_names" &&
+          { test no = "$use_static_libs" || test -z "$old_library"; }; then
+         case $host in
+-        *cygwin* | *mingw* | *cegcc* | *os2*)
++        *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
+             # No point in relinking DLLs because paths are not encoded
+             func_append notinst_deplibs " $lib"
+             need_relink=no
+@@ -6248,7 +6248,7 @@
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+-            *cygwin* | mingw* | *cegcc* | *os2*)
++            *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
+               func_arith $current - $age
+               major=$func_arith_result
+               versuffix=-$major
+@@ -7123,7 +7123,7 @@
+       if test yes = "$build_libtool_libs"; then
+       if test -n "$rpath"; then
+         case $host in
+-        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
++        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-beos* | *-cegcc* | *-*-haiku*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+@@ -7637,7 +7637,7 @@
+ 
+       orig_export_symbols=
+       case $host_os in
+-      cygwin* | mingw* | cegcc*)
++      cygwin* | msys* | mingw* | cegcc*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           func_dll_def_p "$export_symbols" || {
+@@ -8194,7 +8194,7 @@
+ 
+     prog)
+       case $host in
+-      *cygwin*) func_stripname '' '.exe' "$output"
++      *cygwin* | *msys*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+       esac
+       test -n "$vinfo" && \
+@@ -8305,7 +8305,7 @@
+         esac
+       fi
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+@@ -8383,7 +8383,7 @@
+         # Disable wrappers for cegcc and mingw32ce hosts, we are cross 
compiling anyway.
+         wrappers_required=false
+         ;;
+-      *cygwin* | *mingw* )
++      *cygwin* | *msys* | *mingw* )
+         test yes = "$build_libtool_libs" || wrappers_required=false
+         ;;
+       *)
+@@ -8529,14 +8529,14 @@
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+-        *cygwin*)
++        *cygwin* | *msys*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+-        *cygwin* | *mingw* )
++        *cygwin* | *msys* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+@@ -8878,7 +8878,7 @@
+         # tests/bindir.at for full details.
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+-          *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | 
*cegcc*,*lai,yes,no,*.dll)
++          *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | 
*mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+             # If a -bindir argument was supplied, place the dll there.
+             if test -n "$bindir"; then
+               func_relative_path "$install_libdir" "$bindir"
+
+diff -Naur libtool-2.4.2.418-orig/build-aux/ltmain.sh 
libtool-2.4.2.418/build-aux/ltmain.sh
+--- libtool-2.4.2.418-orig/build-aux/ltmain.sh 2013-10-27 02:53:58.000000000 
+0400
++++ libtool-2.4.2.418/build-aux/ltmain.sh      2014-09-02 10:29:08.840800000 
+0400
+@@ -2315,7 +2315,7 @@
+     case $host in
+       # Solaris2 added to fix 
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+       # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+-      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
++      *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+         # don't eliminate duplications in $postdeps and $predeps
+         opt_duplicate_compiler_generated_deps=:
+         ;;
+@@ -3328,7 +3328,7 @@
+ 
+     # On Cygwin there's no "real" PIC flag so we must build both object types
+     case $host_os in
+-    cygwin* | mingw* | pw32* | os2* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
+       pic_mode=default
+       ;;
+     esac
+@@ -4201,7 +4201,7 @@
+             'exit $?'
+         tstripme=$stripme
+         case $host_os in
+-        cygwin* | mingw* | pw32* | cegcc*)
++        cygwin* | msys* | mingw* | pw32* | cegcc*)
+           case $realname in
+           *.dll.a)
+             tstripme=
+@@ -4307,7 +4307,7 @@
+ 
+       # Do a test to see if this is really a libtool program.
+       case $host in
+-      *cygwin* | *mingw*)
++      *cygwin* | *msys* | *mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+@@ -4382,7 +4382,7 @@
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway
+       case $install_prog,$host in
+-      */usr/bin/install*,*cygwin*)
++      */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+@@ -4535,7 +4535,7 @@
+             $RM $export_symbols
+             eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< 
"$nlist" > "$export_symbols"'
+             case $host in
+-            *cygwin* | *mingw* | *cegcc* )
++            *cygwin* | *msys* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$export_symbols" >> 
"$output_objdir/$outputname.def"'
+               ;;
+@@ -4547,7 +4547,7 @@
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > 
"$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+-              *cygwin* | *mingw* | *cegcc* )
++              *cygwin* | *msys* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+@@ -4561,7 +4561,7 @@
+         func_basename "$dlprefile"
+         name=$func_basename_result
+           case $host in
+-          *cygwin* | *mingw* | *cegcc* )
++          *cygwin* | *msys* | *mingw* | *cegcc* )
+             # if an import library, we need to obtain dlname
+             if func_win32_import_lib_p "$dlprefile"; then
+               func_tr_sh "$dlprefile"
+@@ -4736,7 +4736,7 @@
+       # Transform the symbol file into the correct name.
+       symfileobj=$output_objdir/${my_outputname}S.$objext
+       case $host in
+-      *cygwin* | *mingw* | *cegcc* )
++      *cygwin* | *msys* | *mingw* | *cegcc* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "$compile_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED 
"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+@@ -5629,7 +5629,7 @@
+       {
+ EOF
+           case $host in
+-            *mingw* | *cygwin* )
++            *mingw* | *cygwin* | *msys* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+@@ -6350,7 +6350,7 @@
+     $debug_cmd
+ 
+     case $host in
+-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++    *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+       # It is impossible to link a dll without this setting, and
+       # we shouldn't force the makefile maintainer to figure out
+       # what system we are compiling for in order to pass an extra
+@@ -6843,7 +6843,7 @@
+         ;;
+       esac
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+@@ -6863,7 +6863,7 @@
+       -l*)
+       if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+         case $host in
+-        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | 
*-*-haiku*)
++        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+@@ -6946,7 +6946,7 @@
+ 
+       -no-install)
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | 
*-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-darwin* | *-cegcc*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "'-no-install' is ignored for $host"
+@@ -7812,7 +7812,7 @@
+         fi
+         case $host in
+           # special handling for platforms with PE-DLLs.
+-          *cygwin* | *mingw* | *cegcc* )
++          *cygwin* | *msys* | *mingw* | *cegcc* )
+             # Linker will automatically link against shared library if both
+             # static and shared are present.  Therefore, ensure we extract
+             # symbols from the import library if a shared library is present
+@@ -7956,7 +7956,7 @@
+       if test -n "$library_names" &&
+          { test no = "$use_static_libs" || test -z "$old_library"; }; then
+         case $host in
+-        *cygwin* | *mingw* | *cegcc* | *os2*)
++        *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
+             # No point in relinking DLLs because paths are not encoded
+             func_append notinst_deplibs " $lib"
+             need_relink=no
+@@ -8026,7 +8026,7 @@
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+-            *cygwin* | mingw* | *cegcc* | *os2*)
++            *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
+               func_arith $current - $age
+               major=$func_arith_result
+               versuffix=-$major
+@@ -8899,7 +8899,7 @@
+       if test yes = "$build_libtool_libs"; then
+       if test -n "$rpath"; then
+         case $host in
+-        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | 
*-cegcc* | *-*-haiku*)
++        *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | 
*-*-beos* | *-cegcc* | *-*-haiku*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+@@ -9413,7 +9413,7 @@
+ 
+       orig_export_symbols=
+       case $host_os in
+-      cygwin* | mingw* | cegcc*)
++      cygwin* | *msys* | mingw* | cegcc*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           func_dll_def_p "$export_symbols" || {
+@@ -9970,7 +9970,7 @@
+ 
+     prog)
+       case $host in
+-      *cygwin*) func_stripname '' '.exe' "$output"
++      *cygwin* | *msys*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+       esac
+       test -n "$vinfo" && \
+@@ -10081,7 +10081,7 @@
+         esac
+       fi
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++      *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+@@ -10159,7 +10159,7 @@
+         # Disable wrappers for cegcc and mingw32ce hosts, we are cross 
compiling anyway.
+         wrappers_required=false
+         ;;
+-      *cygwin* | *mingw* )
++      *cygwin* | *msys* | *mingw* )
+         test yes = "$build_libtool_libs" || wrappers_required=false
+         ;;
+       *)
+@@ -10305,14 +10305,14 @@
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+-        *cygwin*)
++        *cygwin* | *msys*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+-        *cygwin* | *mingw* )
++        *cygwin* | *msys* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+@@ -10644,7 +10644,7 @@
+         # tests/bindir.at for full details.
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+-          *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | 
*cegcc*,*lai,yes,no,*.dll)
++          *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | 
*mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+             # If a -bindir argument was supplied, place the dll there.
+             if test -n "$bindir"; then
+               func_relative_path "$install_libdir" "$bindir"
+--- libtool-2.4.7/configure.orig       2022-05-25 14:05:58.332605400 +0200
++++ libtool-2.4.7/configure    2022-05-25 14:11:29.613646200 +0200
+@@ -5988,7 +5988,7 @@
+     lt_cv_sys_max_cmd_len=-1;
+     ;;
+ 
+-  cygwin* | mingw* | cegcc*)
++  cygwin* | msys* | mingw* | cegcc*)
+     # On Win9x/ME, this test blows up -- it succeeds, but takes
+     # about 5 minutes as the teststring grows exponentially.
+     # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -6154,7 +6154,7 @@
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+         ;;
+       * ) # otherwise, assume *nix
+@@ -6162,12 +6162,12 @@
+         ;;
+     esac
+     ;;
+-  *-*-cygwin* )
++  *-*-cygwin* | *-*-msys* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_noop
+         ;;
+       * ) # otherwise, assume *nix
+@@ -6233,7 +6233,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     if test yes != "$GCC"; then
+       reload_cmds=false
+     fi
+@@ -6486,7 +6486,7 @@
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+ 
+-cygwin*)
++cygwin* | msys*)
+   # func_win32_libid is a shell function defined in ltmain.sh
+   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+   lt_cv_file_magic_cmd='func_win32_libid'
+@@ -6802,7 +6802,7 @@
+   lt_cv_sharedlib_from_linklib_cmd='unknown'
+ 
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   # two different shell functions defined in ltmain.sh;
+   # decide which one to use based on capabilities of $DLLTOOL
+   case `$DLLTOOL --help 2>&1` in
+@@ -7310,7 +7310,7 @@
+ aix*)
+   symcode='[BCDT]'
+   ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   symcode='[ABCDGISTW]'
+   ;;
+ hpux*)
+@@ -8912,7 +8912,7 @@
+ enable_win32_dll=yes
+ 
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+   if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}as", so it can be a program 
name with args.
+ set dummy ${ac_tool_prefix}as; ac_word=$2
+@@ -9813,7 +9813,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -9916,7 +9916,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic='-DDLL_EXPORT'
+@@ -10418,7 +10418,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -10533,7 +10533,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec='-L$libdir'
+@@ -11074,7 +11074,7 @@
+       export_dynamic_flag_spec=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -12110,7 +12110,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -12136,9 +12136,9 @@
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+-    cygwin*)
++    cygwin* | msys*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+-      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++      soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ 
+       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+       ;;
+@@ -12176,7 +12176,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -12878,7 +12878,7 @@
+     lt_cv_dlopen_libs=
+     ;;
+ 
+-  cygwin*)
++  cygwin* | msys*)
+     lt_cv_dlopen=dlopen
+     lt_cv_dlopen_libs=
+     ;;
+@@ -13827,7 +13827,7 @@
+ beos*)
+   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+   ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+   ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" 
"ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+ "
+ if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
+@@ -14242,7 +14242,7 @@
+   $as_echo_n "(cached) " >&6
+ else
+   case $host_os in #(
+-       *cygwin*)
++       *cygwin* | *msys*)
+          lt_cv_sys_argz_works=no
+          if test no != "$cross_compiling"; then
+            lt_cv_sys_argz_works="guessing no"
+@@ -15517,7 +15517,7 @@
+         esac
+         ;;
+ 
+-      cygwin* | mingw* | pw32* | cegcc*)
++      cygwin* | msys* | mingw* | pw32* | cegcc*)
+       case $GXX,$cc_basename in
+       ,cl* | no,cl* | ,icl* | no,icl*)
+         # Native MSVC or ICC
+@@ -16528,7 +16528,7 @@
+     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | cygwin* | os2* | pw32* | cegcc*)
++    mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -16603,7 +16603,7 @@
+         ;;
+       esac
+       ;;
+-      mingw* | cygwin* | os2* | pw32* | cegcc*)
++      mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+@@ -17092,7 +17092,7 @@
+   pw32*)
+     export_symbols_cmds_CXX=$ltdll_cmds
+     ;;
+-  cygwin* | mingw* | cegcc*)
++  cygwin* | msys* | mingw* | cegcc*)
+     case $cc_basename in
+     cl* | icl*)
+       exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+@@ -17413,7 +17413,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -17439,7 +17439,7 @@
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+-    cygwin*)
++    cygwin* | msys*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+-      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++      soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ 
+@@ -17478,7 +17478,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -18519,7 +18519,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -18622,7 +18622,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+@@ -19109,7 +19109,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -19224,7 +19224,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+@@ -19753,7 +19753,7 @@
+       export_dynamic_flag_spec_F77=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -20581,7 +20581,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -20607,9 +20607,9 @@
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+-    cygwin*)
++    cygwin* | msys*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+-      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++      soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ 
+       ;;
+     mingw* | cegcc*)
+@@ -20646,7 +20646,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -21822,7 +21822,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -21925,7 +21925,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+@@ -22412,7 +22412,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -22527,7 +22527,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_FC='-L$libdir'
+@@ -23056,7 +23056,7 @@
+       export_dynamic_flag_spec_FC=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -23884,7 +23884,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -23910,9 +23910,9 @@
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+-    cygwin*)
++    cygwin* | msys*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+-      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++      soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ 
+       ;;
+     mingw* | cegcc*)
+@@ -23949,7 +23949,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -24844,7 +24844,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -24947,7 +24947,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_GO='-DDLL_EXPORT'
+@@ -25434,7 +25434,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -25549,7 +25549,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, GO) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_GO='-L$libdir'
+@@ -26090,7 +26090,7 @@
+       export_dynamic_flag_spec_GO=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -27073,7 +27073,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -27176,7 +27176,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+ 
+@@ -27663,7 +27663,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -27778,7 +27778,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_GCJ='-L$libdir'
+@@ -28319,7 +28319,7 @@
+       export_dynamic_flag_spec_GCJ=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+
+diff -urN libtool-2.4.7/libltdl/configure.orig libtool-2.4.7/libltdl/configure
+--- libtool-2.4.7/libltdl/configure.orig       2022-05-25 14:29:13.245182300 
+0200
++++ libtool-2.4.7/libltdl/configure    2022-05-25 14:30:03.920944200 +0200
+@@ -4774,7 +4774,7 @@
+     lt_cv_sys_max_cmd_len=-1;
+     ;;
+ 
+-  cygwin* | mingw* | cegcc*)
++  cygwin* | msys* | mingw* | cegcc*)
+     # On Win9x/ME, this test blows up -- it succeeds, but takes
+     # about 5 minutes as the teststring grows exponentially.
+     # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -4940,7 +4940,7 @@
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+         ;;
+       * ) # otherwise, assume *nix
+@@ -4948,12 +4948,12 @@
+         ;;
+     esac
+     ;;
+-  *-*-cygwin* )
++  *-*-cygwin* | *-*-msys* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_noop
+         ;;
+       * ) # otherwise, assume *nix
+@@ -5019,7 +5019,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     if test yes != "$GCC"; then
+       reload_cmds=false
+     fi
+@@ -5272,7 +5272,7 @@
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+ 
+-cygwin*)
++cygwin* | msys*)
+   # func_win32_libid is a shell function defined in ltmain.sh
+   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+   lt_cv_file_magic_cmd='func_win32_libid'
+@@ -5588,7 +5588,7 @@
+   lt_cv_sharedlib_from_linklib_cmd='unknown'
+ 
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   # two different shell functions defined in ltmain.sh;
+   # decide which one to use based on capabilities of $DLLTOOL
+   case `$DLLTOOL --help 2>&1` in
+@@ -6097,7 +6097,7 @@
+ aix*)
+   symcode='[BCDT]'
+   ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   symcode='[ABCDGISTW]'
+   ;;
+ hpux*)
+@@ -7837,7 +7837,7 @@
+ enable_win32_dll=yes
+ 
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+   if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}as", so it can be a program 
name with args.
+ set dummy ${ac_tool_prefix}as; ac_word=$2
+@@ -8738,7 +8738,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -8841,7 +8841,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic='-DDLL_EXPORT'
+@@ -9343,7 +9343,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -9458,7 +9458,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec='-L$libdir'
+@@ -9999,7 +9999,7 @@
+       export_dynamic_flag_spec=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -11035,7 +11035,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -11067,6 +11067,12 @@
+ 
+       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+       ;;
++    msys*)
++      # MSYS DLLs use 'msys-' prefix rather than 'lib'
++      soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++
++      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
++      ;;
+     mingw* | cegcc*)
+       # MinGW DLLs use traditional 'lib' prefix
+       soname_spec='$libname`echo $release | $SED -e 
's/[.]/-/g'`$versuffix$shared_ext'
+@@ -11101,7 +11107,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -11803,7 +11809,7 @@
+     lt_cv_dlopen_libs=
+     ;;
+ 
+-  cygwin*)
++  cygwin* | msys*)
+     lt_cv_dlopen=dlopen
+     lt_cv_dlopen_libs=
+     ;;
+@@ -12751,7 +12757,7 @@
+ beos*)
+   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+   ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+   ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" 
"ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+ "
+ if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
+@@ -13166,7 +13172,7 @@
+   $as_echo_n "(cached) " >&6
+ else
+   case $host_os in #(
+-       *cygwin*)
++       *cygwin* | *msys*)
+          lt_cv_sys_argz_works=no
+          if test no != "$cross_compiling"; then
+            lt_cv_sys_argz_works="guessing no"
+
+diff -urN libtool-2.4.7/m4/libtool.m4.orig libtool-2.4.7/m4/libtool.m4
+--- libtool-2.4.7/m4/libtool.m4.orig   2022-03-17 03:43:39.000000000 +0100
++++ libtool-2.4.7/m4/libtool.m4        2022-05-25 14:26:59.035745300 +0200
+@@ -1703,7 +1703,7 @@
+     lt_cv_sys_max_cmd_len=-1;
+     ;;
+ 
+-  cygwin* | mingw* | cegcc*)
++  cygwin* | msys* | mingw* | cegcc*)
+     # On Win9x/ME, this test blows up -- it succeeds, but takes
+     # about 5 minutes as the teststring grows exponentially.
+     # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -1951,7 +1951,7 @@
+     lt_cv_dlopen_libs=
+     ;;
+ 
+-  cygwin*)
++  cygwin* | msys*)
+     lt_cv_dlopen=dlopen
+     lt_cv_dlopen_libs=
+     ;;
+@@ -2541,7 +2541,7 @@
+   # libtool to hard-code these into programs
+   ;;
+ 
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=.dll
+   need_version=no
+@@ -2567,9 +2567,9 @@
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+-    cygwin*)
++    cygwin* | msys*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+-      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
++      soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | 
$SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ m4_if([$1], [],[
+       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+       ;;
+@@ -2607,7 +2607,7 @@
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+-    cygwin*)
++    cygwin* | msys*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -3385,7 +3385,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     if test yes != "$GCC"; then
+       reload_cmds=false
+     fi
+@@ -3478,7 +3478,7 @@
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+ 
+-cygwin*)
++cygwin* | msys*)
+   # func_win32_libid is a shell function defined in ltmain.sh
+   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+   lt_cv_file_magic_cmd='func_win32_libid'
+@@ -3791,7 +3791,7 @@
+ [lt_cv_sharedlib_from_linklib_cmd='unknown'
+ 
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   # two different shell functions defined in ltmain.sh;
+   # decide which one to use based on capabilities of $DLLTOOL
+   case `$DLLTOOL --help 2>&1` in
+@@ -3861,7 +3861,7 @@
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+ case $host in
+-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | 
*-*-darwin*)
+   # These system don't have libm, or don't need it
+   ;;
+ *-ncr-sysv4.3*)
+@@ -3936,7 +3936,7 @@
+ aix*)
+   symcode='[[BCDT]]'
+   ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+   symcode='[[ABCDGISTW]]'
+   ;;
+ hpux*)
+@@ -4242,7 +4242,7 @@
+     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | cygwin* | os2* | pw32* | cegcc*)
++    mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -4318,7 +4318,7 @@
+         ;;
+       esac
+       ;;
+-      mingw* | cygwin* | os2* | pw32* | cegcc*)
++      mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+@@ -4566,7 +4566,7 @@
+       # PIC is the default for these OSes.
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -4670,7 +4670,7 @@
+       esac
+       ;;
+ 
+-    mingw* | cygwin* | pw32* | os2* | cegcc*)
++    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+@@ -4945,7 +4945,7 @@
+   pw32*)
+     _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+     ;;
+-  cygwin* | mingw* | cegcc*)
++  cygwin* | msys* | mingw* | cegcc*)
+     case $cc_basename in
+     cl* | icl*)
+       _LT_TAGVAR(exclude_expsyms, 
$1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+@@ -5003,7 +5003,7 @@
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+-  cygwin* | mingw* | pw32* | cegcc*)
++  cygwin* | msys* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -5118,7 +5118,7 @@
+       fi
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+       # as there is no search path for DLLs.
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+@@ -5575,7 +5575,7 @@
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+       ;;
+ 
+-    cygwin* | mingw* | pw32* | cegcc*)
++    cygwin* | msys* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++ or Intel C++ Compiler.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -6651,7 +6651,7 @@
+         esac
+         ;;
+ 
+-      cygwin* | mingw* | pw32* | cegcc*)
++      cygwin* | msys* | mingw* | pw32* | cegcc*)
+       case $GXX,$cc_basename in
+       ,cl* | no,cl* | ,icl* | no,icl*)
+         # Native MSVC or ICC
+@@ -8348,7 +8348,7 @@
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+         ;;
+       * ) # otherwise, assume *nix
+@@ -8356,12 +8356,12 @@
+         ;;
+     esac
+     ;;
+-  *-*-cygwin* )
++  *-*-cygwin* | *-*-msys* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+         ;;
+-      *-*-cygwin* )
++      *-*-cygwin* | *-*-msys* )
+         lt_cv_to_host_file_cmd=func_convert_file_noop
+         ;;
+       * ) # otherwise, assume *nix
+
+diff -Naur libtool-2.4.2.418-orig/m4/ltdl.m4 libtool-2.4.2.418/m4/ltdl.m4
+--- libtool-2.4.2.418-orig/m4/ltdl.m4  2013-10-26 03:37:46.000000000 +0400
++++ libtool-2.4.2.418/m4/ltdl.m4       2014-09-02 10:19:58.102800000 +0400
+@@ -706,7 +706,7 @@
+ beos*)
+   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+   ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+   AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
+   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+   ;;
+
+diff -Naur libtool-2.4.2.418-orig/m4/ltoptions.m4 
libtool-2.4.2.418/m4/ltoptions.m4
+--- libtool-2.4.2.418-orig/m4/ltoptions.m4     2013-10-26 03:37:46.000000000 
+0400
++++ libtool-2.4.2.418/m4/ltoptions.m4  2014-09-02 10:20:19.069200000 +0400
+@@ -126,7 +126,7 @@
+ [enable_win32_dll=yes
+ 
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+   AC_CHECK_TOOL(AS, as, false)
+   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+   AC_CHECK_TOOL(OBJDUMP, objdump, false)
+
+diff -Naur libtool-2.4.2.418-orig/tests/bindir.at 
libtool-2.4.2.418/tests/bindir.at
+--- libtool-2.4.2.418-orig/tests/bindir.at     2013-01-26 08:19:10.000000000 
+0400
++++ libtool-2.4.2.418/tests/bindir.at  2014-09-02 10:21:21.999600000 +0400
+@@ -65,7 +65,7 @@
+ 
+ bindirneeded=:
+ case $host_os in
+-  cygwin*|mingw*|cegcc*)
++  cygwin*|msys*|mingw*|cegcc*)
+     ;;
+   *)
+     bindirneeded=false
+@@ -174,7 +174,7 @@
+ 
+ bindirneeded=:
+ case $host_os in
+-  cygwin*|mingw*|cegcc*)
++  cygwin*|msys*|mingw*|cegcc*)
+     ;;
+   *)
+     bindirneeded=false
+
+diff -Naur libtool-2.4.2.418-orig/tests/lt_dladvise.at 
libtool-2.4.2.418/tests/lt_dladvise.at
+--- libtool-2.4.2.418-orig/tests/lt_dladvise.at        2013-01-01 
21:36:01.000000000 +0400
++++ libtool-2.4.2.418/tests/lt_dladvise.at     2014-09-02 10:20:51.298800000 
+0400
+@@ -332,7 +332,7 @@
+ $LIBTOOL --features | grep 'enable shared libraries' >/dev/null && 
have_shared=:
+ 
+ case $host_os,$have_shared in
+-cygwin* | mingw* | cegcc* | *,false)
++cygwin* | msys* | mingw* | cegcc* | *,false)
+   # These hosts do not support linking without -no-undefined
+   CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
+   ;;
diff --git 
a/contrib/autotools-patches/0010-libtool-2.4.2-include-process-h-mod.patch 
b/contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch
similarity index 50%
rename from 
contrib/autotools-patches/0010-libtool-2.4.2-include-process-h-mod.patch
rename to contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch
index c1301a1a..82ecf526 100644
--- a/contrib/autotools-patches/0010-libtool-2.4.2-include-process-h-mod.patch
+++ b/contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch
@@ -1,3 +1,15 @@
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 0418007..91276c2 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -4163,6 +4163,7 @@
+ # include <unistd.h>
+ # include <stdint.h>
+ # ifdef __CYGWIN__
++#  include <process.h>
+ #  include <io.h>
+ # endif
+ #endif
 diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
 index 0418007..91276c2 100644
 --- a/build-aux/ltmain.sh
diff --git 
a/contrib/autotools-patches/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
 
b/contrib/fixes-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
similarity index 100%
rename from 
contrib/autotools-patches/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
rename to 
contrib/fixes-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
diff --git 
a/contrib/autotools-patches/0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
 
b/contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
similarity index 97%
rename from 
contrib/autotools-patches/0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
rename to 
contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
index e0222b59..7bdb62db 100644
--- 
a/contrib/autotools-patches/0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
+++ 
b/contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
@@ -12,10 +12,10 @@ list of files is overkill for cases when a response file is 
enough.
  m4/libtool.m4       |  2 ++
  2 files changed, 16 insertions(+), 14 deletions(-)
 
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
 index e2fb263..db5d590 100644
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
 @@ -7932,20 +7932,7 @@ EOF
          last_robj=
          k=1
diff --git 
a/contrib/autotools-patches/0013-Allow-statically-linking-compiler-support-libraries-mod.patch
 
b/contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch
similarity index 91%
rename from 
contrib/autotools-patches/0013-Allow-statically-linking-compiler-support-libraries-mod.patch
rename to 
contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch
index 0ae0415f..b75b191a 100644
--- 
a/contrib/autotools-patches/0013-Allow-statically-linking-compiler-support-libraries-mod.patch
+++ 
b/contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch
@@ -11,10 +11,10 @@ here.
  build-aux/ltmain.in | 11 +++++++++--
  1 file changed, 9 insertions(+), 2 deletions(-)
 
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
 index e2fb2633..db4d775c 100644
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
 @@ -5870,8 +5870,15 @@ func_mode_link ()
          fi
          case $linkmode in
diff --git 
a/contrib/autotools-patches/0014-Support-llvm-objdump-f-output-mod.patch 
b/contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch
similarity index 93%
rename from 
contrib/autotools-patches/0014-Support-llvm-objdump-f-output-mod.patch
rename to contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch
index 0a1be0ec..d6570502 100644
--- a/contrib/autotools-patches/0014-Support-llvm-objdump-f-output-mod.patch
+++ b/contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch
@@ -8,10 +8,10 @@ Subject: [PATCH] Support llvm-objdump -f output
  m4/libtool.m4       | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
 index a9f070a..4a434cc 100644
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
 @@ -3019,7 +3019,7 @@ func_win32_libid ()
    *ar\ archive*) # could be an import, or static
      # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
diff --git a/contrib/fixes-libtool/apply-all.sh 
b/contrib/fixes-libtool/apply-all.sh
new file mode 100755
index 00000000..7df5f8c3
--- /dev/null
+++ b/contrib/fixes-libtool/apply-all.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+#
+# This file applies optional libtool patches mainly for better MSys2 
compatibility,
+# especially for MSys2/Clang{64,32} toolchains.
+# It's a pity that these patches haven't been sent upstream.
+#
+# Based on Debian SID baseline files as of April 2023.
+#
+
+patchesdir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$patchesdir" || exit 2
+cd "$patchesdir" || exit 2
+patchesdir=$(pwd) || exit 2
+
+patches=(
+  0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
+  0006-Fix-strict-ansi-vs-posix.patch
+  0009-libtool-2.4.2.418-msysize.patch
+  0010-libtool-2.4.2-include-process-h.patch
+  0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
+  0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
+  0013-Allow-statically-linking-compiler-support-libraries-.patch
+  0014-Support-llvm-objdump-f-output.patch
+)
+
+failed=( )
+
+cd "${patchesdir}/../.." || exit 1
+
+patch_params="-Nf -p1 --no-backup-if-mismatch -r - --read-only=fail"
+
+for patch in ${patches[@]}; do
+  patchfile="${patchesdir}/${patch}"
+  # Load patch into memory for simplicity
+  # Patches should not be very large
+  if grep -Eq -e '^--- .*\/ltmain\.in(\.orig)?([[:space:]]|$)' "$patchfile" && 
grep -Eq -e '^--- .*\/ltmain\.sh(\.orig)?([[:space:]]|$)' "$patchfile"
+  then
+    patch_data=$(awk '/^diff .*\/ltmain\.in(\.orig)?$/||(/^--- / && $2 ~ 
/\/ltmain\.in(\.orig)?$/){h=1;s=1;next}/^-- ?$/{h=0;s=0}/^[^-+@ 
]/{h||s=0}/^\+\+\+ /{h=0}!s' "$patchfile") || exit 2
+  else
+    patch_data=$(cat "$patchfile") || exit 2
+  fi
+  patch_data=$(echo "$patch_data" | sed -E -e '/^(diff|---|\+\+\+) / 
s|/ltmain\.in|/ltmain.sh|g' -) || exit 2
+  patch_data=$(echo "$patch_data" | awk '(/^diff / && 
!/.*\/(ltmain\.sh|config\.guess|libtool\.m4|ltoptions\.m4)$/)||(/^--- / && $2 
!~ 
/\/(ltmain\.sh|config\.guess|libtool\.m4|ltoptions\.m4)(\.orig)?$/){h=1;s=1;next}/^--
 ?$/{h=0;s=0}/^[^-+@ ]/{h||s=0}/^\+\+\+ /{h=0}!s' -) || exit 2
+  echo "*** Applying $patch..."
+  if echo "$patch_data" | patch $patch_params -i -
+  then
+    echo "** $patch successfully applied."
+  else
+    echo "** $patch failed."
+    failed+=("$patch")
+  fi
+  unset patch_data
+done
+
+echo ''
+
+if [[ -n "${failed[@]}" ]]; then
+  printf '* Failed patch: %s\n' "${failed[@]}" >&2
+  exit 2
+else
+  echo "* All patches have been successfully applied."
+fi
+
+exit 0
diff --git a/contrib/make-dist.sh b/contrib/make-dist.sh
new file mode 100755
index 00000000..c84ac2b3
--- /dev/null
+++ b/contrib/make-dist.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+#
+# This file creates dist tarball.
+# Optional autotools patches are applied for better toolchains
+# compatibility.
+#
+# Based on Debian SID baseline files as of April 2023.
+#
+
+if ! grep -Eq -e '^PRETTY_NAME="Debian GNU/Linux 12 \(bookworm\)"$' 
/etc/os-release
+then
+  echo "Only Debian 'bookworm' is suppoted by this script." >&2
+  exit 1
+fi
+
+if ! autoconf --version | head -1 | grep -Eq -e ' 2\.71$' -
+then
+  echo "The only supported autoconf version is 2.71." >&2
+  exit 1
+fi
+
+
+tooldir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$tooldir" || exit 2
+cd "$tooldir" || exit 2
+tooldir="$PWD" || exit 2
+cd "${tooldir}/.." || exit 2
+rootsrcdir="$PWD" || exit 2
+
+# Cleanup sources
+echo ''
+echo '*** Perfoming initial cleanup...'
+echo ''
+if [[ ! -f 'Makefile' ]] || ! make maintainer-clean
+then
+  # Makefile needed for initial cleanup
+  if [[ ! -f 'Makefile.in' ]] || [[ ! -f 'configure' ]] || ! ./configure || ! 
make maintainer-clean
+  then
+    rm -f po/Makefile || exit 3
+    # Build 'configure' to build Makefile for initial cleanup
+    autoreconf -fvi || exit 3
+    ./configure || exit 3
+    make maintainer-clean || exit 3
+  fi
+fi
+echo ''
+echo '** Initial cleanup completed.'
+echo ''
+
+# Copy latest autotools files
+echo ''
+echo '*** Copying autotools files...'
+echo ''
+autoreconf -fvi || exit 4
+echo ''
+echo '*** Perfoming intermediate cleanup...'
+echo ''
+./configure || exit 4
+make distclean || exit 4
+rm -f ./configure ./aclocal.m4 || exit 4
+rm -rf ./autom4te.cache || exit 4
+echo ''
+echo '** Initial intermediate completed.'
+echo ''
+
+# Patching local autotools files
+echo ''
+echo '*** Perfoming patching of local autotools files...'
+echo ''
+"$tooldir/fixes-libtool/apply-all.sh" || exit 5
+"$tooldir/fixes-autoconf/apply-all.sh" || exit 5
+echo ''
+echo '** Local autotools files patched.'
+echo ''
+
+# Build the configure and the related files with patches
+echo ''
+echo '*** Building patched configure and related files...'
+echo ''
+autoreconf -v || exit 6
+echo ''
+echo '** Patched build system ready.'
+echo ''
+
+# Build the configure and the related files with patches
+echo ''
+echo '*** Building dist tarball...'
+echo ''
+./configure || exit 7
+make dist || exit 7
+echo ''
+echo '** Dist tarball ready.'
+echo ''
+
+exit 0
\ No newline at end of file
diff --git a/m4/.gitignore b/m4/.gitignore
index f11afe06..9ebe42c6 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -3,3 +3,4 @@
 /ltsugar.m4
 /ltoptions.m4
 /libtool.m4
+/c_backported.m4

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]