]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD.
authorAlexander Traud <pabstraud@compuserve.com>
Fri, 20 Apr 2018 12:13:12 +0000 (14:13 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Fri, 20 Apr 2018 12:15:48 +0000 (06:15 -0600)
ASTERISK-27639

Change-Id: I1347f3f2f3737010d0a80a5c30b5aaf71cf3ccb0

configure
configure.ac

index d8aebc774f344c1f4d4ed4639c5bc9d11cdc0fdc..7c52cf1e5bc659fb30da30562c6f35977419b0d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -21769,6 +21769,78 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+                       if test "${ac_cv_imap_tk}" = "no"; then
+                               imap_libs="-lcrypto -lssl -lc-client4"
+                               LIBS="${saved_libs} ${imap_libs} "`echo ${imap_ldflags}`
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#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);
+
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_imap_tk="yes"
+else
+  ac_cv_imap_tk="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       fi
                        if test "${ac_cv_imap_tk}" = "yes"; then
                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
index 61db0e2d6d77a8393ac02db5395a6735e63c44d2..1bd820528df593c4c89c7ea5fa71ec33636d2798 100644 (file)
@@ -2041,6 +2041,66 @@ if test "${USE_IMAP_TK}" != "no"; then
                                [ac_cv_imap_tk="yes"],
                                [ac_cv_imap_tk="no"]
                        )
+                       if test "${ac_cv_imap_tk}" = "no"; then
+                               imap_libs="-lcrypto -lssl -lc-client4"
+                               LIBS="${saved_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"]
+                               )
+                       fi
                        if test "${ac_cv_imap_tk}" = "yes"; then
                                AC_LINK_IFELSE(
                                        [AC_LANG_PROGRAM(