From bd8b6185f6d1fb0433f048c4096b858e6f88ded6 Mon Sep 17 00:00:00 2001
From: Diego Biurrun <diego@biurrun.de>
Date: Wed, 4 Dec 2013 10:25:04 -0500
Subject: [PATCH] configure: Detect msvcrt libc with a CPP check instead of a
 link check

Simplifies host/target libc detection splitting.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index dfa8d9db6d0..663fe6dc942 100755
--- a/configure
+++ b/configure
@@ -3393,7 +3393,7 @@ elif check_header _mingw.h; then
             (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
         die "ERROR: MinGW runtime version must be >= 3.15."
     add_cppflags -U__STRICT_ANSI__
-elif check_func_headers stdlib.h _get_doserrno; then
+elif check_cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
     libc_type=msvcrt
     add_compat strtod.o strtod=avpriv_strtod
     add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf   \
-- 
GitLab