summaryrefslogtreecommitdiffstats
path: root/Configurations/common.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-11-09 20:01:51 +0100
committerRichard Levitte <levitte@openssl.org>2016-11-10 15:51:42 +0100
commit186a31e510d1326063cfeca17e58fadec236ad2a (patch)
tree229bc2215ceeac6eac726c455a52be262e19b82d /Configurations/common.tmpl
parent42e055e12496a0eab72c64de845aa5bb18a9c4a2 (diff)
Building: make it possible to force linking with static OpenSSL libs
Very simply, support having the .a extension to denote depending on static libraries. Note that this is not supported on native Windows when building shared libraries, as there is not static library then, just an import library with the same name. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1889)
Diffstat (limited to 'Configurations/common.tmpl')
-rw-r--r--Configurations/common.tmpl14
1 files changed, 11 insertions, 3 deletions
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index d811a2a144..5fd6b9729c 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -9,15 +9,22 @@
# there are no duplicate dependencies and that they are in the
# right order. This is especially used to sort the list of
# libraries that a build depends on.
+ sub extensionlesslib {
+ my @result = map { $_ =~ /(\.a)?$/; $` } @_;
+ return @result if wantarray;
+ return $result[0];
+ }
sub resolvedepends {
my $thing = shift;
+ my $extensionlessthing = extensionlesslib($thing);
my @listsofar = @_; # to check if we're looping
- my @list = @{$unified_info{depends}->{$thing}};
+ my @list = @{$unified_info{depends}->{$extensionlessthing}};
my @newlist = ();
if (scalar @list) {
foreach my $item (@list) {
+ my $extensionlessitem = extensionlesslib($item);
# It's time to break off when the dependency list starts looping
- next if grep { $_ eq $item } @listsofar;
+ next if grep { extensionlesslib($_) eq $extensionlessitem } @listsofar;
push @newlist, $item, resolvedepends($item, @listsofar, $item);
}
}
@@ -28,8 +35,9 @@
my @newlist = ();
while (@list) {
my $item = shift @list;
+ my $extensionlessitem = extensionlesslib($item);
push @newlist, $item
- unless grep { $item eq $_ } @list;
+ unless grep { $extensionlessitem eq extensionlesslib($_) } @list;
}
@newlist;
}