Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Dec 2013 18:00:28 +0000 (19:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Dec 2013 18:01:02 +0000 (19:01 +0100)
* qatar/master:
  configure: Separate MinGW32 and MinGW64 libc handling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -3821,20 -3386,16 +3821,23 @@@ elif check_cpp_condition features.h "de
  elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
      libc_type=newlib
      add_cppflags -U__STRICT_ANSI__
- elif check_header _mingw.h; then
-     libc_type=mingw
-     check_cpp_condition _mingw.h \
-         "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \
-             (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
-         die "ERROR: MinGW runtime version must be >= 3.15."
+ # MinGW64 is backwards compatible with MinGW32, so check for it first.
+ elif check_cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then
+     libc_type=mingw64
+     add_cppflags -U__STRICT_ANSI__
+ elif check_cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
+     libc_type=mingw32
+     check_cpp_condition _mingw.h "__MINGW32_MAJOR_VERSION > 3 || \
+         (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
+         die "ERROR: MinGW32 runtime version must be >= 3.15."
      add_cppflags -U__STRICT_ANSI__
 +    if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \
 +            __MINGW64_VERSION_MAJOR < 3"; then
 +        add_compat msvcrt/snprintf.o
 +        add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
 +    else
 +        add_cppflags -D__USE_MINGW_ANSI_STDIO=1
 +    fi
  elif check_cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
      libc_type=msvcrt
      add_compat strtod.o strtod=avpriv_strtod