1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

configure: fix Microsoft tools detection

LLVM tools print installation path upon execution. If one uses LLVM
tools bundled with Microsoft Visual Studio installation, they would be
incorrectly detected as Microsoft's ones.

Microsoft tools can have localized names, so a more specific string
check is not feasible, but luckily we can test if "Microsoft" is at the
beginning of the line, as it is always the case.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Kacper Michajłow
2025-06-14 03:03:15 +02:00
committed by Martin Storsjö
parent 38073187bd
commit 53da090ab7

6
configure vendored
View File

@ -5127,9 +5127,9 @@ probe_cc(){
_flags_filter=msvc_flags
_ld_lib='lib%.a'
_ld_path='-libpath:'
elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
elif $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
_type=msvc
if $_cc -nologo- 2>&1 | grep -q Microsoft; then
if $_cc -nologo- 2>&1 | grep -q ^Microsoft; then
_ident=$($_cc 2>&1 | head -n1 | tr -d '\r')
else
_ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
@ -5239,7 +5239,7 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
DEPCCFLAGS=$_flags
fi
if $ar 2>&1 | grep -q Microsoft; then
if $ar 2>&1 | grep -q ^Microsoft; then
arflags="-nologo"
ar_o='-out:$@'
elif $ar 2>&1 | grep -q "\[D\] "; then