cd php-5.3.1/ext/imap
make clean
phpize
MACOSX_DEPLOYMENT_TARGET=10.6 \
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" \
./configure --with-imap=/usr/local/imap-2007 --with-kerberos --with-imap-ssl=/usr/
make clean
phpize
MACOSX_DEPLOYMENT_TARGET=10.6 \
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" \
./configure --with-imap=/usr/local/imap-2007 --with-kerberos --with-imap-ssl=/usr/
http://www.activecollab.com/forums/post/32919/