Today I am trying to upgrade php on MacOS Mountain Lion. I followed MacTuts+ tutorial and on the step where I execute that long command:
If you have the 'libc-client-devel' RPM or other package in your OS repository then install it.
This will provide the c-client library and header files which PHP needs for IMAP support.