Commit a6cbf9d7 authored by mru's avatar mru

configure: allow wildcards in --enable/disable-thing=name

The name can now be a standard shell pattern.  For example,
--disable-encoder=* disables all encoders.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19603 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9025b25c
...@@ -290,6 +290,14 @@ sh_quote(){ ...@@ -290,6 +290,14 @@ sh_quote(){
echo "$v" echo "$v"
} }
filter(){
pat=$1
shift
for v; do
case "$v" in $pat) echo "$v" ;; esac
done
}
set_all(){ set_all(){
value=$1 value=$1
shift shift
...@@ -1383,10 +1391,9 @@ for opt do ...@@ -1383,10 +1391,9 @@ for opt do
;; ;;
--enable-*=*|--disable-*=*) --enable-*=*|--disable-*=*)
eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/') eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
case "$thing" in is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
encoder|decoder|hwaccel|muxer|demuxer|indev|outdev|parser|bsf|protocol|filter) $action ${optval}_${thing} ;; eval list=\$$(toupper $thing)_LIST
*) die_unknown "$opt" ;; $action $(filter "${optval}_${thing}" $list)
esac
;; ;;
--enable-?*|--disable-?*) --enable-?*|--disable-?*)
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g') eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment