I can't debug your build, you need to use config.log for that, but the main dependency mechanism in the autoconf script is pkgconfig, not via explicit locations. You need to ensure your PKG_CONFIG_PATH is set if you're using non-standard locations, it figures out the rest from the pkgconfig file that should be installed by OpenSSL's build.
-- Scott
