[asterisk-commits] kpfleming: trunk r47759 - in /trunk: ./ configure configure.ac

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 16 13:11:00 MST 2006


Author: kpfleming
Date: Thu Nov 16 14:10:59 2006
New Revision: 47759

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47759
Log:
Merged revisions 47758 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47758 | kpfleming | 2006-11-16 14:09:10 -0600 (Thu, 16 Nov 2006) | 2 lines

check for pre-1.4 versions of Zaptel and abort the configure script if found with an appropriate error message

........

Modified:
    trunk/   (props changed)
    trunk/configure
    trunk/configure.ac

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=47759&r1=47758&r2=47759
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Nov 16 14:10:59 2006
@@ -32972,6 +32972,98 @@
 fi
 
 
+if test "${USE_ZAPTEL}" != "no"; then
+   if test "${PBX_ZAPTEL}" != "1"; then
+      { echo "$as_me:$LINENO: checking for ZT_DIAL_OP_CANCEL in zaptel.h" >&5
+echo $ECHO_N "checking for ZT_DIAL_OP_CANCEL in zaptel.h... $ECHO_C" >&6; }
+      saved_cppflags="${CPPFLAGS}"
+      if test "x${ZAPTEL_DIR}" != "x"; then
+	 CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
+      fi
+      cat >conftest.$ac_ext <<_ACEOF
+
+	/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zaptel.h>
+int
+main ()
+{
+int foo = ZT_DIAL_OP_CANCEL;
+  ;
+  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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (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_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (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_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+		ac_cv_zaptel_h="yes"
+
+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; }
+		ac_cv_zaptel_h="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CPPFLAGS="${saved_cppflags}"
+      if test "${ac_cv_zaptel_h}" = "yes"; then
+         { echo "$as_me:$LINENO: ***" >&5
+echo "$as_me: ***" >&6;}
+	 { echo "$as_me:$LINENO: *** The Zaptel installation on this system is too old" >&5
+echo "$as_me: *** The Zaptel installation on this system is too old" >&6;}
+	 { echo "$as_me:$LINENO: *** to be useable with this version of Asterisk." >&5
+echo "$as_me: *** to be useable with this version of Asterisk." >&6;}
+	 { echo "$as_me:$LINENO: *** Either upgrade your Zaptel installation" >&5
+echo "$as_me: *** Either upgrade your Zaptel installation" >&or run configure;}
+	 { echo "$as_me:$LINENO: *** including --without-zaptel." >&5
+echo "$as_me: *** including --without-zaptel." >&6;}
+	 exit 1
+      fi
+   fi
+fi
+
 EDITLINE_LIB=""
 if test "x$TERMCAP_LIB" != "x" ; then
   EDITLINE_LIB="$TERMCAP_LIB"

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=47759&r1=47758&r2=47759
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Nov 16 14:10:59 2006
@@ -851,6 +851,38 @@
 # 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(
+	[
+	AC_LANG_PROGRAM(
+	[#include <zaptel.h>],
+	[int foo = ZT_DIAL_OP_CANCEL;])
+	],
+	[	AC_MSG_RESULT(yes) 
+		ac_cv_zaptel_h="yes" 
+	],
+	[	AC_MSG_RESULT(no) 
+		ac_cv_zaptel_h="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
+   fi
+fi
+
 EDITLINE_LIB=""
 if test "x$TERMCAP_LIB" != "x" ; then
   EDITLINE_LIB="$TERMCAP_LIB"



More information about the asterisk-commits mailing list