]> git.sesse.net Git - ffmpeg/blobdiff - configure
configure: Simplify inline asm check with appropriate helper function
[ffmpeg] / configure
index 9c277fa3c2ac28ceff85a901fcc99fea741e92c5..4a8d04d21073ac4e2be5e41d2a9c477f2aef86a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -2243,6 +2243,8 @@ vc1_qsv_decoder_deps="libmfx"
 vc1_qsv_decoder_select="qsvdec vc1_qsv_hwaccel vc1_parser"
 vp8_qsv_decoder_deps="libmfx"
 vp8_qsv_decoder_select="qsvdec vp8_qsv_hwaccel vp8_parser"
+vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8"
+vp8_vaapi_encoder_select="vaapi_encode"
 
 nvenc_h264_encoder_select="h264_nvenc_encoder"
 nvenc_hevc_encoder_select="hevc_nvenc_encoder"
@@ -2482,6 +2484,7 @@ avcodec_select="null_bsf"
 avdevice_deps="avformat avcodec avutil"
 avfilter_deps="avutil"
 avformat_deps="avcodec avutil"
+avformat_suggest="network"
 avresample_deps="avutil"
 swscale_deps="avutil"
 
@@ -4112,26 +4115,25 @@ test -n "$libc_type" && enable libc_$libc_type
 probe_libc host_
 test -n "$host_libc_type" && enable host_libc_$host_libc_type
 
+# hacks for compiler/libc/os combinations
+
 case $libc_type in
     bionic)
         add_compat strtod.o strtod=avpriv_strtod
         ;;
+    glibc)
+        if enabled tms470; then
+            CPPFLAGS="-I${source_path}/compat/tms470 ${CPPFLAGS}"
+            add_cppflags -D__USER_LABEL_PREFIX__=
+            add_cppflags -D__builtin_memset=memset
+            add_cppflags -D__gnuc_va_list=va_list -D_VA_LIST_DEFINED
+            add_cflags   -pds=48    # incompatible redefinition of macro
+        elif enabled ccc; then
+            add_ldflags -Wl,-z,now  # calls to libots crash without this
+        fi
+        ;;
 esac
 
-# hacks for compiler/libc/os combinations
-
-if enabled_all tms470 libc_glibc; then
-    CPPFLAGS="-I${source_path}/compat/tms470 ${CPPFLAGS}"
-    add_cppflags -D__USER_LABEL_PREFIX__=
-    add_cppflags -D__builtin_memset=memset
-    add_cppflags -D__gnuc_va_list=va_list -D_VA_LIST_DEFINED
-    add_cflags   -pds=48    # incompatible redefinition of macro
-fi
-
-if enabled_all ccc libc_glibc; then
-    add_ldflags -Wl,-z,now  # calls to libots crash without this
-fi
-
 check_compile_assert flt_lim "float.h limits.h" "DBL_MAX == (double)DBL_MAX" ||
     add_cppflags '-I\$(SRC_PATH)/compat/float'
 
@@ -4181,9 +4183,7 @@ EOF
 sym=$($nm $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
 extern_prefix=${sym%%ff_extern*}
 
-check_cc <<EOF && enable_weak inline_asm
-void foo(void) { __asm__ volatile ("" ::); }
-EOF
+check_inline_asm inline_asm '"" ::'
 
 _restrict=
 for restrict_keyword in restrict __restrict__ __restrict; do
@@ -4594,6 +4594,7 @@ check_type "va/va.h va/va_enc_h264.h" "VAEncPictureParameterBufferH264"
 check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
 check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
 check_type "va/va.h va/va_enc_mpeg2.h" "VAEncPictureParameterBufferMPEG2"
+check_type "va/va.h va/va_enc_vp8.h"  "VAEncPictureParameterBufferVP8"
 
 check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
 
@@ -5410,7 +5411,7 @@ print_enabled_components(){
     struct_name=$2
     name=$3
     shift 3
-    echo "static const $struct_name *$name[] = {" > $TMPH
+    echo "static const $struct_name * const $name[] = {" > $TMPH
     for c in $*; do
         enabled $c && printf "    &ff_%s,\n" $c >> $TMPH
     done