From 758d301a6adf471e89c37a43197d99d2e0e678b4 Mon Sep 17 00:00:00 2001 From: akool Date: Sun, 2 Apr 2000 17:35:06 +0000 Subject: [PATCH] isdnlog-4.18 - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key - mySQL Server version 3.22.27 support - new rates --- isdnlog/Makefile.in | 11 +- isdnlog/README | 12 +- isdnlog/aclocal.m4 | 6 + isdnlog/configure | 395 ++++++++++++++++++++++------------- isdnlog/isdnlog/isdnlog.8.in | 10 +- isdnlog/isdnlog/isdnlog.c | 40 +++- isdnlog/isdnlog/mysqldb.c | 11 +- isdnlog/isdnlog/mysqldb.h | 15 +- isdnlog/rate-de.dat | 51 ++--- isdnlog/tools/dest.c | 2 +- isdnlog/tools/tools.c | 24 ++- 11 files changed, 390 insertions(+), 187 deletions(-) diff --git a/isdnlog/Makefile.in b/isdnlog/Makefile.in index 667e0b1d..ab8e450b 100644 --- a/isdnlog/Makefile.in +++ b/isdnlog/Makefile.in @@ -1,4 +1,4 @@ -## $Id: Makefile.in,v 1.155 2000/03/19 20:26:56 akool Exp $ +## $Id: Makefile.in,v 1.156 2000/04/02 17:35:06 akool Exp $ ## ## ISDN accounting for isdn4linux. ## @@ -19,6 +19,13 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ## ## $Log: Makefile.in,v $ +## Revision 1.156 2000/04/02 17:35:06 akool +## isdnlog-4.18 +## - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 +## - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key +## - mySQL Server version 3.22.27 support +## - new rates +## ## Revision 1.155 2000/03/19 20:26:56 akool ## isdnlog-4.17 ## - new rates @@ -1166,7 +1173,7 @@ SERVICEFILE = /etc/services # DON'T EDIT BELOW THIS LINE ###################################################################### -VERSION = 4.17 +VERSION = 4.18 MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \ isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \ diff --git a/isdnlog/README b/isdnlog/README index c2c2275d..33e99a3c 100644 --- a/isdnlog/README +++ b/isdnlog/README @@ -1,10 +1,10 @@ -ISDNLOG - Version 4.16 - 09-Mar-2000 +ISDNLOG - Version 4.18 - 31-Mar-2000 isdnlog ist ein Utility zur Auswertung des D-Kanals eines ISDN-BRI Anschlusses. -isdnlog-4.16 wurde ausgiebig mit Linux-2.0.38, Linux-2.2.13 sowie +isdnlog-4.18 wurde ausgiebig mit Linux-2.0.38, Linux-2.2.13 sowie Linux-2.3.35 getestet. @@ -3802,8 +3802,8 @@ Inhalt der Datei grants.txt: -- -INSERT INTO user VALUES ('localhost','isdn',password('isdn'),'N','N','N','N','N','N','N','N','N','N'); -INSERT INTO db VALUES ('localhost','isdn','isdn','N','Y','N','N','N','N'); +INSERT INTO user VALUES ('localhost','isdn',password('isdn'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N'); +INSERT INTO db VALUES ('localhost','isdn','isdn','N','Y','N','N','N','N','N','N','N','N'); -- @@ -3814,8 +3814,8 @@ Inhalt der Datei table.txt: CREATE TABLE isdnlog ( sdate date NOT NULL, stime time NOT NULL, - calling varchar(30) NOT NULL, - called varchar(30) NOT NULL, + calling varchar(32) NOT NULL, + called varchar(32) NOT NULL, charge int(4) NOT NULL, dir char(1) NOT NULL, in_bytes int(4) NOT NULL, diff --git a/isdnlog/aclocal.m4 b/isdnlog/aclocal.m4 index 5ecf0ab8..e4228a89 100644 --- a/isdnlog/aclocal.m4 +++ b/isdnlog/aclocal.m4 @@ -74,6 +74,12 @@ AC_DEFUN(AC_CHECK_MYSQLDB, [ AC_EGREP_HEADER(MYSQL,${tst_mysqldir}/include/mysql.h, mydir=${tst_mysqldir}) fi + if test "$mydir" = "no" ; then + AC_MSG_RESULT("$mydir") + AC_MSG_CHECKING([for mysql in /usr]) + AC_EGREP_HEADER(MYSQL,/usr/include/mysql/mysql.h, + mydir=/usr) + fi if test "$mydir" = "no" ; then AC_MSG_RESULT("$mydir") AC_MSG_CHECKING([for mysql in /lib/mysql]) diff --git a/isdnlog/configure b/isdnlog/configure index fce60148..67e765ee 100755 --- a/isdnlog/configure +++ b/isdnlog/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -70,6 +70,7 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -353,7 +354,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -523,9 +524,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -688,20 +691,29 @@ if test "$CONFIG_ISDN_LOG_LU" = "y" ; then #define ISDN_LU 1 EOF +fi +if test "$CONFIG_ISDN_LOG_XX" = "y" ; then + NATION=$CONFIG_ISDN_LOG_CC + NATION_MACRO="ISDN_XX" + cat >> confdefs.h <<\EOF +#define ISDN_XX 1 +EOF + fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:697: checking for $ac_word" >&5 +echo "configure:708: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -722,16 +734,17 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:726: checking for $ac_word" >&5 +echo "configure:738: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -766,25 +779,61 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:789: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:821: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 832 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -798,18 +847,24 @@ else ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:863: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:813: checking whether we are using GNU C" >&5 +echo "configure:868: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -818,7 +873,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -829,11 +884,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:837: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:896: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -848,16 +907,20 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi ac_aux_dir= @@ -886,28 +949,30 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:894: checking for a BSD compatible install" >&5 +echo "configure:958: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -937,6 +1002,8 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in mawk gawk nawk awk @@ -944,15 +1011,16 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:948: checking for $ac_word" >&5 +echo "configure:1015: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AWK="$ac_prog" @@ -975,7 +1043,7 @@ done # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:979: checking for $ac_word" >&5 +echo "configure:1047: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -983,9 +1051,13 @@ else /*) ac_cv_path_SED="$SED" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SED="$SED" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SED="$ac_dir/$ac_word" @@ -1004,7 +1076,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1008: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1080: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1035,7 +1107,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1039: checking for $ac_word" >&5 +echo "configure:1111: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1043,9 +1115,13 @@ else /*) ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/bin:/usr/bin:/usr/local/bin$ac_dummy; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_BZIP2="$ac_dir/$ac_word" @@ -1069,7 +1145,7 @@ test -n "$BZIP2" || BZIP2="/usr/bin/bzip2" echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1073: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1149: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1077,7 +1153,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1110,7 +1186,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1114: checking for dbm_open in -ldbm" >&5 +echo "configure:1190: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1118,7 +1194,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1151,7 +1227,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldb""... $ac_c" 1>&6 -echo "configure:1155: checking for dbm_open in -ldb" >&5 +echo "configure:1231: checking for dbm_open in -ldb" >&5 ac_lib_var=`echo db'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1159,7 +1235,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1198,7 +1274,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1202: checking how to run the C preprocessor" >&5 +echo "configure:1278: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1213,14 +1289,14 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1230,14 +1306,31 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1249,6 +1342,8 @@ else fi rm -f conftest* fi +rm -f conftest* +fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi @@ -1272,10 +1367,10 @@ fi if test "$tst_postgresdir" != "" || test "$CONFIG_ISDNLOG_POSTGRES" = "y" ; then echo $ac_n "checking for postgres in ${tst_postgresdir}""... $ac_c" 1>&6 -echo "configure:1276: checking for postgres in ${tst_postgresdir}" >&5 +echo "configure:1371: checking for postgres in ${tst_postgresdir}" >&5 if test "${tst_postgresdir}" != "" ; then cat > conftest.$ac_ext < EOF @@ -1290,9 +1385,9 @@ rm -f conftest* if test "$pqdir" = "no" ; then echo "$ac_t"""$pqdir"" 1>&6 echo $ac_n "checking for postgres in /lib/postgres95""... $ac_c" 1>&6 -echo "configure:1294: checking for postgres in /lib/postgres95" >&5 +echo "configure:1389: checking for postgres in /lib/postgres95" >&5 cat > conftest.$ac_ext < EOF @@ -1307,9 +1402,9 @@ rm -f conftest* if test "$pqdir" = "no" ; then echo "$ac_t"""$pqdir"" 1>&6 echo $ac_n "checking for postgres in /usr/lib/postgres95""... $ac_c" 1>&6 -echo "configure:1311: checking for postgres in /usr/lib/postgres95" >&5 +echo "configure:1406: checking for postgres in /usr/lib/postgres95" >&5 cat > conftest.$ac_ext < EOF @@ -1324,9 +1419,9 @@ rm -f conftest* if test "$pqdir" = "no" ; then echo "$ac_t"""$pqdir"" 1>&6 echo $ac_n "checking for postgres in /usr/local/postgres95""... $ac_c" 1>&6 -echo "configure:1328: checking for postgres in /usr/local/postgres95" >&5 +echo "configure:1423: checking for postgres in /usr/local/postgres95" >&5 cat > conftest.$ac_ext < EOF @@ -1341,9 +1436,9 @@ rm -f conftest* if test "$pqdir" = "no" ; then echo "$ac_t"""$pqdir"" 1>&6 echo $ac_n "checking for postgres in /usr/local/lib/postgres95""... $ac_c" 1>&6 -echo "configure:1345: checking for postgres in /usr/local/lib/postgres95" >&5 +echo "configure:1440: checking for postgres in /usr/local/lib/postgres95" >&5 cat > conftest.$ac_ext < EOF @@ -1389,10 +1484,10 @@ fi if test "$tst_mysqldir" != "" || test "$CONFIG_ISDNLOG_MYSQLDB" = "y" ; then echo $ac_n "checking for mysql in ${tst_mysqldir}""... $ac_c" 1>&6 -echo "configure:1393: checking for mysql in ${tst_mysqldir}" >&5 +echo "configure:1488: checking for mysql in ${tst_mysqldir}" >&5 if test "${tst_mysqldir}" != "" ; then cat > conftest.$ac_ext < EOF @@ -1406,10 +1501,27 @@ rm -f conftest* fi if test "$mydir" = "no" ; then echo "$ac_t"""$mydir"" 1>&6 - echo $ac_n "checking for mysql in /lib/mysql""... $ac_c" 1>&6 -echo "configure:1411: checking for mysql in /lib/mysql" >&5 + echo $ac_n "checking for mysql in /usr""... $ac_c" 1>&6 +echo "configure:1506: checking for mysql in /usr" >&5 cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "MYSQL" >/dev/null 2>&1; then + rm -rf conftest* + mydir=/usr +fi +rm -f conftest* + + fi + if test "$mydir" = "no" ; then + echo "$ac_t"""$mydir"" 1>&6 + echo $ac_n "checking for mysql in /lib/mysql""... $ac_c" 1>&6 +echo "configure:1523: checking for mysql in /lib/mysql" >&5 + cat > conftest.$ac_ext < EOF @@ -1424,9 +1536,9 @@ rm -f conftest* if test "$mydir" = "no" ; then echo "$ac_t"""$mydir"" 1>&6 echo $ac_n "checking for mysql in /usr/lib/mysql""... $ac_c" 1>&6 -echo "configure:1428: checking for mysql in /usr/lib/mysql" >&5 +echo "configure:1540: checking for mysql in /usr/lib/mysql" >&5 cat > conftest.$ac_ext < EOF @@ -1441,9 +1553,9 @@ rm -f conftest* if test "$mydir" = "no" ; then echo "$ac_t"""$mydir"" 1>&6 echo $ac_n "checking for mysql in /usr/local/mysql""... $ac_c" 1>&6 -echo "configure:1445: checking for mysql in /usr/local/mysql" >&5 +echo "configure:1557: checking for mysql in /usr/local/mysql" >&5 cat > conftest.$ac_ext < EOF @@ -1458,9 +1570,9 @@ rm -f conftest* if test "$mydir" = "no" ; then echo "$ac_t"""$mydir"" 1>&6 echo $ac_n "checking for mysql in /usr/local/lib/mysql""... $ac_c" 1>&6 -echo "configure:1462: checking for mysql in /usr/local/lib/mysql" >&5 +echo "configure:1574: checking for mysql in /usr/local/lib/mysql" >&5 cat > conftest.$ac_ext < EOF @@ -1496,7 +1608,7 @@ EOF oradir="no" if test "$ORACLE_HOME" != "" && test "$CONFIG_ISDNLOG_ORACLE" = "y" ; then echo $ac_n "checking for Oracle in ${ORACLE_HOME}""... $ac_c" 1>&6 -echo "configure:1500: checking for Oracle in ${ORACLE_HOME}" >&5 +echo "configure:1612: checking for Oracle in ${ORACLE_HOME}" >&5 if test -x ${ORACLE_HOME}/bin/proc ; then oradir="yes" fi @@ -1530,16 +1642,16 @@ fi if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" != "" ; then echo $ac_n "checking for linux kernel source in ${tst_kerneldir}""... $ac_c" 1>&6 -echo "configure:1534: checking for linux kernel source in ${tst_kerneldir}" >&5 +echo "configure:1646: checking for linux kernel source in ${tst_kerneldir}" >&5 CPPFLAGS="-nostdinc -I${tst_kerneldir}/include -I${tst_kerneldir}/drivers/isdn" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* lxdir=${tst_kerneldir} @@ -1554,16 +1666,16 @@ rm -f conftest* fi if test "$lxdir" = "no" ; then echo $ac_n "checking for linux kernel source in /usr/src/linux""... $ac_c" 1>&6 -echo "configure:1558: checking for linux kernel source in /usr/src/linux" >&5 +echo "configure:1670: checking for linux kernel source in /usr/src/linux" >&5 CPPFLAGS="-nostdinc -I/usr/src/linux/include -I/usr/src/linux/drivers/isdn" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* lxdir=/usr/src/linux @@ -1577,16 +1689,16 @@ rm -f conftest* if test "$lxdir" = "no" ; then echo "$ac_t"""$lxdir"" 1>&6 echo $ac_n "checking for linux kernel source in /usr/local/src/linux""... $ac_c" 1>&6 -echo "configure:1581: checking for linux kernel source in /usr/local/src/linux" >&5 +echo "configure:1693: checking for linux kernel source in /usr/local/src/linux" >&5 CPPFLAGS="-nostdinc -I/usr/local/src/linux/include -I/usr/local/src/linux/drivers/isdn" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* lxdir=/usr/local/src/linux @@ -1613,12 +1725,12 @@ EOF echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1617: checking for ANSI C header files" >&5 +echo "configure:1729: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1626,8 +1738,8 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -1643,7 +1755,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1661,7 +1773,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1682,7 +1794,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1693,7 +1805,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1717,12 +1829,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1721: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1833: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1738,7 +1850,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1762,18 +1874,18 @@ for ac_hdr in fcntl.h limits.h sys/ioctl.h sys/time.h syslog.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1766: checking for $ac_hdr" >&5 +echo "configure:1878: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -1858,12 +1970,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1862: checking for working const" >&5 +echo "configure:1974: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1933,12 +2045,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1937: checking for pid_t" >&5 +echo "configure:2049: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1947,7 +2059,7 @@ else #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -1966,12 +2078,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1970: checking for size_t" >&5 +echo "configure:2082: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1980,7 +2092,7 @@ else #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -1999,12 +2111,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2003: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2115: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2013,7 +2125,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2034,12 +2146,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2038: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2150: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2047,7 +2159,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2071,13 +2183,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:2075: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:2187: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -2095,7 +2207,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2117,7 +2229,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2121: checking for 8-bit clean memcmp" >&5 +echo "configure:2233: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2125,7 +2237,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2150,15 +2262,15 @@ fi fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2157: checking return type of signal handlers" >&5 +echo "configure:2269: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2175,7 +2287,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2194,7 +2306,7 @@ EOF echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 -echo "configure:2198: checking whether utime accepts a null argument" >&5 +echo "configure:2310: checking whether utime accepts a null argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2204,7 +2316,7 @@ if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else cat > conftest.$ac_ext < #include @@ -2215,7 +2327,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 && t.st_mtime - s.st_mtime < 120)); } EOF -if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_utime_null=yes else @@ -2241,12 +2353,12 @@ fi for ac_func in mktime select socket stime strdup strerror strftime strstr strtod strtol do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2245: checking for $ac_func" >&5 +echo "configure:2357: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2393,7 +2505,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -2460,7 +2572,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2480,9 +2592,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2503,6 +2617,7 @@ s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@AWK@%$AWK%g s%@SED@%$SED%g diff --git a/isdnlog/isdnlog/isdnlog.8.in b/isdnlog/isdnlog/isdnlog.8.in index 2a5d4b02..60f436a3 100644 --- a/isdnlog/isdnlog/isdnlog.8.in +++ b/isdnlog/isdnlog/isdnlog.8.in @@ -1,5 +1,5 @@ -.\" $Id: isdnlog.8.in,v 1.6 2000/03/09 18:50:02 akool Exp $ -.\" CHECKIN $Date: 2000/03/09 18:50:02 $ +.\" $Id: isdnlog.8.in,v 1.7 2000/04/02 17:35:07 akool Exp $ +.\" CHECKIN $Date: 2000/04/02 17:35:07 $ .TH isdnlog 8 "@MANDATE_ISDNLOG8@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration" .PD 0 .SH NAME @@ -414,6 +414,12 @@ isdnctrl, but this would have the same effect). You should run isdnlog with -t1 or better with -t2, so isdnlog sets the local time in sync with telephone switching office. +If there is a third number in value, this is the minimum connection time for providers +charging a basic rate per connection. +.br +e.g. hangup 3:5:60 + + .SH "START MODULE" isdnlog can react on any event and start programs. This feature is diff --git a/isdnlog/isdnlog/isdnlog.c b/isdnlog/isdnlog/isdnlog.c index 9126ec21..6e2c1c23 100644 --- a/isdnlog/isdnlog/isdnlog.c +++ b/isdnlog/isdnlog/isdnlog.c @@ -1,4 +1,4 @@ -/* $Id: isdnlog.c,v 1.60 2000/03/09 18:50:02 akool Exp $ +/* $Id: isdnlog.c,v 1.61 2000/04/02 17:35:07 akool Exp $ * * ISDN accounting for isdn4linux. (log-module) * @@ -19,6 +19,13 @@ * along with this program; if not, write to the Free Software * * $Log: isdnlog.c,v $ + * Revision 1.61 2000/04/02 17:35:07 akool + * isdnlog-4.18 + * - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 + * - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key + * - mySQL Server version 3.22.27 support + * - new rates + * * Revision 1.60 2000/03/09 18:50:02 akool * isdnlog-4.16 * - isdnlog/samples/isdn.conf.no ... changed VBN @@ -1519,6 +1526,37 @@ int main(int argc, char *argv[], char *envp[]) print_msg(PRT_NORMAL, "%s\n", version); } /* if */ +#if 0 /* AK: Ausgabe der gesamten "/etc/isdn/isdn.conf" als SQL-Import-File */ + { + auto FILE *fo = fopen("/tmp/isdn.conf.sql", "w"); + register int i; + register char *p1, *p2; + + + if (fo != (FILE *)NULL) { + fprintf(fo, "USE isdn;\n"); + + for (i = 0; i < knowns; i++) { + p1 = known[i]->num; + while (p2 = strchr(p1, ',')) { + *p2 = 0; + fprintf(fo, "INSERT INTO conf VALUES('%s',%d,'%s');\n", + p1, known[i]->si, known[i]->who); + *p2 = ','; + p1 = p2 + 1; + while (*p1 == ' ') + p1++; + } /* while */ + fprintf(fo, "INSERT INTO conf VALUES('%s',%d,'%s');\n", + p1, known[i]->si, known[i]->who); + } /* for */ + } /* if */ + + fclose(fo); + exit(0); + } +#endif + loop(); if (sockets[ISDNINFO].descriptor >= 0) diff --git a/isdnlog/isdnlog/mysqldb.c b/isdnlog/isdnlog/mysqldb.c index a48c9ee2..77093ada 100644 --- a/isdnlog/isdnlog/mysqldb.c +++ b/isdnlog/isdnlog/mysqldb.c @@ -1,4 +1,4 @@ -/* $Id: mysqldb.c,v 1.1 1998/04/06 15:45:18 keil Exp $ +/* $Id: mysqldb.c,v 1.2 2000/04/02 17:35:07 akool Exp $ * * Interface for mySQL-Database for isdn4linux. (db-module) * @@ -20,6 +20,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: mysqldb.c,v $ + * Revision 1.2 2000/04/02 17:35:07 akool + * isdnlog-4.18 + * - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 + * - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key + * - mySQL Server version 3.22.27 support + * - new rates + * * Revision 1.1 1998/04/06 15:45:18 keil * Added missing files * @@ -128,7 +135,7 @@ int mysql_dbAdd( mysql_DbStrIn *in) char out_txt[400]; struct tm *tm; - assert( (int)in); + /* assert( (int)in); */ if ( mysql_dbStatus() ) /* returns -1 when not open */ if ( mysql_dbOpen() ) /* returns -1 when error appears */ diff --git a/isdnlog/isdnlog/mysqldb.h b/isdnlog/isdnlog/mysqldb.h index 625085d9..f8310e10 100644 --- a/isdnlog/isdnlog/mysqldb.h +++ b/isdnlog/isdnlog/mysqldb.h @@ -1,4 +1,4 @@ -/* $Id: mysqldb.h,v 1.1 1998/04/06 15:45:19 keil Exp $ +/* $Id: mysqldb.h,v 1.2 2000/04/02 17:35:07 akool Exp $ * * Interface for mySQL-Database for isdn4linux. * @@ -20,6 +20,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: mysqldb.h,v $ + * Revision 1.2 2000/04/02 17:35:07 akool + * isdnlog-4.18 + * - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 + * - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key + * - mySQL Server version 3.22.27 support + * - new rates + * * Revision 1.1 1998/04/06 15:45:19 keil * Added missing files * @@ -52,7 +59,7 @@ #include #include #include -#include /* functions for mysql */ +#include /* functions for mysql */ /* */ @@ -62,7 +69,7 @@ #define DB_NAME "isdn" /* name of database */ #define DB_TABLE "isdnlog" /* name of table in database */ -#define NUMSIZE 20 +#define NUMSIZE 32 struct _DbStrIn @@ -73,7 +80,7 @@ struct _DbStrIn int duration; /* Dauer der Verbindung in Sekunden */ int hduration; /* Dauer der Verbindung in 1/100 Sekunden */ int aoce; /* Anzahl zu zahlender Gebuehreneinheiten (AOC-D) */ - int dialin; /* "I" fuer incoming call, "O" fuer outgoing call */ + char dialin; /* "I" fuer incoming call, "O" fuer outgoing call */ int cause; /* Kam eine Verbindung nicht zustande ist hier der Grund */ long ibytes; /* Summe der uebertragenen Byte _von_ draussen (incoming) */ long obytes; /* Summe der uebertragenen Byte _nach_ draussen (outgoing) */ diff --git a/isdnlog/rate-de.dat b/isdnlog/rate-de.dat index 4a2597e8..54a8b295 100644 --- a/isdnlog/rate-de.dat +++ b/isdnlog/rate-de.dat @@ -1,4 +1,4 @@ -V:1.10-Germany [17-Mar-2000 22:42:53] +V:1.10-Germany [02-Apr-2000 18:56:13] # Währungsformat U:%.3f DM @@ -8,7 +8,7 @@ U:%.3f DM # # (C) Copyright 1999, 2000 by Andreas Kool (akool@isdn4linux.de) # -# $Id: rate-de.dat,v 1.86 2000/03/19 20:26:56 akool Exp $ +# $Id: rate-de.dat,v 1.87 2000/04/02 17:35:06 akool Exp $ # # # Das "A:" Tag muß folgendermaßen gefüllt werden: @@ -8167,7 +8167,7 @@ C:2 - 4 Deutschland C:10 Mobilfunk C:102 SUPER24 Internet C:200 - Ausland -# G:01.03.2000 +# G:01.04.2000 Z:0 FreeCall A:011* A:0130*,0800*,0801* @@ -8177,10 +8177,12 @@ A:112 T:*/*=0 Z:1-4 SUPER24 A:+49 -T:*/07-09=0.044/60 -T:*/09-18=0.066/60 -T:*/18-21=0.044/60 -T:*/21-07=0.033/60 +T:W/07-09=0.044/60 +T:W/09-18=0.066/60 +T:W/18-21=0.044/60 +T:W/21-07=0.033/60 +T:E,H/07-21=0.044/60 +T:E,H/21-07=0.033/60 Z:200 Belgien A:BE T:*/*=0.111/60 @@ -10670,7 +10672,7 @@ T:*/*=0 # P:30,0 TelDaFax B:01030 -# G:01-Aug-1999 +# G:01-Apr-2000 D:dtag C:Name:TelDaFax C:Address:Telefon-, Daten- und Fax-Transfer GmbH & Co. KG, Schuppertsgasse 30, 35083 Wetter (Hessen) @@ -10700,15 +10702,14 @@ A:110 A:112 T:*/*=0 Z:1-2 Regio 20 -T:W/07-21=0.07(60)/1 -T:W/21-07=0.04(60)/1 -T:E/*=0.04(60)/1 +T:W/09-18=0.069(60)/1 +T:W/18-09=0.039(60)/1 +T:E/*=0.039(60)/1 Z:3-4 Deutschland A:+49 -T:W/09-18=0.12(60)/1 -T:W/07-09,18-21=0.09(60)/1 -T:W/21-07=0.06(60)/1 -T:E,H/*=0.09(60)/1 +T:W/09-18=0.119(60)/1 +T:W/18-09=0.059(60)/1 +T:E,H/*=0.049(60)/1 Z:10 C/D/E-Netz A:01610,01611,01612,01613,01614,01615,01616,01617,01619 A:01618 @@ -21258,7 +21259,7 @@ A:112 T:*/*=0 Z:2-4 Ferngespräche A:DE -T:*/*=0.08/60 +T:*/*=0.07/60 Z:10 Mobilfunk # A:C-Tel Voice Mail, C-Netz, D1, D2, E1, E2 A:01610,01611,01612,01613,01614,01615,01616,01617,01619 @@ -22173,7 +22174,7 @@ C:Maintainer:Tarif Datenbank Crew C:Special:Die Homepage der Tarif-Datenbank Crew: http://rates4linux.sourceforge.net C:Bei Preselection sekundengenaue Taktung D:dtag -# G:01-Mar-2000 +# G:01-Apr-2000 Z:0 FreeCall A:011* A:0130*,0800*,0801* @@ -22183,17 +22184,11 @@ A:112 T:*/*=0 Z:1-4 National A:+49 -T:[-29.02.2000]W/08-17=0.14/60 -T:[-29.02.2000]W/17-08=0.078/60 -T:[-29.02.2000]E,H/08-17=0.10/60 -T:[-29.02.2000]E,H/17-08=0.078/60 -T:[01.03.2000-]W/08-17=0.098/60 -T:[01.03.2000-]W/17-20=0.078/60 -T:[01.03.2000-]W/20-22=0.068/60 -T:[01.03.2000-]W/22-08=0.038/60 -T:[01.03.2000-]E/08-20=0.078/60 -T:[01.03.2000-]E/20-22=0.068/60 -T:[01.03.2000-]E/22-08=0.038/60 +T:W/08-17=0.078/60 +T:W/17-22=0.058/60 +T:W/22-08=0.038/60 +T:E,H/08-22=0.058/60 +T:E,H/22-08=0.038/60 Z:10-15 Mobil A:01618 A:01610,01611,01612,01613,01614,01615,01616,01617,01619 diff --git a/isdnlog/tools/dest.c b/isdnlog/tools/dest.c index 1c8e961e..df2802c1 100644 --- a/isdnlog/tools/dest.c +++ b/isdnlog/tools/dest.c @@ -203,7 +203,7 @@ static bool isKey(const char *p) bool key = true; for (; *p; p++) - if (*p != '_' && (!isalpha(*p) || !isupper(*p))) { + if(!isupper(*p) && *p != '_' && !isdigit(*p)) { /* e.g. _DEMD1 */ key = false; break; } diff --git a/isdnlog/tools/tools.c b/isdnlog/tools/tools.c index a76c3c03..1b4e70bb 100644 --- a/isdnlog/tools/tools.c +++ b/isdnlog/tools/tools.c @@ -1,4 +1,4 @@ -/* $Id: tools.c,v 1.47 2000/03/19 20:26:57 akool Exp $ +/* $Id: tools.c,v 1.48 2000/04/02 17:35:07 akool Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: tools.c,v $ + * Revision 1.48 2000/04/02 17:35:07 akool + * isdnlog-4.18 + * - isdnlog/isdnlog/isdnlog.8.in ... documented hup3 + * - isdnlog/tools/dest.c ... _DEMD1 not recogniced as key + * - mySQL Server version 3.22.27 support + * - new rates + * * Revision 1.47 2000/03/19 20:26:57 akool * isdnlog-4.17 * - new rates @@ -790,6 +797,21 @@ char *vnum(int chan, int who) sprintf(retstr[retnum], "[TK:Pickup]"); return(retstr[retnum]); } + else if (!memcmp(call[chan].num[who] + 1, "*481", 1)) { + switch (call[chan].num[who][5]) { + case '0' : sprintf(retstr[retnum], "[TK:LCR-Zeitprofil Automatik]"); break; + case '1' : sprintf(retstr[retnum], "[TK:LCR-Zeitprofil Werktag]"); break; + case '4' : sprintf(retstr[retnum], "[TK:LCR-Zeitprofil Feiertag]"); break; + default : sprintf(retstr[retnum], "[TK:LCR-Zeitprofil ???]"); break; + } /* switch */ + return(retstr[retnum]); + } + else if (!memcmp(call[chan].num[who] + 1, "*002", 5)) { + register char *p = call[chan].num[who] + 5; + + sprintf(retstr[retnum], "[TK:Uhrzeit:%c%c:%c%c]", *p, *(p + 1), *(p + 2), *(p + 3)); + return(retstr[retnum]); + } /* else */ } /* if */ strcpy(call[chan].alias[who], num2nam(call[chan].num[who], call[chan].si1));