aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-15 17:26:37 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-15 17:26:37 +0000
commit9ffccc9423fe00dc1b6e553cda5836fefd21fde5 (patch)
tree4be41099a7c1b0766e197d334125d9d7ebcc7131 /configure
parentd2725377f5d62c9aa6be659ed2256932ab22f012 (diff)
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/branches/1.4@103722 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure200
1 files changed, 199 insertions, 1 deletions
diff --git a/configure b/configure
index 12c013ac8..3adab9868 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 103709 .
+# From configure.ac Revision: 103713 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk 1.4.
#
@@ -19481,6 +19481,202 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
echo "${ECHO_T}no" >&6; }
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
+ { echo "$as_me:$LINENO: checking for system c-client library..." >&5
+echo $ECHO_N "checking for system c-client library...... $ECHO_C" >&6; }
+ 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}"
+ 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
fi
fi
fi
@@ -19488,6 +19684,8 @@ echo "${ECHO_T}no" >&6; }
#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; }
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
imap_ldflags=""
imap_libs="-lc-client"
imap_include="-DUSE_SYSTEM_IMAP" #Try the imap directory first