Environment: Mandriva Linux
wget ftp://ftp.cac.washington.edu/imap/imap.tar.gz
tar zxf imap.tar.gz
make lmd EXTRAAUTHENTICATORS=gss
mkdir -p /usr/local/imap/include /usr/local/imap/lib
cp c-client/*.h /usr/local/imap/include
cp c-client/*.c /usr/local/imap/lib
cp c-client/c-client.a /usr/local/imap/lib/libc-client.a
PHP
./configure --with-imap --with-imap-ssl
ref. PHP compilation with cURL, MHash, MCript, mnoGoSearch, etc...