From: Richard Levitte Date: Sun, 5 Mar 2017 20:51:18 +0000 (+0100) Subject: Add a platform specific configuration checker X-Git-Tag: OpenSSL_1_1_0f~180 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a40b5be27e28eaf5a8be7193c8b6460bc6f851b4;p=oweals%2Fopenssl.git 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 (Merged from https://github.com/openssl/openssl/pull/2851) (cherry picked from commit d192a3aaeb76fc89f8285b4dc938c2bc0c37d0d4) --- diff --git a/Configurations/unix-checker.pm b/Configurations/unix-checker.pm new file mode 100644 index 0000000000..b39b0eb7cb --- /dev/null +++ b/Configurations/unix-checker.pm @@ -0,0 +1,22 @@ +#! /usr/bin/perl + +use Config; + +# Check that the perl implementation file modules generate paths that +# we expect for the platform +use File::Spec::Functions qw(:DEFAULT rel2abs); + +if (rel2abs('.') !~ m|/|) { + die <($@); + } 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)