diff options
author | lloyd <[email protected]> | 2008-09-28 19:58:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 19:58:49 +0000 |
commit | fde29acbeb656bcffe13b91f08f847eee4509670 (patch) | |
tree | a1b1cc959ce2cbc4150ae563146ae2a6252b9436 /configure.pl | |
parent | 9bcfe627321ddc81691b835dffaa6324ac4684a4 (diff) |
Make mdx_hash also a module, which most of the hash functions depend on.
Correct the configure program so modules are not autoloaded if their
dependences are not available. (Eg, --no-module=mdx_hash will disable
MD4, MD5, SHA-1, etc rather than cause a compliation failure)
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; } |