When running the 'configure' script to set up the thrift build environment, the path supplied to the 'with-openssl=<path>' option is not honored for all tests within the script where libcrypto is required.
For the first part of the script the path is indeed honored. For example, at line 17316 ("checking whether compiling and linking against OpenSSL works") it can be easily validated (via strace and/or bash script debugging) that the correct user-supplied path to a particular OpenSSL library is being used.
However, later in the script, at line 23292 ("checking for BN_init in -lcrypto...") this is not the case. Again this can readily verified (via strace and/or bash script debugging) that the user supplied path is skipped entirely, and only the O/S system-defined default library paths are searched for libcrypto.