Commit a7663ad9 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '16381923'

* commit '16381923':
  configure: Check whether MSVC requires using the C89-to-C99 converter
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4abe6e41 16381923
......@@ -2623,7 +2623,20 @@ case "$toolchain" in
target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
;;
msvc)
# Check whether the current MSVC version needs the C99 converter.
# From MSVC 2013 (compiler major version 18) onwards, it does actually
# support enough of C99 to build ffmpeg, but we still need to use
# c99wrap for passing command line parameters with a space (for
# avoiding msys path mangling/conversion issues). Default to the new
# behaviour if the regexp was unable to match anything, since this
# successfully parses the version number of existing supported
# versions that require the converter (MSVC 2010 and 2012).
cl_major_ver=$(cl 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then
cc_default="c99wrap -noconv cl"
else
cc_default="c99wrap cl"
fi
ld_default="c99wrap link"
nm_default="dumpbin -symbols"
ar_default="lib"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment