Ran into a small build problem when trying to install the CPAN module Mail::Cclient on a Red Hat Enterprise Linux system. Figured I would go ahead and document the process in full for others ( and for myself later in life ).
FIrst off you will most likely need to install two RPMs
Then you will need to download a distribution of Mail::Cclient, don't even bother trying to install this from the CPAN shell as it won't work.
Unpack your distribution with the normal tar -xvzf Mail-Cclient-x.xx.tar.gz and cd into the directory. You will then, unfortunately, have to edit the Makefile.PL by hand. Specifically you will have to change INC argument to WriteMakefile() to be:
**" INC" => "-I$CCLIENT_DIR -I/usr/include/imap",**
This instructs the build process to look for the shared library in $CCLIENT_DIR and the headers in /usr/include/imap.
Then it is just a matter of calling:
perl Makefile.PL CCLIENT_DIR=/usr/lib
Hope this helps someone else who gets bit by this annoyance.
Turns out that I was grabbing an older version of Mail::Cclient ( version 1.1 specifically ) if you use Mail::Cclient 1.12 then the install process requires a few other RPMs:
- pam-devl e
And then you install it with:
perl Makefile.PL --cclient_dir=/usr/lib --with-pam --with-cclient-includes=/usr/include/imap/ --with-shared_cclient