diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac index 64e97329f..63fd4d437 100644 --- a/configure.ac +++ b/configure.ac @@ -479,8 +479,10 @@ if test "${PBX_IKSEMEL}" = 1; then fi if test "${USE_IMAP_TK}" != "no"; then + switch_to_system_on_failure="no" if test "${IMAP_TK_DIR}" = ""; then IMAP_TK_DIR=`pwd`"/../imap-2004g" + switch_to_system_on_failure="yes" fi saved_cppflags="${CPPFLAGS}" saved_libs="${LIBS}" @@ -607,18 +609,11 @@ if test "${USE_IMAP_TK}" != "no"; then fi CPPFLAGS="${saved_cppflags}" LIBS="${saved_libs}" - if test "${ac_cv_imap_tk}" = "yes"; then - AC_MSG_RESULT(yes) - IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}` - IMAP_TK_INCLUDE="${imap_include}" - PBX_IMAP_TK=1 - AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.]) - if test "${ac_cv_imap_tk2006}" = "yes"; then - AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.]) - fi - else + if test "${ac_cv_imap_tk}" = "no"; then AC_MSG_RESULT(no) - IMAP_TK_DIR="system" + if test "${switch_to_system_on_failure}" = "yes"; then + IMAP_TK_DIR="system" + fi fi fi if test "${IMAP_TK_DIR}" = "system"; then @@ -865,27 +860,27 @@ if test "${USE_IMAP_TK}" != "no"; then ) fi fi - if test "${ac_cv_imap_tk}" = "yes"; then - AC_MSG_RESULT(yes) - CPPFLAGS="${saved_cppflags}" - LIBS="${saved_libs}" - IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}` - IMAP_TK_INCLUDE="${imap_include}" - PBX_IMAP_TK=1 - AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.]) - if test "${ac_cv_imap_tk2006}" = "yes"; then - AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.]) - fi - elif test -n "${IMAP_TK_MANDATORY}"; then - AC_MSG_RESULT(no) - AC_MSG_NOTICE([***]) - AC_MSG_NOTICE([*** The UW IMAP Toolkit installation on this system appears to be broken.]) - AC_MSG_NOTICE([*** Either correct the installation, or run configure]) - AC_MSG_NOTICE([*** including --without-imap.]) - exit 1 - else - AC_MSG_RESULT(no) + fi + if test "${ac_cv_imap_tk}" = "yes"; then + AC_MSG_RESULT(yes) + CPPFLAGS="${saved_cppflags}" + LIBS="${saved_libs}" + IMAP_TK_LIB="${imap_libs} "`echo ${imap_ldflags}` + IMAP_TK_INCLUDE="${imap_include}" + PBX_IMAP_TK=1 + AC_DEFINE([HAVE_IMAP_TK], 1, [Define if your system has the UW IMAP Toolkit c-client library.]) + if test "${ac_cv_imap_tk2006}" = "yes"; then + AC_DEFINE([HAVE_IMAP_TK2006], 1, [Define if your system has the UW IMAP Toolkit c-client library version 2006 or greater.]) fi + elif test -n "${IMAP_TK_MANDATORY}"; then + AC_MSG_RESULT(no) + AC_MSG_NOTICE([***]) + AC_MSG_NOTICE([*** The UW IMAP Toolkit installation on this system appears to be broken.]) + AC_MSG_NOTICE([*** Either correct the installation, or run configure]) + AC_MSG_NOTICE([*** including --without-imap.]) + exit 1 + else + AC_MSG_RESULT(no) fi fi |