]> git.sesse.net Git - x264/blobdiff - configure
Start counting when the first frame is encoded, not when x264_encoder_open is called.
[x264] / configure
index 0d40a927f071091623ff2ebb48abb0a0aec05b57..7c01ebcba157c05aa1c0b05347bb9cd85001d4da 100755 (executable)
--- a/configure
+++ b/configure
@@ -547,6 +547,9 @@ if [[ $host_os = mingw* || $host_os = cygwin* ]]; then
         `$CC 2>&1 | grep -q 'x86'` && host_cpu=i486
         `$CC 2>&1 | grep -q 'x64'` && host_cpu=x86_64
         cpp_check '' '' '_MSC_VER > 1800 || (_MSC_VER == 1800 && _MSC_FULL_VER >= 180030324)' || die "Microsoft Visual Studio support requires Visual Studio 2013 Update 2 or newer"
+    else
+        # MinGW uses broken pre-VS2015 Microsoft printf functions unless it's told to use the POSIX ones.
+        CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
     fi
 else
     if [[ "$cc_base" = icc || "$cc_base" = icc[\ .]* ]]; then
@@ -806,7 +809,7 @@ cc_check || die "No working C compiler found."
 
 if [ $compiler_style = GNU ]; then
     if cc_check '' -std=gnu99 'for( int i = 0; i < 9; i++ );' ; then
-        CFLAGS="$CFLAGS -std=gnu99"
+        CFLAGS="$CFLAGS -std=gnu99 -D_GNU_SOURCE"
     elif cc_check '' -std=c99 'for( int i = 0; i < 9; i++ );' ; then
         CFLAGS="$CFLAGS -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE"
     elif ! cc_check '' '' 'for( int i = 0; i < 9; i++ );' ; then
@@ -1046,7 +1049,7 @@ if [ "$lavf" = "auto" ] ; then
 fi
 
 if [ "$ffms" = "auto" ] ; then
-    ffms_major="2"; ffms_minor="16"; ffms_micro="2"; ffms_bump="0"
+    ffms_major="2"; ffms_minor="21"; ffms_micro="0"; ffms_bump="0"
     ffms="no"
 
     if ${cross_prefix}pkg-config --exists ffms2 2>/dev/null; then
@@ -1171,6 +1174,7 @@ fi
 
 if [ "$debug" = "yes" ]; then
     CFLAGS="-O1 -g $CFLAGS"
+    RCFLAGS="$RCFLAGS -DDEBUG"
 else
     CFLAGS="-O3 -ffast-math $CFLAGS"
 fi