Configure: Check source and build dir equality a little more thoroughly
authorRichard Levitte <levitte@openssl.org>
Wed, 1 Jul 2020 08:06:59 +0000 (10:06 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 2 Jul 2020 16:53:25 +0000 (18:53 +0200)
commit610e2b3b7019b11d97f1dcda13575254a2c65c3d
tree07ae0177794364d0de0257e7415e07024a71c0a5
parent9576c498ca8793261adc20e9dca9cf419617cd3e
Configure: Check source and build dir equality a little more thoroughly

'absolutedir' does a thorough job ensuring that we have a "real" path
to both source and build directory, unencumbered by symbolic links.
However, that isn't enough on case insensitive file systems on Unix
flavored platforms, where it's possible to stand in, for example,
/PATH/TO/Work/openssl, and then do this:

    perl ../../work/openssl/Configure

... and thereby having it look like the source directory and the build
directory aren't the same.

We solve this by having a closer look at the computed source and build
directories, and making sure they are exactly the same strings if they
are in fact the same directory.

This is especially important when making symbolic links based on this
directories, but may have other ramifications as well.

Fixes #12323

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12337)
Configure