aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-01 23:34:35 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-01 23:34:35 +0000
commit58b3ae99dab0813c052e955e4d57633c8ff75ffa (patch)
tree31506c2c5e5973186b1ef469f640e9e15d69ec37 /configure.ac
parentbedf187f62b71ca70171aa209380ae5608c95597 (diff)
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/branches/1.4@49102 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac63
1 files changed, 40 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 43ed4a332..4caa617cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -942,7 +942,7 @@ AC_LANG_POP
AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
if test "${USE_ZAPTEL}" != "no"; then
- AC_MSG_CHECKING(for ZT_TONE_DTMF_BASE in zaptel.h)
+ AC_MSG_CHECKING(for ZT_DIAL_OP_CANCEL in zaptel/zaptel.h)
saved_cppflags="${CPPFLAGS}"
if test "x${ZAPTEL_DIR}" != "x"; then
CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
@@ -951,7 +951,7 @@ if test "${USE_ZAPTEL}" != "no"; then
[
AC_LANG_PROGRAM(
[#include <zaptel/zaptel.h>],
- [int foo = ZT_TONE_DTMF_BASE;])
+ [int foo = ZT_DIAL_OP_CANCEL;])
],
[ AC_MSG_RESULT(yes)
ac_cv_zaptel_h="yes"
@@ -977,37 +977,54 @@ if test "${USE_ZAPTEL}" != "no"; then
fi
fi
-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(
+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