libtool: fix empty "-L" in compiler_lib_search_path

If the compiler places a space between "-L" and the path, the path will
be skipped and only an empty "-L" will appear in the final
compiler_lib_search_path. This will cause the first library in postdeps
following compiler_lib_search_path to be accidentally skipped.

* libtool.m4: Fixed string comparison by adding missing 'x's.
This commit is contained in:
Xiang.Lin 2023-11-06 15:07:56 +08:00 committed by Ileana Dumitrescu
parent 47c71f61df
commit 4da5b57531
No known key found for this signature in database
GPG Key ID: 6570EA01146F7354

4
m4/libtool.m4 vendored
View File

@ -7563,8 +7563,8 @@ if AC_TRY_EVAL(ac_compile); then
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
if test x-L = "$p" ||
test x-R = "$p"; then
if test x-L = x"$p" ||
test x-R = x"$p"; then
prev=$p
continue
fi