Commit cba598d3 authored by mru's avatar mru

configure: add enable_weak and disable_weak

These functions enable/disable their options if these are unset,
leaving their old values otherwise.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15689 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 196ae25f
...@@ -250,6 +250,14 @@ set_all(){ ...@@ -250,6 +250,14 @@ set_all(){
done done
} }
set_weak(){
value=$1
shift
for var; do
eval : \${$var:=$value}
done
}
pushvar(){ pushvar(){
for var in $*; do for var in $*; do
eval level=\${${var}_level:=0} eval level=\${${var}_level:=0}
...@@ -277,6 +285,14 @@ disable(){ ...@@ -277,6 +285,14 @@ disable(){
set_all no $* set_all no $*
} }
enable_weak(){
set_weak yes $*
}
disable_weak(){
set_weak no $*
}
do_enable_deep(){ do_enable_deep(){
for var; do for var; do
enabled $var && continue enabled $var && continue
...@@ -292,6 +308,11 @@ enable_deep(){ ...@@ -292,6 +308,11 @@ enable_deep(){
enable $* enable $*
} }
enable_deep_weak(){
do_enable_deep $*
enable_weak $*
}
enabled(){ enabled(){
test "${1#!}" = "$1" && op== || op=!= test "${1#!}" = "$1" && op== || op=!=
eval test "x\$${1#!}" $op "xyes" eval test "x\$${1#!}" $op "xyes"
......
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