If only a working static OpenSSL is available, ./configure fails
If OpenSSL is available, but only the statically linked version works, ./configure will fail. This is because the autoconf test program will be by default built dynamically, at least on Windows, even if --enable-static-openssl is set. The attached patch (appears to) resolve this problem on Windows.
However, the patch doesn't work on MacOS X because passing -static to the compiler causes it to fail with the error "ld: library not found for -lcrt0.o". I presume MacOS X can't produce fully static binaries for whatever reason.
What I'd really like to do is pass "$TOR_LIBDIR_openssl/libssl.a $TOR_LIBDIR_openssl/libcrypto.a" into the link path of the test program built by TOR_SEARCH_LIBRARY(openssl, ...). However, $TOR_LIBDIR_ is being set by TOR_SEARCH_LIBRARY so there is a chicken and egg problem here which I'm not sure how to resolve.
These tests were done on Tor version e4cebb76.