enable_sanitized(){
for var; do
- enable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g')
+ enable $(sanitize_var_name $var)
done
}
disable_sanitized(){
for var; do
- disable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g')
+ disable $(sanitize_var_name $var)
done
}
}
requested(){
- test "${1#!}" = "$1" && op='=' || op=!=
+ test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}_requested" $op "xyes"
}
enabled(){
- test "${1#!}" = "$1" && op='=' || op=!=
+ test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}" $op "xyes"
}
disabled(){
- test "${1#!}" = "$1" && op='=' || op=!=
+ test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}" $op "xno"
}
test_ldflags(){
log test_ldflags "$@"
+ set -- $($ldflags_filter "$@")
check_ld "cc" "$@" <<EOF
int main(void){ return 0; }
EOF
}
require_header(){
- log require "$@"
+ log require_header "$@"
headers="$1"
shift
check_header "$headers" "$@" || die "ERROR: $headers not found"
}
require_cpp_condition(){
- log require "$@"
+ log require_cpp_condition "$@"
header="$1"
condition="$2"
shift 2
posix_memalign
pthread_cancel
sched_getaffinity
+ SecItemImport
SetConsoleTextAttribute
SetConsoleCtrlHandler
setmode
vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9"
vp9_dxva2_hwaccel_select="vp9_decoder"
vp9_mediacodec_hwaccel_deps="mediacodec"
+vp9_nvdec_hwaccel_deps="cuda nvdec"
+vp9_nvdec_hwaccel_select="vp9_decoder"
vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth"
vp9_vaapi_hwaccel_select="vp9_decoder"
wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
if $ar 2>&1 | grep -q Microsoft; then
arflags="-nologo"
ar_o='-out:$@'
-elif $ar 2>&1 | grep -q 'Usage: ar.*-X.*any'; then
- arflags='-Xany -r -c'
- ar_o='$@'
elif $ar 2>&1 | grep -q "\[D\] "; then
arflags="rcD"
ar_o='$@'
SHFLAGS=-shared
add_cppflags '-I\$(SRC_PATH)/compat/aix'
enabled shared && add_ldflags -Wl,-brtl
+ arflags='-Xany -r -c'
;;
android)
disable symver
check_compile_assert flt_lim "float.h limits.h" "DBL_MAX == (double)DBL_MAX" ||
add_cppflags '-I\$(SRC_PATH)/compat/float'
-esc(){
- echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
-}
-
-echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild/config.fate
-
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
set_default libdir
enabled securetransport &&
check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
- check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
+ check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
disable securetransport
+enabled securetransport &&
+ check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security"
+
enabled schannel &&
check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" &&
echo "License: $license"
-echo "Creating configuration files ..."
-
fi # test "$quiet" != "yes"
+if test -n "$WARNINGS"; then
+ printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
+ enabled fatal_warnings && exit 1
+fi
+
test -e Makefile || echo "include $source_path/Makefile" > Makefile
+esc(){
+ echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
+}
+
+echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild/config.fate
+
enabled stripping || strip="echo skipping strip"
enabled stripping || striptype=""
if enabled x86asm; then
append config_files $TMPASM
- printf '' >$TMPASM
+ cat > $TMPASM <<EOF
+; Automatically generated by configure - do not modify!
+EOF
fi
enabled getenv || echo "#define getenv(x) NULL" >> $TMPH
enabled x86asm && cp_if_changed $TMPASM config.asm
cat > $TMPH <<EOF
-/* Generated by ffconf */
+/* Generated by ffmpeg configure */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
EOF
print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST
-if test -n "$WARNINGS"; then
- printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
- enabled fatal_warnings && exit 1
-fi
-
# Settings for pkg-config files
-cat > ffbuild/config.sh <<EOF
+cat > $TMPH <<EOF
# Automatically generated by configure - do not modify!
shared=$shared
build_suffix=$build_suffix
for lib in $LIBRARY_LIST; do
lib_deps="$(eval echo \$${lib}_deps)"
- echo ${lib}_deps=\"$lib_deps\" >> ffbuild/config.sh
+ echo ${lib}_deps=\"$lib_deps\" >> $TMPH
done
+
+cp_if_changed $TMPH ffbuild/config.sh