]> git.sesse.net Git - ffmpeg/blobdiff - configure
Merge commit 'a5a3b398fd9dce38ca50b20f182b17a256d209f2'
[ffmpeg] / configure
index 9dcda39215d218c631e69f9cc15d0a1b010537cc..f2dede0d5499310d0949d0d0a3fb865e03e236d3 100755 (executable)
--- a/configure
+++ b/configure
@@ -2478,7 +2478,7 @@ HOSTCC_E='-E -o $@'
 HOSTCC_O='-o $@'
 HOSTLD_O='-o $@'
 
-host_cflags='-O3 -g'
+host_cflags='-O3'
 host_cppflags='-D_ISOC99_SOURCE'
 host_libs='-lm'
 host_cflags_filter=echo
@@ -3853,16 +3853,15 @@ probe_libc(){
         if check_${pfx}cpp_condition _mingw.h "__MINGW64_VERSION_MAJOR < 3"; then
             add_compat msvcrt/snprintf.o
             add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
-        else
-            add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1
         fi
         add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
-    elif check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
+    elif check_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION"  ||
+         check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
         eval ${pfx}libc_type=mingw32
         check_${pfx}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_${pfx}cppflags -U__STRICT_ANSI__
+        add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
     elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
         eval ${pfx}libc_type=msvcrt
         # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
@@ -4312,9 +4311,6 @@ check_header windows.h
 check_header X11/extensions/XvMClib.h
 check_header asm/types.h
 
-disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
-disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
-
 if ! disabled w32threads && ! enabled pthreads; then
     check_func_headers "windows.h process.h" _beginthreadex && enable w32threads
 fi
@@ -4323,9 +4319,7 @@ fi
 # do this before the optional library checks as some of them require pthreads
 if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
     enable pthreads
-    if check_func pthread_join && check_func pthread_create; then
-        :
-    elif check_func pthread_join -pthread && check_func pthread_create -pthread; then
+    if check_func pthread_join -pthread && check_func pthread_create -pthread; then
         add_cflags -pthread
         add_extralibs -pthread
     elif check_func pthread_join -pthreads && check_func pthread_create -pthreads; then
@@ -4333,7 +4327,9 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
         add_extralibs -pthreads
     elif check_func pthread_join -lpthreadGC2 && check_func pthread_create -lpthreadGC2; then
         add_extralibs -lpthreadGC2
-    elif ! check_lib pthread.h pthread_join -lpthread && ! check_lib pthread.h pthread_create -lpthread; then
+    elif check_lib pthread.h pthread_join -lpthread && check_lib pthread.h pthread_create -lpthread; then
+        :
+    elif ! check_func pthread_join && ! check_func pthread_create; then
         disable pthreads
     fi
 fi
@@ -4350,6 +4346,9 @@ if enabled pthreads; then
   check_func pthread_cancel
 fi
 
+disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
+disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
+
 enabled sync_val_compare_and_swap && enable atomics_gcc
 enabled_all atomic_cas_ptr machine_rw_barrier && enable atomics_suncc
 enabled MemoryBarrier && enable atomics_win32