summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0241bf573..f9519beb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -851,6 +851,38 @@ AST_C_DEFINE_CHECK([ZAPTEL], [ZT_TONE_DTMF_BASE], [zaptel/zaptel.h], [140])
# or, try old zaptel (0.80 or so)
AST_EXT_LIB_CHECK([ZAPTEL], [zaptel],, [zaptel.h],, [80])
+if test "${USE_ZAPTEL}" != "no"; then
+ if test "${PBX_ZAPTEL}" != "1"; then
+ AC_MSG_CHECKING(for ZT_DIAL_OP_CANCEL in zaptel.h)
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${ZAPTEL_DIR}" != "x"; then
+ CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
+ fi
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [#include <zaptel.h>],
+ [int foo = ZT_DIAL_OP_CANCEL;])
+ ],
+ [ AC_MSG_RESULT(yes)
+ ac_cv_zaptel_h="yes"
+ ],
+ [ AC_MSG_RESULT(no)
+ ac_cv_zaptel_h="no"
+ ]
+ )
+ CPPFLAGS="${saved_cppflags}"
+ if test "${ac_cv_zaptel_h}" = "yes"; then
+ AC_MSG_NOTICE(***)
+ AC_MSG_NOTICE(*** The Zaptel installation on this system is too old)
+ AC_MSG_NOTICE(*** to be useable with this version of Asterisk.)
+ AC_MSG_NOTICE(*** Either upgrade your Zaptel installation, or run configure)
+ AC_MSG_NOTICE(*** including --without-zaptel.)
+ exit 1
+ fi
+ fi
+fi
+
EDITLINE_LIB=""
if test "x$TERMCAP_LIB" != "x" ; then
EDITLINE_LIB="$TERMCAP_LIB"