summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-08-20 21:35:51 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-08-20 21:35:51 +0000
commit4a0d6686fd670ae1b6001ef1b1971c6ea557487b (patch)
tree02faa4d4541d75e3ce61e4b9781d028861904b10 /configure
parent1f794d69c0fc46670a39f13606ed58b31f95a1a1 (diff)
ensure configure only accept valid --list-* parameters
closes issue72 Originally committed as revision 10153 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 23 insertions, 9 deletions
diff --git a/configure b/configure
index 8af75e3521..c86c14af43 100755
--- a/configure
+++ b/configure
@@ -291,6 +291,15 @@ disabled_any(){
done
}
+is_in(){
+ value=$1
+ shift
+ for var in $*; do
+ [ $var = $value ] && return 0
+ done
+ return 1
+}
+
check_deps(){
for cfg; do
enabled ${cfg}_checking && die "Circular dependency for $cfg."
@@ -567,18 +576,25 @@ apply(){
"$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
}
-CONFIG_LIST='
+COMPONENT_LIST="
+ bsfs
+ decoders
+ demuxers
+ encoders
+ muxers
+ parsers
+ protocols
+"
+
+CONFIG_LIST="
+ $COMPONENT_LIST
audio_beos
audio_oss
avisynth
beos_netserver
bktr
- bsfs
dc1394
- decoders
- demuxers
dv1394
- encoders
ffmpeg
ffplay
ffserver
@@ -604,12 +620,9 @@ CONFIG_LIST='
libxvid
memalign_hack
mpegaudio_hp
- muxers
network
- parsers
powerpc_perf
pp
- protocols
small
swscaler
vhook
@@ -617,7 +630,7 @@ CONFIG_LIST='
v4l2
x11grab
zlib
-'
+"
THREADS_LIST='
beosthreads
@@ -995,6 +1008,7 @@ for opt do
;;
--list-*)
NAME="${opt#--list-}"
+ is_in $NAME $COMPONENT_LIST || die_unknown $opt
NAME=$(toupper ${NAME%s})
eval show_list \$${NAME}_LIST
;;