aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-15 17:32:43 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-15 17:32:43 +0000
commite92a79cd30aedc2300ef4233079c3b1d7594a302 (patch)
tree6f598ed8bc501a6578dc6a871652d7c5693a5a04 /configure.ac
parent2d7e70ff016450bcac99ff5392de65a100cebc58 (diff)
Merged revisions 103722 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103722 | mmichelson | 2008-02-15 11:26:37 -0600 (Fri, 15 Feb 2008) | 8 lines 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. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103725 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac123
1 files changed, 123 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 073ec0fa4..950886aee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -782,12 +782,135 @@ if test "${USE_IMAP_TK}" != "no"; then
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