diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-25 19:20:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-25 19:20:07 +0000 |
commit | 9a940a47bcf36cf22fbf2c059494f8c61368f1f3 (patch) | |
tree | 32f81066fe9a9bf731601603722cfc97538f8c8f /configure | |
parent | e42ecf03f23df756e9e2a4f71d3a8637bcff674f (diff) |
Allow compilation off app_voicemail with IMAP_STORAE against a system installed
version of the c-client library. (issue #10047, jcollie)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71688 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 29 insertions, 10 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 67029 . +# From configure.ac Revision: 69703 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -19102,7 +19102,10 @@ fi fi if test "${USE_IMAP_TK}" != "no"; then - if test "${IMAP_TK_DIR}" = ""; 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 @@ -19115,22 +19118,34 @@ echo "$as_me: the configure script will assume you have placed built the c-clien echo "$as_me: files at ${IMAP_TK_DIR}, as outlined in the doc/imapstorage.txt file." >&6;} fi fi - { echo "$as_me:$LINENO: checking for UW IMAP Toolkit c-client library" >&5 + 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 -f ${IMAP_TK_DIR}/c-client/LDFLAGS ; then + 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} -I${IMAP_TK_DIR}/c-client" - LIBS="${LIBS} ${IMAP_TK_DIR}/c-client/c-client.a "`echo ${imap_ldflags}` + 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" +#ifdef USE_SYSTEM_IMAP + #include <imap/c-client.h> + #else + #include "c-client.h" + #endif void mm_searched (MAILSTREAM *stream,unsigned long number) { } @@ -19223,7 +19238,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "c-client.h" +#ifdef USE_SYSTEM_IMAP + #include <imap/c-client.h> + #else + #include "c-client.h" + #endif void mm_searched (MAILSTREAM *stream,unsigned long number) { } @@ -19315,8 +19334,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ if test "${ac_cv_imap_tk}" = "yes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - IMAP_TK_LIB="${IMAP_TK_DIR}/c-client/c-client.a "`echo ${imap_ldflags}` - IMAP_TK_INCLUDE="-I${IMAP_TK_DIR}/c-client" + IMAP_TK_LIB="${imap_libs}"`echo ${imap_ldflags}` + IMAP_TK_INCLUDE="${imap_include}" PBX_IMAP_TK=1 cat >>confdefs.h <<\_ACEOF |