imap

Compiling PHP5 with IMAP support on OS X Leopard

This really shouldn't have been that hard, but it took quite a bit of searching and playing around to finally get this to work.

I started at PHP's IMAP web page which informed me that the first thing I needed to do was grab the c-client libraries and compile it. You can find these here: ftp://ftp.cac.washington.edu/imap/.


cd /SourceCache
curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
tar -xzvf c-client.tar.Z
cd imap-2007a
sudo make oxp
sudo mkdir /usr/local/imap-2007h/lib
sudo mkdir /usr/local/imap-2007h/include
cp imap-2007a/*.h /usr/local/imap-2007a/include
cp imap-2007a/*.c /usr/local/imap-2007a/lib
cp c-client.a /usr/local/imap-2007a/lib/libc-client.a

When Apple built Leopard they forgot to include the MySQL header files, but were kind enough to offer them up for download at http://www.opensource.apple.com/darwinsource/other/. Download the MySQL binaries, untar and follow the instructions in the README. Its very simple.