Compare commits

...

5 Commits

Author SHA1 Message Date
Martin Bachem 25c870554f little progess 2006-05-18 19:01:22 +00:00
Martin Bachem 3225869f02 first steps to add capi support, do not use until merged into MAIN 2006-05-17 20:55:15 +00:00
Martin Bachem 5ff994048d generated by autoconf 2006-05-17 20:46:52 +00:00
Martin Bachem b7430a7901 check for lib capi, later --with-CAPI20 would be nice 2006-05-17 20:45:12 +00:00
Martin Bachem f4b1512704 first steps to add capi support, do not use until merged into MAIN 2006-05-17 20:39:47 +00:00
12 changed files with 954 additions and 201 deletions

View File

@ -106,6 +106,9 @@
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the `capi20' library (-lcapi20). */
#undef HAVE_LIBCAPI20
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM

356
ant-phone/configure vendored
View File

@ -720,13 +720,13 @@ echo X"$0" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test ! -r "$srcdir/$ac_unique_file"; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
@ -735,7 +735,7 @@ if test ! -r $srcdir/$ac_unique_file; then
{ (exit 1); exit 1; }; }
fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
(cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
@ -980,7 +980,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd "$ac_popdir"
cd $ac_popdir
done
fi
@ -1634,7 +1634,7 @@ fi
# Define the identity of the package.
PACKAGE=ant-phone
VERSION="0.1.12"
VERSION="0.1.12-capiconn"
# Some tools Automake needs.
@ -2329,7 +2329,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2387,7 +2388,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2503,7 +2505,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2557,7 +2560,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2602,7 +2606,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2646,7 +2651,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3021,7 +3027,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3087,7 +3094,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3176,7 +3184,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3303,7 +3312,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3376,7 +3386,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3415,6 +3426,80 @@ echo "$as_me: error: You need the libsndfile headers to build this package" >&2;
fi
echo "$as_me:$LINENO: checking for capi20_register in -lcapi20" >&5
echo $ECHO_N "checking for capi20_register in -lcapi20... $ECHO_C" >&6
if test "${ac_cv_lib_capi20_capi20_register+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcapi20 $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 gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char capi20_register ();
int
main ()
{
capi20_register ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_capi20_capi20_register=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_capi20_capi20_register=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_capi20_capi20_register" >&5
echo "${ECHO_T}$ac_cv_lib_capi20_capi20_register" >&6
if test $ac_cv_lib_capi20_capi20_register = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCAPI20 1
_ACEOF
LIBS="-lcapi20 $LIBS"
fi
# Checks for header files.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@ -3699,7 +3784,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3869,7 +3955,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3949,7 +4036,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4141,7 +4229,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4204,7 +4293,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4269,7 +4359,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4335,7 +4426,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4452,7 +4544,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4687,7 +4780,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4785,7 +4879,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4854,7 +4949,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4965,7 +5061,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5760,7 +5857,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5814,7 +5912,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5876,7 +5975,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5936,7 +6036,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6009,7 +6110,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6073,7 +6175,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6143,7 +6246,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6206,7 +6310,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6268,7 +6373,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6330,7 +6436,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6392,7 +6499,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6464,7 +6572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6613,7 +6722,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6694,7 +6804,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6835,7 +6946,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6973,7 +7085,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7157,7 +7270,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7532,7 +7646,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7617,7 +7732,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7686,7 +7802,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7754,7 +7871,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7923,7 +8041,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -7963,7 +8082,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8019,7 +8139,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8059,7 +8180,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8123,7 +8245,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8150,8 +8273,10 @@ case $ac_lo in
esac
else
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
@ -8244,7 +8369,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8284,7 +8410,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8340,7 +8467,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8380,7 +8508,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8444,7 +8573,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8471,8 +8601,10 @@ case $ac_lo in
esac
else
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
@ -8565,7 +8697,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8605,7 +8738,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8661,7 +8795,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8701,7 +8836,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8765,7 +8901,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8792,8 +8929,10 @@ case $ac_lo in
esac
else
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
@ -8886,7 +9025,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -8963,7 +9103,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -9113,7 +9254,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -9179,7 +9321,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -9802,7 +9945,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -9880,7 +10024,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10089,7 +10234,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10156,7 +10302,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10224,7 +10371,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10293,7 +10441,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10361,7 +10510,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10429,7 +10579,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10553,7 +10704,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10603,7 +10755,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10693,7 +10846,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10758,7 +10912,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10822,7 +10977,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -10967,7 +11123,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -11033,7 +11190,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -11152,7 +11310,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -11597,7 +11756,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -11651,7 +11811,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -12752,6 +12913,11 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@ -12790,12 +12956,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub

View File

@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(ant-phone)
AM_INIT_AUTOMAKE(ant-phone, "0.1.12", ant-phone-devel@nongnu.org)
AM_INIT_AUTOMAKE(ant-phone, "0.1.12-capiconn", ant-phone-devel@nongnu.org)
AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([config.h.in])
AM_CONFIG_HEADER([config.h])
@ -20,6 +20,7 @@ AC_PROG_YACC
# Checks for libraries.
AC_CHECK_LIB([m], [floor])
AC_CHECK_LIB([sndfile], [sf_open],, AC_MSG_ERROR(You need the libsndfile headers to build this package))
AC_CHECK_LIB([capi20], [capi20_register])
# Checks for header files.
AC_HEADER_STDC

View File

@ -29,6 +29,8 @@ ant_phone_SOURCES = \
recording.c \
isdntree.c
ant_phone_SOURCES += isdn_capi.c capiconn.c
noinst_HEADERS = \
callerid.h \
g711.h \
@ -51,6 +53,8 @@ noinst_HEADERS = \
isdnlexer.h \
isdntree.h
noinst_HEADERS += isdn_capi.h capiconn.h
EXTRA_DIST = \
pickup.xpm \
hangup.xpm \

View File

@ -57,7 +57,8 @@ am_ant_phone_OBJECTS = ant-phone.$(OBJEXT) callerid.$(OBJEXT) \
calleridparser.$(OBJEXT) isdnlexer.$(OBJEXT) \
isdnparser.$(OBJEXT) gtksettings.$(OBJEXT) \
controlpad.$(OBJEXT) fxgenerator.$(OBJEXT) server.$(OBJEXT) \
client.$(OBJEXT) recording.$(OBJEXT) isdntree.$(OBJEXT)
client.$(OBJEXT) recording.$(OBJEXT) isdntree.$(OBJEXT) \
isdn_capi.$(OBJEXT) capiconn.$(OBJEXT)
ant_phone_OBJECTS = $(am_ant_phone_OBJECTS)
ant_phone_LDADD = $(LDADD)
ant_phone_DEPENDENCIES =
@ -196,52 +197,15 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
ant_phone_SOURCES = \
ant-phone.c \
callerid.c \
g711.c \
gtk.c \
isdn.c \
llcheck.c \
mediation.c \
session.c \
sound.c \
util.c \
settings.c \
calleridlexer.l \
calleridparser.y \
isdnlexer.l \
isdnparser.y \
gtksettings.c \
controlpad.c \
fxgenerator.c \
server.c \
client.c \
recording.c \
isdntree.c
noinst_HEADERS = \
callerid.h \
g711.h \
gtk.h \
isdn.h \
llcheck.h \
mediation.h \
session.h \
sound.h \
util.h \
settings.h \
gtksettings.h \
controlpad.h \
fxgenerator.h \
server.h \
client.h \
recording.h \
globals.h \
gettext.h \
isdnlexer.h \
isdntree.h
ant_phone_SOURCES = ant-phone.c callerid.c g711.c gtk.c isdn.c \
llcheck.c mediation.c session.c sound.c util.c settings.c \
calleridlexer.l calleridparser.y isdnlexer.l isdnparser.y \
gtksettings.c controlpad.c fxgenerator.c server.c client.c \
recording.c isdntree.c isdn_capi.c capiconn.c
noinst_HEADERS = callerid.h g711.h gtk.h isdn.h llcheck.h mediation.h \
session.h sound.h util.h settings.h gtksettings.h controlpad.h \
fxgenerator.h server.h client.h recording.h globals.h \
gettext.h isdnlexer.h isdntree.h isdn_capi.h capiconn.h
EXTRA_DIST = \
pickup.xpm \
hangup.xpm \
@ -347,6 +311,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callerid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calleridlexer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calleridparser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capiconn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/controlpad.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fxgenerator.Po@am__quote@
@ -354,6 +319,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtksettings.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdn_capi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdnlexer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdnparser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isdntree.Po@am__quote@

View File

@ -92,16 +92,17 @@
int main(int argc, char *argv[]) {
struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"usage", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{"cleanup", no_argument, 0, 'r'},
{"debug", optional_argument, 0, 'd'},
{"soundin", required_argument, 0, 'i'},
{"soundout", required_argument, 0, 'o'},
{"msn", required_argument, 0, 'm'},
{"msns", required_argument, 0, 'l'},
{"call", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{"usage", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{"cleanup", no_argument, 0, 'r'},
{"debug", optional_argument, 0, 'd'},
{"soundin", required_argument, 0, 'i'},
{"soundout", required_argument, 0, 'o'},
{"msn", required_argument, 0, 'm'},
{"msns", required_argument, 0, 'l'},
{"call", required_argument, 0, 'c'},
{"interface", required_argument, 0, 'f'},
{0, 0, 0, 0}
};
char *short_options = "hvrd::i:o:m:l:c:";
@ -114,6 +115,9 @@ int main(int argc, char *argv[]) {
char *audio_device_name_out = "";
char *msn = "";
char *msns = "";
#ifdef HAVE_LIBCAPI20
unsigned int interface=0; // 0=HiSax (ttyIx), 1..2 = capi20 controller num
#endif
int gtk_result;
@ -185,10 +189,16 @@ Options:\n\
default: 0\n\
-l, --msns=MSNS MSNs to listen on, semicolon-separated list or '*'\n\
default: *\n\
-c, --call=NUMBER Call specified number\n\
\n\
-c, --call=NUMBER Call specified number\n"), argv[0]);
#ifdef HAVE_LIBCAPI20
printf ("\n\
-f, --interface=X 0=HiSax, [1..9]=capi20 controller num\n\
default: 0\n");
#endif
printf ("\n\
Note: If arguments of --soundin and --soundout are equal, a full duplex\n\
sound device is needed.\n"), argv[0]);
sound device is needed.\n");
exit(0);
case 'v': /* version */
printf("ANT " VERSION "\n");
@ -226,6 +236,15 @@ Note: If arguments of --soundin and --soundout are equal, a full duplex\n\
}
exit(0);
break;
#ifdef HAVE_LIBCAPI20
case 'f':
if (optarg) {
interface = strtol(optarg, NULL, 0);
} else {
interface = 0;
}
break;
#endif
case '?':
exit(1);
}
@ -235,7 +254,12 @@ Note: If arguments of --soundin and --soundout are equal, a full duplex\n\
output_codeset_set("UTF-8"); /* GTK needs UTF-8 strings */
if (session_init(&session, audio_device_name_in, audio_device_name_out,
msn, msns))
msn, msns
#ifdef HAVE_LIBCAPI20
, interface))
#else
))
#endif
{
fprintf(stderr, "Error at session init.\n");
exit(1);

View File

@ -59,6 +59,13 @@
* Plugin for pppd to support PPP over CAPI2.0.
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_LIBCAPI20
#include <string.h>
#include "capiconn.h"
@ -2102,3 +2109,5 @@ capiconn_listenstate(capiconn_context *ctx, unsigned contr)
return CAPICONN_WRONG_STATE;
return CAPICONN_OK;
}
#endif HAVE_LIBCAPI20

View File

@ -36,6 +36,11 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
/* capi support */
#ifdef HAVE_LIBCAPI20
#include "isdn_capi.h"
#endif
/* own header files */
#include "globals.h"
#include "gtk.h"
@ -165,6 +170,14 @@ gint timeout_callback(gpointer data) {
free(timediff);
}
#ifdef HAVE_LIBCAPI20
/* use periodic timer to handle CAPI messages */
if (session->capi_contr) {
printf ("capi messages\n");
ant_capi_messages(session);
}
#endif
return TRUE; /* call it again */
}

464
ant-phone/src/isdn_capi.c Normal file
View File

@ -0,0 +1,464 @@
/* $Id$
*
* This file is part of ANT (Ant is Not a Telephone)
*
* Authors:
* - Martin Bachem, m.bachem@gmx.de
*
* heavy capitalized on:
* + isdn4k-utils/[pppdcapiplugin,capiiinfo]
* + capiconn samples capiintest/capiouttest
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#ifdef HAVE_LIBCAPI20
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <malloc.h>
#include <capi20.h>
#include <linux/capi.h>
#include <unistd.h>
#include <stddef.h>
#include "globals.h"
#include "callerid.h"
#include "session.h"
#include "isdn_capi.h"
#include "capiconn.h"
static char msgbuf[4096];
/* callback for capiconn, TODO: don't use global session */
static void
ant_capi_incoming(capi_connection * cp, unsigned contr,
unsigned cipvalue, char *callednumber,
char *callingnumber)
{
switch (session.state) {
case STATE_READY:
/* caller id update */
session.ring_time = time(NULL);
/* save callee's number */
free(session.to);
session.to = strdup(callednumber);
cid_add_line(&session, CALL_IN, NULL, session.to);
/* save caller's number */
free(session.from);
session.from = strdup(callingnumber);
cid_set_from(&session, session.from);
if (session_set_state(&session, STATE_RINGING))
session_set_state(&session,
STATE_RINGING_QUIET);
session.cipvalue = cipvalue;
session.cp = cp;
break;
default:
if (debug)
printf
("ERROR: incoming call at state %i\n",
session.state);
}
}
static char *
ant_capi_conninfo(capi_connection * p)
{
static char buf[1024];
capi_conninfo *cp = capiconn_getinfo(p);
char *callingnumber = "";
char *callednumber = "";
if (cp->callingnumber && cp->callingnumber[0] > 2)
callingnumber = cp->callingnumber + 3;
if (cp->callednumber && cp->callednumber[0] > 1)
callednumber = cp->callednumber + 2;
if (debug) {
snprintf(buf, sizeof(buf),
"\"%s\" -> \"%s\" %s (pcli=0x%x/ncci=0x%x)",
callingnumber, callednumber,
cp->isincoming ? "incoming" : "outgoing",
cp->plci, cp->ncci);
} else {
snprintf(buf, sizeof(buf),
"\"%s\" -> \"%s\" %s",
callingnumber, callednumber,
cp->isincoming ? "incoming" : "outgoing");
}
buf[sizeof(buf) - 1] = 0;
return buf;
}
#define OUTSIZE 128
static int senddata(capi_connection *cp)
{
char *data;
data = (char *)malloc(OUTSIZE);
if (!data) {
printf ("ERROR: malloc failed\n");
return -1;
}
if (capiconn_send(cp, data, OUTSIZE) == CAPICONN_OK) {
return 0;
}
free(data);
return -1;
}
/* callback for capiconn, TODO: don't use global session */
static void
ant_capi_connected(capi_connection * cp, _cstruct NCPI)
{
capi_conninfo *p = capiconn_getinfo(cp);
printf ("connected(%s) NCPIlen=%d\n", ant_capi_conninfo(cp), NCPI[0]);
session.vcon_time = time(NULL); /* for caller id monitor */
cid_set_date(&session, session.vcon_time);
session_set_state(&session, STATE_CONVERSATION);
if (p->b1proto == 1 && p->b2proto == 1 && p->b3proto == 0) {
printf ("enabling DTMF\n");
(void)capiconn_dtmf_setstate(cp, 1);
}
// senddata(cp);
}
/* callback for capiconn, TODO: don't use global session */
static void
ant_capi_disconnected(capi_connection * cp, int localdisconnect,
unsigned reason, unsigned reason_b3)
{
switch (session.state) {
case STATE_RINGING:
case STATE_RINGING_QUIET:
/* caller giving up */
session_set_state(&session, STATE_READY);
cid_set_duration(&session, _("(RUNG)"));
cid_mark_row(&session, session.cid_num - 1, TRUE);
break;
default:
if (debug)
printf
("ERROR: got disconnect at state %i\n",
session.state);
}
}
/* callback for GTK widget */
int
ant_capi_pickup(session_t * session)
{
switch (session->state) {
case STATE_RINGING:
case STATE_RINGING_QUIET:
switch (session->cipvalue) {
case 1: /* Speech */
case 4: /* 3.1 KHz audio */
case 5: /* 7 KHz audio */
case 16: /* Telephony */
case 26: /* 7kHz telephony */
(void)capiconn_accept(session->cp, 1, 1, 0, 0, 0, 0, 0);
break;
case 2: /* unrestricted digital information */
case 3: /* restricted digital infomation */
/* HDLC: 0,1,0 X75: 0,0,0 X75+V42Bis: 0,8,0 */
/* x25overx75: 0,0,2 */
(void)capiconn_accept(session->cp, 0, 1, 0, 0, 0, 0, 0);
/*(void)capiconn_accept(cp, 0, 0, 2, 0, 0, 0, 0);*/
break;
case 17: /* Group 2/3 facsimile */
(void)capiconn_accept(session->cp, 4, 4, 4, 0, 0, 0, 0);
break;
default:
(void)capiconn_ignore(session->cp);
break;
}
break;
default:
if (debug)
printf
("ERROR: got disconnect at state %i\n",
session->state);
}
}
/* callback for GTK widget */
int
ant_capi_hangup(session_t * session)
{
switch (session->state) {
/* abort dialing */
case STATE_DIALING:
break;
/* reject call */
case STATE_RINGING:
case STATE_RINGING_QUIET:
session_set_state(session, STATE_READY);
cid_set_duration(session, _("(REJECTED)"));
(void) capiconn_reject(session->cp);
break;
/* hang up (while b-channel is open) */
case STATE_CONVERSATION:
(void)capiconn_disconnect(session->cp, 0);
session_deinit_conversation(session, 1); /* 1 == we hang up ourselves ;) */
session_set_state(session, STATE_READY);
cid_set_duration(session, NULL);
break;
default:
if (debug)
printf
("ERROR: got disconnect at state %i\n",
session->state);
}
}
static void
ant_capi_chargeinfo(capi_connection * cp, unsigned long charge,
int inunits)
{
if (debug) {
if (inunits) {
printf("%s: charge in units: %ul",
ant_capi_conninfo(cp), charge);
} else {
printf("%s: charge in currency: %ul",
ant_capi_conninfo(cp), charge);
}
}
}
static int
ant_capi_put_message(unsigned appid, unsigned char *msg)
{
unsigned err;
err = capi20_put_message(appid, msg);
if (err && debug) {
fprintf(stderr, "putmessage(appid=%d) - %s 0x%x", appid,
capi_info2str(err), err);
}
return 0;
}
static void
ant_capi_msg(const char *prefix, const char *format, va_list args)
{
char *s = msgbuf;
char *e = msgbuf + sizeof(msgbuf);
(void) snprintf(s, e - s, "%s", prefix);
s += strlen(s);
(void) vsnprintf(s, e - s, format, args);
s += strlen(s);
printf("%s\n", msgbuf);
}
static void
ant_capi_err(const char *format, ...)
{
va_list args;
if (debug) {
va_start(args, format);
ant_capi_msg("CAPI Error: ", format, args);
va_end(args);
}
}
static void
ant_capi_dbg(const char *format, ...)
{
va_list args;
if (debug > 1) {
va_start(args, format);
ant_capi_msg("CAPI Debug: ", format, args);
va_end(args);
}
}
static void
ant_capi_info(const char *format, ...)
{
va_list args;
if (debug > 2) {
va_start(args, format);
ant_capi_msg("CAPI Info: ", format, args);
va_end(args);
}
}
static char *conninfo(capi_connection *p)
{
static char buf[1024];
capi_conninfo *cp = capiconn_getinfo(p);
snprintf(buf, sizeof(buf),
"appl=%d plci=0x%x ncci=0x%x %s",
cp->appid,
cp->plci,
cp->ncci,
cp->isincoming ? "incoming" : "outgoing"
);
return buf;
}
static void
ant_capi_rx(capi_connection * cp, unsigned char *data, unsigned datalen)
{
printf ("received(%s): len=%u\n", conninfo(cp), datalen);
}
static void
ant_capi_tx(capi_connection * cp, unsigned char *buf)
{
printf ("sent(%s): %p\n", conninfo(cp), buf);
free(buf);
senddata(cp);
// printf ("sent(%s)\n", conninfo(cp));
}
static void
ant_capi_dtmf_rx(capi_connection * cp,
unsigned char *data, unsigned datalen)
{
ant_capi_info("dtmf_reveived(%s): %ld \"%-*.*s\"",
conninfo(cp), datalen, (int) datalen, (int) datalen, data);
}
capiconn_callbacks ant_capi_callbacks = {
malloc: malloc,
free: free,
disconnected: ant_capi_disconnected,
incoming: ant_capi_incoming,
connected: ant_capi_connected,
chargeinfo: ant_capi_chargeinfo,
/*
received: ant_capi_rx,
datasent: ant_capi_tx,
dtmf_received: ant_capi_dtmf_rx,
*/
received: 0,
datasent: 0,
dtmf_received: 0,
capi_put_message: ant_capi_put_message,
debugmsg: (void (*)(const char *,...)) ant_capi_dbg,
infomsg: (void (*)(const char *,...)) ant_capi_info,
errmsg: (void (*)(const char *,...)) ant_capi_err
};
int
ant_capi_init(session_t * session)
{
int serrno, err;
if (CAPI20_ISINSTALLED() != CapiNoError) {
fprintf(stderr, "CAPI not installed - %s (%d)\n",
strerror(errno), errno);
return -2;
}
if ((err = capi20_register(2, 8, 2048, &session->applid)) != 0) {
serrno = errno;
fprintf(stderr,
"CAPI_REGISTER failed - %s (0x%04x) [%s (%d)]\n",
capi_info2str(err), err, strerror(serrno), errno);
return (-3);
}
if (capi20ext_set_flags(session->applid, 1) < 0) {
serrno = errno;
(void) capi20_release(session->applid);
fprintf(stderr,
"CAPI: failed to set highjacking mode - %s (%d)\n",
strerror(serrno), serrno);
return (-4);
}
if ((session->ctx =
capiconn_getcontext(session->applid,
&ant_capi_callbacks)) == 0) {
(void) capi20_release(session->applid);
fprintf(stderr, "CAPI: get_context failed\n");
return (-5);
}
session->cinfo.ddi = 0;
session->cinfo.ndigits = 0;
if (capiconn_addcontr
(session->ctx, session->capi_contr,
&session->cinfo) != CAPICONN_OK) {
(void) capiconn_freecontext(session->ctx);
(void) capi20_release(session->applid);
fprintf(stderr, "CAPI: add controller %d failed",
session->capi_contr);
return (-1);
}
return (0);
}
void
ant_capi_listen(session_t * session)
{
/*
call
conn = capiconn_connect(ctx,
session->opt_contr, // contr
1, // cipvalue
number_to_call,
session->msn,
1, 1, 0,
0, 0, 0, 0, 0);
*/
(void) capiconn_listen(session->ctx, session->capi_contr,
0x1FFF03FF, 0);
} void
ant_capi_free(session_t * session)
{
(void) capiconn_freecontext(session->ctx);
(void) capi20_release(session->applid);
}
/* attention: get called periodically by timer defined TIMER_DELAY in gtk.c,
* so be quick ;)
*/
void
ant_capi_messages(session_t * session)
{
unsigned char *msg = 0;
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 100;
if (capi20_waitformessage(session->applid, &tv) == 0) {
if (capi20_get_message(session->applid, &msg) == 0)
capiconn_inject(session->applid, msg);
}
}
#endif /* HAVE_LIBCAPI20 */

23
ant-phone/src/isdn_capi.h Normal file
View File

@ -0,0 +1,23 @@
/* $Id$
*
* This file is part of ANT (Ant is Not a Telephone)
*
* Authors:
* - Martin Bachem, m.bachem@gmx.de
* - heavy capitalized on: isdn4k-utils/[pppdcapiplugin,capiiinfo]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#include "session.h"
int ant_capi_init(session_t *session);
void ant_capi_listen(session_t *session);
void ant_capi_free(session_t *session);
void ant_capi_messages(session_t *session);
int ant_capi_pickup(session_t *session);
int ant_capi_hangup(session_t *session);

View File

@ -55,6 +55,9 @@
#include "settings.h"
#include "fxgenerator.h"
#include "server.h"
#ifdef HAVE_LIBCAPI20
#include "isdn_capi.h"
#endif
/*
* This is our session. Currently just one globally.
@ -190,15 +193,26 @@ int session_isdn_init(session_t *session) {
/* open and init isdn device */
if (debug)
fprintf(stderr, "Initializing ISDN device...\n");
if ((session->isdn_fd =
open_isdn_device(&session->isdn_device_name,
&session->isdn_lockfile_name)) < 0) {
fprintf(stderr, "Error opening isdn device.\n");
return -1;
}
if (init_isdn_device(session->isdn_fd, &session->isdn_backup)) {
fprintf(stderr, "Error initializing isdn device.\n");
return -1;
#ifdef HAVE_LIBCAPI20
if (session->capi_contr) {
if (ant_capi_init(session)) {
printf ("CAPI 2.0 initialization failed!\n");
return -1;
}
} else
#endif
{
if ((session->isdn_fd =
open_isdn_device(&session->isdn_device_name,
&session->isdn_lockfile_name)) < 0) {
fprintf(stderr, "Error opening isdn device.\n");
return -1;
}
if (init_isdn_device(session->isdn_fd, &session->isdn_backup)) {
fprintf(stderr, "Error initializing isdn device.\n");
return -1;
}
}
session->isdn_inbuf_size = session->isdn_outbuf_size = DEFAULT_ISDNBUF_SIZE;
@ -213,10 +227,17 @@ int session_isdn_init(session_t *session) {
return -1;
}
if (isdn_setMSN(session->isdn_fd, session->msn) ||
isdn_setMSNs(session->isdn_fd, session->msns)) {
fprintf(stderr, "Error setting MSN properties.\n");
return -1;
#ifdef HAVE_LIBCAPI20
if (session->capi_contr) {
ant_capi_listen(session);
} else
#endif
{
if (isdn_setMSN(session->isdn_fd, session->msn) ||
isdn_setMSNs(session->isdn_fd, session->msns)) {
fprintf(stderr, "Error setting MSN properties.\n");
return -1;
}
}
session->isdn_inbuf_len = 0;
@ -310,14 +331,23 @@ int session_isdn_deinit(session_t *session) {
if (debug)
fprintf(stderr, "Closing ISDN device...\n");
/* de-init / restore isdn device */
if (deinit_isdn_device(session->isdn_fd, &session->isdn_backup)) {
fprintf(stderr, "Error restoring ttyI state.\n");
#ifdef HAVE_LIBCAPI20
if (session->capi_contr) {
ant_capi_free(session);
}
/* close isdn device */
if (close_isdn_device(session->isdn_fd,
session->isdn_device_name,
session->isdn_lockfile_name)) {
fprintf(stderr, "Error closing isdn device.\n");
else
#endif
{
if (deinit_isdn_device(session->isdn_fd, &session->isdn_backup)) {
fprintf(stderr, "Error restoring ttyI state.\n");
}
/* close isdn device */
if (close_isdn_device(session->isdn_fd,
session->isdn_device_name,
session->isdn_lockfile_name)) {
fprintf(stderr, "Error closing isdn device.\n");
}
}
return 0;
@ -341,7 +371,14 @@ int session_isdn_deinit(session_t *session) {
int session_init(session_t *session,
char *audio_device_name_in,
char *audio_device_name_out,
char *msn, char *msns) {
char *msn, char *msns
#ifdef HAVE_LIBCAPI20
, unsigned int interface)
#else
)
#endif
{
int i;
/*
@ -416,6 +453,10 @@ int session_init(session_t *session,
session->ring_time = 0;
session->unanswered = 0;
#ifdef HAVE_LIBCAPI20
session->capi_contr = interface;
#endif
/* setup audio and isdn */
if (!session->option_release_devices)
if (session_audio_init(session) < 0) return -1;
@ -499,12 +540,16 @@ void session_io_handlers_start(session_t *session) {
(gpointer) session,
NULL);
}
session->gtk_isdn_input_tag = gtk_input_add_full(session->isdn_fd,
GDK_INPUT_READ,
gtk_handle_isdn_input,
NULL,
(gpointer) session,
NULL);
if (!session->capi_contr) {
session->gtk_isdn_input_tag = gtk_input_add_full(session->isdn_fd,
GDK_INPUT_READ,
gtk_handle_isdn_input,
NULL,
(gpointer) session,
NULL);
}
/* server functionality */
session->gtk_local_input_tag = gtk_input_add_full(session->local_sock,
@ -665,19 +710,24 @@ void session_deinit_conversation(session_t *session, int self_hangup) {
session_io_handlers_stop(session);
session_reset_audio(session);
session_io_handlers_start(session);
if (isdn_blockmode(session->isdn_fd, 0))
fprintf(stderr, "Warning: "
"Switching back to normal isdn tty mode not successful.\n");
/* go back to command mode */
if (isdn_stop_audio(session->isdn_fd, self_hangup)) {
fprintf(stderr, "Error switching back to command mode.\n");
}
/* isdn hangup */
if (isdn_hangup(session->isdn_fd)) {
fprintf(stderr, "Error hanging up.\n");
#ifdef HAVE_LIBCAPI20
if (!(session->capi_contr))
#endif
{
if (isdn_blockmode(session->isdn_fd, 0))
fprintf(stderr, "Warning: "
"Switching back to normal isdn tty mode not successful.\n");
/* go back to command mode */
if (isdn_stop_audio(session->isdn_fd, self_hangup)) {
fprintf(stderr, "Error switching back to command mode.\n");
}
/* isdn hangup */
if (isdn_hangup(session->isdn_fd)) {
fprintf(stderr, "Error hanging up.\n");
}
}
session->isdn_inbuf_len = 0;
@ -1287,6 +1337,13 @@ void gtk_handle_pick_up_button(GtkWidget *widget _U_, gpointer data) {
char *clear_number; /* number after un_vanity() */
int result;
#ifdef HAVE_LIBCAPI20
if (session->capi_contr) {
ant_capi_pickup(session);
return;
}
#endif
switch (session->state) {
case STATE_READY: /* we are in command mode and want to dial */
number = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(session->dial_number_box)
@ -1370,6 +1427,13 @@ void gtk_handle_pick_up_button(GtkWidget *widget _U_, gpointer data) {
void gtk_handle_hang_up_button(GtkWidget *widget _U_, gpointer data) {
session_t *session = (session_t *) data;
#ifdef HAVE_LIBCAPI20
if (session->capi_contr) {
ant_capi_hangup(session);
return;
}
#endif
switch (session->state) {
case STATE_READY: /* we are already in command mode */
break;

View File

@ -35,6 +35,13 @@
/* GTK */
#include <gtk/gtk.h>
/* Capi 2.0 */
#ifdef HAVE_LIBCAPI20
#include <linux/capi.h>
#include <capi20.h>
#include "capiconn.h"
#endif
/* own header files */
#include "recording.h"
@ -211,6 +218,16 @@ typedef struct {
char* msn; /* originating msn, allocated memory! */
char* msns; /* comma-separated list of msns to listen on, allocated memory!*/
#ifdef HAVE_LIBCAPI20
/* capi 2.0 control variables */
unsigned char capi_contr; /* 0=HiSax /dev/ttyIx, [1..?]=capi20 controller num */
capiconn_context *ctx;
capi_contrinfo cinfo;
capi_connection *cp;
unsigned cipvalue;
unsigned applid;
#endif
int unanswered; /* unanswered calls for this session */
/* some options (useful for options file handling) */
@ -252,7 +269,12 @@ int session_audio_deinit(session_t *session);
int session_init(session_t *session,
char *audio_device_name_in,
char *audio_device_name_out,
char *msn, char *msns);
char *msn, char *msns
#ifdef HAVE_LIBCAPI20
, unsigned int interface);
#else
);
#endif
void session_audio_free(session_t *session);
int session_deinit(session_t *session);