OSDN Git Service

configure: Detect msvcrt libc with a CPP check instead of a link check
authorDiego Biurrun <diego@biurrun.de>
Wed, 4 Dec 2013 15:25:04 +0000 (10:25 -0500)
committerDiego Biurrun <diego@biurrun.de>
Wed, 4 Dec 2013 16:50:59 +0000 (11:50 -0500)
Simplifies host/target libc detection splitting.

configure

index dfa8d9d..663fe6d 100755 (executable)
--- 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   \