How To Install Memcache on MAMP 2
brew install memcached
/Applications/MAMP/bin/php/[php version folder]/include/php.
cd /Applications/MAMP/bin/php/[php version folder]/include/php/
/Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
extension=memcache.soto your php.ini within MAMP Pro (CMD + 4)
/Applications/MAMP\ Pro/MAMP\ PRO.app/Contents/Resources/php[your php version].ini
/Applications/MAMP/conf/php[your php version].ini
http://localhost/MAMP/phpinfo.phpand ⌘+F for "memcache".
Once you have your local binaries properly configured, you can essentially install any other php extension by using that
phpize should work as well.
Make sure pecl compiled the memcache extension to the correct place. It should be in a folder named: /Applications/MAMP/bin/php/[PHP VERSION FOLDER]/lib/php/extensions/no-debug-non-zts-20060613
Inspired by this tutorial, and gisted in case it ever went down.