Custom PHP build to support MAPI functions

I recall reading something about this here a while back, but can’t find it now - I’d like to create a custom PHP build to include support for MAPI functions on one of my domains.

What is the process for doing this?