pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
- set_safe "${pkg}_cflags" $pkg_cflags &&
- set_safe "${pkg}_libs" $pkg_libs
+ set_safe "${pkg}_cflags" $pkg_cflags &&
+ set_safe "${pkg}_extralibs" $pkg_libs
}
check_exec(){
pkg="${1%% *}"
check_pkg_config "$@" || die "ERROR: $pkg_version not found"
add_cflags $(get_safe "${pkg}_cflags")
- add_extralibs $(get_safe "${pkg}_libs")
+ add_extralibs $(get_safe "${pkg}_extralibs")
}
hostcc_e(){
extra_version
host_cc
host_cflags
+ host_extralibs
host_ld
host_ldflags
- host_libs
host_os
ld
logfile
vp6f_decoder_select="vp6_decoder"
vp7_decoder_select="h264pred videodsp vp8dsp"
vp8_decoder_select="h264pred videodsp vp8dsp"
-vp9_decoder_select="videodsp"
+vp9_decoder_select="videodsp vp9_superframe_split_bsf"
webp_decoder_select="vp8_decoder"
wmapro_decoder_select="mdct sinewin wma_freqs"
wmav1_decoder_select="mdct sinewin wma_freqs"
# hardware accelerators
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
+dxva2_lib_deps="dxva2"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore"
bs2b_filter_deps="libbs2b"
cropdetect_filter_deps="gpl"
deinterlace_qsv_filter_deps="libmfx"
+deinterlace_vaapi_filter_deps="vaapi"
delogo_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen"
# libraries, in linking order
avcodec_deps="avutil"
+avcodec_select="null_bsf"
avdevice_deps="avformat avcodec avutil"
avfilter_deps="avutil"
avformat_deps="avcodec avutil"
fps_filter null_filter resample_filter scale_filter
trim_filter"
avplay_deps="avcodec avfilter avformat avresample sdl"
-avplay_libs='$sdl_libs'
+avplay_extralibs='$sdl_extralibs'
avplay_select="rdft format_filter transpose_filter hflip_filter vflip_filter"
avprobe_deps="avcodec avformat"
HOSTCC_O='-o $@'
HOSTLD_O='-o $@'
-host_libs='-lm'
+host_extralibs='-lm'
host_cflags_filter=echo
host_ldflags_filter=echo
haiku)
prefix_default="/boot/common"
network_extralibs="-lnetwork"
- host_libs=
+ host_extralibs=
;;
sunos)
SHFLAGS='-shared -Wl,-h,$$(@F)'
# MinGW headers can be installed on Cygwin, so check for newlib first.
elif check_${pfx}cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
eval ${pfx}libc_type=newlib
- add_${pfx}cppflags -U__STRICT_ANSI__
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D_XOPEN_SOURCE=600
# MinGW64 is backwards compatible with MinGW32, so check for it first.
elif check_${pfx}cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then
eval ${pfx}libc_type=mingw64
check_func mmap
check_func mprotect
# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
-check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt; }
+check_func_headers time.h nanosleep || check_lib time.h nanosleep -lrt
check_func sched_getaffinity
check_func setrlimit
check_func strerror_r
check_func_headers io.h setmode
check_func_headers stdlib.h getenv
-check_func_headers windows.h CoTaskMemFree -lole32
check_func_headers windows.h GetProcessAffinityMask
check_func_headers windows.h GetProcessTimes
check_func_headers windows.h GetSystemTimeAsFileTime
# do this before the optional library checks as some of them require pthreads
if ! disabled pthreads && ! enabled w32threads; then
enable pthreads
- if check_func pthread_join -pthread; then
+ if check_lib pthread.h pthread_join -pthread; then
add_cflags -pthread
- add_extralibs -pthread
- elif check_func pthread_join -pthreads; then
+ elif check_lib pthread.h pthread_join -pthreads; then
add_cflags -pthreads
- add_extralibs -pthreads
- elif check_func pthread_join -lpthreadGC2; then
- add_extralibs -lpthreadGC2
+ elif check_lib pthread.h pthread_join -lpthreadGC2; then
+ :
elif check_lib pthread.h pthread_join -lpthread; then
:
elif ! check_func pthread_join; then
enabled omx && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
enabled openssl && { { check_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
check_pkg_config openssl openssl/ssl.h SSL_library_init; } && {
- add_cflags $openssl_cflags && add_extralibs $openssl_libs; }||
+ add_cflags $openssl_cflags && add_extralibs $openssl_extralibs; } ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
} && enable libxcb_xfixes
add_cflags "$xcb_shape_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
- add_extralibs "$xcb_shape_libs $xcb_shm_libs $xcb_xfixes_libs"
+ add_extralibs "$xcb_shape_extralibs $xcb_shm_extralibs $xcb_xfixes_extralibs"
fi
+enabled dxva2 &&
+ check_lib windows.h CoTaskMemFree -lole32 &&
+ enable dxva2_lib
+
enabled vaapi && require vaapi va/va.h vaInitialize -lva
enabled vaapi &&
$HAVE_LIST \
$ALL_COMPONENTS \
-enabled_all dxva2 CoTaskMemFree &&
- prepend avconv_libs $($ldflags_filter "-lole32") &&
- enable dxva2_lib
-
map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
for thread in $THREADS_LIST; do
HOSTCPPFLAGS=$host_cppflags
HOSTEXESUF=$HOSTEXESUF
HOSTLDFLAGS=$host_ldflags
-HOSTLIBS=$host_libs
+HOSTEXTRALIBS=$host_extralibs
DEPHOSTCC=$host_cc
DEPHOSTCCFLAGS=$DEPHOSTCCFLAGS \$(HOSTCCFLAGS)
HOSTCCDEP=$HOSTCCDEP
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> config.mak' $LIBRARY_LIST
-print_program_libs(){
- eval "program_libs=\$${1}_libs"
- eval echo "LIBS-${1}=${program_libs}" >> config.mak
+print_program_extralibs(){
+ eval "program_extralibs=\$${1}_extralibs"
+ eval echo "EXTRALIBS-${1}=${program_extralibs}" >> config.mak
}
-map 'print_program_libs $v' $PROGRAM_LIST
+map 'print_program_extralibs $v' $PROGRAM_LIST
cat > $TMPH <<EOF
/* Automatically generated by configure - do not modify! */