aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-01 23:43:43 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-01 23:43:43 +0000
commit6fa0d7528f0db06c526290b63e152b8f5f139940 (patch)
tree082ad1df57bb4b251643a8e175553417d8d137ac /configure.ac
parent21f3c330f27ae80840a0873bcd25d4de1ab4e728 (diff)
Merged revisions 49102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49102 | kpfleming | 2007-01-01 17:34:35 -0600 (Mon, 01 Jan 2007) | 2 lines check specifically for VLDTMF and transcoding support in the system's Zaptel installation, and make only the modules that need those features dependent on them (this will allow building the other Zaptel-using parts of Asterisk against older versions of Zaptel or those on other platforms that haven't caught up yet to the Linux version) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49103 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac66
1 files changed, 40 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index ee7a6e4b2..59ac22402 100644
--- a/configure.ac
+++ b/configure.ac
@@ -853,42 +853,56 @@ AC_LANG_POP
AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
-# check for zaptel 1.4.0
-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(
+AST_C_DEFINE_CHECK([ZAPTEL], [ZT_DIAL_OP_CANCEL], [zaptel/zaptel.h])
+
+if test "${PBX_ZAPTEL}" = 1; then
+ AC_MSG_CHECKING(for ZT_TONE_DTMF_BASE in zaptel/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;])
+ [#include <zaptel/zaptel.h>],
+ [int foo = ZT_TONE_DTMF_BASE;])
],
[ AC_MSG_RESULT(yes)
- ac_cv_zaptel_h="yes"
+ ac_cv_zaptel_vldtmf="yes"
],
[ AC_MSG_RESULT(no)
- ac_cv_zaptel_h="no"
+ ac_cv_zaptel_vldtmf="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
+ CPPFLAGS="${saved_cppflags}"
+ if test "${ac_cv_zaptel_vldtmf}" = "yes"; then
+ PBX_ZAPTEL_VLDTMF=1
+ fi
+ AC_MSG_CHECKING(for ZT_TCOP_TRANSCODE in zaptel/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/zaptel.h>],
+ [int foo = ZT_TCOP_TRANSCODE;])
+ ],
+ [ AC_MSG_RESULT(yes)
+ ac_cv_zaptel_transcode="yes"
+ ],
+ [ AC_MSG_RESULT(no)
+ ac_cv_zaptel_transcode="no"
+ ]
+ )
+ CPPFLAGS="${saved_cppflags}"
+ if test "${ac_cv_zaptel_transcode}" = "yes"; then
+ PBX_ZAPTEL_TRANSCODE=1
fi
fi
+AC_SUBST(PBX_ZAPTEL_VLDTMF)
+AC_SUBST(PBX_ZAPTEL_TRANSCODE)
EDITLINE_LIB=""
if test "x$TERMCAP_LIB" != "x" ; then