aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-07 22:06:24 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-10 15:39:23 +0300
commit2854eab93198f8e846ed36a0c9e0fccf4978961c (patch)
tree051e36adf9773a572a2d7a9b24172ef88973e095 /contrib
parentedf692a61627394c26132e203857afc5237495c3 (diff)
downloadlibmicrohttpd-2854eab93198f8e846ed36a0c9e0fccf4978961c.tar.gz
libmicrohttpd-2854eab93198f8e846ed36a0c9e0fccf4978961c.zip
Updated libtool fixes
Diffstat (limited to 'contrib')
-rw-r--r--contrib/autotools-patches/0003-Pass-various-flags-to-GCC.patch20
-rw-r--r--contrib/autotools-patches/0003-Pass-various-runtime-library-flags-to-GCC.mingw-mod.patch30
-rw-r--r--contrib/autotools-patches/0009-libtool-2.4.2.418-msysize-mod.patch443
-rwxr-xr-xcontrib/autotools-patches/apply-all.sh38
-rw-r--r--contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch31
-rw-r--r--contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch (renamed from contrib/autotools-patches/0006-Fix-strict-ansi-vs-posix-mod.patch)10
-rw-r--r--contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch1403
-rw-r--r--contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch (renamed from contrib/autotools-patches/0010-libtool-2.4.2-include-process-h-mod.patch)12
-rw-r--r--contrib/fixes-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch (renamed from contrib/autotools-patches/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch)0
-rw-r--r--contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch (renamed from contrib/autotools-patches/0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch)6
-rw-r--r--contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch (renamed from contrib/autotools-patches/0013-Allow-statically-linking-compiler-support-libraries-mod.patch)6
-rw-r--r--contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch (renamed from contrib/autotools-patches/0014-Support-llvm-objdump-f-output-mod.patch)6
-rwxr-xr-xcontrib/fixes-libtool/apply-all.sh65
13 files changed, 1525 insertions, 545 deletions
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 @@
1diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
2index 21e5e078..ddd6e36f 100755
3--- a/build-aux/ltmain.sh
4+++ b/build-aux/ltmain.sh
5@@ -7369,11 +7369,14 @@ func_mode_link ()
6 # -fsanitize=* Clang/GCC memory and address sanitizer
7 # -fuse-ld=* Linker select flags for GCC
8 # -static-* direct GCC to link specific libraries statically
9+ # -shared-* direct GCC to link shared version of specific libraries
10 # -fcilkplus Cilk Plus language extension features for C/C++
11 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
12 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
13 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
14- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
15+ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-shared-*|-fcilkplus| \
16+ -ftree-parallelize-loops=*|-fgnu-tm|-ffast-math| \
17+ -funsafe-math-optimizations|-fvtable-verify*)
18 func_quote_for_eval "$arg"
19 arg=$func_quote_for_eval_result
20 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 @@
1[PATCH 3/6] Pass various runtime library flags to GCC.
2* build-aux/ltmain.in (func_mode_link): Pass the
3-shared-libgcc and -static-lib* flags along to GCC.
4---
5 build-aux/ltmain.sh | 5 ++++-
6 1 files changed, 4 insertions(+), 1 deletions(-)
7
8diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
9index 1821779..eda7790 100644
10--- a/build-aux/ltmain.sh
11+++ b/build-aux/ltmain.sh
12@@ -5084,9 +5084,14 @@ func_mode_link ()
13 # --sysroot=* for sysroot support
14 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
15 # -stdlib=* select c++ std lib with clang
16+ # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
17+ # link against specified runtime library
18 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
19 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
20- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
21+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
22+ -ftree-parallelize-loops=*|-fcilkplus|-fgnu-tm|-ffast-math| \
23+ -funsafe-math-optimizations|-fvtable-verify*| \
24+ -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++)
25 func_quote_for_eval "$arg"
26 arg=$func_quote_for_eval_result
27 func_append compile_command " $arg"
28--
291.7.1
30
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 @@
1diff --git a/build-aux/config.guess b/build-aux/config.guess
2index f50dcdb6..cd89e459 100755
3--- a/build-aux/config.guess
4+++ b/build-aux/config.guess
5@@ -883,6 +883,9 @@ EOF
6 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
7 echo x86_64-unknown-cygwin
8 exit ;;
9+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
10+ echo x86_64-unknown-msys
11+ exit ;;
12 prep*:SunOS:5.*:*)
13 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
14 exit ;;
15diff -Naur libtool-2.4.2.418-orig/build-aux/ltmain.sh libtool-2.4.2.418/build-aux/ltmain.sh
16--- libtool-2.4.2.418-orig/build-aux/ltmain.sh 2013-10-27 02:53:58.000000000 +0400
17+++ libtool-2.4.2.418/build-aux/ltmain.sh 2014-09-02 10:29:08.840800000 +0400
18@@ -2315,7 +2315,7 @@
19 case $host in
20 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
21 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
22- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
23+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
24 # don't eliminate duplications in $postdeps and $predeps
25 opt_duplicate_compiler_generated_deps=:
26 ;;
27@@ -3328,7 +3328,7 @@
28
29 # On Cygwin there's no "real" PIC flag so we must build both object types
30 case $host_os in
31- cygwin* | mingw* | pw32* | os2* | cegcc*)
32+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
33 pic_mode=default
34 ;;
35 esac
36@@ -4201,7 +4201,7 @@
37 'exit $?'
38 tstripme=$stripme
39 case $host_os in
40- cygwin* | mingw* | pw32* | cegcc*)
41+ cygwin* | msys* | mingw* | pw32* | cegcc*)
42 case $realname in
43 *.dll.a)
44 tstripme=
45@@ -4307,7 +4307,7 @@
46
47 # Do a test to see if this is really a libtool program.
48 case $host in
49- *cygwin* | *mingw*)
50+ *cygwin* | *msys* | *mingw*)
51 if func_ltwrapper_executable_p "$file"; then
52 func_ltwrapper_scriptname "$file"
53 wrapper=$func_ltwrapper_scriptname_result
54@@ -4382,7 +4382,7 @@
55 # remove .exe since cygwin /usr/bin/install will append another
56 # one anyway
57 case $install_prog,$host in
58- */usr/bin/install*,*cygwin*)
59+ */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
60 case $file:$destfile in
61 *.exe:*.exe)
62 # this is ok
63@@ -4535,7 +4535,7 @@
64 $RM $export_symbols
65 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
66 case $host in
67- *cygwin* | *mingw* | *cegcc* )
68+ *cygwin* | *msys* | *mingw* | *cegcc* )
69 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
70 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
71 ;;
72@@ -4547,7 +4547,7 @@
73 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
74 eval '$MV "$nlist"T "$nlist"'
75 case $host in
76- *cygwin* | *mingw* | *cegcc* )
77+ *cygwin* | *msys* | *mingw* | *cegcc* )
78 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
79 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
80 ;;
81@@ -4561,7 +4561,7 @@
82 func_basename "$dlprefile"
83 name=$func_basename_result
84 case $host in
85- *cygwin* | *mingw* | *cegcc* )
86+ *cygwin* | *msys* | *mingw* | *cegcc* )
87 # if an import library, we need to obtain dlname
88 if func_win32_import_lib_p "$dlprefile"; then
89 func_tr_sh "$dlprefile"
90@@ -4736,7 +4736,7 @@
91 # Transform the symbol file into the correct name.
92 symfileobj=$output_objdir/${my_outputname}S.$objext
93 case $host in
94- *cygwin* | *mingw* | *cegcc* )
95+ *cygwin* | *msys* | *mingw* | *cegcc* )
96 if test -f "$output_objdir/$my_outputname.def"; then
97 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
98 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
99@@ -5629,7 +5629,7 @@
100 {
101 EOF
102 case $host in
103- *mingw* | *cygwin* )
104+ *mingw* | *cygwin* | *msys* )
105 # make stdout use "unix" line endings
106 echo " setmode(1,_O_BINARY);"
107 ;;
108@@ -6350,7 +6350,7 @@
109 $debug_cmd
110
111 case $host in
112- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
113+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
114 # It is impossible to link a dll without this setting, and
115 # we shouldn't force the makefile maintainer to figure out
116 # what system we are compiling for in order to pass an extra
117@@ -6843,7 +6843,7 @@
118 ;;
119 esac
120 case $host in
121- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
122+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
123 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
124 case :$dllsearchpath: in
125 *":$dir:"*) ;;
126@@ -6863,7 +6863,7 @@
127 -l*)
128 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
129 case $host in
130- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
131+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
132 # These systems don't actually have a C or math library (as such)
133 continue
134 ;;
135@@ -6946,7 +6946,7 @@
136
137 -no-install)
138 case $host in
139- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
140+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
141 # The PATH hackery in wrapper scripts is required on Windows
142 # and Darwin in order for the loader to find any dlls it needs.
143 func_warning "'-no-install' is ignored for $host"
144@@ -7812,7 +7812,7 @@
145 fi
146 case $host in
147 # special handling for platforms with PE-DLLs.
148- *cygwin* | *mingw* | *cegcc* )
149+ *cygwin* | *msys* | *mingw* | *cegcc* )
150 # Linker will automatically link against shared library if both
151 # static and shared are present. Therefore, ensure we extract
152 # symbols from the import library if a shared library is present
153@@ -7956,7 +7956,7 @@
154 if test -n "$library_names" &&
155 { test no = "$use_static_libs" || test -z "$old_library"; }; then
156 case $host in
157- *cygwin* | *mingw* | *cegcc* | *os2*)
158+ *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
159 # No point in relinking DLLs because paths are not encoded
160 func_append notinst_deplibs " $lib"
161 need_relink=no
162@@ -8026,7 +8026,7 @@
163 elif test -n "$soname_spec"; then
164 # bleh windows
165 case $host in
166- *cygwin* | mingw* | *cegcc* | *os2*)
167+ *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
168 func_arith $current - $age
169 major=$func_arith_result
170 versuffix=-$major
171@@ -8899,7 +8899,7 @@
172 if test yes = "$build_libtool_libs"; then
173 if test -n "$rpath"; then
174 case $host in
175- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
176+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
177 # these systems don't actually have a c library (as such)!
178 ;;
179 *-*-rhapsody* | *-*-darwin1.[012])
180@@ -9413,7 +9413,7 @@
181
182 orig_export_symbols=
183 case $host_os in
184- cygwin* | mingw* | cegcc*)
185+ cygwin* | *msys* | mingw* | cegcc*)
186 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
187 # exporting using user supplied symfile
188 func_dll_def_p "$export_symbols" || {
189@@ -9970,7 +9970,7 @@
190
191 prog)
192 case $host in
193- *cygwin*) func_stripname '' '.exe' "$output"
194+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
195 output=$func_stripname_result.exe;;
196 esac
197 test -n "$vinfo" && \
198@@ -10081,7 +10081,7 @@
199 esac
200 fi
201 case $host in
202- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
203+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
204 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
205 case :$dllsearchpath: in
206 *":$libdir:"*) ;;
207@@ -10159,7 +10159,7 @@
208 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
209 wrappers_required=false
210 ;;
211- *cygwin* | *mingw* )
212+ *cygwin* | *msys* | *mingw* )
213 test yes = "$build_libtool_libs" || wrappers_required=false
214 ;;
215 *)
216@@ -10305,14 +10305,14 @@
217 esac
218 # test for cygwin because mv fails w/o .exe extensions
219 case $host in
220- *cygwin*)
221+ *cygwin* | *msys*)
222 exeext=.exe
223 func_stripname '' '.exe' "$outputname"
224 outputname=$func_stripname_result ;;
225 *) exeext= ;;
226 esac
227 case $host in
228- *cygwin* | *mingw* )
229+ *cygwin* | *msys* | *mingw* )
230 func_dirname_and_basename "$output" "" "."
231 output_name=$func_basename_result
232 output_path=$func_dirname_result
233@@ -10644,7 +10644,7 @@
234 # tests/bindir.at for full details.
235 tdlname=$dlname
236 case $host,$output,$installed,$module,$dlname in
237- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
238+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
239 # If a -bindir argument was supplied, place the dll there.
240 if test -n "$bindir"; then
241 func_relative_path "$install_libdir" "$bindir"
242diff -Naur libtool-2.4.2.418-orig/m4/libtool.m4 libtool-2.4.2.418/m4/libtool.m4
243--- libtool-2.4.2.418-orig/m4/libtool.m4 2013-10-26 03:37:46.000000000 +0400
244+++ libtool-2.4.2.418/m4/libtool.m4 2014-09-02 10:19:40.084800000 +0400
245@@ -1665,7 +1665,7 @@
246 lt_cv_sys_max_cmd_len=-1;
247 ;;
248
249- cygwin* | mingw* | cegcc*)
250+ cygwin* | msys* | mingw* | cegcc*)
251 # On Win9x/ME, this test blows up -- it succeeds, but takes
252 # about 5 minutes as the teststring grows exponentially.
253 # Worse, since 9x/ME are not pre-emptively multitasking,
254@@ -1913,7 +1913,7 @@
255 lt_cv_dlopen_libs=
256 ;;
257
258- cygwin*)
259+ cygwin* | msys*)
260 lt_cv_dlopen=dlopen
261 lt_cv_dlopen_libs=
262 ;;
263@@ -2399,7 +2399,7 @@
264 # libtool to hard-code these into programs
265 ;;
266
267-cygwin* | mingw* | pw32* | cegcc*)
268+cygwin* | msys* | mingw* | pw32* | cegcc*)
269 version_type=windows
270 shrext_cmds=.dll
271 need_version=no
272@@ -2431,6 +2431,12 @@
273 m4_if([$1], [],[
274 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
275 ;;
276+ msys*)
277+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
278+ soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
279+m4_if([$1], [],[
280+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
281+ ;;
282 mingw* | cegcc*)
283 # MinGW DLLs use traditional 'lib' prefix
284 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
285@@ -2465,7 +2471,7 @@
286 # Convert to MSYS style.
287 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
288 ;;
289- cygwin*)
290+ cygwin* | msys*)
291 # Convert to unix form, then to dos form, then back to unix form
292 # but this time dos style (no spaces!) so that the unix form looks
293 # like /cygdrive/c/PROGRA~1:/cygdr...
294@@ -3203,7 +3209,7 @@
295 esac
296 reload_cmds='$LD$reload_flag -o $output$reload_objs'
297 case $host_os in
298- cygwin* | mingw* | pw32* | cegcc*)
299+ cygwin* | msys* | mingw* | pw32* | cegcc*)
300 if test yes != "$GCC"; then
301 reload_cmds=false
302 fi
303@@ -3259,7 +3265,7 @@
304 lt_cv_file_magic_test_file=/shlib/libc.so
305 ;;
306
307-cygwin*)
308+cygwin* | msys*)
309 # func_win32_libid is a shell function defined in ltmain.sh
310 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
311 lt_cv_file_magic_cmd='func_win32_libid'
312@@ -3564,7 +3570,7 @@
313 [lt_cv_sharedlib_from_linklib_cmd='unknown'
314
315 case $host_os in
316-cygwin* | mingw* | pw32* | cegcc*)
317+cygwin* | msys* | mingw* | pw32* | cegcc*)
318 # two different shell functions defined in ltmain.sh;
319 # decide which one to use based on capabilities of $DLLTOOL
320 case `$DLLTOOL --help 2>&1` in
321@@ -3634,7 +3640,7 @@
322 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
323 LIBM=
324 case $host in
325-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
326+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
327 # These system don't have libm, or don't need it
328 ;;
329 *-ncr-sysv4.3*)
330@@ -3709,7 +3715,7 @@
331 aix*)
332 symcode='[[BCDT]]'
333 ;;
334-cygwin* | mingw* | pw32* | cegcc*)
335+cygwin* | msys* | mingw* | pw32* | cegcc*)
336 symcode='[[ABCDGISTW]]'
337 ;;
338 hpux*)
339@@ -4015,7 +4021,7 @@
340 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
341 # PIC is the default for these OSes.
342 ;;
343- mingw* | cygwin* | os2* | pw32* | cegcc*)
344+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
345 # This hack is so that the source file can tell whether it is being
346 # built for inclusion in a dll (and should export symbols for example).
347 # Although the cygwin gcc ignores -fPIC, still need this for old-style
348@@ -4086,7 +4092,7 @@
349 ;;
350 esac
351 ;;
352- mingw* | cygwin* | os2* | pw32* | cegcc*)
353+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
354 # This hack is so that the source file can tell whether it is being
355 # built for inclusion in a dll (and should export symbols for example).
356 m4_if([$1], [GCJ], [],
357@@ -4334,7 +4340,7 @@
358 # PIC is the default for these OSes.
359 ;;
360
361- mingw* | cygwin* | pw32* | os2* | cegcc*)
362+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
363 # This hack is so that the source file can tell whether it is being
364 # built for inclusion in a dll (and should export symbols for example).
365 # Although the cygwin gcc ignores -fPIC, still need this for old-style
366@@ -4433,7 +4439,7 @@
367 esac
368 ;;
369
370- mingw* | cygwin* | pw32* | os2* | cegcc*)
371+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
372 # This hack is so that the source file can tell whether it is being
373 # built for inclusion in a dll (and should export symbols for example).
374 m4_if([$1], [GCJ], [],
375@@ -4699,7 +4705,7 @@
376 pw32*)
377 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
378 ;;
379- cygwin* | mingw* | cegcc*)
380+ cygwin* | msys* | mingw* | cegcc*)
381 case $cc_basename in
382 cl*)
383 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
384@@ -4757,7 +4763,7 @@
385 extract_expsyms_cmds=
386
387 case $host_os in
388- cygwin* | mingw* | pw32* | cegcc*)
389+ cygwin* | msys* | mingw* | pw32* | cegcc*)
390 # FIXME: the MSVC++ port hasn't been tested in a loooong time
391 # When not using gcc, we currently assume that we are using
392 # Microsoft Visual C++.
393@@ -4872,7 +4878,7 @@
394 fi
395 ;;
396
397- cygwin* | mingw* | pw32* | cegcc*)
398+ cygwin* | msys* | mingw* | pw32* | cegcc*)
399 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
400 # as there is no search path for DLLs.
401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
402@@ -5247,7 +5253,7 @@
403 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
404 ;;
405
406- cygwin* | mingw* | pw32* | cegcc*)
407+ cygwin* | msys* | mingw* | pw32* | cegcc*)
408 # When not using gcc, we currently assume that we are using
409 # Microsoft Visual C++.
410 # hardcode_libdir_flag_spec is actually meaningless, as there is
411@@ -6241,7 +6247,7 @@
412 esac
413 ;;
414
415- cygwin* | mingw* | pw32* | cegcc*)
416+ cygwin* | msys* | mingw* | pw32* | cegcc*)
417 case $GXX,$cc_basename in
418 ,cl* | no,cl*)
419 # Native MSVC
420@@ -7937,7 +7943,7 @@
421 *-*-mingw* ) # actually msys
422 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
423 ;;
424- *-*-cygwin* )
425+ *-*-cygwin* | *-*-msys* )
426 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
427 ;;
428 * ) # otherwise, assume *nix
429@@ -7945,12 +7951,12 @@
430 ;;
431 esac
432 ;;
433- *-*-cygwin* )
434+ *-*-cygwin* | *-*-msys* )
435 case $build in
436 *-*-mingw* ) # actually msys
437 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
438 ;;
439- *-*-cygwin* )
440+ *-*-cygwin* | *-*-msys* )
441 lt_cv_to_host_file_cmd=func_convert_file_noop
442 ;;
443 * ) # 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 @@
1#!/bin/bash
2
3#
4# This file applies optional libtool patches mainly for better MSys2 compatibility,
5# especially for MSys2/Clang{64,32} toolchains.
6# It's a pity that these patches haven't been sent upstream.
7#
8# Based on Debian SID baseline files as of December 2021.
9#
10
11patchesdir="$(dirname "$BASH_SOURCE")" || exit 2
12test -n "$patchesdir" || exit 2
13
14patches=(
15 0003-Pass-various-flags-to-GCC.patch
16 0006-Fix-strict-ansi-vs-posix-mod.patch
17 0009-libtool-2.4.2.418-msysize-mod.patch
18 0010-libtool-2.4.2-include-process-h-mod.patch
19 0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
20 0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
21 0013-Allow-statically-linking-compiler-support-libraries-mod.patch
22 0014-Support-llvm-objdump-f-output-mod.patch
23)
24
25failed=( )
26
27cd "${patchesdir}/../.." || exit 1
28
29for patch in ${patches[@]}; do
30 patch -N -p1 --no-backup-if-mismatch -r - -i "${patchesdir}/${patch}" || failed+=("$patch")
31done
32
33if [[ -n "${failed[@]}" ]]; then
34 printf 'Failed patch: %s\n' "${failed[@]}" >&2
35 exit 2
36fi
37
38exit 0
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 @@
1The patch below was modified to work on top of Debian patches
2
3[PATCH 3/6] Pass various runtime library flags to GCC.
4* build-aux/ltmain.in (func_mode_link): Pass the
5-shared-libgcc and -static-lib* flags along to GCC.
6
7diff -urN libtool-2.4.7/build-aux/ltmain.in.orig libtool-2.4.7/build-aux/ltmain.in
8--- libtool-2.4.7/build-aux/ltmain.in.orig 2022-05-25 13:57:50.311734300 +0200
9+++ libtool-2.4.7/build-aux/ltmain.in 2022-05-25 14:01:54.621866600 +0200
10@@ -7559,15 +7559,19 @@
11 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
12 # -specs=* GCC specs files
13 # -stdlib=* select c++ std lib with clang
14+ # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
15+ # link against specified runtime library
16 # -fsanitize=* Clang/GCC memory and address sanitizer
17 # -fuse-ld=* Linker select flags for GCC
18- # -static-* direct GCC to link specific libraries statically
19 # -fcilkplus Cilk Plus language extension features for C/C++
20 # -Wa,* Pass flags directly to the assembler
21 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
22 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
23 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
24- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
25+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-ftree-parallelize-loops=*| \
26+ -fcilkplus|-fgnu-tm|-ffast-math|-funsafe-math-optimizations| \
27+ -fvtable-verify*|-shared-libgcc|-static-libgcc|-static-libgfortran| \
28+ -static-libstdc++)
29 func_quote_arg pretty "$arg"
30 arg=$func_quote_arg_result
31 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
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 @@
2* build-aux/ltmain.in (func_mode_link): Also check for _POSIX 2* build-aux/ltmain.in (func_mode_link): Also check for _POSIX
3as well as __STRICT_ANSI__ to avoid re-definitions. 3as well as __STRICT_ANSI__ to avoid re-definitions.
4--- 4---
5 build-aux/ltmain.sh | 4 +++- 5 build-aux/ltmain.in | 4 +++-
6 1 files changed, 1 insertions(+), 1 deletions(-) 6 1 files changed, 1 insertions(+), 1 deletions(-)
7 7
8diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 8diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
9index af46cb8..244bb5b 100644 9index af46cb8..244bb5b 100644
10--- a/build-aux/ltmain.sh 10--- a/build-aux/ltmain.in
11+++ b/build-aux/ltmain.sh 11+++ b/build-aux/ltmain.in
12@@ -3382,7 +3382,7 @@ 12@@ -3382,7 +3382,7 @@
13 13
14 /* declarations of non-ANSI functions */ 14 /* declarations of non-ANSI functions */
@@ -19,4 +19,4 @@ index af46cb8..244bb5b 100644
19 # endif 19 # endif
20 #elif defined __CYGWIN__ 20 #elif defined __CYGWIN__
21-- 21--
221.7.0.2.msysgit.0 221.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 @@
1diff -urN libtool-2.4.7/build-aux/config.guess.orig libtool-2.4.7/build-aux/config.guess
2--- libtool-2.4.7/build-aux/config.guess.orig 2022-05-25 14:18:47.388587800 +0200
3+++ libtool-2.4.7/build-aux/config.guess 2022-05-25 14:21:50.720326000 +0200
4@@ -950,6 +950,9 @@
5 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
6 GUESS=x86_64-pc-cygwin
7 ;;
8+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
9+ GUESS=x86_64-pc-msys
10+ ;;
11 prep*:SunOS:5.*:*)
12 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
13 GUESS=powerpcle-unknown-solaris2$SUN_REL
14
15diff -Naur libtool-2.4.3-orig/build-aux/ltmain.in libtool-2.4.3/build-aux/ltmain.in
16--- libtool-2.4.3-orig/build-aux/ltmain.in 2014-09-02 09:54:56.481600000 +0400
17+++ libtool-2.4.3/build-aux/ltmain.in 2014-09-02 10:14:04.809600000 +0400
18@@ -497,7 +497,7 @@
19 case $host in
20 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
21 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
22- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
23+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
24 # don't eliminate duplications in $postdeps and $predeps
25 opt_duplicate_compiler_generated_deps=:
26 ;;
27@@ -1510,7 +1510,7 @@
28
29 # On Cygwin there's no "real" PIC flag so we must build both object types
30 case $host_os in
31- cygwin* | mingw* | pw32* | os2* | cegcc*)
32+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
33 pic_mode=default
34 ;;
35 esac
36@@ -2383,7 +2383,7 @@
37 'exit $?'
38 tstripme=$stripme
39 case $host_os in
40- cygwin* | mingw* | pw32* | cegcc*)
41+ cygwin* | msys* | mingw* | pw32* | cegcc*)
42 case $realname in
43 *.dll.a)
44 tstripme=
45@@ -2489,7 +2489,7 @@
46
47 # Do a test to see if this is really a libtool program.
48 case $host in
49- *cygwin* | *mingw*)
50+ *cygwin* | *msys* | *mingw*)
51 if func_ltwrapper_executable_p "$file"; then
52 func_ltwrapper_scriptname "$file"
53 wrapper=$func_ltwrapper_scriptname_result
54@@ -2564,7 +2564,7 @@
55 # remove .exe since cygwin /usr/bin/install will append another
56 # one anyway
57 case $install_prog,$host in
58- */usr/bin/install*,*cygwin*)
59+ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
60 case $file:$destfile in
61 *.exe:*.exe)
62 # this is ok
63@@ -2717,7 +2717,7 @@
64 $RM $export_symbols
65 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
66 case $host in
67- *cygwin* | *mingw* | *cegcc* )
68+ *cygwin* | *msys* | *mingw* | *cegcc* )
69 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
70 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
71 ;;
72@@ -2729,7 +2729,7 @@
73 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
74 eval '$MV "$nlist"T "$nlist"'
75 case $host in
76- *cygwin* | *mingw* | *cegcc* )
77+ *cygwin* | *msys* | *mingw* | *cegcc* )
78 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
79 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
80 ;;
81@@ -2743,7 +2743,7 @@
82 func_basename "$dlprefile"
83 name=$func_basename_result
84 case $host in
85- *cygwin* | *mingw* | *cegcc* )
86+ *cygwin* | *msys* | *mingw* | *cegcc* )
87 # if an import library, we need to obtain dlname
88 if func_win32_import_lib_p "$dlprefile"; then
89 func_tr_sh "$dlprefile"
90@@ -2918,7 +2918,7 @@
91 # Transform the symbol file into the correct name.
92 symfileobj=$output_objdir/${my_outputname}S.$objext
93 case $host in
94- *cygwin* | *mingw* | *cegcc* )
95+ *cygwin* | *msys* | *mingw* | *cegcc* )
96 if test -f "$output_objdir/$my_outputname.def"; then
97 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
98 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
99@@ -3811,7 +3811,7 @@
100 {
101 EOF
102 case $host in
103- *mingw* | *cygwin* )
104+ *mingw* | *cygwin* | *msys* )
105 # make stdout use "unix" line endings
106 echo " setmode(1,_O_BINARY);"
107 ;;
108@@ -4567,7 +4567,7 @@
109 $debug_cmd
110
111 case $host in
112- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
113+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
114 # It is impossible to link a dll without this setting, and
115 # we shouldn't force the makefile maintainer to figure out
116 # what system we are compiling for in order to pass an extra
117@@ -5060,7 +5060,7 @@
118 ;;
119 esac
120 case $host in
121- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
122+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
123 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
124 case :$dllsearchpath: in
125 *":$dir:"*) ;;
126@@ -5080,7 +5080,7 @@
127 -l*)
128 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
129 case $host in
130- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
131+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
132 # These systems don't actually have a C or math library (as such)
133 continue
134 ;;
135@@ -5163,7 +5163,7 @@
136
137 -no-install)
138 case $host in
139- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
140+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
141 # The PATH hackery in wrapper scripts is required on Windows
142 # and Darwin in order for the loader to find any dlls it needs.
143 func_warning "'-no-install' is ignored for $host"
144@@ -6034,7 +6034,7 @@
145 fi
146 case $host in
147 # special handling for platforms with PE-DLLs.
148- *cygwin* | *mingw* | *cegcc* )
149+ *cygwin* | *msys* | *mingw* | *cegcc* )
150 # Linker will automatically link against shared library if both
151 # static and shared are present. Therefore, ensure we extract
152 # symbols from the import library if a shared library is present
153@@ -6178,7 +6178,7 @@
154 if test -n "$library_names" &&
155 { test no = "$use_static_libs" || test -z "$old_library"; }; then
156 case $host in
157- *cygwin* | *mingw* | *cegcc* | *os2*)
158+ *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
159 # No point in relinking DLLs because paths are not encoded
160 func_append notinst_deplibs " $lib"
161 need_relink=no
162@@ -6248,7 +6248,7 @@
163 elif test -n "$soname_spec"; then
164 # bleh windows
165 case $host in
166- *cygwin* | mingw* | *cegcc* | *os2*)
167+ *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
168 func_arith $current - $age
169 major=$func_arith_result
170 versuffix=-$major
171@@ -7123,7 +7123,7 @@
172 if test yes = "$build_libtool_libs"; then
173 if test -n "$rpath"; then
174 case $host in
175- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
176+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
177 # these systems don't actually have a c library (as such)!
178 ;;
179 *-*-rhapsody* | *-*-darwin1.[012])
180@@ -7637,7 +7637,7 @@
181
182 orig_export_symbols=
183 case $host_os in
184- cygwin* | mingw* | cegcc*)
185+ cygwin* | msys* | mingw* | cegcc*)
186 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
187 # exporting using user supplied symfile
188 func_dll_def_p "$export_symbols" || {
189@@ -8194,7 +8194,7 @@
190
191 prog)
192 case $host in
193- *cygwin*) func_stripname '' '.exe' "$output"
194+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
195 output=$func_stripname_result.exe;;
196 esac
197 test -n "$vinfo" && \
198@@ -8305,7 +8305,7 @@
199 esac
200 fi
201 case $host in
202- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
203+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
204 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
205 case :$dllsearchpath: in
206 *":$libdir:"*) ;;
207@@ -8383,7 +8383,7 @@
208 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
209 wrappers_required=false
210 ;;
211- *cygwin* | *mingw* )
212+ *cygwin* | *msys* | *mingw* )
213 test yes = "$build_libtool_libs" || wrappers_required=false
214 ;;
215 *)
216@@ -8529,14 +8529,14 @@
217 esac
218 # test for cygwin because mv fails w/o .exe extensions
219 case $host in
220- *cygwin*)
221+ *cygwin* | *msys*)
222 exeext=.exe
223 func_stripname '' '.exe' "$outputname"
224 outputname=$func_stripname_result ;;
225 *) exeext= ;;
226 esac
227 case $host in
228- *cygwin* | *mingw* )
229+ *cygwin* | *msys* | *mingw* )
230 func_dirname_and_basename "$output" "" "."
231 output_name=$func_basename_result
232 output_path=$func_dirname_result
233@@ -8878,7 +8878,7 @@
234 # tests/bindir.at for full details.
235 tdlname=$dlname
236 case $host,$output,$installed,$module,$dlname in
237- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
238+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
239 # If a -bindir argument was supplied, place the dll there.
240 if test -n "$bindir"; then
241 func_relative_path "$install_libdir" "$bindir"
242
243diff -Naur libtool-2.4.2.418-orig/build-aux/ltmain.sh libtool-2.4.2.418/build-aux/ltmain.sh
244--- libtool-2.4.2.418-orig/build-aux/ltmain.sh 2013-10-27 02:53:58.000000000 +0400
245+++ libtool-2.4.2.418/build-aux/ltmain.sh 2014-09-02 10:29:08.840800000 +0400
246@@ -2315,7 +2315,7 @@
247 case $host in
248 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
249 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
250- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
251+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
252 # don't eliminate duplications in $postdeps and $predeps
253 opt_duplicate_compiler_generated_deps=:
254 ;;
255@@ -3328,7 +3328,7 @@
256
257 # On Cygwin there's no "real" PIC flag so we must build both object types
258 case $host_os in
259- cygwin* | mingw* | pw32* | os2* | cegcc*)
260+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
261 pic_mode=default
262 ;;
263 esac
264@@ -4201,7 +4201,7 @@
265 'exit $?'
266 tstripme=$stripme
267 case $host_os in
268- cygwin* | mingw* | pw32* | cegcc*)
269+ cygwin* | msys* | mingw* | pw32* | cegcc*)
270 case $realname in
271 *.dll.a)
272 tstripme=
273@@ -4307,7 +4307,7 @@
274
275 # Do a test to see if this is really a libtool program.
276 case $host in
277- *cygwin* | *mingw*)
278+ *cygwin* | *msys* | *mingw*)
279 if func_ltwrapper_executable_p "$file"; then
280 func_ltwrapper_scriptname "$file"
281 wrapper=$func_ltwrapper_scriptname_result
282@@ -4382,7 +4382,7 @@
283 # remove .exe since cygwin /usr/bin/install will append another
284 # one anyway
285 case $install_prog,$host in
286- */usr/bin/install*,*cygwin*)
287+ */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
288 case $file:$destfile in
289 *.exe:*.exe)
290 # this is ok
291@@ -4535,7 +4535,7 @@
292 $RM $export_symbols
293 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
294 case $host in
295- *cygwin* | *mingw* | *cegcc* )
296+ *cygwin* | *msys* | *mingw* | *cegcc* )
297 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
298 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
299 ;;
300@@ -4547,7 +4547,7 @@
301 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
302 eval '$MV "$nlist"T "$nlist"'
303 case $host in
304- *cygwin* | *mingw* | *cegcc* )
305+ *cygwin* | *msys* | *mingw* | *cegcc* )
306 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
307 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
308 ;;
309@@ -4561,7 +4561,7 @@
310 func_basename "$dlprefile"
311 name=$func_basename_result
312 case $host in
313- *cygwin* | *mingw* | *cegcc* )
314+ *cygwin* | *msys* | *mingw* | *cegcc* )
315 # if an import library, we need to obtain dlname
316 if func_win32_import_lib_p "$dlprefile"; then
317 func_tr_sh "$dlprefile"
318@@ -4736,7 +4736,7 @@
319 # Transform the symbol file into the correct name.
320 symfileobj=$output_objdir/${my_outputname}S.$objext
321 case $host in
322- *cygwin* | *mingw* | *cegcc* )
323+ *cygwin* | *msys* | *mingw* | *cegcc* )
324 if test -f "$output_objdir/$my_outputname.def"; then
325 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
326 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
327@@ -5629,7 +5629,7 @@
328 {
329 EOF
330 case $host in
331- *mingw* | *cygwin* )
332+ *mingw* | *cygwin* | *msys* )
333 # make stdout use "unix" line endings
334 echo " setmode(1,_O_BINARY);"
335 ;;
336@@ -6350,7 +6350,7 @@
337 $debug_cmd
338
339 case $host in
340- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
341+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
342 # It is impossible to link a dll without this setting, and
343 # we shouldn't force the makefile maintainer to figure out
344 # what system we are compiling for in order to pass an extra
345@@ -6843,7 +6843,7 @@
346 ;;
347 esac
348 case $host in
349- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
350+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
351 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
352 case :$dllsearchpath: in
353 *":$dir:"*) ;;
354@@ -6863,7 +6863,7 @@
355 -l*)
356 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
357 case $host in
358- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
359+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
360 # These systems don't actually have a C or math library (as such)
361 continue
362 ;;
363@@ -6946,7 +6946,7 @@
364
365 -no-install)
366 case $host in
367- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
368+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
369 # The PATH hackery in wrapper scripts is required on Windows
370 # and Darwin in order for the loader to find any dlls it needs.
371 func_warning "'-no-install' is ignored for $host"
372@@ -7812,7 +7812,7 @@
373 fi
374 case $host in
375 # special handling for platforms with PE-DLLs.
376- *cygwin* | *mingw* | *cegcc* )
377+ *cygwin* | *msys* | *mingw* | *cegcc* )
378 # Linker will automatically link against shared library if both
379 # static and shared are present. Therefore, ensure we extract
380 # symbols from the import library if a shared library is present
381@@ -7956,7 +7956,7 @@
382 if test -n "$library_names" &&
383 { test no = "$use_static_libs" || test -z "$old_library"; }; then
384 case $host in
385- *cygwin* | *mingw* | *cegcc* | *os2*)
386+ *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
387 # No point in relinking DLLs because paths are not encoded
388 func_append notinst_deplibs " $lib"
389 need_relink=no
390@@ -8026,7 +8026,7 @@
391 elif test -n "$soname_spec"; then
392 # bleh windows
393 case $host in
394- *cygwin* | mingw* | *cegcc* | *os2*)
395+ *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
396 func_arith $current - $age
397 major=$func_arith_result
398 versuffix=-$major
399@@ -8899,7 +8899,7 @@
400 if test yes = "$build_libtool_libs"; then
401 if test -n "$rpath"; then
402 case $host in
403- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
404+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
405 # these systems don't actually have a c library (as such)!
406 ;;
407 *-*-rhapsody* | *-*-darwin1.[012])
408@@ -9413,7 +9413,7 @@
409
410 orig_export_symbols=
411 case $host_os in
412- cygwin* | mingw* | cegcc*)
413+ cygwin* | *msys* | mingw* | cegcc*)
414 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
415 # exporting using user supplied symfile
416 func_dll_def_p "$export_symbols" || {
417@@ -9970,7 +9970,7 @@
418
419 prog)
420 case $host in
421- *cygwin*) func_stripname '' '.exe' "$output"
422+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
423 output=$func_stripname_result.exe;;
424 esac
425 test -n "$vinfo" && \
426@@ -10081,7 +10081,7 @@
427 esac
428 fi
429 case $host in
430- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
431+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
432 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
433 case :$dllsearchpath: in
434 *":$libdir:"*) ;;
435@@ -10159,7 +10159,7 @@
436 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
437 wrappers_required=false
438 ;;
439- *cygwin* | *mingw* )
440+ *cygwin* | *msys* | *mingw* )
441 test yes = "$build_libtool_libs" || wrappers_required=false
442 ;;
443 *)
444@@ -10305,14 +10305,14 @@
445 esac
446 # test for cygwin because mv fails w/o .exe extensions
447 case $host in
448- *cygwin*)
449+ *cygwin* | *msys*)
450 exeext=.exe
451 func_stripname '' '.exe' "$outputname"
452 outputname=$func_stripname_result ;;
453 *) exeext= ;;
454 esac
455 case $host in
456- *cygwin* | *mingw* )
457+ *cygwin* | *msys* | *mingw* )
458 func_dirname_and_basename "$output" "" "."
459 output_name=$func_basename_result
460 output_path=$func_dirname_result
461@@ -10644,7 +10644,7 @@
462 # tests/bindir.at for full details.
463 tdlname=$dlname
464 case $host,$output,$installed,$module,$dlname in
465- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
466+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
467 # If a -bindir argument was supplied, place the dll there.
468 if test -n "$bindir"; then
469 func_relative_path "$install_libdir" "$bindir"
470--- libtool-2.4.7/configure.orig 2022-05-25 14:05:58.332605400 +0200
471+++ libtool-2.4.7/configure 2022-05-25 14:11:29.613646200 +0200
472@@ -5988,7 +5988,7 @@
473 lt_cv_sys_max_cmd_len=-1;
474 ;;
475
476- cygwin* | mingw* | cegcc*)
477+ cygwin* | msys* | mingw* | cegcc*)
478 # On Win9x/ME, this test blows up -- it succeeds, but takes
479 # about 5 minutes as the teststring grows exponentially.
480 # Worse, since 9x/ME are not pre-emptively multitasking,
481@@ -6154,7 +6154,7 @@
482 *-*-mingw* ) # actually msys
483 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
484 ;;
485- *-*-cygwin* )
486+ *-*-cygwin* | *-*-msys* )
487 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
488 ;;
489 * ) # otherwise, assume *nix
490@@ -6162,12 +6162,12 @@
491 ;;
492 esac
493 ;;
494- *-*-cygwin* )
495+ *-*-cygwin* | *-*-msys* )
496 case $build in
497 *-*-mingw* ) # actually msys
498 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
499 ;;
500- *-*-cygwin* )
501+ *-*-cygwin* | *-*-msys* )
502 lt_cv_to_host_file_cmd=func_convert_file_noop
503 ;;
504 * ) # otherwise, assume *nix
505@@ -6233,7 +6233,7 @@
506 esac
507 reload_cmds='$LD$reload_flag -o $output$reload_objs'
508 case $host_os in
509- cygwin* | mingw* | pw32* | cegcc*)
510+ cygwin* | msys* | mingw* | pw32* | cegcc*)
511 if test yes != "$GCC"; then
512 reload_cmds=false
513 fi
514@@ -6486,7 +6486,7 @@
515 lt_cv_file_magic_test_file=/shlib/libc.so
516 ;;
517
518-cygwin*)
519+cygwin* | msys*)
520 # func_win32_libid is a shell function defined in ltmain.sh
521 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
522 lt_cv_file_magic_cmd='func_win32_libid'
523@@ -6802,7 +6802,7 @@
524 lt_cv_sharedlib_from_linklib_cmd='unknown'
525
526 case $host_os in
527-cygwin* | mingw* | pw32* | cegcc*)
528+cygwin* | msys* | mingw* | pw32* | cegcc*)
529 # two different shell functions defined in ltmain.sh;
530 # decide which one to use based on capabilities of $DLLTOOL
531 case `$DLLTOOL --help 2>&1` in
532@@ -7310,7 +7310,7 @@
533 aix*)
534 symcode='[BCDT]'
535 ;;
536-cygwin* | mingw* | pw32* | cegcc*)
537+cygwin* | msys* | mingw* | pw32* | cegcc*)
538 symcode='[ABCDGISTW]'
539 ;;
540 hpux*)
541@@ -8912,7 +8912,7 @@
542 enable_win32_dll=yes
543
544 case $host in
545-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
546+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
547 if test -n "$ac_tool_prefix"; then
548 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
549 set dummy ${ac_tool_prefix}as; ac_word=$2
550@@ -9813,7 +9813,7 @@
551 # PIC is the default for these OSes.
552 ;;
553
554- mingw* | cygwin* | pw32* | os2* | cegcc*)
555+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
556 # This hack is so that the source file can tell whether it is being
557 # built for inclusion in a dll (and should export symbols for example).
558 # Although the cygwin gcc ignores -fPIC, still need this for old-style
559@@ -9916,7 +9916,7 @@
560 esac
561 ;;
562
563- mingw* | cygwin* | pw32* | os2* | cegcc*)
564+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
565 # This hack is so that the source file can tell whether it is being
566 # built for inclusion in a dll (and should export symbols for example).
567 lt_prog_compiler_pic='-DDLL_EXPORT'
568@@ -10418,7 +10418,7 @@
569 extract_expsyms_cmds=
570
571 case $host_os in
572- cygwin* | mingw* | pw32* | cegcc*)
573+ cygwin* | msys* | mingw* | pw32* | cegcc*)
574 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
575 # When not using gcc, we currently assume that we are using
576 # Microsoft Visual C++ or Intel C++ Compiler.
577@@ -10533,7 +10533,7 @@
578 fi
579 ;;
580
581- cygwin* | mingw* | pw32* | cegcc*)
582+ cygwin* | msys* | mingw* | pw32* | cegcc*)
583 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
584 # as there is no search path for DLLs.
585 hardcode_libdir_flag_spec='-L$libdir'
586@@ -11074,7 +11074,7 @@
587 export_dynamic_flag_spec=-rdynamic
588 ;;
589
590- cygwin* | mingw* | pw32* | cegcc*)
591+ cygwin* | msys* | mingw* | pw32* | cegcc*)
592 # When not using gcc, we currently assume that we are using
593 # Microsoft Visual C++ or Intel C++ Compiler.
594 # hardcode_libdir_flag_spec is actually meaningless, as there is
595@@ -12110,7 +12110,7 @@
596 # libtool to hard-code these into programs
597 ;;
598
599-cygwin* | mingw* | pw32* | cegcc*)
600+cygwin* | msys* | mingw* | pw32* | cegcc*)
601 version_type=windows
602 shrext_cmds=.dll
603 need_version=no
604@@ -12136,9 +12136,9 @@
605 shlibpath_overrides_runpath=yes
606
607 case $host_os in
608- cygwin*)
609+ cygwin* | msys*)
610 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
611- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
612+ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
613
614 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
615 ;;
616@@ -12176,7 +12176,7 @@
617 # Convert to MSYS style.
618 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
619 ;;
620- cygwin*)
621+ cygwin* | msys*)
622 # Convert to unix form, then to dos form, then back to unix form
623 # but this time dos style (no spaces!) so that the unix form looks
624 # like /cygdrive/c/PROGRA~1:/cygdr...
625@@ -12878,7 +12878,7 @@
626 lt_cv_dlopen_libs=
627 ;;
628
629- cygwin*)
630+ cygwin* | msys*)
631 lt_cv_dlopen=dlopen
632 lt_cv_dlopen_libs=
633 ;;
634@@ -13827,7 +13827,7 @@
635 beos*)
636 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
637 ;;
638-cygwin* | mingw* | pw32*)
639+cygwin* | msys* | mingw* | pw32*)
640 ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
641 "
642 if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
643@@ -14242,7 +14242,7 @@
644 $as_echo_n "(cached) " >&6
645 else
646 case $host_os in #(
647- *cygwin*)
648+ *cygwin* | *msys*)
649 lt_cv_sys_argz_works=no
650 if test no != "$cross_compiling"; then
651 lt_cv_sys_argz_works="guessing no"
652@@ -15517,7 +15517,7 @@
653 esac
654 ;;
655
656- cygwin* | mingw* | pw32* | cegcc*)
657+ cygwin* | msys* | mingw* | pw32* | cegcc*)
658 case $GXX,$cc_basename in
659 ,cl* | no,cl* | ,icl* | no,icl*)
660 # Native MSVC or ICC
661@@ -16528,7 +16528,7 @@
662 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
663 # PIC is the default for these OSes.
664 ;;
665- mingw* | cygwin* | os2* | pw32* | cegcc*)
666+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
667 # This hack is so that the source file can tell whether it is being
668 # built for inclusion in a dll (and should export symbols for example).
669 # Although the cygwin gcc ignores -fPIC, still need this for old-style
670@@ -16603,7 +16603,7 @@
671 ;;
672 esac
673 ;;
674- mingw* | cygwin* | os2* | pw32* | cegcc*)
675+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
676 # This hack is so that the source file can tell whether it is being
677 # built for inclusion in a dll (and should export symbols for example).
678 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
679@@ -17092,7 +17092,7 @@
680 pw32*)
681 export_symbols_cmds_CXX=$ltdll_cmds
682 ;;
683- cygwin* | mingw* | cegcc*)
684+ cygwin* | msys* | mingw* | cegcc*)
685 case $cc_basename in
686 cl* | icl*)
687 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
688@@ -17413,7 +17413,7 @@
689 # libtool to hard-code these into programs
690 ;;
691
692-cygwin* | mingw* | pw32* | cegcc*)
693+cygwin* | msys* | mingw* | pw32* | cegcc*)
694 version_type=windows
695 shrext_cmds=.dll
696 need_version=no
697@@ -17439,7 +17439,7 @@
698 shlibpath_overrides_runpath=yes
699
700 case $host_os in
701- cygwin*)
702+ cygwin* | msys*)
703 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
704- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
705+ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
706
707@@ -17478,7 +17478,7 @@
708 # Convert to MSYS style.
709 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
710 ;;
711- cygwin*)
712+ cygwin* | msys*)
713 # Convert to unix form, then to dos form, then back to unix form
714 # but this time dos style (no spaces!) so that the unix form looks
715 # like /cygdrive/c/PROGRA~1:/cygdr...
716@@ -18519,7 +18519,7 @@
717 # PIC is the default for these OSes.
718 ;;
719
720- mingw* | cygwin* | pw32* | os2* | cegcc*)
721+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
722 # This hack is so that the source file can tell whether it is being
723 # built for inclusion in a dll (and should export symbols for example).
724 # Although the cygwin gcc ignores -fPIC, still need this for old-style
725@@ -18622,7 +18622,7 @@
726 esac
727 ;;
728
729- mingw* | cygwin* | pw32* | os2* | cegcc*)
730+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
731 # This hack is so that the source file can tell whether it is being
732 # built for inclusion in a dll (and should export symbols for example).
733 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
734@@ -19109,7 +19109,7 @@
735 extract_expsyms_cmds=
736
737 case $host_os in
738- cygwin* | mingw* | pw32* | cegcc*)
739+ cygwin* | msys* | mingw* | pw32* | cegcc*)
740 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
741 # When not using gcc, we currently assume that we are using
742 # Microsoft Visual C++ or Intel C++ Compiler.
743@@ -19224,7 +19224,7 @@
744 fi
745 ;;
746
747- cygwin* | mingw* | pw32* | cegcc*)
748+ cygwin* | msys* | mingw* | pw32* | cegcc*)
749 # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
750 # as there is no search path for DLLs.
751 hardcode_libdir_flag_spec_F77='-L$libdir'
752@@ -19753,7 +19753,7 @@
753 export_dynamic_flag_spec_F77=-rdynamic
754 ;;
755
756- cygwin* | mingw* | pw32* | cegcc*)
757+ cygwin* | msys* | mingw* | pw32* | cegcc*)
758 # When not using gcc, we currently assume that we are using
759 # Microsoft Visual C++ or Intel C++ Compiler.
760 # hardcode_libdir_flag_spec is actually meaningless, as there is
761@@ -20581,7 +20581,7 @@
762 # libtool to hard-code these into programs
763 ;;
764
765-cygwin* | mingw* | pw32* | cegcc*)
766+cygwin* | msys* | mingw* | pw32* | cegcc*)
767 version_type=windows
768 shrext_cmds=.dll
769 need_version=no
770@@ -20607,9 +20607,9 @@
771 shlibpath_overrides_runpath=yes
772
773 case $host_os in
774- cygwin*)
775+ cygwin* | msys*)
776 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
777- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
778+ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
779
780 ;;
781 mingw* | cegcc*)
782@@ -20646,7 +20646,7 @@
783 # Convert to MSYS style.
784 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
785 ;;
786- cygwin*)
787+ cygwin* | msys*)
788 # Convert to unix form, then to dos form, then back to unix form
789 # but this time dos style (no spaces!) so that the unix form looks
790 # like /cygdrive/c/PROGRA~1:/cygdr...
791@@ -21822,7 +21822,7 @@
792 # PIC is the default for these OSes.
793 ;;
794
795- mingw* | cygwin* | pw32* | os2* | cegcc*)
796+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
797 # This hack is so that the source file can tell whether it is being
798 # built for inclusion in a dll (and should export symbols for example).
799 # Although the cygwin gcc ignores -fPIC, still need this for old-style
800@@ -21925,7 +21925,7 @@
801 esac
802 ;;
803
804- mingw* | cygwin* | pw32* | os2* | cegcc*)
805+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
806 # This hack is so that the source file can tell whether it is being
807 # built for inclusion in a dll (and should export symbols for example).
808 lt_prog_compiler_pic_FC='-DDLL_EXPORT'
809@@ -22412,7 +22412,7 @@
810 extract_expsyms_cmds=
811
812 case $host_os in
813- cygwin* | mingw* | pw32* | cegcc*)
814+ cygwin* | msys* | mingw* | pw32* | cegcc*)
815 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
816 # When not using gcc, we currently assume that we are using
817 # Microsoft Visual C++ or Intel C++ Compiler.
818@@ -22527,7 +22527,7 @@
819 fi
820 ;;
821
822- cygwin* | mingw* | pw32* | cegcc*)
823+ cygwin* | msys* | mingw* | pw32* | cegcc*)
824 # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
825 # as there is no search path for DLLs.
826 hardcode_libdir_flag_spec_FC='-L$libdir'
827@@ -23056,7 +23056,7 @@
828 export_dynamic_flag_spec_FC=-rdynamic
829 ;;
830
831- cygwin* | mingw* | pw32* | cegcc*)
832+ cygwin* | msys* | mingw* | pw32* | cegcc*)
833 # When not using gcc, we currently assume that we are using
834 # Microsoft Visual C++ or Intel C++ Compiler.
835 # hardcode_libdir_flag_spec is actually meaningless, as there is
836@@ -23884,7 +23884,7 @@
837 # libtool to hard-code these into programs
838 ;;
839
840-cygwin* | mingw* | pw32* | cegcc*)
841+cygwin* | msys* | mingw* | pw32* | cegcc*)
842 version_type=windows
843 shrext_cmds=.dll
844 need_version=no
845@@ -23910,9 +23910,9 @@
846 shlibpath_overrides_runpath=yes
847
848 case $host_os in
849- cygwin*)
850+ cygwin* | msys*)
851 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
852- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
853+ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
854
855 ;;
856 mingw* | cegcc*)
857@@ -23949,7 +23949,7 @@
858 # Convert to MSYS style.
859 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
860 ;;
861- cygwin*)
862+ cygwin* | msys*)
863 # Convert to unix form, then to dos form, then back to unix form
864 # but this time dos style (no spaces!) so that the unix form looks
865 # like /cygdrive/c/PROGRA~1:/cygdr...
866@@ -24844,7 +24844,7 @@
867 # PIC is the default for these OSes.
868 ;;
869
870- mingw* | cygwin* | pw32* | os2* | cegcc*)
871+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
872 # This hack is so that the source file can tell whether it is being
873 # built for inclusion in a dll (and should export symbols for example).
874 # Although the cygwin gcc ignores -fPIC, still need this for old-style
875@@ -24947,7 +24947,7 @@
876 esac
877 ;;
878
879- mingw* | cygwin* | pw32* | os2* | cegcc*)
880+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
881 # This hack is so that the source file can tell whether it is being
882 # built for inclusion in a dll (and should export symbols for example).
883 lt_prog_compiler_pic_GO='-DDLL_EXPORT'
884@@ -25434,7 +25434,7 @@
885 extract_expsyms_cmds=
886
887 case $host_os in
888- cygwin* | mingw* | pw32* | cegcc*)
889+ cygwin* | msys* | mingw* | pw32* | cegcc*)
890 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
891 # When not using gcc, we currently assume that we are using
892 # Microsoft Visual C++ or Intel C++ Compiler.
893@@ -25549,7 +25549,7 @@
894 fi
895 ;;
896
897- cygwin* | mingw* | pw32* | cegcc*)
898+ cygwin* | msys* | mingw* | pw32* | cegcc*)
899 # _LT_TAGVAR(hardcode_libdir_flag_spec, GO) is actually meaningless,
900 # as there is no search path for DLLs.
901 hardcode_libdir_flag_spec_GO='-L$libdir'
902@@ -26090,7 +26090,7 @@
903 export_dynamic_flag_spec_GO=-rdynamic
904 ;;
905
906- cygwin* | mingw* | pw32* | cegcc*)
907+ cygwin* | msys* | mingw* | pw32* | cegcc*)
908 # When not using gcc, we currently assume that we are using
909 # Microsoft Visual C++ or Intel C++ Compiler.
910 # hardcode_libdir_flag_spec is actually meaningless, as there is
911@@ -27073,7 +27073,7 @@
912 # PIC is the default for these OSes.
913 ;;
914
915- mingw* | cygwin* | pw32* | os2* | cegcc*)
916+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
917 # This hack is so that the source file can tell whether it is being
918 # built for inclusion in a dll (and should export symbols for example).
919 # Although the cygwin gcc ignores -fPIC, still need this for old-style
920@@ -27176,7 +27176,7 @@
921 esac
922 ;;
923
924- mingw* | cygwin* | pw32* | os2* | cegcc*)
925+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
926 # This hack is so that the source file can tell whether it is being
927 # built for inclusion in a dll (and should export symbols for example).
928
929@@ -27663,7 +27663,7 @@
930 extract_expsyms_cmds=
931
932 case $host_os in
933- cygwin* | mingw* | pw32* | cegcc*)
934+ cygwin* | msys* | mingw* | pw32* | cegcc*)
935 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
936 # When not using gcc, we currently assume that we are using
937 # Microsoft Visual C++ or Intel C++ Compiler.
938@@ -27778,7 +27778,7 @@
939 fi
940 ;;
941
942- cygwin* | mingw* | pw32* | cegcc*)
943+ cygwin* | msys* | mingw* | pw32* | cegcc*)
944 # _LT_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
945 # as there is no search path for DLLs.
946 hardcode_libdir_flag_spec_GCJ='-L$libdir'
947@@ -28319,7 +28319,7 @@
948 export_dynamic_flag_spec_GCJ=-rdynamic
949 ;;
950
951- cygwin* | mingw* | pw32* | cegcc*)
952+ cygwin* | msys* | mingw* | pw32* | cegcc*)
953 # When not using gcc, we currently assume that we are using
954 # Microsoft Visual C++ or Intel C++ Compiler.
955 # hardcode_libdir_flag_spec is actually meaningless, as there is
956
957diff -urN libtool-2.4.7/libltdl/configure.orig libtool-2.4.7/libltdl/configure
958--- libtool-2.4.7/libltdl/configure.orig 2022-05-25 14:29:13.245182300 +0200
959+++ libtool-2.4.7/libltdl/configure 2022-05-25 14:30:03.920944200 +0200
960@@ -4774,7 +4774,7 @@
961 lt_cv_sys_max_cmd_len=-1;
962 ;;
963
964- cygwin* | mingw* | cegcc*)
965+ cygwin* | msys* | mingw* | cegcc*)
966 # On Win9x/ME, this test blows up -- it succeeds, but takes
967 # about 5 minutes as the teststring grows exponentially.
968 # Worse, since 9x/ME are not pre-emptively multitasking,
969@@ -4940,7 +4940,7 @@
970 *-*-mingw* ) # actually msys
971 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
972 ;;
973- *-*-cygwin* )
974+ *-*-cygwin* | *-*-msys* )
975 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
976 ;;
977 * ) # otherwise, assume *nix
978@@ -4948,12 +4948,12 @@
979 ;;
980 esac
981 ;;
982- *-*-cygwin* )
983+ *-*-cygwin* | *-*-msys* )
984 case $build in
985 *-*-mingw* ) # actually msys
986 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
987 ;;
988- *-*-cygwin* )
989+ *-*-cygwin* | *-*-msys* )
990 lt_cv_to_host_file_cmd=func_convert_file_noop
991 ;;
992 * ) # otherwise, assume *nix
993@@ -5019,7 +5019,7 @@
994 esac
995 reload_cmds='$LD$reload_flag -o $output$reload_objs'
996 case $host_os in
997- cygwin* | mingw* | pw32* | cegcc*)
998+ cygwin* | msys* | mingw* | pw32* | cegcc*)
999 if test yes != "$GCC"; then
1000 reload_cmds=false
1001 fi
1002@@ -5272,7 +5272,7 @@
1003 lt_cv_file_magic_test_file=/shlib/libc.so
1004 ;;
1005
1006-cygwin*)
1007+cygwin* | msys*)
1008 # func_win32_libid is a shell function defined in ltmain.sh
1009 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1010 lt_cv_file_magic_cmd='func_win32_libid'
1011@@ -5588,7 +5588,7 @@
1012 lt_cv_sharedlib_from_linklib_cmd='unknown'
1013
1014 case $host_os in
1015-cygwin* | mingw* | pw32* | cegcc*)
1016+cygwin* | msys* | mingw* | pw32* | cegcc*)
1017 # two different shell functions defined in ltmain.sh;
1018 # decide which one to use based on capabilities of $DLLTOOL
1019 case `$DLLTOOL --help 2>&1` in
1020@@ -6097,7 +6097,7 @@
1021 aix*)
1022 symcode='[BCDT]'
1023 ;;
1024-cygwin* | mingw* | pw32* | cegcc*)
1025+cygwin* | msys* | mingw* | pw32* | cegcc*)
1026 symcode='[ABCDGISTW]'
1027 ;;
1028 hpux*)
1029@@ -7837,7 +7837,7 @@
1030 enable_win32_dll=yes
1031
1032 case $host in
1033-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
1034+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
1035 if test -n "$ac_tool_prefix"; then
1036 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1037 set dummy ${ac_tool_prefix}as; ac_word=$2
1038@@ -8738,7 +8738,7 @@
1039 # PIC is the default for these OSes.
1040 ;;
1041
1042- mingw* | cygwin* | pw32* | os2* | cegcc*)
1043+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
1044 # This hack is so that the source file can tell whether it is being
1045 # built for inclusion in a dll (and should export symbols for example).
1046 # Although the cygwin gcc ignores -fPIC, still need this for old-style
1047@@ -8841,7 +8841,7 @@
1048 esac
1049 ;;
1050
1051- mingw* | cygwin* | pw32* | os2* | cegcc*)
1052+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
1053 # This hack is so that the source file can tell whether it is being
1054 # built for inclusion in a dll (and should export symbols for example).
1055 lt_prog_compiler_pic='-DDLL_EXPORT'
1056@@ -9343,7 +9343,7 @@
1057 extract_expsyms_cmds=
1058
1059 case $host_os in
1060- cygwin* | mingw* | pw32* | cegcc*)
1061+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1062 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
1063 # When not using gcc, we currently assume that we are using
1064 # Microsoft Visual C++ or Intel C++ Compiler.
1065@@ -9458,7 +9458,7 @@
1066 fi
1067 ;;
1068
1069- cygwin* | mingw* | pw32* | cegcc*)
1070+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1071 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
1072 # as there is no search path for DLLs.
1073 hardcode_libdir_flag_spec='-L$libdir'
1074@@ -9999,7 +9999,7 @@
1075 export_dynamic_flag_spec=-rdynamic
1076 ;;
1077
1078- cygwin* | mingw* | pw32* | cegcc*)
1079+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1080 # When not using gcc, we currently assume that we are using
1081 # Microsoft Visual C++ or Intel C++ Compiler.
1082 # hardcode_libdir_flag_spec is actually meaningless, as there is
1083@@ -11035,7 +11035,7 @@
1084 # libtool to hard-code these into programs
1085 ;;
1086
1087-cygwin* | mingw* | pw32* | cegcc*)
1088+cygwin* | msys* | mingw* | pw32* | cegcc*)
1089 version_type=windows
1090 shrext_cmds=.dll
1091 need_version=no
1092@@ -11067,6 +11067,12 @@
1093
1094 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1095 ;;
1096+ msys*)
1097+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
1098+ soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1099+
1100+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1101+ ;;
1102 mingw* | cegcc*)
1103 # MinGW DLLs use traditional 'lib' prefix
1104 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1105@@ -11101,7 +11107,7 @@
1106 # Convert to MSYS style.
1107 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
1108 ;;
1109- cygwin*)
1110+ cygwin* | msys*)
1111 # Convert to unix form, then to dos form, then back to unix form
1112 # but this time dos style (no spaces!) so that the unix form looks
1113 # like /cygdrive/c/PROGRA~1:/cygdr...
1114@@ -11803,7 +11809,7 @@
1115 lt_cv_dlopen_libs=
1116 ;;
1117
1118- cygwin*)
1119+ cygwin* | msys*)
1120 lt_cv_dlopen=dlopen
1121 lt_cv_dlopen_libs=
1122 ;;
1123@@ -12751,7 +12757,7 @@
1124 beos*)
1125 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
1126 ;;
1127-cygwin* | mingw* | pw32*)
1128+cygwin* | msys* | mingw* | pw32*)
1129 ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
1130 "
1131 if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
1132@@ -13166,7 +13172,7 @@
1133 $as_echo_n "(cached) " >&6
1134 else
1135 case $host_os in #(
1136- *cygwin*)
1137+ *cygwin* | *msys*)
1138 lt_cv_sys_argz_works=no
1139 if test no != "$cross_compiling"; then
1140 lt_cv_sys_argz_works="guessing no"
1141
1142diff -urN libtool-2.4.7/m4/libtool.m4.orig libtool-2.4.7/m4/libtool.m4
1143--- libtool-2.4.7/m4/libtool.m4.orig 2022-03-17 03:43:39.000000000 +0100
1144+++ libtool-2.4.7/m4/libtool.m4 2022-05-25 14:26:59.035745300 +0200
1145@@ -1703,7 +1703,7 @@
1146 lt_cv_sys_max_cmd_len=-1;
1147 ;;
1148
1149- cygwin* | mingw* | cegcc*)
1150+ cygwin* | msys* | mingw* | cegcc*)
1151 # On Win9x/ME, this test blows up -- it succeeds, but takes
1152 # about 5 minutes as the teststring grows exponentially.
1153 # Worse, since 9x/ME are not pre-emptively multitasking,
1154@@ -1951,7 +1951,7 @@
1155 lt_cv_dlopen_libs=
1156 ;;
1157
1158- cygwin*)
1159+ cygwin* | msys*)
1160 lt_cv_dlopen=dlopen
1161 lt_cv_dlopen_libs=
1162 ;;
1163@@ -2541,7 +2541,7 @@
1164 # libtool to hard-code these into programs
1165 ;;
1166
1167-cygwin* | mingw* | pw32* | cegcc*)
1168+cygwin* | msys* | mingw* | pw32* | cegcc*)
1169 version_type=windows
1170 shrext_cmds=.dll
1171 need_version=no
1172@@ -2567,9 +2567,9 @@
1173 shlibpath_overrides_runpath=yes
1174
1175 case $host_os in
1176- cygwin*)
1177+ cygwin* | msys*)
1178 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1179- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
1180+ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
1181 m4_if([$1], [],[
1182 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
1183 ;;
1184@@ -2607,7 +2607,7 @@
1185 # Convert to MSYS style.
1186 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
1187 ;;
1188- cygwin*)
1189+ cygwin* | msys*)
1190 # Convert to unix form, then to dos form, then back to unix form
1191 # but this time dos style (no spaces!) so that the unix form looks
1192 # like /cygdrive/c/PROGRA~1:/cygdr...
1193@@ -3385,7 +3385,7 @@
1194 esac
1195 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1196 case $host_os in
1197- cygwin* | mingw* | pw32* | cegcc*)
1198+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1199 if test yes != "$GCC"; then
1200 reload_cmds=false
1201 fi
1202@@ -3478,7 +3478,7 @@
1203 lt_cv_file_magic_test_file=/shlib/libc.so
1204 ;;
1205
1206-cygwin*)
1207+cygwin* | msys*)
1208 # func_win32_libid is a shell function defined in ltmain.sh
1209 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1210 lt_cv_file_magic_cmd='func_win32_libid'
1211@@ -3791,7 +3791,7 @@
1212 [lt_cv_sharedlib_from_linklib_cmd='unknown'
1213
1214 case $host_os in
1215-cygwin* | mingw* | pw32* | cegcc*)
1216+cygwin* | msys* | mingw* | pw32* | cegcc*)
1217 # two different shell functions defined in ltmain.sh;
1218 # decide which one to use based on capabilities of $DLLTOOL
1219 case `$DLLTOOL --help 2>&1` in
1220@@ -3861,7 +3861,7 @@
1221 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1222 LIBM=
1223 case $host in
1224-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
1225+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
1226 # These system don't have libm, or don't need it
1227 ;;
1228 *-ncr-sysv4.3*)
1229@@ -3936,7 +3936,7 @@
1230 aix*)
1231 symcode='[[BCDT]]'
1232 ;;
1233-cygwin* | mingw* | pw32* | cegcc*)
1234+cygwin* | msys* | mingw* | pw32* | cegcc*)
1235 symcode='[[ABCDGISTW]]'
1236 ;;
1237 hpux*)
1238@@ -4242,7 +4242,7 @@
1239 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1240 # PIC is the default for these OSes.
1241 ;;
1242- mingw* | cygwin* | os2* | pw32* | cegcc*)
1243+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
1244 # This hack is so that the source file can tell whether it is being
1245 # built for inclusion in a dll (and should export symbols for example).
1246 # Although the cygwin gcc ignores -fPIC, still need this for old-style
1247@@ -4318,7 +4318,7 @@
1248 ;;
1249 esac
1250 ;;
1251- mingw* | cygwin* | os2* | pw32* | cegcc*)
1252+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
1253 # This hack is so that the source file can tell whether it is being
1254 # built for inclusion in a dll (and should export symbols for example).
1255 m4_if([$1], [GCJ], [],
1256@@ -4566,7 +4566,7 @@
1257 # PIC is the default for these OSes.
1258 ;;
1259
1260- mingw* | cygwin* | pw32* | os2* | cegcc*)
1261+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
1262 # This hack is so that the source file can tell whether it is being
1263 # built for inclusion in a dll (and should export symbols for example).
1264 # Although the cygwin gcc ignores -fPIC, still need this for old-style
1265@@ -4670,7 +4670,7 @@
1266 esac
1267 ;;
1268
1269- mingw* | cygwin* | pw32* | os2* | cegcc*)
1270+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
1271 # This hack is so that the source file can tell whether it is being
1272 # built for inclusion in a dll (and should export symbols for example).
1273 m4_if([$1], [GCJ], [],
1274@@ -4945,7 +4945,7 @@
1275 pw32*)
1276 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
1277 ;;
1278- cygwin* | mingw* | cegcc*)
1279+ cygwin* | msys* | mingw* | cegcc*)
1280 case $cc_basename in
1281 cl* | icl*)
1282 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
1283@@ -5003,7 +5003,7 @@
1284 extract_expsyms_cmds=
1285
1286 case $host_os in
1287- cygwin* | mingw* | pw32* | cegcc*)
1288+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1289 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
1290 # When not using gcc, we currently assume that we are using
1291 # Microsoft Visual C++ or Intel C++ Compiler.
1292@@ -5118,7 +5118,7 @@
1293 fi
1294 ;;
1295
1296- cygwin* | mingw* | pw32* | cegcc*)
1297+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1298 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1299 # as there is no search path for DLLs.
1300 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1301@@ -5575,7 +5575,7 @@
1302 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
1303 ;;
1304
1305- cygwin* | mingw* | pw32* | cegcc*)
1306+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1307 # When not using gcc, we currently assume that we are using
1308 # Microsoft Visual C++ or Intel C++ Compiler.
1309 # hardcode_libdir_flag_spec is actually meaningless, as there is
1310@@ -6651,7 +6651,7 @@
1311 esac
1312 ;;
1313
1314- cygwin* | mingw* | pw32* | cegcc*)
1315+ cygwin* | msys* | mingw* | pw32* | cegcc*)
1316 case $GXX,$cc_basename in
1317 ,cl* | no,cl* | ,icl* | no,icl*)
1318 # Native MSVC or ICC
1319@@ -8348,7 +8348,7 @@
1320 *-*-mingw* ) # actually msys
1321 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
1322 ;;
1323- *-*-cygwin* )
1324+ *-*-cygwin* | *-*-msys* )
1325 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
1326 ;;
1327 * ) # otherwise, assume *nix
1328@@ -8356,12 +8356,12 @@
1329 ;;
1330 esac
1331 ;;
1332- *-*-cygwin* )
1333+ *-*-cygwin* | *-*-msys* )
1334 case $build in
1335 *-*-mingw* ) # actually msys
1336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
1337 ;;
1338- *-*-cygwin* )
1339+ *-*-cygwin* | *-*-msys* )
1340 lt_cv_to_host_file_cmd=func_convert_file_noop
1341 ;;
1342 * ) # otherwise, assume *nix
1343
1344diff -Naur libtool-2.4.2.418-orig/m4/ltdl.m4 libtool-2.4.2.418/m4/ltdl.m4
1345--- libtool-2.4.2.418-orig/m4/ltdl.m4 2013-10-26 03:37:46.000000000 +0400
1346+++ libtool-2.4.2.418/m4/ltdl.m4 2014-09-02 10:19:58.102800000 +0400
1347@@ -706,7 +706,7 @@
1348 beos*)
1349 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
1350 ;;
1351-cygwin* | mingw* | pw32*)
1352+cygwin* | msys* | mingw* | pw32*)
1353 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
1354 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
1355 ;;
1356
1357diff -Naur libtool-2.4.2.418-orig/m4/ltoptions.m4 libtool-2.4.2.418/m4/ltoptions.m4
1358--- libtool-2.4.2.418-orig/m4/ltoptions.m4 2013-10-26 03:37:46.000000000 +0400
1359+++ libtool-2.4.2.418/m4/ltoptions.m4 2014-09-02 10:20:19.069200000 +0400
1360@@ -126,7 +126,7 @@
1361 [enable_win32_dll=yes
1362
1363 case $host in
1364-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
1365+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
1366 AC_CHECK_TOOL(AS, as, false)
1367 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1368 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1369
1370diff -Naur libtool-2.4.2.418-orig/tests/bindir.at libtool-2.4.2.418/tests/bindir.at
1371--- libtool-2.4.2.418-orig/tests/bindir.at 2013-01-26 08:19:10.000000000 +0400
1372+++ libtool-2.4.2.418/tests/bindir.at 2014-09-02 10:21:21.999600000 +0400
1373@@ -65,7 +65,7 @@
1374
1375 bindirneeded=:
1376 case $host_os in
1377- cygwin*|mingw*|cegcc*)
1378+ cygwin*|msys*|mingw*|cegcc*)
1379 ;;
1380 *)
1381 bindirneeded=false
1382@@ -174,7 +174,7 @@
1383
1384 bindirneeded=:
1385 case $host_os in
1386- cygwin*|mingw*|cegcc*)
1387+ cygwin*|msys*|mingw*|cegcc*)
1388 ;;
1389 *)
1390 bindirneeded=false
1391
1392diff -Naur libtool-2.4.2.418-orig/tests/lt_dladvise.at libtool-2.4.2.418/tests/lt_dladvise.at
1393--- libtool-2.4.2.418-orig/tests/lt_dladvise.at 2013-01-01 21:36:01.000000000 +0400
1394+++ libtool-2.4.2.418/tests/lt_dladvise.at 2014-09-02 10:20:51.298800000 +0400
1395@@ -332,7 +332,7 @@
1396 $LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
1397
1398 case $host_os,$have_shared in
1399-cygwin* | mingw* | cegcc* | *,false)
1400+cygwin* | msys* | mingw* | cegcc* | *,false)
1401 # These hosts do not support linking without -no-undefined
1402 CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
1403 ;;
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
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 @@
1diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
2index 0418007..91276c2 100644
3--- a/build-aux/ltmain.in
4+++ b/build-aux/ltmain.in
5@@ -4163,6 +4163,7 @@
6 # include <unistd.h>
7 # include <stdint.h>
8 # ifdef __CYGWIN__
9+# include <process.h>
10 # include <io.h>
11 # endif
12 #endif
1diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 13diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
2index 0418007..91276c2 100644 14index 0418007..91276c2 100644
3--- a/build-aux/ltmain.sh 15--- 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
index 49cc0706..49cc0706 100644
--- 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
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
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.
12 m4/libtool.m4 | 2 ++ 12 m4/libtool.m4 | 2 ++
13 2 files changed, 16 insertions(+), 14 deletions(-) 13 2 files changed, 16 insertions(+), 14 deletions(-)
14 14
15diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 15diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
16index e2fb263..db5d590 100644 16index e2fb263..db5d590 100644
17--- a/build-aux/ltmain.sh 17--- a/build-aux/ltmain.in
18+++ b/build-aux/ltmain.sh 18+++ b/build-aux/ltmain.in
19@@ -7932,20 +7932,7 @@ EOF 19@@ -7932,20 +7932,7 @@ EOF
20 last_robj= 20 last_robj=
21 k=1 21 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
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.
11 build-aux/ltmain.in | 11 +++++++++-- 11 build-aux/ltmain.in | 11 +++++++++--
12 1 file changed, 9 insertions(+), 2 deletions(-) 12 1 file changed, 9 insertions(+), 2 deletions(-)
13 13
14diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 14diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
15index e2fb2633..db4d775c 100644 15index e2fb2633..db4d775c 100644
16--- a/build-aux/ltmain.sh 16--- a/build-aux/ltmain.in
17+++ b/build-aux/ltmain.sh 17+++ b/build-aux/ltmain.in
18@@ -5870,8 +5870,15 @@ func_mode_link () 18@@ -5870,8 +5870,15 @@ func_mode_link ()
19 fi 19 fi
20 case $linkmode in 20 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
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
8 m4/libtool.m4 | 2 +- 8 m4/libtool.m4 | 2 +-
9 2 files changed, 2 insertions(+), 2 deletions(-) 9 2 files changed, 2 insertions(+), 2 deletions(-)
10 10
11diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh 11diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
12index a9f070a..4a434cc 100644 12index a9f070a..4a434cc 100644
13--- a/build-aux/ltmain.sh 13--- a/build-aux/ltmain.in
14+++ b/build-aux/ltmain.sh 14+++ b/build-aux/ltmain.in
15@@ -3019,7 +3019,7 @@ func_win32_libid () 15@@ -3019,7 +3019,7 @@ func_win32_libid ()
16 *ar\ archive*) # could be an import, or static 16 *ar\ archive*) # could be an import, or static
17 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. 17 # 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 @@
1#!/bin/bash
2
3#
4# This file applies optional libtool patches mainly for better MSys2 compatibility,
5# especially for MSys2/Clang{64,32} toolchains.
6# It's a pity that these patches haven't been sent upstream.
7#
8# Based on Debian SID baseline files as of April 2023.
9#
10
11patchesdir=$(dirname $BASH_SOURCE) || exit 2
12test -n "$patchesdir" || exit 2
13cd "$patchesdir" || exit 2
14patchesdir=$(pwd) || exit 2
15
16patches=(
17 0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
18 0006-Fix-strict-ansi-vs-posix.patch
19 0009-libtool-2.4.2.418-msysize.patch
20 0010-libtool-2.4.2-include-process-h.patch
21 0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
22 0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
23 0013-Allow-statically-linking-compiler-support-libraries-.patch
24 0014-Support-llvm-objdump-f-output.patch
25)
26
27failed=( )
28
29cd "${patchesdir}/../.." || exit 1
30
31patch_params="-Nf -p1 --no-backup-if-mismatch -r - --read-only=fail"
32
33for patch in ${patches[@]}; do
34 patchfile="${patchesdir}/${patch}"
35 # Load patch into memory for simplicity
36 # Patches should not be very large
37 if grep -Eq -e '^--- .*\/ltmain\.in(\.orig)?([[:space:]]|$)' "$patchfile" && grep -Eq -e '^--- .*\/ltmain\.sh(\.orig)?([[:space:]]|$)' "$patchfile"
38 then
39 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
40 else
41 patch_data=$(cat "$patchfile") || exit 2
42 fi
43 patch_data=$(echo "$patch_data" | sed -E -e '/^(diff|---|\+\+\+) / s|/ltmain\.in|/ltmain.sh|g' -) || exit 2
44 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
45 echo "*** Applying $patch..."
46 if echo "$patch_data" | patch $patch_params -i -
47 then
48 echo "** $patch successfully applied."
49 else
50 echo "** $patch failed."
51 failed+=("$patch")
52 fi
53 unset patch_data
54done
55
56echo ''
57
58if [[ -n "${failed[@]}" ]]; then
59 printf '* Failed patch: %s\n' "${failed[@]}" >&2
60 exit 2
61else
62 echo "* All patches have been successfully applied."
63fi
64
65exit 0