configure: When disabling a library disable all the related components

This way is sufficient to use the component specific configure variable
and not guard against the global library configure variable in code
that is outside it (e.g. checkasm).
This commit is contained in:
Luca Barbato 2015-10-05 03:41:41 +02:00
parent 58b42345b3
commit d7a5a178c2

43
configure vendored
View File

@ -1129,20 +1129,39 @@ cp_if_changed(){
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
# system-dependent things.
COMPONENT_LIST="
AVCODEC_COMPONENTS="
bsfs
decoders
demuxers
encoders
filters
hwaccels
indevs
muxers
outdevs
parsers
"
AVDEVICE_COMPONENTS="
indevs
outdevs
"
AVFILTER_COMPONENTS="
filters
"
AVFORMAT_COMPONENTS="
demuxers
muxers
protocols
"
AVRESAMPLE_COMPONENTS=""
AVUTIL_COMPONENTS=""
COMPONENT_LIST="
$AVCODEC_COMPONENTS
$AVDEVICE_COMPONENTS
$AVFILTER_COMPONENTS
$AVFORMAT_COMPONENTS
$AVRESAMPLE_COMPONENTS
$AVUTIL_COMPONENTS
"
EXAMPLE_LIST="
avcodec_example
filter_audio_example
@ -2600,6 +2619,18 @@ done
disabled logging && logfile=/dev/null
# Disable all the library-specific components if the library itself
# is disabled, see AVCODEC_LIST and following _LIST variables.
disable_components(){
disabled ${1} && disable $(
eval components="\$$(toupper ${1})_COMPONENTS"
map 'eval echo \${$(toupper ${v%s})_LIST}' $components
)
}
map 'disable_components $v' $LIBRARY_LIST
echo "# $0 $LIBAV_CONFIGURATION" > $logfile
set >> $logfile