|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26936 Add an option to compile imap with imap-uw c-client linkage
Submitted: 2004-01-16 10:16 UTC Modified: 2016-12-30 18:55 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jdolecek at NetBSD dot org Assigned:
Status: Open Package: IMAP related
PHP Version: 4.3.4 OS: NetBSD 1.6 ZG
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
41 - 9 = ?
Subscribe to this entry?

 [2004-01-16 10:16 UTC] jdolecek at NetBSD dot org
It would be nice if it would be possible to compile imap module directly with imap-uw linkage file, so that all supported authentication modules and protocols would be available. Actually, patches implementing this are in NetBSD pkgsrc system for some time, and I hope such option would be useful for other systems too. Having this option integrated in main PHP tree would ease our package maintenance, too :)

Note there is similar (now closed) PR #4136 with same
issue. The bug DB entry claims it was fixed in CVS,
I don't know why it was backed off.

Anyway, following patch adds configure option --with-imap-linkage.
This option makes php_imap.c #include directly c-client
linkage.c, instead of using list of hardcoded stuff.
Default is same as now, i.e. to NOT use linkage.c.
The --with-imap-linkage also disables the --with-kerberos check, since that is not needed in this case.

Patch #1
-- cut here --
--- config.m4.orig      2003-10-03 07:25:35.000000000 +0200
+++ config.m4
@@ -54,6 +54,14 @@ AC_DEFUN(PHP_IMAP_TEST_BUILD, [

+dsl Must be before --with-kerberos, affects the check
+PHP_ARG_WITH(imap-linkage,use IMAP c-client linkage,
+[  --with-imap-linkage     Use IMAP c-client linkage to determine supported ite
+if test "$PHP_IMAP_LINKAGE" != "no"; then
   [  --with-kerberos[=DIR]     IMAP: Include Kerberos support. DIR is the Kerbe
ros install dir.],[
@@ -90,7 +98,7 @@ AC_DEFUN(PHP_IMAP_KRB_CHK, [
-  else
+  elif test "$PHP_IMAP_LINKAGE" != "yes"; then
     AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [
       AC_MSG_ERROR([This c-client library is built with Kerberos support.

-- cut here --

Patch #2
-- cut here --
--- php_imap.c.orig     2003-09-04 09:48:30.000000000 +0200
+++ php_imap.c
@@ -408,6 +408,11 @@ PHP_MINIT_FUNCTION(imap)

        ZEND_INIT_MODULE_GLOBALS(imap, php_imap_init_globals, NULL)

+ * Optionally use the installed c-client linkage.c to determine which drivers
+ * are authenticators are linked in. Otherwise use this fixed list.
+ */
 #ifndef PHP_WIN32
        mail_link(&unixdriver);         /* link in the unix driver */
        mail_link(&mhdriver);           /* link in the mh driver */
@@ -423,6 +428,10 @@ PHP_MINIT_FUNCTION(imap)
        mail_link(&tenexdriver);        /* link in the tenex driver */
        mail_link(&mtxdriver);          /* link in the mtx driver */
        mail_link(&dummydriver);        /* link in the dummy driver */
+#else /* HAVE_IMAP_LINKAGE */
+        /* link in the c-client mail and auth drivers */
+#include "linkage.c"
+#endif /* HAVE_IMAP_LINKAGE */

 #ifndef PHP_WIN32
        auth_link(&auth_log);           /* link in the log authenticator */
-- cut here --

Reproduce code:
Code inspection - php_imap.c uses fixed list
instead of using imap-uw supplied linkage.c.


patch-ext_imap_config.m4 (last revision 2017-11-25 20:06 UTC by jdolecek at NetBSD dot org)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 18:55 UTC]
-Package: Feature/Change Request +Package: IMAP related
 [2017-11-25 20:08 UTC] jdolecek at NetBSD dot org
I've uploaded up-to-date patch (as of 7.1, applies also for 7.2). It would be really nice to have this option, would reduce amount of patches we keep for NetBSD pkgsrc package system.
 [2018-02-16 22:24 UTC] jdolecek at NetBSD dot org
We've found alternative solution for NetBSD pkgsrc, and do not need to maintain this patch any more. You can close this bug. Thank you.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 15:01:26 2019 UTC