summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-08 19:00:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-08 19:01:02 +0100
commit1b264607883e7d52a3941cd9c192e3045096acc9 (patch)
treea195b65abeb3096b8c11e480e4f46f64fd099dbd /configure
parentc1b9d7189d3fee48a4439f27a565373fdb96b2d2 (diff)
parent120797e2ef0ca317daf63ad79be5f72f835e9ac2 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: configure: Separate MinGW32 and MinGW64 libc handling Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 9 insertions, 6 deletions
diff --git a/configure b/configure
index 0b00684758..dd8976465d 100755
--- a/configure
+++ b/configure
@@ -3821,12 +3821,15 @@ elif check_cpp_condition features.h "defined __GLIBC__"; then
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