Commit f372f9b4 authored by aurel's avatar aurel

ensure configure only accept valid --list-* parameters

closes issue72


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10153 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 547a5cf7
...@@ -291,6 +291,15 @@ disabled_any(){ ...@@ -291,6 +291,15 @@ disabled_any(){
done done
} }
is_in(){
value=$1
shift
for var in $*; do
[ $var = $value ] && return 0
done
return 1
}
check_deps(){ check_deps(){
for cfg; do for cfg; do
enabled ${cfg}_checking && die "Circular dependency for $cfg." enabled ${cfg}_checking && die "Circular dependency for $cfg."
...@@ -567,18 +576,25 @@ apply(){ ...@@ -567,18 +576,25 @@ apply(){
"$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp" "$@" < "$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_beos
audio_oss audio_oss
avisynth avisynth
beos_netserver beos_netserver
bktr bktr
bsfs
dc1394 dc1394
decoders
demuxers
dv1394 dv1394
encoders
ffmpeg ffmpeg
ffplay ffplay
ffserver ffserver
...@@ -604,12 +620,9 @@ CONFIG_LIST=' ...@@ -604,12 +620,9 @@ CONFIG_LIST='
libxvid libxvid
memalign_hack memalign_hack
mpegaudio_hp mpegaudio_hp
muxers
network network
parsers
powerpc_perf powerpc_perf
pp pp
protocols
small small
swscaler swscaler
vhook vhook
...@@ -617,7 +630,7 @@ CONFIG_LIST=' ...@@ -617,7 +630,7 @@ CONFIG_LIST='
v4l2 v4l2
x11grab x11grab
zlib zlib
' "
THREADS_LIST=' THREADS_LIST='
beosthreads beosthreads
...@@ -995,6 +1008,7 @@ for opt do ...@@ -995,6 +1008,7 @@ for opt do
;; ;;
--list-*) --list-*)
NAME="${opt#--list-}" NAME="${opt#--list-}"
is_in $NAME $COMPONENT_LIST || die_unknown $opt
NAME=$(toupper ${NAME%s}) NAME=$(toupper ${NAME%s})
eval show_list \$${NAME}_LIST eval show_list \$${NAME}_LIST
;; ;;
......
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