See commit message for svn revision 103698. This behavior is the same as what is...
authorMark Michelson <mmichelson@digium.com>
Thu, 14 Feb 2008 23:39:47 +0000 (23:39 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 14 Feb 2008 23:39:47 +0000 (23:39 +0000)
there. The difference is that trunk already had the --with-imap=system option, but it only
checked the include path for headers in the imap directory and not also the c-client directory.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103700 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure
configure.ac

index fd239f3..fff57ed 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 102329 .
+# From configure.ac Revision: 103694 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
 
 
 if test "${USE_IMAP_TK}" != "no"; then
-   if test "${IMAP_TK_DIR}" = "system" ; then
-      { echo "$as_me:$LINENO: Checking for system c-client library..." >&5
-echo "$as_me: Checking for system c-client library..." >&6;}
-   elif test "${IMAP_TK_DIR}" = ""; then
-      IMAP_TK_DIR=`pwd`"/../imap-2004g"
-      if test  -n "${IMAP_TK_MANDATORY}"; then
-        { echo "$as_me:$LINENO: The --with-imap option does not search your system for installed" >&5
-echo "$as_me: The --with-imap option does not search your system for installed" >&6;}
-        { echo "$as_me:$LINENO: c-client library/header files. Since you did not provide a path" >&5
-echo "$as_me: c-client library/header files. Since you did not provide a path" >&6;}
-        { echo "$as_me:$LINENO: the configure script will assume you have placed built the c-client" >&5
-echo "$as_me: the configure script will assume you have placed built the c-client" >&6;}
-        { echo "$as_me:$LINENO: files at ${IMAP_TK_DIR}, as outlined in the doc/imapstorage.txt file." >&5
-echo "$as_me: files at ${IMAP_TK_DIR}, as outlined in the doc/imapstorage.txt file." >&6;}
-      fi
-   fi
-   if test "${IMAP_TK_DIR}" != "system" ; then
-      { echo "$as_me:$LINENO: checking for UW IMAP Toolkit c-client library" >&5
+       if test "${IMAP_TK_DIR}" = ""; then
+               IMAP_TK_DIR=`pwd`"/../imap-2004g"
+       fi
+       saved_cppflags="${CPPFLAGS}"
+       saved_libs="${LIBS}"
+       if test "${IMAP_TK_DIR}" != "system"; then
+               { echo "$as_me:$LINENO: checking for UW IMAP Toolkit c-client library" >&5
 echo $ECHO_N "checking for UW IMAP Toolkit c-client library... $ECHO_C" >&6; }
-   fi
-   saved_cppflags="${CPPFLAGS}"
-   saved_libs="${LIBS}"
-   if test "${IMAP_TK_DIR}" = "system" ; then
-      imap_ldflags=""
-      imap_libs="-lc-client"
-      imap_include="-DUSE_SYSTEM_IMAP"
-   elif test -f ${IMAP_TK_DIR}/c-client/LDFLAGS ; then
-      imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
-      imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
-      imap_include="-I${IMAP_TK_DIR}/c-client"
-   fi
-   CPPFLAGS="${CPPFLAGS} ${imap_include}"
-   LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
-   cat >conftest.$ac_ext <<_ACEOF
+               if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
+               imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
+               fi
+               imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
+               imap_include="-I${IMAP_TK_DIR}/c-client"
+       CPPFLAGS="${CPPFLAGS} ${imap_include}"
+               LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+               cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.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)
+                               {
+                               }
+int
+main ()
+{
+
+                               MAILSTREAM *foo = mail_open(NULL, "", 0);
+
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_imap_tk="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_imap_tk="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+               if test "${ac_cv_imap_tk}" = "yes"; then
+                       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.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)
+                                       {
+                                       }
+int
+main ()
+{
+
+                                       long check = mail_expunge_full(NULL, "", 0);
+
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_imap_tk2006="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_imap_tk2006="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+               fi
+               CPPFLAGS="${saved_cppflags}"
+               LIBS="${saved_libs}"
+               if test "${ac_cv_imap_tk}" = "yes"; then
+                       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+               IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
+               IMAP_TK_INCLUDE="${imap_include}"
+               PBX_IMAP_TK=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IMAP_TK 1
+_ACEOF
+
+               if test "${ac_cv_imap_tk2006}" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IMAP_TK2006 1
+_ACEOF
+
+               fi
+               else
+                       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                       IMAP_TK_DIR="system"
+               fi
+       fi
+       if test "${IMAP_TK_DIR}" = "system"; then
+               #We will enter here if user specified "system" or if any of above checks failed
+               { echo "$as_me:$LINENO: checking for system c-client library..." >&5
+echo $ECHO_N "checking for system c-client library...... $ECHO_C" >&6; }
+               imap_ldflags=""
+               imap_libs="-lc-client"
+               imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
+               CPPFLAGS="${CPPFLAGS} ${imap_include}"
+               LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+               cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+                               #include <imap/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)
+                               {
+                               }
+int
+main ()
+{
+
+                               MAILSTREAM *foo = mail_open(NULL, "", 0);
+
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_imap_tk="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_imap_tk="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+               if test "${ac_cv_imap_tk}" = "yes"; then
+                       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+                                       #include <imap/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)
+                                       {
+                                       }
+int
+main ()
+{
+
+                                       long check = mail_expunge_full(NULL, "", 0);
+
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_imap_tk2006="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_imap_tk2006="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+               else #looking in imap directory didn't work, try c-client
+                       imap_ldflags=""
+                       imap_libs="-lc-client"
+                       imap_include="-DUSE_SYSTEM_CCLIENT"
+                       CPPFLAGS="${saved_cppflags}"
+                       LIBS="${saved_libs}"
+                       CPPFLAGS="${CPPFLAGS} ${imap_include}"
+                       LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+                       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef USE_SYSTEM_IMAP
-               #include <imap/c-client.h>
-               #else
-               #include "c-client.h"
-               #endif
-               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)
-               {
-               }
+#include <stdio.h>
+                                       #include <c-client/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)
+                                       {
+                                       }
 int
 main ()
 {
 
-               MAILSTREAM *foo = mail_open(NULL, "", 0);
+                                       MAILSTREAM *foo = mail_open(NULL, "", 0);
 
 
   ;
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-   if test "${ac_cv_imap_tk}" = "yes"; then
-   cat >conftest.$ac_ext <<_ACEOF
+                       if test "${ac_cv_imap_tk}" = "yes"; then
+                               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef USE_SYSTEM_IMAP
-        #include <imap/c-client.h>
-        #else
-        #include "c-client.h"
-        #endif
-         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)
-         {
-         }
+#include <stdio.h>
+                                               #include <c-client/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)
+                                               {
+                                               }
 int
 main ()
 {
 
-         long check = mail_expunge_full(NULL, "", 0);
+                                               long check = mail_expunge_full(NULL, "", 0);
 
 
   ;
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-  fi
-   CPPFLAGS="${saved_cppflags}"
-   LIBS="${saved_libs}"
-   if test "${ac_cv_imap_tk}" = "yes"; then
-      { echo "$as_me:$LINENO: result: yes" >&5
+                       fi
+               fi
+               if test "${ac_cv_imap_tk}" = "yes"; then
+                       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
-      IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
-      IMAP_TK_INCLUDE="${imap_include}"
-      PBX_IMAP_TK=1
+                       CPPFLAGS="${saved_cppflags}"
+                       LIBS="${saved_libs}"
+                       IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
+                       IMAP_TK_INCLUDE="${imap_include}"
+                       PBX_IMAP_TK=1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_IMAP_TK 1
 _ACEOF
 
-      if test "${ac_cv_imap_tk2006}" = "yes"; then
+                       if test "${ac_cv_imap_tk2006}" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_IMAP_TK2006 1
 _ACEOF
 
-      fi
-   else
-      { echo "$as_me:$LINENO: result: no" >&5
+                       fi
+               else
+                       { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-   fi
+               fi
+       fi
 fi
 
 
index 172b3d3..9f1287b 100644 (file)
@@ -648,167 +648,407 @@ fi
 AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
 
 if test "${USE_IMAP_TK}" != "no"; then
-   if test "${IMAP_TK_DIR}" = "system" ; then
-      AC_MSG_NOTICE([Checking for system c-client library...])
-   elif test "${IMAP_TK_DIR}" = ""; then
-      IMAP_TK_DIR=`pwd`"/../imap-2004g"
-      if test  -n "${IMAP_TK_MANDATORY}"; then
-        AC_MSG_NOTICE([The --with-imap option does not search your system for installed])
-        AC_MSG_NOTICE([c-client library/header files. Since you did not provide a path])
-        AC_MSG_NOTICE([the configure script will assume you have placed built the c-client])
-        AC_MSG_NOTICE([files at ${IMAP_TK_DIR}, as outlined in the doc/imapstorage.txt file.])
-      fi
-   fi
-   if test "${IMAP_TK_DIR}" != "system" ; then
-      AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
-   fi
-   saved_cppflags="${CPPFLAGS}"
-   saved_libs="${LIBS}"
-   if test "${IMAP_TK_DIR}" = "system" ; then
-      imap_ldflags=""
-      imap_libs="-lc-client"
-      imap_include="-DUSE_SYSTEM_IMAP"
-   elif test -f ${IMAP_TK_DIR}/c-client/LDFLAGS ; then
-      imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
-      imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
-      imap_include="-I${IMAP_TK_DIR}/c-client"
-   fi
-   CPPFLAGS="${CPPFLAGS} ${imap_include}"
-   LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
-   AC_LINK_IFELSE(
-       AC_LANG_PROGRAM(
-               [#ifdef USE_SYSTEM_IMAP
-               #include <imap/c-client.h>
-               #else
-               #include "c-client.h"
-               #endif
-               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)
-               {
-               }],
-               [
-               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(
-         [#ifdef USE_SYSTEM_IMAP
-        #include <imap/c-client.h>
-        #else
-        #include "c-client.h"
-        #endif
-         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
-      AC_MSG_RESULT(yes) 
-      IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
-      IMAP_TK_INCLUDE="${imap_include}"
-      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
-   else
-      AC_MSG_RESULT(no) 
-   fi
+       if test "${IMAP_TK_DIR}" = ""; then
+               IMAP_TK_DIR=`pwd`"/../imap-2004g"
+       fi
+       saved_cppflags="${CPPFLAGS}"
+       saved_libs="${LIBS}"
+       if test "${IMAP_TK_DIR}" != "system"; then
+               AC_MSG_CHECKING(for UW IMAP Toolkit c-client library)
+               if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
+               imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
+               fi
+               imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
+               imap_include="-I${IMAP_TK_DIR}/c-client"
+       CPPFLAGS="${CPPFLAGS} ${imap_include}"
+               LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+               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)
+                               {
+                               }],
+                               [
+                               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
+                       AC_MSG_RESULT(yes)
+               IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
+               IMAP_TK_INCLUDE="${imap_include}"
+               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
+               else
+                       AC_MSG_RESULT(no)
+                       IMAP_TK_DIR="system"
+               fi
+       fi 
+       if test "${IMAP_TK_DIR}" = "system"; then
+               #We will enter here if user specified "system" or if any of above checks failed
+               AC_MSG_CHECKING([for system c-client library...])
+               imap_ldflags=""
+               imap_libs="-lc-client"
+               imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
+               CPPFLAGS="${CPPFLAGS} ${imap_include}"
+               LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+               AC_LINK_IFELSE(
+               AC_LANG_PROGRAM(
+                               [#include <stdio.h>
+                               #include <imap/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)
+                               {
+                               }],
+                               [
+                               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 <stdio.h>
+                                       #include <imap/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"]
+                       )
+               else #looking in imap directory didn't work, try c-client
+                       imap_ldflags=""
+                       imap_libs="-lc-client"
+                       imap_include="-DUSE_SYSTEM_CCLIENT"
+                       CPPFLAGS="${saved_cppflags}"
+                       LIBS="${saved_libs}"
+                       CPPFLAGS="${CPPFLAGS} ${imap_include}"
+                       LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
+                       AC_LINK_IFELSE(
+                       AC_LANG_PROGRAM(
+                                       [#include <stdio.h>
+                                       #include <c-client/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)
+                                       {
+                                       }],
+                                       [
+                                       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 <stdio.h>
+                                               #include <c-client/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
+               fi
+               if test "${ac_cv_imap_tk}" = "yes"; then
+                       AC_MSG_RESULT(yes)
+                       CPPFLAGS="${saved_cppflags}"
+                       LIBS="${saved_libs}"
+                       IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}`
+                       IMAP_TK_INCLUDE="${imap_include}"
+                       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
+               else
+                       AC_MSG_RESULT(no) 
+               fi
+       fi
 fi
 
 AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])