How to build and include the uw-imap c-client in php

popowich

EQ Forum Admin
Staff member
Hello,

Are you having some trouble including the UW-IMAP source in an a software build such as php with the --with-imap-dir directive?

In my example I am building php with imap support on webmail servers that will be running the IMP webmail that is part of the Horde Project.

The first step is to download the current UW-IMAP source code.

I prefer to untar it and move the folder into /usr/local. The current version example is /usr/local/imap-2007e.

> tar -zxvpf imap-2007e.tar.gz
> mv imap-2007e /usr/local
The next step is to build the package using the code specific to your environment.

I am running Solaris and use gso. If you are using a linux OS you may want to use slx.

Check the Makefile for all of the available options.

> cd /usr/local/imap-2007e
> make gso
After building you need to create some links so that the imap package can be included in other software builds. You will be creating lib and include links and link to the c-client directory, and within the c-client directory you will be linking the name libc-client.a to the existing c-client.a that was creating during the build process.
> cd /usr/local/imap-2007e
> ln -s c-client lib
> ln -s c-client include
> cd c-client
> ln -s c-client.a libc-client.a

If you got this far with no errors you should be all set.

To include this version of the UW-IMAP Toolkit in your php build use the following in your php configure line:

--with-imap=/usr/local/imap-2007e --with-imap-ssl=/usr/local/ssl
 
Top