summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-03-05 21:51:18 +0100
committerRichard Levitte <levitte@openssl.org>2017-03-06 16:43:21 +0100
commita40b5be27e28eaf5a8be7193c8b6460bc6f851b4 (patch)
tree4e115507b0a39a28461389a6da49a2057c6a5091 /Configure
parent0d41526f4f76b2f9384540503c21e8ef41e1fbbb (diff)
Add a platform specific configuration checker
For each platform, we may need to perform some basic checks to see that available tools perform as we expect them. For the moment, the added checkers test that Perl gives the expected path format. This should help MingW users to see if they run an appropriate Perl implementation, for example. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2851) (cherry picked from commit d192a3aaeb76fc89f8285b4dc938c2bc0c37d0d4)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/Configure b/Configure
index 38081c44a1..79d9f33b46 100755
--- a/Configure
+++ b/Configure
@@ -994,6 +994,25 @@ $target{build_scheme} = [ $target{build_scheme} ]
my ($builder, $builder_platform, @builder_opts) =
@{$target{build_scheme}};
+foreach my $checker (($builder_platform."-".$target{build_file}."-checker.pm",
+ $builder_platform."-checker.pm")) {
+ my $checker_path = catfile($srcdir, "Configurations", $checker);
+ if (-f $checker_path) {
+ my $fn = $ENV{CONFIGURE_CHECKER_WARN}
+ ? sub { warn $@; } : sub { die $@; };
+ if (! do $checker_path) {
+ if ($@) {
+ $fn->($@);
+ } elsif ($!) {
+ $fn->($!);
+ } else {
+ $fn->("The detected tools didn't match the platform\n");
+ }
+ }
+ last;
+ }
+}
+
push @{$config{defines}}, "NDEBUG" if $config{build_type} eq "release";
if ($target =~ /^mingw/ && `$target{cc} --target-help 2>&1` =~ m/-mno-cygwin/m)