@@ -22,8 +22,12 @@ AC_DEFUN(IMAP_LIB_CHK,[
22
22
] )
23
23
24
24
AC_DEFUN ( PHP_IMAP_KRB_CHK , [
25
- PHP_ARG_WITH(kerberos,for Kerberos support in IMAP,
26
- [ --with-kerberos[ =DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.] )
25
+ AC_ARG_WITH ( kerberos ,
26
+ [ --with-kerberos[ =DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.] ,[
27
+ PHP_KERBEROS=$withval
28
+ ] ,[
29
+ PHP_KERBEROS=no
30
+ ] )
27
31
28
32
if test "$PHP_KERBEROS" = "yes"; then
29
33
test -d /usr/kerberos && PHP_KERBEROS=/usr/kerberos
@@ -36,27 +40,40 @@ AC_DEFUN(PHP_IMAP_KRB_CHK, [
36
40
PHP_ADD_LIBRARY(krb5, 1, IMAP_SHARED_LIBADD)
37
41
PHP_ADD_LIBRARY(k5crypto, 1, IMAP_SHARED_LIBADD)
38
42
PHP_ADD_LIBRARY(com_err, 1, IMAP_SHARED_LIBADD)
43
+ else
44
+ AC_EGREP_HEADER ( auth_gss , $IMAP_INC_DIR/linkage.h , [
45
+ AC_MSG_ERROR ( This c-client library is build with Kerberos support.
46
+
47
+ Add -- with-kerberos<=DIR> to your configure line. Check config.log for details. )
48
+ ] )
39
49
fi
50
+
40
51
] )
41
52
42
53
AC_DEFUN ( PHP_IMAP_SSL_CHK , [
43
- PHP_ARG_WITH(imap-ssl,for SSL support in IMAP,
44
- [ --with-imap-ssl[ =DIR] IMAP: Include SSL support. DIR is the OpenSSL install dir.] )
54
+ AC_ARG_WITH ( imap-ssl ,
55
+ [ --with-imap-ssl[ =DIR] IMAP: Include SSL support. DIR is the OpenSSL install dir.] ,[
56
+ PHP_IMAP_SSL=$withval
57
+ ] ,[
58
+ PHP_IMAP_SSL=no
59
+ ] )
45
60
46
61
if test "$PHP_IMAP_SSL" = "yes"; then
47
62
PHP_IMAP_SSL=/usr
48
63
fi
49
64
50
65
if test "$PHP_IMAP_SSL" != "no"; then
66
+ AC_DEFINE ( HAVE_IMAP_SSL ,1 ,[ ] )
51
67
PHP_ADD_LIBPATH($PHP_IMAP_SSL/lib, IMAP_SHARED_LIBADD)
52
- PHP_ADD_LIBRARY_DEFER(crypto )
53
- PHP_ADD_LIBRARY_DEFER(ssl )
54
-
68
+ PHP_ADD_LIBRARY_DEFER(ssl,, IMAP_SHARED_LIBADD )
69
+ PHP_ADD_LIBRARY_DEFER(crypto,, IMAP_SHARED_LIBADD )
70
+ else
55
71
old_LIBS=$LIBS
56
- LIBS="$LIBS -lc-client -lcrypto -lssl "
72
+ LIBS="$LIBS -L$IMAP_LIBDIR -lc-client "
57
73
if test $PHP_KERBEROS != "no"; then
58
- LIBS="$LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
74
+ LIBS="$LIBS -L$PHP_KERBEROS/lib - lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
59
75
fi
76
+
60
77
AC_TRY_RUN ( [
61
78
void mm_log(void){}
62
79
void mm_dlog(void){}
@@ -73,24 +90,23 @@ AC_DEFUN(PHP_IMAP_SSL_CHK, [
73
90
void mm_exists(void){}
74
91
void mm_searched(void){}
75
92
void mm_expunged(void){}
76
- char ssl_onceonlyinit ();
93
+ char mail_open ();
77
94
int main() {
78
- ssl_onceonlyinit ();
95
+ mail_open ();
79
96
return 0;
80
97
}
81
- ] ,[
82
- AC_DEFINE ( HAVE_IMAP_SSL , 1 , [ ] )
83
- ] , [
84
- AC_MSG_ERROR ( Problem with c-client library. Please check config.log for more information .)
98
+ ] ,, [
99
+ AC_MSG_ERROR ( This c-client library is build with SSL support.
100
+
101
+ Add -- with-imap-ssl<=DIR> to your configure line. Check config.log for details .)
85
102
] )
86
103
LIBS=$old_LIBS
87
104
fi
88
105
] )
89
106
90
107
91
108
PHP_ARG_WITH(imap,for IMAP support,
92
- [ --with-imap[ =DIR] Include IMAP support. DIR is the IMAP include
93
- and c-client.a directory.] )
109
+ [ --with-imap[ =DIR] Include IMAP support. DIR is the c-client install prefix.] )
94
110
95
111
if test "$PHP_IMAP" != "no"; then
96
112
@@ -109,7 +125,8 @@ if test "$PHP_IMAP" != "no"; then
109
125
done
110
126
111
127
AC_CHECK_LIB ( pam , pam_start )
112
-
128
+ AC_CHECK_LIB ( crypt , crypt )
129
+
113
130
PHP_EXPAND_PATH($IMAP_DIR, IMAP_DIR)
114
131
115
132
if test -z "$IMAP_DIR"; then
@@ -134,7 +151,7 @@ if test "$PHP_IMAP" != "no"; then
134
151
135
152
PHP_ADD_INCLUDE($IMAP_INC_DIR)
136
153
PHP_ADD_LIBPATH($IMAP_LIBDIR, IMAP_SHARED_LIBADD)
137
- PHP_ADD_LIBRARY_DEFER($IMAP_LIB)
154
+ PHP_ADD_LIBRARY_DEFER($IMAP_LIB,, IMAP_SHARED_LIBADD )
138
155
PHP_IMAP_KRB_CHK
139
156
PHP_IMAP_SSL_CHK
140
157
fi
0 commit comments