[asterisk-commits] mogorman: trunk r40335 - in /trunk: ./ apps/ doc/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Aug 17 15:39:49 MST 2006


Author: mogorman
Date: Thu Aug 17 17:39:48 2006
New Revision: 40335

URL: http://svn.digium.com/view/asterisk?rev=40335&view=rev
Log:
changes to configure to support older c-client than the
2004 version.

Modified:
    trunk/apps/app_voicemail.c
    trunk/configure.ac
    trunk/doc/imapstorage.txt

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=40335&r1=40334&r2=40335&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Aug 17 17:39:48 2006
@@ -6470,10 +6470,13 @@
 	/* expunge message - use UID Expunge if supported on IMAP server*/
 	ast_log(LOG_DEBUG, "*** Checking if we can expunge, deleted set to %d, expungeonhangup set to %d\n",deleted,expungeonhangup);
 	if (vmu && deleted == 1 && expungeonhangup == 1)  {
+#ifdef HAVE_IMAP_TK2006
 	      	if (LEVELUIDPLUS (vms.mailstream)) {
 			ast_log(LOG_DEBUG, "*** About to expunge messages using UID\n");
 			mail_expunge_full(vms.mailstream,NIL,EX_UID);
-		} else {
+		} else 
+#endif
+		{
 			ast_log(LOG_DEBUG, "*** About to expunge messages\n");
 			mail_expunge(vms.mailstream);
 		}

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=40335&r1=40334&r2=40335&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Aug 17 17:39:48 2006
@@ -348,62 +348,116 @@
    LIBS="${LIBS} ${IMAP_TK_DIR}/c-client/c-client.a "`echo ${imap_ldflags}`
    AC_LINK_IFELSE(
 	AC_LANG_PROGRAM(
-		[#include "c-client.h"],
+		[#include "c-client.h"
+		void mm_searched (MAILSTREAM *stream,unsigned long number)
+		{
+		}
+		void mm_exists (MAILSTREAM *stream,unsigned long number)
+		{
+		}
+		void mm_expunged (MAILSTREAM *stream,unsigned long number)
+		{
+		}
+		void mm_flags (MAILSTREAM *stream,unsigned long number)
+		{
+		}
+		void mm_notify (MAILSTREAM *stream,char *string,long errflg)
+		{
+		}
+		void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
+		{
+		}
+		void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
+		{
+		}
+		void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
+		{
+		}
+		void mm_log (char *string,long errflg)
+		{
+		}
+		void mm_dlog (char *string)
+		{
+		}
+		void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
+		{
+		}
+		void mm_critical (MAILSTREAM *stream)
+		{
+		}
+		void mm_nocritical (MAILSTREAM *stream)
+		{
+		}
+		long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
+		{
+		}
+		void mm_fatal (char *string)
+		{
+		}],
 		[
-		void mm_searched (MAILSTREAM *stream,unsigned long number)
-		{
-		}
-		void mm_exists (MAILSTREAM *stream,unsigned long number)
-		{
-		}
-		void mm_expunged (MAILSTREAM *stream,unsigned long number)
-		{
-		}
-		void mm_flags (MAILSTREAM *stream,unsigned long number)
-		{
-		}
-		void mm_notify (MAILSTREAM *stream,char *string,long errflg)
-		{
-		}
-		void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
-		{
-		}
-		void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
-		{
-		}
-		void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
-		{
-		}
-		void mm_log (char *string,long errflg)
-		{
-		}
-		void mm_dlog (char *string)
-		{
-		}
-		void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
-		{
-		}
-		void mm_critical (MAILSTREAM *stream)
-		{
-		}
-		void mm_nocritical (MAILSTREAM *stream)
-		{
-		}
-		long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
-		{
-		}
-		void mm_fatal (char *string)
-		{
-		}
-		int main()
-		{
 		MAILSTREAM *foo = mail_open(NULL, "", 0);
-		}
 		]
 	),
 	[ac_cv_imap_tk="yes"],
 	[ac_cv_imap_tk="no"]
    )
+   if test "${ac_cv_imap_tk}" = "yes"; then
+   AC_LINK_IFELSE(
+      AC_LANG_PROGRAM(
+         [#include "c-client.h"
+         void mm_searched (MAILSTREAM *stream,unsigned long number)
+         {
+         }
+         void mm_exists (MAILSTREAM *stream,unsigned long number)
+         {
+         }
+         void mm_expunged (MAILSTREAM *stream,unsigned long number)
+         {
+         }
+         void mm_flags (MAILSTREAM *stream,unsigned long number)
+         {
+         }
+         void mm_notify (MAILSTREAM *stream,char *string,long errflg)
+         {
+         }
+         void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
+         {
+         }
+         void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
+         {
+         }
+         void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
+         {
+         }
+         void mm_log (char *string,long errflg)
+         {
+         }
+         void mm_dlog (char *string)
+         {
+         }
+         void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
+         {
+         }
+         void mm_critical (MAILSTREAM *stream)
+         {
+         }
+         void mm_nocritical (MAILSTREAM *stream)
+         {
+         }
+         long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
+         {
+         }
+         void mm_fatal (char *string)
+         {
+         }],
+         [
+         long check = mail_expunge_full(NULL, "", 0);
+         ]
+      ),
+      [ac_cv_imap_tk2006="yes"],
+      [ac_cv_imap_tk2006="no"]
+  )
+  fi
    CPPFLAGS="${saved_cppflags}"
    LIBS="${saved_libs}"
    if test "${ac_cv_imap_tk}" = "yes"; then
@@ -412,6 +466,9 @@
       IMAP_TK_INCLUDE="-I${IMAP_TK_DIR}/c-client"
       PBX_IMAP_TK=1
       AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.])
+      if test "${ac_cv_imap_tk2006}" = "yes"; then
+         AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.])
+      fi
    elif test ! -z "${IMAP_TK_MANDATORY}"; then
       AC_MSG_RESULT(no) 
       AC_MSG_NOTICE(***)

Modified: trunk/doc/imapstorage.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/imapstorage.txt?rev=40335&r1=40334&r2=40335&view=diff
==============================================================================
--- trunk/doc/imapstorage.txt (original)
+++ trunk/doc/imapstorage.txt Thu Aug 17 17:39:48 2006
@@ -58,7 +58,9 @@
 or where ever you built the University of Washington IMAP C-Client.
 Then make menuselect go to voicemail options and check the imap box
 then make, make install and asterisk will have imap storage support for 
-voicemail.
+voicemail. If you are using there 2004 version you will not have access to
+their mail_expunge_full function if you install the 2006 dev branch it will
+configure will detect and enable this for you.
 
 ---------------------
 Modify voicemail.conf



More information about the asterisk-commits mailing list