1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-05-29 21:47:48 +02:00

configure: fail if autodetect-libraries are requested but not found

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
Andreas Cadhalpun 2016-11-30 23:50:17 +01:00
parent 4c45566493
commit 8aad209c13
2 changed files with 57 additions and 22 deletions

View File

@ -7,6 +7,7 @@ version <next>:
- Pro-MPEG CoP #3-R2 FEC protocol - Pro-MPEG CoP #3-R2 FEC protocol
- premultiply video filter - premultiply video filter
- Support for spherical videos - Support for spherical videos
- configure now fails if autodetect-libraries are requested but not found
version 3.2: version 3.2:
- libopenmpt demuxer - libopenmpt demuxer

78
configure vendored
View File

@ -597,6 +597,13 @@ popvar(){
done done
} }
request(){
for var in $*; do
eval ${var}_requested=yes
eval $var=
done
}
enable(){ enable(){
set_all yes $* set_all yes $*
} }
@ -653,6 +660,11 @@ enable_deep_weak(){
done done
} }
requested(){
test "${1#!}" = "$1" && op='=' || op=!=
eval test "x\$${1#!}_requested" $op "xyes"
}
enabled(){ enabled(){
test "${1#!}" = "$1" && op='=' || op=!= test "${1#!}" = "$1" && op='=' || op=!=
eval test "x\$${1#!}" $op "xyes" eval test "x\$${1#!}" $op "xyes"
@ -724,9 +736,9 @@ do_check_deps(){
[ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; } [ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; }
[ -n "$dep_ifn" ] && { enabled_any $dep_ifn && enable_weak $cfg; } [ -n "$dep_ifn" ] && { enabled_any $dep_ifn && enable_weak $cfg; }
enabled_all $dep_all || disable $cfg enabled_all $dep_all || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not all dependencies are satisfied: $dep_all"; }
enabled_any $dep_any || disable $cfg enabled_any $dep_any || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not any dependency is satisfied: $dep_any"; }
disabled_any $dep_sel && disable $cfg disabled_any $dep_sel && { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some selected dependency is unsatisfied: $dep_sel"; }
if enabled $cfg; then if enabled $cfg; then
enable_deep $dep_sel enable_deep $dep_sel
@ -1481,10 +1493,25 @@ EXAMPLE_LIST="
transcode_aac_example transcode_aac_example
transcoding_example transcoding_example
" "
EXTERNAL_AUTODETECT_LIBRARY_LIST="
bzlib
iconv
libxcb
libxcb_shm
libxcb_shape
libxcb_xfixes
lzma
schannel
sdl
sdl2
securetransport
xlib
zlib
"
EXTERNAL_LIBRARY_LIST=" EXTERNAL_LIBRARY_LIST="
$EXTERNAL_AUTODETECT_LIBRARY_LIST
avisynth avisynth
bzlib
chromaprint chromaprint
crystalhd crystalhd
decklink decklink
@ -1492,7 +1519,6 @@ EXTERNAL_LIBRARY_LIST="
gcrypt gcrypt
gmp gmp
gnutls gnutls
iconv
jni jni
ladspa ladspa
libass libass
@ -1545,42 +1571,26 @@ EXTERNAL_LIBRARY_LIST="
libx264 libx264
libx265 libx265
libxavs libxavs
libxcb
libxcb_shm
libxcb_shape
libxcb_xfixes
libxvid libxvid
libzimg libzimg
libzmq libzmq
libzvbi libzvbi
lzma
mediacodec mediacodec
netcdf netcdf
openal openal
opencl opencl
opengl opengl
openssl openssl
schannel
sdl
sdl2
securetransport
videotoolbox videotoolbox
x11grab x11grab
xlib
zlib
" "
HWACCEL_AUTODETECT_LIBRARY_LIST="
HWACCEL_LIBRARY_LIST="
audiotoolbox audiotoolbox
cuda cuda
cuvid cuvid
d3d11va d3d11va
dxva2 dxva2
libmfx
libnpp
mmal
nvenc nvenc
omx
vaapi vaapi
vda vda
vdpau vdpau
@ -1588,6 +1598,14 @@ HWACCEL_LIBRARY_LIST="
xvmc xvmc
" "
HWACCEL_LIBRARY_LIST="
$HWACCEL_AUTODETECT_LIBRARY_LIST
libmfx
libnpp
mmal
omx
"
DOCUMENT_LIST=" DOCUMENT_LIST="
doc doc
htmlpages htmlpages
@ -1684,6 +1702,12 @@ ATOMICS_LIST="
atomics_win32 atomics_win32
" "
AUTODETECT_LIBS="
$EXTERNAL_AUTODETECT_LIBRARY_LIST
$HWACCEL_AUTODETECT_LIBRARY_LIST
$THREADS_LIST
"
ARCH_LIST=" ARCH_LIST="
aarch64 aarch64
alpha alpha
@ -3483,6 +3507,11 @@ for e in $env; do
eval "export $e" eval "export $e"
done done
# Mark specifically enabled, but normally autodetected libraries as requested.
for lib in $AUTODETECT_LIBS; do
enabled $lib && request $lib
done
# Enable platform codecs by default. # Enable platform codecs by default.
enable_weak audiotoolbox enable_weak audiotoolbox
@ -6399,6 +6428,11 @@ if disabled stdatomic_h; then
fi fi
fi fi
# Check if requested libraries were found.
for lib in $AUTODETECT_LIBS; do
requested $lib && ! enabled $lib && die "ERROR: $lib requested but not found";
done
enabled zlib && add_cppflags -DZLIB_CONST enabled zlib && add_cppflags -DZLIB_CONST
# conditional library dependencies, in linking order # conditional library dependencies, in linking order