[asterisk-commits] mmichelson: branch 1.4 r103722 - in /branches/1.4: ./ doc/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 15 11:26:38 CST 2008
Author: mmichelson
Date: Fri Feb 15 11:26:37 2008
New Revision: 103722
URL: http://svn.digium.com/view/asterisk?view=rev&rev=103722
Log:
Final round of changes for configure script logic for IMAP
Now if a directory is specified, then we will search that directory for
a source installation of the IMAP toolkit. If none is found, then we will
use that directory as the basis for detecting a package installation of
the IMAP c-client. If that check fails, then configure will fail.
Modified:
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/doc/imapstorage.txt
Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?view=diff&rev=103722&r1=103721&r2=103722
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Fri Feb 15 11:26:37 2008
@@ -613,12 +613,135 @@
AC_MSG_RESULT(no)
if test "${switch_to_system_on_failure}" = "yes"; then
IMAP_TK_DIR="system"
+ else #This means they specified a directory. Search for a package installation there too
+ AC_MSG_CHECKING([for system c-client library...])
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ imap_include="-I${IMAP_TK_DIR}/include"
+ imap_ldflags="-I${IMAP_TK_DIR}/lib"
+ imap_libs="-lc-client"
+ CPPFLAGS="${CPPFLAGS} ${imap_include}"
+ LIBS="${LIBS} ${imap_libs} ${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
fi
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...])
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
imap_ldflags=""
imap_libs="-lc-client"
imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first
Modified: branches/1.4/doc/imapstorage.txt
URL: http://svn.digium.com/view/asterisk/branches/1.4/doc/imapstorage.txt?view=diff&rev=103722&r1=103721&r2=103722
==============================================================================
--- branches/1.4/doc/imapstorage.txt (original)
+++ branches/1.4/doc/imapstorage.txt Fri Feb 15 11:26:37 2008
@@ -70,7 +70,10 @@
------------------
Configure with ./configure --with-imap=/usr/src/imap
-or where ever you built thfe UWashington IMAP Toolkit.
+or where ever you built thfe UWashington IMAP Toolkit. This directory
+will be searched for a source installation. If no source installation is
+found there, then a package installation of the IMAP c-client will be
+searched for in this directory. If one is not found, then configure will fail
A second configure option is to not specify a directory (i.e.
./configure --with-imap). This will assume that you have the
More information about the asterisk-commits
mailing list