[asterisk-commits] kpfleming: trunk r95937 - in /trunk: ./ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 2 13:34:33 CST 2008
Author: kpfleming
Date: Wed Jan 2 13:34:33 2008
New Revision: 95937
URL: http://svn.digium.com/view/asterisk?view=rev&rev=95937
Log:
improve AC_C_DEFINE_CHECK to not try to evaluate the macro being checked for, but just check for its existence
finish implementation of check for Zaptel HWGAIN support
add check for Zaptel ECHOCANCEL_PARAMS support
Modified:
trunk/acinclude.m4
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
Modified: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk/trunk/acinclude.m4?view=diff&rev=95937&r1=95936&r2=95937
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Wed Jan 2 13:34:33 2008
@@ -100,7 +100,14 @@
CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
AC_COMPILE_IFELSE(
- [ AC_LANG_PROGRAM( [#include <$3>], [int foo = $2;]) ],
+ [ AC_LANG_PROGRAM( [#include <$3>],
+ [#if defined($2)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+ ])],
[ AC_MSG_RESULT(yes)
PBX_$1=1
AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=95937&r1=95936&r2=95937
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Wed Jan 2 13:34:33 2008
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 95624 .
+# From configure.ac Revision: 95817 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk 1.4.
#
@@ -924,6 +924,14 @@
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
@@ -1614,9 +1622,14 @@
--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
@@ -9251,7 +9264,7 @@
- ZAPTEL_TRANSCODE_DESCRIP="Zaptel_transcode"
+ ZAPTEL_TRANSCODE_DESCRIP="Zaptel Transcoder Support"
ZAPTEL_TRANSCODE_OPTION="zaptel_transcode"
# Check whether --with-zaptel_transcode was given.
@@ -9279,7 +9292,7 @@
- ZAPTEL_VLDTMF_DESCRIP="Zaptel_vldtmf"
+ ZAPTEL_VLDTMF_DESCRIP="Zaptel VLDTMF Support"
ZAPTEL_VLDTMF_OPTION="zaptel_vldtmf"
# Check whether --with-zaptel_vldtmf was given.
@@ -9301,6 +9314,62 @@
fi
PBX_ZAPTEL_VLDTMF=0
+
+
+
+
+
+
+ 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
@@ -16600,7 +16669,13 @@
int
main ()
{
-int foo = PTHREAD_RWLOCK_INITIALIZER;
+#if defined(PTHREAD_RWLOCK_INITIALIZER)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -16669,7 +16744,13 @@
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;
}
@@ -16738,7 +16819,13 @@
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;
}
@@ -16807,7 +16894,13 @@
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;
}
@@ -17585,7 +17678,13 @@
int
main ()
{
-int foo = RTLD_NOLOAD;
+#if defined(RTLD_NOLOAD)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -17655,7 +17754,13 @@
int
main ()
{
-int foo = IP_MTU_DISCOVER;
+#if defined(IP_MTU_DISCOVER)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -33803,7 +33908,13 @@
int
main ()
{
-int foo = Fac_RESULT;
+#if defined(Fac_RESULT)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -33872,7 +33983,13 @@
int
main ()
{
-int foo = Fac_ERROR;
+#if defined(Fac_ERROR)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -44557,7 +44674,13 @@
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;
}
@@ -44626,7 +44749,13 @@
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;
}
@@ -44697,7 +44826,13 @@
int
main ()
{
-int foo = ZT_EVENT_REMOVED;
+#if defined(ZT_EVENT_REMOVED)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -44747,7 +44882,84 @@
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
@@ -44768,7 +44980,13 @@
int
main ()
{
-int foo = ZT_TCOP_ALLOCATE;
+#if defined(ZT_TCOP_ALLOCATE)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -44839,7 +45057,13 @@
int
main ()
{
-int foo = ZT_SET_HWGAIN;
+#if defined(ZT_SET_HWGAIN)
+ int foo = 0;
+ #else
+ int foo = bar;
+ #endif
+ 0
+
;
return 0;
}
@@ -49072,6 +49296,14 @@
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
@@ -49117,7 +49349,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; 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
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=95937&r1=95936&r2=95937
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Jan 2 13:34:33 2008
@@ -250,8 +250,10 @@
AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
-AST_EXT_LIB_SETUP([ZAPTEL_TRANSCODE], [Zaptel_transcode], [zaptel_transcode])
-AST_EXT_LIB_SETUP([ZAPTEL_VLDTMF], [Zaptel_vldtmf], [zaptel_vldtmf])
+AST_EXT_LIB_SETUP([ZAPTEL_TRANSCODE], [Zaptel Transcoder Support], [zaptel_transcode])
+AST_EXT_LIB_SETUP([ZAPTEL_VLDTMF], [Zaptel VLDTMF Support], [zaptel_vldtmf])
+AST_EXT_LIB_SETUP([ZAPTEL_HWGAIN], [Zaptel Hardware Gain Support], [zaptel_hwgain])
+AST_EXT_LIB_SETUP([ZAPTEL_ECHOCANPARAMS], [Zaptel Echo Canceler Parameter Support], [zaptel_echocanparams])
AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
@@ -1143,7 +1145,10 @@
# Check for VLDTMF support
AST_C_DEFINE_CHECK([ZAPTEL_VLDTMF], [ZT_EVENT_REMOVED], [zaptel/zaptel.h])
-# Check for transcode support
+# Check for echo canceler parameters support
+AST_C_DEFINE_CHECK([ZAPTEL_ECHOCANPARAMS], [ZT_ECHOCANCEL_PARAMS], [zaptel/zaptel.h])
+
+# Check for transcoder support
AST_C_DEFINE_CHECK([ZAPTEL_TRANSCODE], [ZT_TCOP_ALLOCATE], [zaptel/zaptel.h])
# Check for Zaptel hwgain support
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=95937&r1=95936&r2=95937
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Wed Jan 2 13:34:33 2008
@@ -1011,6 +1011,12 @@
/* Define this to indicate the ${ZAPTEL_DESCRIP} library */
#undef HAVE_ZAPTEL
+
+/* Define if your system has the ZAPTEL_ECHOCANPARAMS headers. */
+#undef HAVE_ZAPTEL_ECHOCANPARAMS
+
+/* Define ZAPTEL_ECHOCANPARAMS headers version */
+#undef HAVE_ZAPTEL_ECHOCANPARAMS_VERSION
/* Define if your system has the ZAPTEL_HWGAIN headers. */
#undef HAVE_ZAPTEL_HWGAIN
More information about the asterisk-commits
mailing list