configure: check if NAN can be used as a constant initializer
authorJames Almer <jamrial@gmail.com>
Wed, 13 Sep 2017 17:07:21 +0000 (14:07 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 13 Sep 2017 18:38:10 +0000 (15:38 -0300)
Some targets, like NetBSD and DJGPP, don't seem to support it.

Signed-off-by: James Almer <jamrial@gmail.com>
configure

index 4dd11ef..6e3a350 100755 (executable)
--- a/configure
+++ b/configure
@@ -3210,6 +3210,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"
@@ -3217,7 +3218,7 @@ vidstabtransform_filter_deps="libvidstab"
 libvmaf_filter_deps="libvmaf"
 zmq_filter_deps="libzmq"
 zoompan_filter_deps="swscale"
-zscale_filter_deps="libzimg"
+zscale_filter_deps="libzimg const_nan"
 scale_vaapi_filter_deps="vaapi VAProcPipelineParameterBuffer"
 
 # examples
@@ -5312,6 +5313,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