]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Handle unset $multilib for Windows targets.
authorMarkus Mützel <markus.muetzel@gmx.de>
Mon, 14 Oct 2024 15:25:07 +0000 (17:25 +0200)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 15 Oct 2024 14:52:50 +0000 (17:52 +0300)
If `multilib` is unset (which it apparently is by default), the output
from running a `configure` script contains lines like the following:
```
checking dynamic linker characteristics... ../configure: line 26791: test: yes: unary operator expected
Win32 ld.exe
```

The additional output is not a fatal error. But it could be irritating.

Avoid the unexpected output from `test` by making sure `=` is used as a
binary operator.

* m4/libtool.m4: Prepend "x" on both sides of a comparison with `test`
and the operator `=`.

See also: https://github.com/msys2/MINGW-packages/pull/21905

m4/libtool.m4

index 66b33f5989e79d222a89531245260f4b756645d9..ac230d1292386dffdc71cc1e9dd15df101804ebb 100644 (file)
@@ -2584,7 +2584,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*)
     # If user builds GCC with mulitlibs enabled,
     # it should just install on $(libdir)
     # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
-    if test yes = $multilib; then
+    if test xyes = x$multilib; then
     postinstall_cmds='base_file=`basename \$file`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~