Php-imap: how to install without pain

Do you want to install php-imap support to your linux server without pain? Have yoy been -- like me -- through days of nightmares trying to resolve problems like these:

#include "confdefs.h" > I attempted to find the confdefs.h

5.2.0 does not build because it's missing the definition of
"U8T_CANONICAL" in the imap extension. I tried both with libc-client-dev
package as well as with self-compiled imapd.2006XXX.TAR.GZ.

Did you "ducked into the php-5.2.5/ext/imap directory and ran phpize, next I configured the extension with
./configure \
--with-libdir=lib64 \
--with-kerberos \
--with-imap-ssl \
--with-imap=/usr/local/imap-2006j " but to no avail?

Now you follow this route:

Download and install Xampp. It compiles a perfect version of php and all the dependencies are resolved. Now, if you don't want to use Xampp itself as your Apache/Php/MySql etc. manager, no problem, just use its settings to get the job done.
On my server I use DirectAdmin with Custombuild. Configure the php and imap part with these lines:
--with-imap-dir=/opt/lampp \
--with-imap-ssl \
--with-imap=/opt/lampp \

and voilà. Hope this helps.
Truly yours,

--
G.