ftp://ftp.cac.washington.edu/imap/
下载安装包,解压
imap-2007
make lrh SSLTYPE=none
[root@localhost c-client]# cp c-client.
c-client.a c-client.h
[root@localhost c-client]# cp c-client.a /usr/local/lib/libc-client.a
[root@localhost c-client]# cp rfc822.h /usr/local/include/
[root@localhost c-client]# cp mail.h /usr/local/include/
[root@localhost c-client]# cp linkpage.h /usr/local/include/
cp: stat
‘
linkpage.h
’失败
:
没有那个文件或目录
[root@localhost c-client]# cp linkage.h /usr/local/include/
重新编译
php
:
[root@localhost php-5.2.0]# './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gd=/usr/local/gd' '--enable-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr/local/jpeg6' '--with-png=/usr/local/lib' '--with-ttf' '--with-zlib=/usr/local/zlib' '--with-freetype-dir=/usr/local/freetype' '--enable-magic-quotes' '--with-mysql=/usr/local/mysql' '--with-mysql-sock=/usr/local/mysql/tmp/mysql.sock' '--with-iconv' '--with-mbstring' '--enable-mbstring' '--enable-track-vars' '--enable-force-cgi-redirect' '--enable-ftp' '--with-config-file-path=/usr/local/apache2/conf' '--with-pear=/usr/local/php/pear' '--with-mcrypt=/usr/local/libmcrypt' '--with-gettext' '--with-cyrus' '--with-imap'
make
出现错误:
/home/soft/php-5.2.0/ext/imap/php_imap.c: In function `zif_imap_utf8':
/home/soft/php-5.2.0/ext/imap/php_imap.c:2188: `U8T_CANONICAL' undeclared (first use in this function)
/home/soft/php-5.2.0/ext/imap/php_imap.c:2188: (Each undeclared identifier is reported only once
/home/soft/php-5.2.0/ext/imap/php_imap.c:2188: for each function it appears in.)
make: *** [ext/imap/php_imap.lo] Error 1
下载最新的
php5.2
编译提示:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
Config.h
内容:
如下:
configure:47514: checking for U8T_CANONICAL
configure:47530: gcc -c -I/usr/local/include -D_REENTRANT conftest.c 1>&5
configure:47521:22: c-client.h: No such file or directory
configure: In function `main':
configure:47525: `U8T_CANONICAL' undeclared (first use in this function)
configure:47525: (Each undeclared identifier is reported only once
configure:47525: for each function it appears in.)
configure: failed program was:
#line 47519 "configure"
#include "confdefs.h"
#include <c-client.h>
int main() {
int i = U8T_CANONICAL;
; return 0; }
把
c-client.h
拷贝到
/usr/local/include
下
config.h
内容
configure:47514: checking for U8T_CANONICAL
configure:47530: gcc -c -I/usr/local/include -D_REENTRANT conftest.c 1>&5
In file included from configure:47521:
/usr/local/include/c-client.h:42:60: osdep.h: No such file or directory
/usr/local/include/c-client.h:44:60: smtp.h: No such file or directory
/usr/local/include/c-client.h:45:60: nntp.h: No such file or directory
/usr/local/include/c-client.h:46:67: utf8.h: No such file or directory
/usr/local/include/c-client.h:47:65: utf8aux.h: No such file or directory
/usr/local/include/c-client.h:48:69: misc.h: No such file or directory
configure: In function `main':
configure:47525: `U8T_CANONICAL' undeclared (first use in this function)
configure:47525: (Each undeclared identifier is reported only once
configure:47525: for each function it appears in.)
configure: failed program was:
#line 47519 "configure"
#include "confdefs.h"
#include <c-client.h>
int main() {
int i = U8T_CANONICAL;
; return 0; }
最后把
c-client
下的文件
cp *.h /usr/local/include
编译:
Thank you for using PHP.
Notice: Following unknown configure options were used:
--enable-gd
--with-png=/usr/local/lib
--with-mbstring
--enable-track-vars
--with-cyrus
Check './configure --help' for available options
据说是
bug
我也不知道
不过现在可以了!
参考:
转帖请注明