diff --git a/mingw-w64-autotools/PKGBUILD b/mingw-w64-autotools/PKGBUILD index d65f15eea7..e5c5d0dfc0 100644 --- a/mingw-w64-autotools/PKGBUILD +++ b/mingw-w64-autotools/PKGBUILD @@ -3,7 +3,7 @@ _realname=autotools pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2022.01.16 +pkgver=2023.08.12 pkgrel=1 pkgdesc="A meta package for the GNU autotools build system (mingw-w64)" arch=('any') @@ -14,7 +14,7 @@ depends=( 'autoconf-wrapper' 'automake-wrapper' 'make' - 'libtool' + "${MINGW_PACKAGE_PREFIX}-libtool" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-pkg-config" ) diff --git a/mingw-w64-libltdl/PKGBUILD b/mingw-w64-libltdl/PKGBUILD deleted file mode 100644 index efbe674553..0000000000 --- a/mingw-w64-libltdl/PKGBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Maintainer: Alexey Pavlov -# Contributor: Ray Donnelly - -_realname=libltdl -_parentname=libtool -pkgbase=mingw-w64-${_realname} -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.4.7 -pkgrel=1 -pkgdesc="A system independent dlopen wrapper for GNU libtool (mingw-w64)" -arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') -url="https://www.gnu.org/software/libtool" -license=("GPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc") -provides=("${MINGW_PACKAGE_PREFIX}-libtool") -conflicts=("${MINGW_PACKAGE_PREFIX}-libtool") -replaces=("${MINGW_PACKAGE_PREFIX}-libtool") -source=("https://ftp.gnu.org/pub/gnu/libtool/${_parentname}-${pkgver}.tar.xz"{,.sig}) -sha256sums=('4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d' - 'SKIP') -validpgpkeys=('7C5FBB96BE82B954AC20DF5F6EAC957F8EEB55C0') # "Alex Ameen " - -prepare() { - cd ${srcdir}/${_parentname}-${pkgver}/libltdl - - autoreconf -fvi -} - -build() { - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} - - export lt_cv_deplibs_check_method='pass_all' - - ../${_parentname}-${pkgver}/libltdl/configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --enable-ltdl-install - - make -} - -package() { - cd "${srcdir}/build-${MINGW_CHOST}" - - make DESTDIR="${pkgdir}" install -} diff --git a/mingw-w64-libtool/0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch b/mingw-w64-libtool/0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch new file mode 100644 index 0000000000..310002b823 --- /dev/null +++ b/mingw-w64-libtool/0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch @@ -0,0 +1,99 @@ +[PATCH 2/6] [cygwin|mingw] Create UAC manifest files. + +* build-aux/ltmain.in (func_emit_exe_manifest): New function. +(func_mode_link) [cygwin|mingw]: Create manifest files for wrapper +and target exe when target name matches heuristic that triggers +UAC problems for newer win32 OSs. Clean up $cwrapper.manifest on +error. Ensure manifest files have executable permission. +(func_mode_uninstall): Clean up manifest files. +Various reports by Eric Blake, Kai Tietz, and Cesar Strauss. +--- + build-auxltmain.in | 50 ++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 48 insertions(+), 2 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 0418007..1821779 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -4277,6 +4277,41 @@ EOF + } + # end: func_emit_cwrapperexe_src + ++# func_emit_exe_manifest ++# emit a Win32 UAC manifest for executable on stdout ++# Must ONLY be called from within func_mode_link because ++# it depends on a number of variable set therein. ++func_emit_exe_manifest () ++{ ++ cat < ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++EOF ++} ++ + # func_win32_import_lib_p ARG + # True if ARG is an import lib, as indicated by $file_magic_cmd + func_win32_import_lib_p () +@@ -8237,7 +8272,7 @@ EOF + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper +- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 ++ trap "$RM $cwrappersource $cwrapper $cwrapper.manifest; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + +@@ -8257,6 +8292,16 @@ EOF + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then ++ # Create the UAC manifests first if necessary (but the ++ # manifest files must have executable permission regardless). ++ case $output_name in ++ *instal*|*patch*|*setup*|*update*) ++ func_emit_exe_manifest > $cwrapper.manifest ++ func_emit_exe_manifest > $output_path/$objdir/$output_name.exe.manifest ++ chmod +x $cwrapper.manifest ++ chmod +x $output_path/$objdir/$output_name.exe.manifest ++ ;; ++ esac + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result +@@ -8777,8 +8822,9 @@ func_mode_uninstall () + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" ++ func_append rmfiles " ${name}.manifest $objdir/${name}.manifest" + if test yes = "$fast_install" && test -n "$relink_command"; then +- func_append rmfiles " $odir/lt-$name" ++ func_append rmfiles " $odir/lt-$name $objdir/lt-${name}.manifest" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" +-- +1.7.1 + diff --git a/mingw-w64-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch b/mingw-w64-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch new file mode 100644 index 0000000000..dca3e72058 --- /dev/null +++ b/mingw-w64-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch @@ -0,0 +1,27 @@ +[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 +@@ -5440,13 +5440,18 @@ + # -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 + # -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=*|-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/mingw-w64-libtool/0005-Fix-seems-to-be-moved.patch b/mingw-w64-libtool/0005-Fix-seems-to-be-moved.patch new file mode 100644 index 0000000000..73c249db39 --- /dev/null +++ b/mingw-w64-libtool/0005-Fix-seems-to-be-moved.patch @@ -0,0 +1,24 @@ +[PATCH 5/6] Fix "seems to be moved" +* build-aux/ltmain.in (func_mode_link): Compare files by inode +to fix "seems to be moved" warning. +--- + build-aux/ltmain.in | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index af46cb8..244bb5b 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -6283,7 +6283,9 @@ func_mode_link () + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" +- test "$absdir" != "$libdir" && \ ++ abs_inode=`ls -i "$deplib" | awk '{print $1}'` ++ lib_inode=`ls -i "$libdir/$(basename $deplib)" | awk '{print $1}'` ++ test "$abs_inode" != "$lib_inode" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir +-- +1.7.0.2.msysgit.0 \ No newline at end of file diff --git a/mingw-w64-libtool/0006-Fix-strict-ansi-vs-posix.patch b/mingw-w64-libtool/0006-Fix-strict-ansi-vs-posix.patch new file mode 100644 index 0000000000..486ad76112 --- /dev/null +++ b/mingw-w64-libtool/0006-Fix-strict-ansi-vs-posix.patch @@ -0,0 +1,22 @@ +[PATCH 6/6] Fix STRICT_ANSI vs POSIX +* build-aux/ltmain.in (func_mode_link): Also check for _POSIX +as well as __STRICT_ANSI__ to avoid re-definitions. +--- + build-aux/ltmain.in | 4 +++- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index af46cb8..244bb5b 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3382,7 +3382,7 @@ + + /* declarations of non-ANSI functions */ + #if defined __MINGW32__ +-# ifdef __STRICT_ANSI__ ++# if defined(__STRICT_ANSI__) && !defined(__MINGW64_VERSION_MAJOR) || defined(_POSIX_) + int _putenv (const char *); + # endif + #elif defined __CYGWIN__ +-- +1.7.0.2.msysgit.0 \ No newline at end of file diff --git a/mingw-w64-libtool/0007-fix-cr-for-awk-in-configure.all.patch b/mingw-w64-libtool/0007-fix-cr-for-awk-in-configure.all.patch new file mode 100644 index 0000000000..65d5185a36 --- /dev/null +++ b/mingw-w64-libtool/0007-fix-cr-for-awk-in-configure.all.patch @@ -0,0 +1,22 @@ +--- libtool-2.4.2/configure.orig 2011-10-17 10:18:58.000000000 +0000 ++++ libtool-2.4.2/configure 2013-08-04 19:01:30.220494400 +0000 +@@ -28825,7 +28825,7 @@ + fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then +- ac_cs_awk_cr='\\r' ++ ac_cs_awk_cr='\r' + else + ac_cs_awk_cr=$ac_cr + fi +--- libtool-2.4.2/libltdl/configure.orig 2011-10-17 10:19:47.000000000 +0000 ++++ libtool-2.4.2/libltdl/configure 2013-08-05 11:49:24.990792500 +0000 +@@ -13574,7 +13574,7 @@ + fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then +- ac_cs_awk_cr='\\r' ++ ac_cs_awk_cr='\r' + else + ac_cs_awk_cr=$ac_cr + fi diff --git a/mingw-w64-libtool/0009-libtool-2.4.2.418-msysize.patch b/mingw-w64-libtool/0009-libtool-2.4.2.418-msysize.patch new file mode 100644 index 0000000000..1997342f5d --- /dev/null +++ b/mingw-w64-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 + " + 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 + " + 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 ]]) + 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/mingw-w64-libtool/0010-libtool-2.4.2-include-process-h.patch b/mingw-w64-libtool/0010-libtool-2.4.2-include-process-h.patch new file mode 100644 index 0000000000..82ecf5266b --- /dev/null +++ b/mingw-w64-libtool/0010-libtool-2.4.2-include-process-h.patch @@ -0,0 +1,24 @@ +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 + # include + # ifdef __CYGWIN__ ++# include + # include + # endif + #endif +diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh +index 0418007..91276c2 100644 +--- a/build-aux/ltmain.sh ++++ b/build-aux/ltmain.sh +@@ -4163,6 +4163,7 @@ + # include + # include + # ifdef __CYGWIN__ ++# include + # include + # endif + #endif diff --git a/mingw-w64-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch b/mingw-w64-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch new file mode 100644 index 0000000000..49cc070655 --- /dev/null +++ b/mingw-w64-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch @@ -0,0 +1,33 @@ +From a18473ed4e5574dab899db640b8efeff78939b54 Mon Sep 17 00:00:00 2001 +From: Manoj Gupta +Date: Wed, 10 Oct 2018 10:50:23 +0300 +Subject: [PATCH 1/2] Pick up clang_rt static archives compiler internal + libraries + +Libtool checks only for libraries linked as -l* when trying to +find internal compiler libraries. Clang, however uses the absolute +path to link its internal libraries e.g. compiler_rt. This patch +handles clang's statically linked libraries when finding internal +compiler libraries. +https://crbug.com/749263 +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 +--- + m4/libtool.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index b55a6e5..d9322d0 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -7556,7 +7556,7 @@ if AC_TRY_EVAL(ac_compile); then + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + +- -L* | -R* | -l*) ++ -L* | -R* | -l* | */libclang_rt.*.a) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || +-- +2.7.4 + diff --git a/mingw-w64-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch b/mingw-w64-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch new file mode 100644 index 0000000000..7bdb62dbfb --- /dev/null +++ b/mingw-w64-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch @@ -0,0 +1,83 @@ +From ec15841963ca3aab3bc88fb0932c014337284bfc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Wed, 10 Oct 2018 10:47:21 +0300 +Subject: [PATCH 2/2] Prefer response files over linker scripts for mingw tools + +The GCC/binutils tools support response files just fine, while +lld (impersonating GNU ld) only supports response files, not +linker scripts. Using a linker script as input just to pass a +list of files is overkill for cases when a response file is enough. +--- + build-aux/ltmain.in | 28 ++++++++++++++-------------- + m4/libtool.m4 | 2 ++ + 2 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index e2fb263..db5d590 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -7932,20 +7932,7 @@ EOF + last_robj= + k=1 + +- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then +- output=$output_objdir/$output_la.lnkscript +- func_verbose "creating GNU ld script: $output" +- echo 'INPUT (' > $output +- for obj in $save_libobjs +- do +- func_to_tool_file "$obj" +- $ECHO "$func_to_tool_file_result" >> $output +- done +- echo ')' >> $output +- func_append delfiles " $output" +- func_to_tool_file "$output" +- output=$func_to_tool_file_result +- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then ++ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output +@@ -7964,6 +7951,19 @@ EOF + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" ++ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then ++ output=$output_objdir/$output_la.lnkscript ++ func_verbose "creating GNU ld script: $output" ++ echo 'INPUT (' > $output ++ for obj in $save_libobjs ++ do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output ++ done ++ echo ')' >> $output ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$func_to_tool_file_result + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index d9322d0..9046a84 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -5130,6 +5130,7 @@ _LT_EOF + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ++ _LT_TAGVAR(file_list_spec, $1)='@' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -6706,6 +6707,7 @@ if test yes != "$_lt_caught_CXX_error"; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +-- +2.7.4 + diff --git a/mingw-w64-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch b/mingw-w64-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch new file mode 100644 index 0000000000..b75b191a7c --- /dev/null +++ b/mingw-w64-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch @@ -0,0 +1,38 @@ +From b9f77cae8cfbe850e58cac686fcb4d246b5bfc51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Mon, 19 Aug 2019 13:34:51 +0300 +Subject: [PATCH] Allow statically linking compiler support libraries when + linking a library + +For cases with deplibs_check_method="file_magic ..." (as it is for mingw), +there were previously no way that a static library could be accepted +here. +--- + build-aux/ltmain.in | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index e2fb2633..db4d775c 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -5870,8 +5870,15 @@ func_mode_link () + fi + case $linkmode in + lib) +- # Linking convenience modules into shared libraries is allowed, +- # but linking other static libraries is non-portable. ++ # Linking convenience modules and compiler provided static libraries ++ # into shared libraries is allowed, but linking other static ++ # libraries is non-portable. ++ case $deplib in ++ */libgcc*.$libext | */libclang_rt*.$libext) ++ deplibs="$deplib $deplibs" ++ continue ++ ;; ++ esac + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) +-- +2.17.1 + diff --git a/mingw-w64-libtool/0014-Support-llvm-objdump-f-output.patch b/mingw-w64-libtool/0014-Support-llvm-objdump-f-output.patch new file mode 100644 index 0000000000..d6570502d9 --- /dev/null +++ b/mingw-w64-libtool/0014-Support-llvm-objdump-f-output.patch @@ -0,0 +1,39 @@ +From 03dabb6a70847761e65572a2a7b770a3b1b9f123 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= +Date: Mon, 12 Apr 2021 23:44:10 +0200 +Subject: [PATCH] Support llvm-objdump -f output + +--- + build-aux/ltmain.in | 2 +- + m4/libtool.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index a9f070a..4a434cc 100644 +--- 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. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | +- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then ++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 21a7d60..594be9c 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -3473,7 +3473,7 @@ mingw* | pw32*) + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. +- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +-- +2.31.1 + diff --git a/mingw-w64-libtool/0015-Allow-statically-linking-Flang-support-libraries.patch b/mingw-w64-libtool/0015-Allow-statically-linking-Flang-support-libraries.patch new file mode 100644 index 0000000000..e75e737d66 --- /dev/null +++ b/mingw-w64-libtool/0015-Allow-statically-linking-Flang-support-libraries.patch @@ -0,0 +1,21 @@ +Allow statically linking Flang support libraries when linking a library + +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-03-17 03:43:39.000000000 +0100 ++++ libtool-2.4.7/build-aux/ltmain.in 2022-10-30 11:49:11.337887100 +0100 +@@ -7459,6 +7459,15 @@ + a_deplib= + break 2 + fi ++ # Linking compiler provided static libraries into shared ++ # libraries is allowed, but linking other static libraries is ++ # non-portable. ++ case $potlib in ++ */libFortran*.$libext) ++ func_append newdeplibs " $potlib" ++ a_deplib= ++ ;; ++ esac + done + done + fi diff --git a/mingw-w64-libtool/PKGBUILD b/mingw-w64-libtool/PKGBUILD new file mode 100644 index 0000000000..e87d6350c2 --- /dev/null +++ b/mingw-w64-libtool/PKGBUILD @@ -0,0 +1,120 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ray Donnelly + +_realname=libtool +pkgbase=mingw-w64-libtool +pkgname=("${MINGW_PACKAGE_PREFIX}-libtool" "${MINGW_PACKAGE_PREFIX}-libltdl") +pkgver=2.4.7 +pkgrel=2 +pkgdesc="A generic library support script (mingw-w64)" +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +url="https://www.gnu.org/software/libtool" +license=("GPL") +makedepends=( + "${MINGW_PACKAGE_PREFIX}-cc" + "automake-wrapper" + "autoconf-wrapper" + "help2man" +) +source=("https://ftp.gnu.org/pub/gnu/libtool/${_realname}-${pkgver}.tar.xz"{,.sig} + 0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch + 0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch + 0005-Fix-seems-to-be-moved.patch + 0006-Fix-strict-ansi-vs-posix.patch + 0007-fix-cr-for-awk-in-configure.all.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 + 0015-Allow-statically-linking-Flang-support-libraries.patch) +sha256sums=('4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d' + 'SKIP' + 'fe8b80efd34f9385220ebc90aaec945e44de8c343c75719d6ac0d4e472a6eed5' + '37d46a7964cf56617b897feb566537d847dee5e8f53e4771255d3cccf722918d' + 'dc39fbe066958178f96108f07db62b48b9339efddf2c21f800ff8d67110ca393' + '6a94ada08b0a0aa36240efd9ccb826e22ab94ef0969270f2edb8be344dc8c62b' + 'd96beecfc5d15f94ce46bbe0e89d6e6fdb973a25ad6be98c30504b58453792c1' + '1a858a13592a1a5bd56ae3c4e610408ca19ec9d318ebdfd96bebcfc585b2924f' + '0f3defa657d353b9f55469f6d514abd96494ce7459ef76bbd63980d8994cafe9' + 'c727b2b017163cfdeca60820d3cff2dac8968c5630745602b150f92b159af313' + 'c95a65e890b1ae6362807abc66809e72cf81aeea5f9f556e38f9752f974bf435' + '8069e887aeeab7491f15e00547fa66d9b9e86407f5a23f37a6d8c7d165de752e' + 'db16cd322e0ebc578c906e94b0788810af17ce617c700a50db2e3c598dbbed7e' + '9fe454603a519e9ac50b32de125d4c5293520142c34a895c6e392a190719ff52') +validpgpkeys=('7C5FBB96BE82B954AC20DF5F6EAC957F8EEB55C0') # "Alex Ameen " + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Nbp1 -i "${srcdir}/$_patch" + done +} + +prepare() { + cd "${_realname}-${pkgver}" + + # Note: keep the patches in sync with msys libtool + apply_patch_with_msg \ + 0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch \ + 0003-Pass-various-runtime-library-flags-to-GCC.mingw.patch \ + 0005-Fix-seems-to-be-moved.patch \ + 0006-Fix-strict-ansi-vs-posix.patch \ + 0007-fix-cr-for-awk-in-configure.all.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 \ + 0015-Allow-statically-linking-Flang-support-libraries.patch +} + +build() { + cd "${_realname}-${pkgver}" + + ./configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} + + make +} + +package_libtool() { + depends=("${MINGW_PACKAGE_PREFIX}-libltdl") + + cd "${_realname}-${pkgver}" + + make DESTDIR=${pkgdir} install-binSCRIPTS install-man install-info \ + install-data-local + + # Fix paths + local WINPREFIX=$(cygpath -wm ${MINGW_PREFIX}) + sed -i "s|${WINPREFIX}|${MINGW_PREFIX}|g" "${pkgdir}${MINGW_PREFIX}/bin/libtool" +} + +package_libltdl() { + pkgdesc="A system independent dlopen wrapper for GNU libtool" + + cd "${_realname}-${pkgver}" + + make DESTDIR=${pkgdir} install-libLTLIBRARIES install-includeHEADERS \ + install-ltdlincludeHEADERS +} + +# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; +# vim: set ft=bash : + +# generate wrappers +for _name in "${pkgname[@]}"; do + _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}" + _func="$(declare -f "${_short}")" + eval "${_func/#${_short}/package_${_name}}" +done +# template end;