configure: Don't do enable_deep_weak on disabled variables
authorMartin Storsjö <martin@martin.st>
Wed, 3 Apr 2013 12:55:14 +0000 (15:55 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 2 May 2013 19:31:57 +0000 (22:31 +0300)
This avoids cases where configure tries to weakly enable an item
which actually is disabled, ending up still enabling dependencies
of the item which itself is only enabled weakly.

More concretely, the h264 decoder suggests error resilience, which
is then enabled weakly (unless manually disabled). Previously,
dsputil, which is a dependency of error resilience, was enabled
even if error resilience wasn't enabled in the end.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure

index f280928..fd47e53 100755 (executable)
--- a/configure
+++ b/configure
@@ -489,8 +489,13 @@ enable_deep(){
 }
 
 enable_deep_weak(){
-    do_enable_deep $*
-    enable_weak $*
+    for var; do
+        disabled $var && continue
+        pushvar var
+        do_enable_deep $var
+        popvar var
+        enable_weak $var
+    done
 }
 
 enabled(){