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

 

Steps for re-compiling imap.so

 

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 imap.so

5. Edit php.ini

 

Same steps for 7.0.8

 

References: