aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-14 02:26:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-14 02:34:34 +0100
commita7663ad9cf74bb0a25c07085e7a8f2b235d0c0cb (patch)
treed8c9c18c4c523b667df79686624b4c8d4e9a6f89
parent4abe6e415310e63d64c3a370c15d410d2050ca2a (diff)
parent16381923fb7b9087ce559fb1cd3594469ac6788b (diff)
downloadffmpeg-a7663ad9cf74bb0a25c07085e7a8f2b235d0c0cb.tar.gz
Merge commit '16381923fb7b9087ce559fb1cd3594469ac6788b'
* commit '16381923fb7b9087ce559fb1cd3594469ac6788b': configure: Check whether MSVC requires using the C89-to-C99 converter Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure b/configure
index 5f80764552..c3606bdb32 100755
--- a/configure
+++ b/configure
@@ -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)
- cc_default="c99wrap cl"
+ # 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"