aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-10-05 03:41:41 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-07 18:45:50 +0200
commitd7a5a178c252b625537adc046392624ad543dea7 (patch)
treeeaf9d312a0472eb90d96cfc4aa833bd12c63c085
parent58b42345b38b46d11c32e11d9c57517f99d6a601 (diff)
downloadffmpeg-d7a5a178c252b625537adc046392624ad543dea7.tar.gz
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).
-rwxr-xr-xconfigure41
1 files changed, 36 insertions, 5 deletions
diff --git a/configure b/configure
index 14af2b74b4..ac4c2eb5c6 100755
--- a/configure
+++ b/configure
@@ -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
+ parsers
+"
+
+AVDEVICE_COMPONENTS="
indevs
- muxers
outdevs
- parsers
+"
+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