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 | |
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)
-rwxr-xr-x | configure.pl | 30 | ||||
-rw-r--r-- | src/hash/fork256/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/has160/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/md4/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/md5/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/mdx_hash/mdx_hash.cpp (renamed from src/mdx_hash.cpp) | 0 | ||||
-rw-r--r-- | src/hash/mdx_hash/mdx_hash.h (renamed from include/mdx_hash.h) | 0 | ||||
-rw-r--r-- | src/hash/rmd128/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/rmd160/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/sha1/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/sha1_sse2/modinfo.txt (renamed from src/asm/sha1_sse2/modinfo.txt) | 9 | ||||
-rw-r--r-- | src/hash/sha1_sse2/sha160.cpp (renamed from src/asm/sha1_sse2/sha160.cpp) | 0 | ||||
-rw-r--r-- | src/hash/sha1_sse2/sha160.h (renamed from src/asm/sha1_sse2/sha160.h) | 0 | ||||
-rw-r--r-- | src/hash/sha1_sse2/sha1_sse.cpp (renamed from src/asm/sha1_sse2/sha1core.cpp) | 0 | ||||
-rw-r--r-- | src/hash/sha2/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/tiger/modinfo.txt | 4 | ||||
-rw-r--r-- | src/hash/whirlpool/modinfo.txt | 4 |
17 files changed, 61 insertions, 18 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; } diff --git a/src/hash/fork256/modinfo.txt b/src/hash/fork256/modinfo.txt index 677834b63..ae0c9f1a4 100644 --- a/src/hash/fork256/modinfo.txt +++ b/src/hash/fork256/modinfo.txt @@ -8,3 +8,7 @@ load_on auto fork256.cpp fork256.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/has160/modinfo.txt b/src/hash/has160/modinfo.txt index 7574ba293..a945f3225 100644 --- a/src/hash/has160/modinfo.txt +++ b/src/hash/has160/modinfo.txt @@ -8,3 +8,7 @@ load_on auto has160.cpp has160.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/md4/modinfo.txt b/src/hash/md4/modinfo.txt index 6d32dbd90..fc9cbe116 100644 --- a/src/hash/md4/modinfo.txt +++ b/src/hash/md4/modinfo.txt @@ -8,3 +8,7 @@ load_on auto md4.cpp md4.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/md5/modinfo.txt b/src/hash/md5/modinfo.txt index fb17add4a..525a45ab5 100644 --- a/src/hash/md5/modinfo.txt +++ b/src/hash/md5/modinfo.txt @@ -8,3 +8,7 @@ load_on auto md5.cpp md5.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp index 96b885d87..96b885d87 100644 --- a/src/mdx_hash.cpp +++ b/src/hash/mdx_hash/mdx_hash.cpp diff --git a/include/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h index 84f92493b..84f92493b 100644 --- a/include/mdx_hash.h +++ b/src/hash/mdx_hash/mdx_hash.h diff --git a/src/hash/rmd128/modinfo.txt b/src/hash/rmd128/modinfo.txt index 9be80268b..402271da5 100644 --- a/src/hash/rmd128/modinfo.txt +++ b/src/hash/rmd128/modinfo.txt @@ -8,3 +8,7 @@ load_on auto rmd128.cpp rmd128.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/rmd160/modinfo.txt b/src/hash/rmd160/modinfo.txt index 11183b03e..af4b5c230 100644 --- a/src/hash/rmd160/modinfo.txt +++ b/src/hash/rmd160/modinfo.txt @@ -8,3 +8,7 @@ load_on auto rmd160.cpp rmd160.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/sha1/modinfo.txt b/src/hash/sha1/modinfo.txt index 38cea256c..a0ae30b4b 100644 --- a/src/hash/sha1/modinfo.txt +++ b/src/hash/sha1/modinfo.txt @@ -8,3 +8,7 @@ load_on auto sha160.cpp sha160.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/asm/sha1_sse2/modinfo.txt b/src/hash/sha1_sse2/modinfo.txt index e1805260c..58d1851b0 100644 --- a/src/asm/sha1_sse2/modinfo.txt +++ b/src/hash/sha1_sse2/modinfo.txt @@ -1,14 +1,11 @@ -realname "SSE2 implementation of SHA-1" +realname "SHA-1 (SSE2)" load_on request -<replace> +<add> sha160.cpp sha160.h -</replace> - -<add> -sha1core.cpp +sha1_sse.cpp </add> <arch> diff --git a/src/asm/sha1_sse2/sha160.cpp b/src/hash/sha1_sse2/sha160.cpp index dfb5fdfe5..dfb5fdfe5 100644 --- a/src/asm/sha1_sse2/sha160.cpp +++ b/src/hash/sha1_sse2/sha160.cpp diff --git a/src/asm/sha1_sse2/sha160.h b/src/hash/sha1_sse2/sha160.h index c6f8482cf..c6f8482cf 100644 --- a/src/asm/sha1_sse2/sha160.h +++ b/src/hash/sha1_sse2/sha160.h diff --git a/src/asm/sha1_sse2/sha1core.cpp b/src/hash/sha1_sse2/sha1_sse.cpp index 23dbfc5e2..23dbfc5e2 100644 --- a/src/asm/sha1_sse2/sha1core.cpp +++ b/src/hash/sha1_sse2/sha1_sse.cpp diff --git a/src/hash/sha2/modinfo.txt b/src/hash/sha2/modinfo.txt index c7dc29fac..71df4510b 100644 --- a/src/hash/sha2/modinfo.txt +++ b/src/hash/sha2/modinfo.txt @@ -10,3 +10,7 @@ sha256.h sha_64.cpp sha_64.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/tiger/modinfo.txt b/src/hash/tiger/modinfo.txt index e117d6701..7d4cd7177 100644 --- a/src/hash/tiger/modinfo.txt +++ b/src/hash/tiger/modinfo.txt @@ -9,3 +9,7 @@ tig_tab.cpp tiger.cpp tiger.h </add> + +<requires> +mdx_hash +</requires> diff --git a/src/hash/whirlpool/modinfo.txt b/src/hash/whirlpool/modinfo.txt index 9d069efee..be55b5c3b 100644 --- a/src/hash/whirlpool/modinfo.txt +++ b/src/hash/whirlpool/modinfo.txt @@ -9,3 +9,7 @@ whrl_tab.cpp whrlpool.cpp whrlpool.h </add> + +<requires> +mdx_hash +</requires> |