Please review the two patches in http://panda.com/imap/alpine.html
These will be needed in the future to build Alpine (and re-Alpine) with the Panda IMAP version of c-client. They are fully compatible with current Panda c-client and with UW c-client.