aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-08-06 15:45:22 +0000
committerMåns Rullgård <mans@mansr.com>2009-08-06 15:45:22 +0000
commitbe8f2501ddad926653553bda8c8e6f062c4d1de2 (patch)
tree04f4b3d075f6c72051d7a936ab63e5660188ad61
parentd22c13a8df238d9215d0adb8d47b1e458513aa93 (diff)
downloadffmpeg-be8f2501ddad926653553bda8c8e6f062c4d1de2.tar.gz
configure: allow wildcards in --enable/disable-thing=name
The name can now be a standard shell pattern. For example, --disable-encoder=* disables all encoders. Originally committed as revision 19603 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure b/configure
index f26c0adede..035d938c79 100755
--- a/configure
+++ b/configure
@@ -290,6 +290,14 @@ sh_quote(){
echo "$v"
}
+filter(){
+ pat=$1
+ shift
+ for v; do
+ case "$v" in $pat) echo "$v" ;; esac
+ done
+}
+
set_all(){
value=$1
shift
@@ -1383,10 +1391,9 @@ for opt do
;;
--enable-*=*|--disable-*=*)
eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
- case "$thing" in
- encoder|decoder|hwaccel|muxer|demuxer|indev|outdev|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
- *) die_unknown "$opt" ;;
- esac
+ is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
+ eval list=\$$(toupper $thing)_LIST
+ $action $(filter "${optval}_${thing}" $list)
;;
--enable-?*|--disable-?*)
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')