improve AC_C_DEFINE_CHECK to not try to evaluate the macro being checked for, but...
[asterisk/asterisk.git] / configure
index c1040af..69fdc12 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 95383 .
+# From configure.ac Revision: 95817 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.4.
 #
@@ -756,6 +756,10 @@ GTK2_LIB
 GTK2_INCLUDE
 GTK2_DIR
 PBX_GTK2
+ICONV_LIB
+ICONV_INCLUDE
+ICONV_DIR
+PBX_ICONV
 IKSEMEL_LIB
 IKSEMEL_INCLUDE
 IKSEMEL_DIR
@@ -920,6 +924,14 @@ ZAPTEL_VLDTMF_LIB
 ZAPTEL_VLDTMF_INCLUDE
 ZAPTEL_VLDTMF_DIR
 PBX_ZAPTEL_VLDTMF
+ZAPTEL_HWGAIN_LIB
+ZAPTEL_HWGAIN_INCLUDE
+ZAPTEL_HWGAIN_DIR
+PBX_ZAPTEL_HWGAIN
+ZAPTEL_ECHOCANPARAMS_LIB
+ZAPTEL_ECHOCANPARAMS_INCLUDE
+ZAPTEL_ECHOCANPARAMS_DIR
+PBX_ZAPTEL_ECHOCANPARAMS
 SDL_LIB
 SDL_INCLUDE
 SDL_DIR
@@ -1568,6 +1580,7 @@ Optional Packages:
                           'internal' GSM otherwise
   --with-gtk=PATH         use gtk libraries files in PATH
   --with-gtk2=PATH        use gtk2 libraries files in PATH
+  --with-iconv=PATH       use Iconv Library files in PATH
   --with-iksemel=PATH     use Iksemel Jabber Library files in PATH
   --with-imap=PATH        use UW IMAP Toolkit files in PATH
   --with-isdnnet=PATH     use ISDN4Linux Library files in PATH
@@ -1609,9 +1622,14 @@ Optional Packages:
   --with-z=PATH           use zlib files in PATH
   --with-zaptel=PATH      use Zaptel files in PATH
   --with-zaptel_transcode=PATH
-                          use Zaptel_transcode files in PATH
+                          use Zaptel Transcoder Support files in PATH
   --with-zaptel_vldtmf=PATH
-                          use Zaptel_vldtmf files in PATH
+                          use Zaptel VLDTMF Support files in PATH
+  --with-zaptel_hwgain=PATH
+                          use Zaptel Hardware Gain Support files in PATH
+  --with-zaptel_echocanparams=PATH
+                          use Zaptel Echo Canceler Parameter Support files in
+                          PATH
   --with-sdl=PATH         use Sdl files in PATH
   --with-SDL_image=PATH   use Sdl Image library files in PATH
   --with-avcodec=PATH     use Ffmpeg and avcodec library files in PATH
@@ -8126,6 +8144,34 @@ fi
 
 
 
+    ICONV_DESCRIP="Iconv Library"
+    ICONV_OPTION="iconv"
+
+# Check whether --with-iconv was given.
+if test "${with_iconv+set}" = set; then
+  withval=$with_iconv;
+       case ${withval} in
+       n|no)
+       USE_ICONV=no
+       ;;
+       y|ye|yes)
+       ac_mandatory_list="${ac_mandatory_list} ICONV"
+       ;;
+       *)
+       ICONV_DIR="${withval}"
+       ac_mandatory_list="${ac_mandatory_list} ICONV"
+       ;;
+       esac
+
+fi
+
+    PBX_ICONV=0
+
+
+
+
+
+
     IKSEMEL_DESCRIP="Iksemel Jabber Library"
     IKSEMEL_OPTION="iksemel"
 
@@ -9218,7 +9264,7 @@ fi
 
 
 
-    ZAPTEL_TRANSCODE_DESCRIP="Zaptel_transcode"
+    ZAPTEL_TRANSCODE_DESCRIP="Zaptel Transcoder Support"
     ZAPTEL_TRANSCODE_OPTION="zaptel_transcode"
 
 # Check whether --with-zaptel_transcode was given.
@@ -9246,7 +9292,7 @@ fi
 
 
 
-    ZAPTEL_VLDTMF_DESCRIP="Zaptel_vldtmf"
+    ZAPTEL_VLDTMF_DESCRIP="Zaptel VLDTMF Support"
     ZAPTEL_VLDTMF_OPTION="zaptel_vldtmf"
 
 # Check whether --with-zaptel_vldtmf was given.
@@ -9274,6 +9320,62 @@ fi
 
 
 
+    ZAPTEL_HWGAIN_DESCRIP="Zaptel Hardware Gain Support"
+    ZAPTEL_HWGAIN_OPTION="zaptel_hwgain"
+
+# Check whether --with-zaptel_hwgain was given.
+if test "${with_zaptel_hwgain+set}" = set; then
+  withval=$with_zaptel_hwgain;
+       case ${withval} in
+       n|no)
+       USE_ZAPTEL_HWGAIN=no
+       ;;
+       y|ye|yes)
+       ac_mandatory_list="${ac_mandatory_list} ZAPTEL_HWGAIN"
+       ;;
+       *)
+       ZAPTEL_HWGAIN_DIR="${withval}"
+       ac_mandatory_list="${ac_mandatory_list} ZAPTEL_HWGAIN"
+       ;;
+       esac
+
+fi
+
+    PBX_ZAPTEL_HWGAIN=0
+
+
+
+
+
+
+    ZAPTEL_ECHOCANPARAMS_DESCRIP="Zaptel Echo Canceler Parameter Support"
+    ZAPTEL_ECHOCANPARAMS_OPTION="zaptel_echocanparams"
+
+# Check whether --with-zaptel_echocanparams was given.
+if test "${with_zaptel_echocanparams+set}" = set; then
+  withval=$with_zaptel_echocanparams;
+       case ${withval} in
+       n|no)
+       USE_ZAPTEL_ECHOCANPARAMS=no
+       ;;
+       y|ye|yes)
+       ac_mandatory_list="${ac_mandatory_list} ZAPTEL_ECHOCANPARAMS"
+       ;;
+       *)
+       ZAPTEL_ECHOCANPARAMS_DIR="${withval}"
+       ac_mandatory_list="${ac_mandatory_list} ZAPTEL_ECHOCANPARAMS"
+       ;;
+       esac
+
+fi
+
+    PBX_ZAPTEL_ECHOCANPARAMS=0
+
+
+
+
+
+
 
     SDL_DESCRIP="Sdl"
     SDL_OPTION="sdl"
@@ -16567,7 +16669,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = PTHREAD_RWLOCK_INITIALIZER;
+#if defined(PTHREAD_RWLOCK_INITIALIZER)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -16636,7 +16744,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = PTHREAD_RWLOCK_PREFER_WRITER_NP;
+#if defined(PTHREAD_RWLOCK_PREFER_WRITER_NP)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -16705,7 +16819,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = PTHREAD_MUTEX_RECURSIVE_NP;
+#if defined(PTHREAD_MUTEX_RECURSIVE_NP)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -16774,7 +16894,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -17552,7 +17678,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = RTLD_NOLOAD;
+#if defined(RTLD_NOLOAD)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -17622,7 +17754,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = IP_MTU_DISCOVER;
+#if defined(IP_MTU_DISCOVER)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -31715,6 +31853,272 @@ _ACEOF
    fi
 fi
 
+if test "${host_os}" != "linux-gnu" ; then
+
+if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
+   pbxlibdir=""
+   # if --with-ICONV=DIR has been specified, use it.
+   if test "x${ICONV_DIR}" != "x"; then
+      if test -d ${ICONV_DIR}/lib; then
+        pbxlibdir="-L${ICONV_DIR}/lib"
+      else
+        pbxlibdir="-L${ICONV_DIR}"
+      fi
+   fi
+   pbxfuncname="iconv_open"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_ICONV_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -liconv" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -liconv... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_ICONV_FOUND=yes
+else
+  AST_ICONV_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_ICONV_FOUND}" = "yes"; then
+      ICONV_LIB="${pbxlibdir} -liconv "
+      # if --with-ICONV=DIR has been specified, use it.
+      if test "x${ICONV_DIR}" != "x"; then
+        ICONV_INCLUDE="-I${ICONV_DIR}/include"
+      fi
+      ICONV_INCLUDE="${ICONV_INCLUDE} "
+      if test "xiconv.h" = "x" ; then  # no header, assume found
+         ICONV_HEADER_FOUND="1"
+      else                             # check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE} "
+        if test "${ac_cv_header_iconv_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_iconv_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <iconv.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: iconv.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to www.asterisk.org ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_iconv_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_iconv_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; }
+
+fi
+if test $ac_cv_header_iconv_h = yes; then
+  ICONV_HEADER_FOUND=1
+else
+  ICONV_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
+         ICONV_LIB=""
+         ICONV_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
+           ICONV_LIB=""
+        fi
+         PBX_ICONV=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ICONV_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+else
+  PBX_ICONV=1
+fi
+
 
 if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then
    pbxlibdir=""
@@ -33504,7 +33908,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = Fac_RESULT;
+#if defined(Fac_RESULT)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -33573,7 +33983,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = Fac_ERROR;
+#if defined(Fac_ERROR)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -44258,7 +44674,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = ZT_TONE_DTMF_BASE;
+#if defined(ZT_TONE_DTMF_BASE)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -44327,7 +44749,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = ZT_DIAL_OP_CANCEL;
+#if defined(ZT_DIAL_OP_CANCEL)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -44398,7 +44826,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = ZT_EVENT_REMOVED;
+#if defined(ZT_EVENT_REMOVED)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -44448,7 +44882,84 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     fi
 
 
-# Check for transcode support
+# Check for echo canceler parameters support
+
+    if test "x${PBX_ZAPTEL_ECHOCANPARAMS}" != "x1" -a "${USE_ZAPTEL_ECHOCANPARAMS}" != "no"; then
+       { echo "$as_me:$LINENO: checking for ZT_ECHOCANCEL_PARAMS in zaptel/zaptel.h" >&5
+echo $ECHO_N "checking for ZT_ECHOCANCEL_PARAMS in zaptel/zaptel.h... $ECHO_C" >&6; }
+       saved_cppflags="${CPPFLAGS}"
+       if test "x${ZAPTEL_ECHOCANPARAMS_DIR}" != "x"; then
+           ZAPTEL_ECHOCANPARAMS_INCLUDE="-I${ZAPTEL_ECHOCANPARAMS_DIR}/include"
+       fi
+       CPPFLAGS="${CPPFLAGS} ${ZAPTEL_ECHOCANPARAMS_INCLUDE}"
+
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zaptel/zaptel.h>
+int
+main ()
+{
+#if defined(ZT_ECHOCANCEL_PARAMS)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+               PBX_ZAPTEL_ECHOCANPARAMS=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZAPTEL_ECHOCANPARAMS 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZAPTEL_ECHOCANPARAMS_VERSION
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+              { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       CPPFLAGS="${saved_cppflags}"
+    fi
+
+
+# Check for transcoder support
 
     if test "x${PBX_ZAPTEL_TRANSCODE}" != "x1" -a "${USE_ZAPTEL_TRANSCODE}" != "no"; then
        { echo "$as_me:$LINENO: checking for ZT_TCOP_ALLOCATE in zaptel/zaptel.h" >&5
@@ -44469,7 +44980,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = ZT_TCOP_ALLOCATE;
+#if defined(ZT_TCOP_ALLOCATE)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -44540,7 +45057,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int foo = ZT_SET_HWGAIN;
+#if defined(ZT_SET_HWGAIN)
+                               int foo = 0;
+                               #else
+                               int foo = bar;
+                               #endif
+                               0
+
   ;
   return 0;
 }
@@ -48523,6 +49046,10 @@ GTK2_LIB!$GTK2_LIB$ac_delim
 GTK2_INCLUDE!$GTK2_INCLUDE$ac_delim
 GTK2_DIR!$GTK2_DIR$ac_delim
 PBX_GTK2!$PBX_GTK2$ac_delim
+ICONV_LIB!$ICONV_LIB$ac_delim
+ICONV_INCLUDE!$ICONV_INCLUDE$ac_delim
+ICONV_DIR!$ICONV_DIR$ac_delim
+PBX_ICONV!$PBX_ICONV$ac_delim
 IKSEMEL_LIB!$IKSEMEL_LIB$ac_delim
 IKSEMEL_INCLUDE!$IKSEMEL_INCLUDE$ac_delim
 IKSEMEL_DIR!$IKSEMEL_DIR$ac_delim
@@ -48577,10 +49104,6 @@ OGG_DIR!$OGG_DIR$ac_delim
 PBX_OGG!$PBX_OGG$ac_delim
 OSPTK_LIB!$OSPTK_LIB$ac_delim
 OSPTK_INCLUDE!$OSPTK_INCLUDE$ac_delim
-OSPTK_DIR!$OSPTK_DIR$ac_delim
-PBX_OSPTK!$PBX_OSPTK$ac_delim
-OSS_LIB!$OSS_LIB$ac_delim
-OSS_INCLUDE!$OSS_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -48622,6 +49145,10 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+OSPTK_DIR!$OSPTK_DIR$ac_delim
+PBX_OSPTK!$PBX_OSPTK$ac_delim
+OSS_LIB!$OSS_LIB$ac_delim
+OSS_INCLUDE!$OSS_INCLUDE$ac_delim
 OSS_DIR!$OSS_DIR$ac_delim
 PBX_OSS!$PBX_OSS$ac_delim
 PGSQL_LIB!$PGSQL_LIB$ac_delim
@@ -48715,10 +49242,6 @@ PBX_X11!$PBX_X11$ac_delim
 ZLIB_LIB!$ZLIB_LIB$ac_delim
 ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim
 ZLIB_DIR!$ZLIB_DIR$ac_delim
-PBX_ZLIB!$PBX_ZLIB$ac_delim
-ZAPTEL_LIB!$ZAPTEL_LIB$ac_delim
-ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim
-ZAPTEL_DIR!$ZAPTEL_DIR$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -48760,6 +49283,10 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PBX_ZLIB!$PBX_ZLIB$ac_delim
+ZAPTEL_LIB!$ZAPTEL_LIB$ac_delim
+ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim
+ZAPTEL_DIR!$ZAPTEL_DIR$ac_delim
 PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim
 ZAPTEL_TRANSCODE_LIB!$ZAPTEL_TRANSCODE_LIB$ac_delim
 ZAPTEL_TRANSCODE_INCLUDE!$ZAPTEL_TRANSCODE_INCLUDE$ac_delim
@@ -48769,6 +49296,14 @@ ZAPTEL_VLDTMF_LIB!$ZAPTEL_VLDTMF_LIB$ac_delim
 ZAPTEL_VLDTMF_INCLUDE!$ZAPTEL_VLDTMF_INCLUDE$ac_delim
 ZAPTEL_VLDTMF_DIR!$ZAPTEL_VLDTMF_DIR$ac_delim
 PBX_ZAPTEL_VLDTMF!$PBX_ZAPTEL_VLDTMF$ac_delim
+ZAPTEL_HWGAIN_LIB!$ZAPTEL_HWGAIN_LIB$ac_delim
+ZAPTEL_HWGAIN_INCLUDE!$ZAPTEL_HWGAIN_INCLUDE$ac_delim
+ZAPTEL_HWGAIN_DIR!$ZAPTEL_HWGAIN_DIR$ac_delim
+PBX_ZAPTEL_HWGAIN!$PBX_ZAPTEL_HWGAIN$ac_delim
+ZAPTEL_ECHOCANPARAMS_LIB!$ZAPTEL_ECHOCANPARAMS_LIB$ac_delim
+ZAPTEL_ECHOCANPARAMS_INCLUDE!$ZAPTEL_ECHOCANPARAMS_INCLUDE$ac_delim
+ZAPTEL_ECHOCANPARAMS_DIR!$ZAPTEL_ECHOCANPARAMS_DIR$ac_delim
+PBX_ZAPTEL_ECHOCANPARAMS!$PBX_ZAPTEL_ECHOCANPARAMS$ac_delim
 SDL_LIB!$SDL_LIB$ac_delim
 SDL_INCLUDE!$SDL_INCLUDE$ac_delim
 SDL_DIR!$SDL_DIR$ac_delim
@@ -48814,7 +49349,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5