diff options
author | Måns Rullgård <mans@mansr.com> | 2006-07-11 19:54:59 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-07-11 19:54:59 +0000 |
commit | 3dc7174e9dbe0d12d84b6159e6733d3865ed53f5 (patch) | |
tree | 6baad4f25c07bd2645301e1cd173a045169e6657 /configure | |
parent | fce53524b94ac658e704314102015b8502d3c200 (diff) | |
download | ffmpeg-3dc7174e9dbe0d12d84b6159e6733d3865ed53f5.tar.gz |
simplify list processing
Originally committed as revision 5717 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -299,6 +299,12 @@ require(){ check_lib $header $func "$@" || die "ERROR: $name not found" } +filter_out(){ + pattern="$1" + shift + echo "$@" | sed "s%\\<$pattern\\>%%g" +} + if test x"$1" = x"-h" -o x"$1" = x"--help" ; then show_help fi @@ -817,9 +823,9 @@ for opt do ;; --enable-decoder=*) DECODER_LIST="$DECODER_LIST ${optval}_decoder" ;; - --disable-encoder=*) ENCODER_LIST="`echo $ENCODER_LIST | sed -e \"s#${optval}_encoder##\"`" + --disable-encoder=*) ENCODER_LIST="`filter_out ${optval}_encoder $ENCODER_LIST`" ;; - --disable-decoder=*) DECODER_LIST="`echo $DECODER_LIST | sed -e \"s#${optval}_decoder##\"`" + --disable-decoder=*) DECODER_LIST="`filter_out ${optval}_decoder $DECODER_LIST`" ;; --disable-encoders) ENCODER_LIST="" ;; @@ -827,19 +833,19 @@ for opt do ;; --enable-muxer=*) MUXER_LIST="$MUXER_LIST ${optval}_muxer" ;; - --disable-muxer=*) MUXER_LIST="`echo $MUXER_LIST | sed -e \"s#${opt#*=}_muxer##\"`" + --disable-muxer=*) MUXER_LIST="`filter_out ${optval}_muxer $MUXER_LIST`" ;; --disable-muxers) MUXER_LIST=""; ffserver="no" ;; --enable-demuxer=*) DEMUXER_LIST="$DEMUXER_LIST ${optval}_demuxer" ;; - --disable-demuxer=*) DEMUXER_LIST="`echo $DEMUXER_LIST | sed -e \"s#${optval}_demuxer##\"`" + --disable-demuxer=*) DEMUXER_LIST="`filter_out ${optval}_demuxer $DEMUXER_LIST`" ;; --disable-demuxers) DEMUXER_LIST="" ;; --enable-parser=*) PARSER_LIST="$PARSER_LIST ${optval}_parser" ;; - --disable-parser=*) PARSER_LIST="`echo $PARSER_LIST | sed -e \"s#${optval}_parser##\"`" + --disable-parser=*) PARSER_LIST="`filter_out ${optval}_parser $PARSER_LIST`" ;; --disable-parsers) PARSER_LIST="" ;; |