diff options
author | lloyd <[email protected]> | 2007-03-12 01:12:25 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-03-12 01:12:25 +0000 |
commit | cc8247386812fe1f0f1af9b81121dfe2798f0488 (patch) | |
tree | 14f002718595883029b538a3f54a95340d413b27 | |
parent | 1a1c59035e6aff9f8e41a87909154cc18717c47d (diff) |
Provide a more flexible mechanism for specifying which modules are loaded.
Now three classes are defined: 'request', 'auto', and 'asm_ok'. The 'auto'
class is loaded automatically if the platform support matches up with
what we are building for (this is the former default). The 'request' mode
means it is only loaded if specifically requested by name. The 'asm_ok'
module is marked for all modules that use any assembler (including inline
assembler). This normally functions like 'auto', unless --debug is passed
to configure, in which case it is treated as 'request'.
Modules which do not specify a load behavior are given a default of
'request'.
28 files changed, 64 insertions, 22 deletions
diff --git a/configure.pl b/configure.pl index 81f5b9166..7f741fe21 100755 --- a/configure.pl +++ b/configure.pl @@ -1120,14 +1120,14 @@ sub get_module_info { my %info; $info{'name'} = $name; - $info{'external_libs'} = 0; + $info{'load_on'} = 'requeste'; # default unless specified $info{'libs'} = {}; while($_ = &$reader()) { match_any_of($_, \%info, 'quoted', 'realname:note'); match_any_of($_, \%info, 'unquoted', 'define:mp_bits'); - $info{'external_libs'} = 1 if(/^uses_external_libs/); + $info{'load_on'} = $1 if(/^load_on: (.*)$/); read_list($_, $reader, 'arch', list_push(\@{$info{'arch'}})); read_list($_, $reader, 'cc', list_push(\@{$info{'cc'}})); @@ -1278,13 +1278,15 @@ sub guess_mods { my $arch = $$config{'arch'}; my $submodel = $$config{'submodel'}; + my $asm_ok = ($$config{'debug'} == 0); + my @usable_modules; foreach my $mod (sort keys %MODULES) { my %modinfo = %{ $MODULES{$mod} }; - # If it uses external libs, the user has to request it specifically - next if($modinfo{'external_libs'}); + next if($modinfo{'load_on'} eq 'request'); + next if(!$asm_ok and $modinfo{'load_on'} eq 'asm_ok'); my @cc_list = @{ $modinfo{'cc'} }; next if(scalar @cc_list > 0 && !in_array($cc, \@cc_list)); diff --git a/modules/alg_amd64/modinfo.txt b/modules/alg_amd64/modinfo.txt index 0c5296745..04ee56d19 100644 --- a/modules/alg_amd64/modinfo.txt +++ b/modules/alg_amd64/modinfo.txt @@ -2,13 +2,17 @@ realname "Algorithm x86-64 Assembler" mp_bits 64 +load_on: asm_ok + <ignore> mp_mulop.cpp +sha160.cpp </ignore> <add> asm_macr.h mp_mulop.S +sha1core.S </add> <arch> diff --git a/modules/alg_ia32/modinfo.txt b/modules/alg_ia32/modinfo.txt index 2b1386895..fdd955d11 100644 --- a/modules/alg_ia32/modinfo.txt +++ b/modules/alg_ia32/modinfo.txt @@ -2,6 +2,8 @@ realname "Algorithm x86 Assembler" mp_bits 32 +load_on: asm_ok + <replace> md4.cpp md5.cpp diff --git a/modules/alloc_mmap/modinfo.txt b/modules/alloc_mmap/modinfo.txt index a6e79d61f..6426bdf24 100644 --- a/modules/alloc_mmap/modinfo.txt +++ b/modules/alloc_mmap/modinfo.txt @@ -2,6 +2,8 @@ realname "Disk Based Allocation System" define ALLOC_MMAP +load_on: auto + <add> mmap_mem.cpp mmap_mem.h diff --git a/modules/comp_bzip2/modinfo.txt b/modules/comp_bzip2/modinfo.txt index 3109f290c..92ffb2085 100644 --- a/modules/comp_bzip2/modinfo.txt +++ b/modules/comp_bzip2/modinfo.txt @@ -1,11 +1,11 @@ # This module was written by Peter J. Jones -uses_external_libs - realname "Bzip2 Compressor" define COMPRESSOR_BZIP2 +load_on: request + <add> bzip2.h bzip2.cpp diff --git a/modules/comp_zlib/modinfo.txt b/modules/comp_zlib/modinfo.txt index 82622eb2f..1687ad312 100644 --- a/modules/comp_zlib/modinfo.txt +++ b/modules/comp_zlib/modinfo.txt @@ -1,11 +1,11 @@ realname "Zlib Compressor" #realname "Zlib/Gzip Compressor" -uses_external_libs - define COMPRESSOR_ZLIB #define COMPRESSOR_ZLIB,COMPRESSOR_GZIP +load_on: request + <add> zlib.h zlib.cpp diff --git a/modules/eng_aep/modinfo.txt b/modules/eng_aep/modinfo.txt index 577d7a52f..1ffdb81d5 100644 --- a/modules/eng_aep/modinfo.txt +++ b/modules/eng_aep/modinfo.txt @@ -1,6 +1,8 @@ realname "AEP Engine" -uses_external_libs +define ENGINE_AEP,ENTROPY_SRC_AEP + +load_on: request <add> eng_aep.cpp @@ -12,8 +14,6 @@ hw_aep.h aep_conn.h </add> -define ENGINE_AEP,ENTROPY_SRC_AEP - <libs> all -> aep </libs> diff --git a/modules/eng_gmp/modinfo.txt b/modules/eng_gmp/modinfo.txt index b8a709fa1..bc44986de 100644 --- a/modules/eng_gmp/modinfo.txt +++ b/modules/eng_gmp/modinfo.txt @@ -1,6 +1,8 @@ realname "GMP Engine" -uses_external_libs +define ENGINE_GNU_MP + +load_on: request <add> eng_gmp.cpp @@ -11,8 +13,6 @@ eng_gmp.h gmp_wrap.h </add> -define ENGINE_GNU_MP - <libs> all -> gmp </libs> diff --git a/modules/eng_ossl/modinfo.txt b/modules/eng_ossl/modinfo.txt index facad8a72..3378a9158 100644 --- a/modules/eng_ossl/modinfo.txt +++ b/modules/eng_ossl/modinfo.txt @@ -1,6 +1,8 @@ realname "OpenSSL Engine" -uses_external_libs +define ENGINE_OPENSSL + +load_on: request <add> eng_ossl.cpp @@ -13,8 +15,6 @@ eng_ossl.h bn_wrap.h </add> -define ENGINE_OPENSSL - <libs> all -> crypto </libs> diff --git a/modules/es_beos/modinfo.txt b/modules/es_beos/modinfo.txt index 7587a8b14..292f7832d 100644 --- a/modules/es_beos/modinfo.txt +++ b/modules/es_beos/modinfo.txt @@ -2,6 +2,8 @@ realname "BeOS Entropy Source" define ENTROPY_SRC_BEOS +load_on: auto + <add> es_beos.h es_beos.cpp diff --git a/modules/es_capi/modinfo.txt b/modules/es_capi/modinfo.txt index fb9c37744..8a0f3041c 100644 --- a/modules/es_capi/modinfo.txt +++ b/modules/es_capi/modinfo.txt @@ -2,6 +2,8 @@ realname "Win32 CryptoAPI Entropy Source" define ENTROPY_SRC_CAPI +load_on: auto + <add> es_capi.h es_capi.cpp diff --git a/modules/es_egd/modinfo.txt b/modules/es_egd/modinfo.txt index 1df29117d..06261862c 100644 --- a/modules/es_egd/modinfo.txt +++ b/modules/es_egd/modinfo.txt @@ -2,6 +2,8 @@ realname "EGD Entropy Source" define ENTROPY_SRC_EGD +load_on: auto + <add> es_egd.h es_egd.cpp diff --git a/modules/es_ftw/modinfo.txt b/modules/es_ftw/modinfo.txt index 49364a963..d3e93db69 100644 --- a/modules/es_ftw/modinfo.txt +++ b/modules/es_ftw/modinfo.txt @@ -2,6 +2,8 @@ realname "File Tree Walking Entropy Source" define ENTROPY_SRC_FTW +load_on: auto + <add> es_ftw.h es_ftw.cpp diff --git a/modules/es_unix/modinfo.txt b/modules/es_unix/modinfo.txt index a728a6df1..ccb499b82 100644 --- a/modules/es_unix/modinfo.txt +++ b/modules/es_unix/modinfo.txt @@ -2,6 +2,8 @@ realname "Generic Unix Entropy Source" define ENTROPY_SRC_UNIX +load_on: auto + <add> es_unix.cpp unix_src.cpp diff --git a/modules/es_win32/modinfo.txt b/modules/es_win32/modinfo.txt index 9bb27a03a..cc8a525bc 100644 --- a/modules/es_win32/modinfo.txt +++ b/modules/es_win32/modinfo.txt @@ -5,6 +5,8 @@ realname "Win32 Entropy Source" define ENTROPY_SRC_WIN32 +load_on: auto + <add> es_win32.h es_win32.cpp diff --git a/modules/fd_unix/modinfo.txt b/modules/fd_unix/modinfo.txt index 8841fa7b5..c659f5377 100644 --- a/modules/fd_unix/modinfo.txt +++ b/modules/fd_unix/modinfo.txt @@ -2,6 +2,8 @@ realname "Unix I/O support for Pipe" define PIPE_UNIXFD_IO +load_on: auto + <add> fd_unix.h fd_unix.cpp diff --git a/modules/ml_unix/modinfo.txt b/modules/ml_unix/modinfo.txt index c7f8945bb..b25468586 100644 --- a/modules/ml_unix/modinfo.txt +++ b/modules/ml_unix/modinfo.txt @@ -1,5 +1,7 @@ realname "Memory Locking for Unix" +load_on: auto + <replace> mlock.cpp </replace> diff --git a/modules/ml_win32/modinfo.txt b/modules/ml_win32/modinfo.txt index db72b510b..e886c758f 100644 --- a/modules/ml_win32/modinfo.txt +++ b/modules/ml_win32/modinfo.txt @@ -1,5 +1,7 @@ realname "Memory Locking for Win32" +load_on: auto + <replace> mlock.cpp </replace> diff --git a/modules/mp_amd64/modinfo.txt b/modules/mp_amd64/modinfo.txt index 2ff4d771d..0e24da0d9 100644 --- a/modules/mp_amd64/modinfo.txt +++ b/modules/mp_amd64/modinfo.txt @@ -2,6 +2,8 @@ realname "MPI Assembler Backend for x86-64/AMD64 Systems" mp_bits 64 +load_on: asm_ok + <replace> mp_asm.h mp_asmi.h diff --git a/modules/mp_asm64/modinfo.txt b/modules/mp_asm64/modinfo.txt index 469a20634..256a439d3 100644 --- a/modules/mp_asm64/modinfo.txt +++ b/modules/mp_asm64/modinfo.txt @@ -2,6 +2,8 @@ realname "MPI Assembler Backend for 64 bit Systems" mp_bits 64 +load_on: asm_ok + <replace> mp_asm.h </replace> diff --git a/modules/mp_ia32/modinfo.txt b/modules/mp_ia32/modinfo.txt index 2c23efb03..805fb656f 100644 --- a/modules/mp_ia32/modinfo.txt +++ b/modules/mp_ia32/modinfo.txt @@ -2,6 +2,8 @@ realname "MPI Assembler Backend for x86 Systems" mp_bits 32 +load_on: asm_ok + <replace> mp_asm.h mp_asmi.h diff --git a/modules/mux_pthr/modinfo.txt b/modules/mux_pthr/modinfo.txt index 6d3e157d9..f14137dd5 100644 --- a/modules/mux_pthr/modinfo.txt +++ b/modules/mux_pthr/modinfo.txt @@ -2,6 +2,8 @@ realname "Pthread Mutex" define MUTEX_PTHREAD +load_on: auto + <add> mux_pthr.cpp mux_pthr.h diff --git a/modules/mux_qt/modinfo.txt b/modules/mux_qt/modinfo.txt index f895464d9..32094eaf4 100644 --- a/modules/mux_qt/modinfo.txt +++ b/modules/mux_qt/modinfo.txt @@ -4,11 +4,7 @@ define MUTEX_QT note "You'll probably have to add -I/-L flags to the Makefile to find Qt" -<replace> -types.h -</replace> - -uses_external_libs +load_on: request <add> mux_qt.cpp diff --git a/modules/mux_win32/modinfo.txt b/modules/mux_win32/modinfo.txt index a88036419..320d21b5b 100644 --- a/modules/mux_win32/modinfo.txt +++ b/modules/mux_win32/modinfo.txt @@ -2,6 +2,8 @@ realname "Win32 Mutex" define MUTEX_WIN32 +load_on: auto + <add> mux_win32.cpp mux_win32.h diff --git a/modules/tm_hard/modinfo.txt b/modules/tm_hard/modinfo.txt index 788eb85ff..35f13dd91 100644 --- a/modules/tm_hard/modinfo.txt +++ b/modules/tm_hard/modinfo.txt @@ -2,6 +2,8 @@ realname "Hardware Timer" define TIMER_HARDWARE +load_on: asm_ok + <add> tm_hard.cpp tm_hard.h diff --git a/modules/tm_posix/modinfo.txt b/modules/tm_posix/modinfo.txt index f01d25094..b6c1d6916 100644 --- a/modules/tm_posix/modinfo.txt +++ b/modules/tm_posix/modinfo.txt @@ -2,6 +2,8 @@ realname "POSIX Timer" define TIMER_POSIX +load_on: auto + <add> tm_posix.cpp tm_posix.h diff --git a/modules/tm_unix/modinfo.txt b/modules/tm_unix/modinfo.txt index 73f3fae22..405e341c4 100644 --- a/modules/tm_unix/modinfo.txt +++ b/modules/tm_unix/modinfo.txt @@ -2,6 +2,8 @@ realname "Unix Timer" define TIMER_UNIX +load_on: auto + <add> tm_unix.cpp tm_unix.h diff --git a/modules/tm_win32/modinfo.txt b/modules/tm_win32/modinfo.txt index 27d43c4ef..cc5f06197 100644 --- a/modules/tm_win32/modinfo.txt +++ b/modules/tm_win32/modinfo.txt @@ -2,6 +2,8 @@ realname "Win32 Timer" define TIMER_WIN32 +load_on: auto + <add> tm_win32.cpp tm_win32.h |