Merge commit '8e7bea6dc6ac5b21484774a026847bec0771ab62'
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Wed, 27 Jan 2016 19:48:09 +0000 (19:48 +0000)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Wed, 27 Jan 2016 19:48:09 +0000 (19:48 +0000)
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -633,8 -546,15 +640,15 @@@ enable_deep_weak()
      done
  }
  
+ request(){
+     for var; do
+         enable ${var}_requested
+     done
+     enable_deep $*
+ }
  enabled(){
 -    test "${1#!}" = "$1" && op== || op=!=
 +    test "${1#!}" = "$1" && op='=' || op=!=
      eval test "x\$${1#!}" $op "xyes"
  }
  
@@@ -2824,17 -2338,12 +2838,17 @@@ sctp_protocol_deps="struct_sctp_event_s
  sctp_protocol_select="network"
  srtp_protocol_select="rtp_protocol"
  tcp_protocol_select="network"
 -tls_gnutls_protocol_deps="gnutls"
 +tls_gnutls_protocol_deps="gnutls !tls_schannel_protocol !tls_securetransport_protocol"
  tls_gnutls_protocol_select="tcp_protocol"
 -tls_openssl_protocol_deps="openssl !tls_gnutls_protocol"
 +tls_openssl_protocol_deps="openssl !tls_schannel_protocol !tls_securetransport_protocol !tls_gnutls_protocol"
  tls_openssl_protocol_select="tcp_protocol"
 -tls_protocol_select_any="tls_gnutls_protocol tls_openssl_protocol"
 +tls_schannel_protocol_deps="schannel"
 +tls_schannel_protocol_select="tcp_protocol"
 +tls_securetransport_protocol_deps="securetransport"
 +tls_securetransport_protocol_select="tcp_protocol"
- tls_protocol_deps_any="tls_schannel_protocol tls_securetransport_protocol tls_gnutls_protocol tls_openssl_protocol"
++tls_protocol_select_any="tls_schannel_protocol tls_securetransport_protocol tls_gnutls_protocol tls_openssl_protocol"
  udp_protocol_select="network"
 +udplite_protocol_select="network"
  unix_protocol_deps="sys_un_h"
  unix_protocol_select="network"
  
@@@ -3214,12 -2605,11 +3222,12 @@@ for opt d
              disable $PROGRAM_LIST
          ;;
          --disable-everything)
-             map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
+             map 'eval disable \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
          ;;
          --disable-all)
-             map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
+             map 'eval disable \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
              disable $LIBRARY_LIST $PROGRAM_LIST doc
 +            enable avutil
          ;;
          --enable-random|--disable-random)
              action=${opt%%-random}
              is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
              eval list=\$$(toupper $thing)_LIST
              name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
 -            $action $(filter "$name" $list)
 -        ;;
 -        --enable-avserver|--disable-avserver*)
 -            warn "avserver has been removed, the ${opt} option is only"\
 -                 "provided for compatibility and will be removed in the future"
+             test $action = enable && action="request"
 +            list=$(filter "$name" $list)
 +            [ "$list" = "" ] && warn "Option $opt did not match anything"
 +            $action $list
          ;;
          --enable-?*|--disable-?*)
              eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
@@@ -3292,11 -2682,26 +3300,30 @@@ disable_components()
  
  map 'disable_components $v' $LIBRARY_LIST
  
 -echo "# $0 $LIBAV_CONFIGURATION" > $logfile
 +echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
++
+ # Mark components that had not been enabled/disabled explicitly
+ # as enabled
+ for n in $COMPONENT_LIST; do
+     v=$(toupper ${n%s})_LIST
+     eval enable_weak \$$v
+     eval ${n}_if_any="\$$v"
+ done
+ # Make so that disabled libraries are enabled if a component
+ # of them is requested
+ for n in $LIBRARY_LIST; do
+     v=$(toupper ${n})_COMPONENTS
+     eval ${n}_if_any="\$$v"
+ done
++echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
  set >> $logfile
  
 +test -n "$valgrind" && toolchain="valgrind-memcheck"
 +
  case "$toolchain" in
      clang-asan)
          cc_default="clang"