aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-08 00:52:57 +0000
committerlloyd <[email protected]>2006-09-08 00:52:57 +0000
commit662fccf63e1063d45cd9de6e8860cdb8a28c9e90 (patch)
treeaf10baff287a5dc175181b15a5cb5a64d9f57a57 /configure.pl
parent13ddd61ff941cbb7ca7cd9cb0eee06054edca4d5 (diff)
Make some code a bit more concise/Perlish
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl30
1 files changed, 14 insertions, 16 deletions
diff --git a/configure.pl b/configure.pl
index 0d7bf4dda..e47870a10 100755
--- a/configure.pl
+++ b/configure.pl
@@ -387,23 +387,21 @@ sub check_for_file {
sub using_libs {
my ($os,@using) = @_;
my %libs;
+
foreach my $mod (@using) {
my %MOD_LIBS = %{ $MODULES{$mod}{'libs'} };
- foreach my $mod_os (keys %MOD_LIBS)
- {
- next if($mod_os =~ /^all!$os$/);
- next if($mod_os =~ /^all!$os,/);
- next if($mod_os =~ /^all!.*,${os}$/);
- next if($mod_os =~ /^all!.*,$os,.*/);
- next unless($mod_os eq $os or ($mod_os =~ /^all.*/));
- my @liblist = split(/,/, $MOD_LIBS{$mod_os});
- foreach my $lib (@liblist) { $libs{$lib} = 1; }
- }
- }
+ foreach my $mod_os (keys %MOD_LIBS) {
+ next if($mod_os =~ /^all!$os$/);
+ next if($mod_os =~ /^all!$os,/);
+ next if($mod_os =~ /^all!.*,${os}$/);
+ next if($mod_os =~ /^all!.*,$os,.*/);
+ next unless($mod_os eq $os or ($mod_os =~ /^all.*/));
+ my @liblist = split(/,/, $MOD_LIBS{$mod_os});
+ foreach my $lib (@liblist) { $libs{$lib} = 1; }
+ }
+ }
- my @libarray;
- foreach (sort keys %libs) { push @libarray , $_; }
- return @libarray;
+ return sort keys %libs;
}
sub defines {
@@ -1323,8 +1321,8 @@ sub print_pkg_config
return if($os eq 'generic' or $os eq 'windows');
- my $link_to = "-lm";
- foreach my $lib (@libs) { $link_to .= " -l" . $lib; }
+ unshift @libs, "m";
+ my $link_to = "-l" . join(" -l", @libs);
process_template('misc/config/botan-config.in', 'botan-config',
{ 'version' => "${major}.${minor}.${patch}",