[asterisk-commits] file: trunk r87325 - in /trunk: ./ channels/ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 29 11:34:46 CDT 2007


Author: file
Date: Mon Oct 29 11:34:45 2007
New Revision: 87325

URL: http://svn.digium.com/view/asterisk?view=rev&rev=87325
Log:
Add autoconf checks for extra suppserv definitions that are not present in releases yet. chan_misdn should now build against the latest release.
(closes issue #11103)
Reported by: IgorG

Modified:
    trunk/channels/chan_misdn.c
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=87325&r1=87324&r2=87325
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Mon Oct 29 11:34:45 2007
@@ -452,13 +452,17 @@
 static void print_facility(struct FacParm *fac, struct misdn_bchannel *bc)
 {
 	switch (fac->Function) {
+#ifdef HAVE_MISDN_FAC_RESULT
 		case Fac_RESULT:
 			chan_misdn_log(0, bc->port," --> Received RESULT Operation\n");
 			break;
+#endif
+#ifdef HAVE_MISDN_FAC_ERROR
 		case Fac_ERROR:
 			chan_misdn_log(0, bc->port," --> Received Error Operation\n");
 			chan_misdn_log(0, bc->port," --> Value:%d Error:%s\n",fac->u.ERROR.errorValue, fac->u.ERROR.error);
 			break;
+#endif
 		case Fac_CD:
 			chan_misdn_log(1,bc->port," --> calldeflect to: %s, screened: %s\n", fac->u.CDeflection.DeflectedToNumber,
 					fac->u.CDeflection.PresentationAllowed ? "yes" : "no");
@@ -4908,8 +4912,10 @@
 		print_facility(&(bc->fac_in), bc);
 		
 		switch (bc->fac_in.Function) {
+#ifdef HAVE_MISDN_FAC_RESULT
 		case Fac_RESULT:
 		break;
+#endif
 		case Fac_CD:
 			if (ch) {
 				struct ast_channel *bridged = ast_bridged_channel(ch->ast);
@@ -4946,7 +4952,9 @@
 			}
 			break;
 		case Fac_None:
+#ifdef HAVE_MISDN_FAC_ERROR
 		case Fac_ERROR:
+#endif
 		break;
 		default:
 			chan_misdn_log(0, bc->port," --> not yet handled: facility type:%p\n", bc->fac_in.Function);

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=87325&r1=87324&r2=87325
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Mon Oct 29 11:34:45 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 85542 .
+# From configure.ac Revision: 87247 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -39647,6 +39647,144 @@
    fi
 fi
 
+
+    if test "x${PBX_MISDN_FAC_RESULT}" != "x1" -a "${USE_MISDN_FAC_RESULT}" != "no"; then
+	{ echo "$as_me:$LINENO: checking for Fac_RESULT in mISDNuser/suppserv.h" >&5
+echo $ECHO_N "checking for Fac_RESULT in mISDNuser/suppserv.h... $ECHO_C" >&6; }
+	saved_cppflags="${CPPFLAGS}"
+	if test "x${MISDN_FAC_RESULT_DIR}" != "x"; then
+	    MISDN_FAC_RESULT_INCLUDE="-I${MISDN_FAC_RESULT_DIR}/include"
+	fi
+	CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_RESULT_INCLUDE}"
+
+	cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <mISDNuser/suppserv.h>
+int
+main ()
+{
+int foo = Fac_RESULT;
+  ;
+  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_MISDN_FAC_RESULT=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_RESULT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_RESULT_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
+
+
+    if test "x${PBX_MISDN_FAC_ERROR}" != "x1" -a "${USE_MISDN_FAC_ERROR}" != "no"; then
+	{ echo "$as_me:$LINENO: checking for Fac_ERROR in mISDNuser/suppserv.h" >&5
+echo $ECHO_N "checking for Fac_ERROR in mISDNuser/suppserv.h... $ECHO_C" >&6; }
+	saved_cppflags="${CPPFLAGS}"
+	if test "x${MISDN_FAC_ERROR_DIR}" != "x"; then
+	    MISDN_FAC_ERROR_INCLUDE="-I${MISDN_FAC_ERROR_DIR}/include"
+	fi
+	CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_ERROR_INCLUDE}"
+
+	cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <mISDNuser/suppserv.h>
+int
+main ()
+{
+int foo = Fac_ERROR;
+  ;
+  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_MISDN_FAC_ERROR=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_ERROR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MISDN_FAC_ERROR_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
+
    if test "${ac_cv_header_linux_mISDNdsp_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for linux/mISDNdsp.h" >&5
 echo $ECHO_N "checking for linux/mISDNdsp.h... $ECHO_C" >&6; }

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=87325&r1=87324&r2=87325
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Oct 29 11:34:45 2007
@@ -783,6 +783,8 @@
 if test "${PBX_MISDN}" = 1; then
    AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
    AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
+   AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
+   AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
    AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
 fi
 

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=87325&r1=87324&r2=87325
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Mon Oct 29 11:34:45 2007
@@ -432,6 +432,18 @@
 
 /* Define this to indicate the ${MISDN_DESCRIP} library */
 #undef HAVE_MISDN
+
+/* Define if your system has the MISDN_FAC_ERROR headers. */
+#undef HAVE_MISDN_FAC_ERROR
+
+/* Define MISDN_FAC_ERROR headers version */
+#undef HAVE_MISDN_FAC_ERROR_VERSION
+
+/* Define if your system has the MISDN_FAC_RESULT headers. */
+#undef HAVE_MISDN_FAC_RESULT
+
+/* Define MISDN_FAC_RESULT headers version */
+#undef HAVE_MISDN_FAC_RESULT_VERSION
 
 /* Define to indicate the ${MISDN_DESCRIP} library version */
 #undef HAVE_MISDN_VERSION




More information about the asterisk-commits mailing list