aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-10-24 23:18:08 +0000
committerMåns Rullgård <mans@mansr.com>2008-10-24 23:18:08 +0000
commit72a436687c1915d1e9cb22edb4e869e556ee0899 (patch)
tree983a6eb1a0c8779ebd707733208d151644d9439a
parentf9d328da8f071849395ec4be48bc0d6f1803f749 (diff)
downloadffmpeg-72a436687c1915d1e9cb22edb4e869e556ee0899.tar.gz
configure: add enable_weak and disable_weak
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
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index 542c9a7949..5c7315b9c0 100755
--- a/configure
+++ b/configure
@@ -250,6 +250,14 @@ set_all(){
done
}
+set_weak(){
+ value=$1
+ shift
+ for var; do
+ eval : \${$var:=$value}
+ done
+}
+
pushvar(){
for var in $*; do
eval level=\${${var}_level:=0}
@@ -277,6 +285,14 @@ disable(){
set_all no $*
}
+enable_weak(){
+ set_weak yes $*
+}
+
+disable_weak(){
+ set_weak no $*
+}
+
do_enable_deep(){
for var; do
enabled $var && continue
@@ -292,6 +308,11 @@ enable_deep(){
enable $*
}
+enable_deep_weak(){
+ do_enable_deep $*
+ enable_weak $*
+}
+
enabled(){
test "${1#!}" = "$1" && op== || op=!=
eval test "x\$${1#!}" $op "xyes"