Merge commit 'd7a5a178c252b625537adc046392624ad543dea7'
authorHendrik Leppkes <h.leppkes@gmail.com>
Sat, 10 Oct 2015 07:37:51 +0000 (09:37 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Sat, 10 Oct 2015 07:37:51 +0000 (09:37 +0200)
* commit 'd7a5a178c252b625537adc046392624ad543dea7':
  configure: When disabling a library disable all the related components

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -1346,23 -1150,25 +1353,35 @@@ AVFORMAT_COMPONENTS=
      protocols
  "
  
+ AVRESAMPLE_COMPONENTS=""
+ AVUTIL_COMPONENTS=""
+ COMPONENT_LIST="
+     $AVCODEC_COMPONENTS
+     $AVDEVICE_COMPONENTS
+     $AVFILTER_COMPONENTS
+     $AVFORMAT_COMPONENTS
+     $AVRESAMPLE_COMPONENTS
+     $AVUTIL_COMPONENTS
+ "
  EXAMPLE_LIST="
 -    avcodec_example
 +    avio_reading_example
 +    avio_dir_cmd_example
 +    decoding_encoding_example
 +    demuxing_decoding_example
 +    extract_mvs_example
      filter_audio_example
 +    filtering_audio_example
 +    filtering_video_example
      metadata_example
 -    output_example
 +    muxing_example
      qsvdec_example
 +    remuxing_example
 +    resampling_audio_example
 +    scaling_video_example
      transcode_aac_example
 +    transcoding_example
  "
  
  EXTERNAL_LIBRARY_LIST="
  
  disabled logging && logfile=/dev/null
  
 -echo "# $0 $LIBAV_CONFIGURATION" > $logfile
+ # 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 $FFMPEG_CONFIGURATION" > $logfile
  set >> $logfile
  
 +test -n "$valgrind" && toolchain="valgrind-memcheck"
 +
  case "$toolchain" in
      clang-asan)
          cc_default="clang"