On macOS, configure exports a hardcoded OPENSSL_ROOT_DIR of
/usr/local/opt/openssl/. That is the Homebrew prefix on Intel Macs; on Apple
Silicon Homebrew installs to /opt/homebrew, so the directory does not exist.
Nothing is broken today: CMake's FindOpenSSL treats OPENSSL_ROOT_DIR as a
hint rather than an exclusive search path, so it ignores the dead directory
and finds OpenSSL anyway. The problem is the log line, which confidently
names a path that exists on no Apple Silicon machine and sends anyone
debugging an OpenSSL pickup down a false trail.
Ask brew for the real prefix, preferring openssl@3 and falling back to
openssl, and keep the previous value as a last resort so behaviour is
unchanged where Homebrew is absent.
Our CMake project used to forcefully create and use two different build directories: "build" and "tmp".
This commit changes the behavior so that only the build directory CMake is ran in is used.
The "configure" script now runs CMake in "build" by default, instead of "tmp".
* use OPENSSL_ROOT_DIR
* add special .configure handling for osx
* move readline, curses to cedar
Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>