Commit d4f8cecc authored by Mans Rullgard's avatar Mans Rullgard

configure: fix automatic processing of _extralibs in check_deps

This fixes the automatic use of $foo_extralibs when feature foo
is enabled indirectly through a _select or _suggest.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 774e6fc9
...@@ -535,12 +535,13 @@ is_in(){ ...@@ -535,12 +535,13 @@ is_in(){
return 1 return 1
} }
check_deps(){ do_check_deps(){
for cfg; do for cfg; do
cfg="${cfg#!}" cfg="${cfg#!}"
enabled ${cfg}_checking && die "Circular dependency for $cfg." enabled ${cfg}_checking && die "Circular dependency for $cfg."
disabled ${cfg}_checking && continue disabled ${cfg}_checking && continue
enable ${cfg}_checking enable ${cfg}_checking
append allopts $cfg
eval dep_all="\$${cfg}_deps" eval dep_all="\$${cfg}_deps"
eval dep_any="\$${cfg}_deps_any" eval dep_any="\$${cfg}_deps_any"
...@@ -550,7 +551,7 @@ check_deps(){ ...@@ -550,7 +551,7 @@ check_deps(){
eval dep_ifn="\$${cfg}_if_any" eval dep_ifn="\$${cfg}_if_any"
pushvar cfg dep_all dep_any dep_sel dep_sgs dep_ifa dep_ifn pushvar cfg dep_all dep_any dep_sel dep_sgs dep_ifa dep_ifn
check_deps $dep_all $dep_any $dep_sel $dep_sgs $dep_ifa $dep_ifn do_check_deps $dep_all $dep_any $dep_sel $dep_sgs $dep_ifa $dep_ifn
popvar cfg dep_all dep_any dep_sel dep_sgs dep_ifa dep_ifn popvar cfg dep_all dep_any dep_sel dep_sgs dep_ifa dep_ifn
[ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; } [ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; }
...@@ -560,8 +561,6 @@ check_deps(){ ...@@ -560,8 +561,6 @@ check_deps(){
disabled_any $dep_sel && disable $cfg disabled_any $dep_sel && disable $cfg
if enabled $cfg; then if enabled $cfg; then
eval dep_extralibs="\$${cfg}_extralibs"
test -n "$dep_extralibs" && add_extralibs $dep_extralibs
enable_deep $dep_sel enable_deep $dep_sel
enable_deep_weak $dep_sgs enable_deep_weak $dep_sgs
fi fi
...@@ -570,6 +569,18 @@ check_deps(){ ...@@ -570,6 +569,18 @@ check_deps(){
done done
} }
check_deps(){
unset allopts
do_check_deps "$@"
for cfg in $allopts; do
enabled $cfg || continue
eval dep_extralibs="\$${cfg}_extralibs"
test -n "$dep_extralibs" && add_extralibs $dep_extralibs
done
}
print_config(){ print_config(){
pfx=$1 pfx=$1
files=$2 files=$2
......
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