1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-14 00:58:38 +02:00

configure: Move newlib libc check before mingw libc check

On Cygwin systems MinGW headers can be present if the corresponding
packages have been installed. Since the MinGW libc is checked for
first, this results in newlib getting misdetected as MinGW libc.
This commit is contained in:
Diego Biurrun 2013-01-31 00:43:18 +01:00
parent 0f5b0b4178
commit 29f1fa7422

7
configure vendored
View File

@ -3041,15 +3041,16 @@ if check_cpp_condition features.h "defined __UCLIBC__"; then
elif check_cpp_condition features.h "defined __GLIBC__"; then elif check_cpp_condition features.h "defined __GLIBC__"; then
libc_type=glibc libc_type=glibc
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
# MinGW headers can be installed on Cygwin, so check for newlib first.
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
libc_type=newlib
add_cppflags -U__STRICT_ANSI__
elif check_header _mingw.h; then elif check_header _mingw.h; then
libc_type=mingw libc_type=mingw
check_cpp_condition _mingw.h \ check_cpp_condition _mingw.h \
"defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \ "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW runtime version must be >= 3.15." die "ERROR: MinGW runtime version must be >= 3.15."
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
libc_type=newlib
add_cppflags -U__STRICT_ANSI__
elif check_func_headers stdlib.h _get_doserrno; then elif check_func_headers stdlib.h _get_doserrno; then
libc_type=msvcrt libc_type=msvcrt
add_compat strtod.o strtod=avpriv_strtod add_compat strtod.o strtod=avpriv_strtod