[FFmpeg-devel] [PATCH] configure: check if NAN can be used as a constant initializer

James Almer jamrial at gmail.com
Wed Sep 13 20:10:39 EEST 2017


Some targets, like NetBSD and DJGPP, don't seem to support it.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure b/configure
index ab1550d39b..4855ca54c9 100755
--- a/configure
+++ b/configure
@@ -3222,6 +3222,7 @@ pixfmts_super2xsai_test_deps="super2xsai_filter"
 tinterlace_filter_deps="gpl"
 tinterlace_merge_test_deps="tinterlace_filter"
 tinterlace_pad_test_deps="tinterlace_filter"
+tonemap_filter_deps="const_nan"
 uspp_filter_deps="gpl avcodec"
 vaguedenoiser_filter_deps="gpl"
 vidstabdetect_filter_deps="libvidstab"
@@ -5324,6 +5325,11 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
 od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
+check_cc <<EOF && enable const_nan
+#include <math.h>
+void foo(void) { struct { double d; } static const bar[] = { { NAN } }; }
+EOF
+
 if ! enabled ppc64 || enabled bigendian; then
     disable vsx
 fi
-- 
2.13.3



More information about the ffmpeg-devel mailing list