diff options
author | lloyd <[email protected]> | 2008-06-17 14:37:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-17 14:37:52 +0000 |
commit | db50519bf651c5e1d1787fff374ea2a4632ff013 (patch) | |
tree | 622ce1b445d4222d67fb7704cab63ef7b1110b0d | |
parent | 4dc7c95a6cdbcca2c9e15c5d34f7d1e7ee181773 (diff) |
Add ability for one module to require another. Does not take into account
OS/arch/compiler restrictions on the required module, only on the requiree.
Since normally the required module will use a subset of the functionality,
that is probably OK, but something to be aware of.
-rwxr-xr-x | configure.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.pl b/configure.pl index 6b9b9b71a..66ca7f8ca 100755 --- a/configure.pl +++ b/configure.pl @@ -943,6 +943,16 @@ sub load_modules { foreach my $mod (sort keys %{$$config{'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); + } + } + + } my $gen_defines = sub { @@ -1317,6 +1327,7 @@ sub get_module_info { read_list($_, $reader, 'add', list_push(\@{$info{'add'}})); read_list($_, $reader, 'replace', list_push(\@{$info{'replace'}})); read_list($_, $reader, 'ignore', list_push(\@{$info{'ignore'}})); + read_list($_, $reader, 'requires', list_push(\@{$info{'requires'}})); read_list($_, $reader, 'libs', sub { |