diff options
Diffstat (limited to 'configure.pl')
-rwxr-xr-x | configure.pl | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/configure.pl b/configure.pl index a20125391..200f6683c 100755 --- a/configure.pl +++ b/configure.pl @@ -417,15 +417,12 @@ sub autoload_modules { my $asm_ok = $$config{'asm_ok'}; - foreach my $mod (sort keys %MODULES) { + MOD: foreach my $mod (sort keys %MODULES) { my %modinfo = %{ $MODULES{$mod} }; - trace("Loading $mod"); - my $realname = $modinfo{'realname'}; if(defined($$config{'modules'}{$mod})) { - my $n = $$config{'modules'}{$mod}; if($n < 0) { @@ -438,6 +435,23 @@ sub autoload_modules { } } + foreach my $req_mod (@{$modinfo{'requires'}}) { + if(defined($$config{'modules'}{$req_mod})) { + if($$config{'modules'}{$req_mod} < 0) { + autoconfig("Disabling $mod since required module " . + "$req_mod is disabled"); + + $$config{'modules'}{$mod} = -1; + next MOD; + } + + } else { + autoconfig("Enabling module $req_mod - required by $mod"); + $$config{'modules'}{$req_mod} = 1; + load_module($config, $req_mod); + } + } + my @arch_list = @{ $modinfo{'arch'} }; if(scalar @arch_list > 0 && !in_array($arch, \@arch_list) && @@ -997,14 +1011,6 @@ sub load_modules { load_module($config, $mod); - foreach my $req_mod (@{$MODULES{$mod}{'requires'}}) { - unless(defined($$config{'modules'}{$req_mod})) { - autoconfig("Module $req_mod - required by $mod"); - $$config{'modules'}{$req_mod} = 1; - load_module($config, $req_mod); - } - } - push @mod_names, $mod; } |