These functions enable/disable their options if these are unset,
leaving their old values otherwise.
Originally committed as revision 15689 to svn://svn.ffmpeg.org/ffmpeg/trunk
done
}
+set_weak(){
+ value=$1
+ shift
+ for var; do
+ eval : \${$var:=$value}
+ done
+}
+
pushvar(){
for var in $*; do
eval level=\${${var}_level:=0}
set_all no $*
}
+enable_weak(){
+ set_weak yes $*
+}
+
+disable_weak(){
+ set_weak no $*
+}
+
do_enable_deep(){
for var; do
enabled $var && continue
enable $*
}
+enable_deep_weak(){
+ do_enable_deep $*
+ enable_weak $*
+}
+
enabled(){
test "${1#!}" = "$1" && op== || op=!=
eval test "x\$${1#!}" $op "xyes"