How to re-compile with SSL enabled for MAMP Pro (Mac), macOS Sierra


Steps for re-compiling


1. Download imap source

2. Find the text osx: and replace SSLINCLUDE=/usr/include/openssl to SSLINCLUDE=/usr/local/opt/openssl/include/openssl

3. Compile c-client.a and copy to /usr/local/imap

4. Go to php imap extension folder and compile

5. Edit php.ini


Same steps for 7.0.8