diff options
author | lloyd <[email protected]> | 2009-09-04 15:37:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-09-04 15:37:39 +0000 |
commit | c184cd88ab53a8e2c343be0ab3a8517a964789e7 (patch) | |
tree | d6482cb99346e1d14a2181769b59f2b9daad489c | |
parent | 53f3baadaaf6e2475f3e98943ea3e835579715df (diff) |
Add a new option --no-autoload to configure.py. This will produce a minimal
build (only libstate, utils, plus dependencies), which can be extended with
use of --enable-modules.
To add new modules to the set of always-loaded, use 'load_on always' in info.txt
Also fix a few small build problems that popped up when doing a minimal build.
Requested by a user.
-rw-r--r-- | checks/pk_bench.cpp | 2 | ||||
-rwxr-xr-x | configure.pl | 1 | ||||
-rwxr-xr-x | configure.py | 20 | ||||
-rw-r--r-- | doc/log.txt | 2 | ||||
-rw-r--r-- | src/libstate/info.txt | 2 | ||||
-rw-r--r-- | src/libstate/pk_engine.h | 1 | ||||
-rw-r--r-- | src/utils/info.txt | 2 |
7 files changed, 26 insertions, 4 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp index a944934fb..88a72afde 100644 --- a/checks/pk_bench.cpp +++ b/checks/pk_bench.cpp @@ -675,6 +675,8 @@ void bench_pk(RandomNumberGenerator& rng, benchmark_dsa_nr<NR_PrivateKey>(rng, seconds, report); #endif +#if defined(BOTAN_HAS_RW) if(algo == "All" || algo == "RW") benchmark_rw(rng, seconds, report); +#endif } diff --git a/configure.pl b/configure.pl index 592eb2bff..6cf43e5e6 100755 --- a/configure.pl +++ b/configure.pl @@ -520,6 +520,7 @@ sub scan_modules { next unless(module_runs_on($config, \%modinfo, $mod, 0)); if($modinfo{'load_on'} eq 'auto' or + $modinfo{'load_on'} eq 'always' or ($modinfo{'load_on'} eq 'asm_ok' and $$config{'asm_ok'})) { my %maybe_load = (); diff --git a/configure.py b/configure.py index d1bd46cb5..d2fd1535f 100755 --- a/configure.py +++ b/configure.py @@ -164,6 +164,8 @@ def process_command_line(args): mods_group.add_option('--disable-modules', dest='disabled_modules', metavar='MODS', action='append', default=[], help='disable specific modules') + mods_group.add_option('--no-autoload', action='store_true', default=False, + help='disable automatic loading') for mod in ['openssl', 'gnump', 'bzip2', 'zlib']: @@ -799,10 +801,22 @@ def choose_modules_to_use(options, modules): cannot_use_because(modname, 'loaded on request only') elif module.load_on == 'dep': maybe_dep.append(modname) - elif module.load_on in ['auto', 'asm_ok']: - if module.load_on == 'asm_ok' and not options.asm_ok: + + elif module.load_on == 'always': + to_load.append(modname) + + elif module.load_on == 'asm_ok': + if options.asm_ok: + if options.no_autoload: + maybe_dep.append(modname) + else: + to_load.append(modname) + else: cannot_use_because(modname, 'uses assembly and --disable-asm set') + elif module.load_on == 'auto': + if options.no_autoload: + maybe_dep.append(modname) else: to_load.append(modname) else: @@ -847,6 +861,8 @@ def choose_modules_to_use(options, modules): logging.info('Skipping mod because %s - %s' % ( reason, ' '.join(disabled_mods))) + logging.info('Loading modules %s', ' '.join(sorted(to_load))) + return [modules[mod] for mod in to_load] """ diff --git a/doc/log.txt b/doc/log.txt index faba96814..a8627429c 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -1,5 +1,7 @@ * 1.8.7-pre, 2009-??-?? + - Fix processing multiple messages in XTS mode + - Add --no-autoload option to configure.py, for minimized builds * 1.8.6, 2009-08-13 - Add Cryptobox, a set of simple password-based encryption routines diff --git a/src/libstate/info.txt b/src/libstate/info.txt index 7ca35c5a4..6eaa2f70b 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -1,6 +1,6 @@ realname "Botan Libstate Module" -load_on auto +load_on always define LIBSTATE_MODULE diff --git a/src/libstate/pk_engine.h b/src/libstate/pk_engine.h index 3f8650a4e..256a47c20 100644 --- a/src/libstate/pk_engine.h +++ b/src/libstate/pk_engine.h @@ -9,6 +9,7 @@ #define BOTAN_ENGINE_PK_LOOKUP_H__ #include <botan/bigint.h> +#include <botan/pow_mod.h> #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) #include <botan/if_op.h> diff --git a/src/utils/info.txt b/src/utils/info.txt index 95ea5fc2e..ab50b88ad 100644 --- a/src/utils/info.txt +++ b/src/utils/info.txt @@ -2,7 +2,7 @@ realname "Utility Functions" define UTIL_FUNCTIONS -load_on auto +load_on always <libs> tru64 -> rt |