Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > media > main-updates-src > by-pkgid > 7b221bae7f9b8b645f8569147bfa09d3 > files > 10

squidGuard-1.2.0-13.1mdv2007.1.src.rpm

--- squidguard-1.2.0.orig/configure
+++ squidguard-1.2.0/configure
@@ -1,155 +1,38 @@
 #! /bin/sh
+
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-
-# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-as_executable_p="test -f"
-
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-# NLS nuisances.
-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
+# Defaults:
+ac_help=
 ac_default_prefix=/usr/local
-cross_compiling=no
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-ac_unique_file="src/main.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
+# Any additions from configure.in:
+ac_help="$ac_help
+  --with-db=DIR           location of the Berkley DB distribution"
+ac_help="$ac_help
+  --with-db-lib=DIR       location of the Berkley DB library"
+ac_help="$ac_help
+  --with-db-inc=DIR       location of the Berkley DB include files"
+ac_help="$ac_help
+  --with-sg-config=FILE    location of squidGuard config file"
+ac_help="$ac_help
+  --with-sg-logdir=DIR     location of squidGuard log file"
+ac_help="$ac_help
+  --with-sg-dbhome=DIR     location of squidGuard db dirs"
 
 # Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-cache_file=/dev/null
+build=NONE
+cache_file=./config.cache
 exec_prefix=NONE
+host=NONE
 no_create=
+nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -158,15 +41,10 @@
 silent=
 site=
 srcdir=
+target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
@@ -180,16 +58,17 @@
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
+# 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
 
 ac_prev=
 for ac_option
 do
+
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
     eval "$ac_prev=\$ac_option"
@@ -197,59 +76,59 @@
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case "$ac_option" in
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
+    bindir="$ac_optarg" ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
+    ac_prev=build ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
+    build="$ac_optarg" ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
+    cache_file="$ac_optarg" ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   | --da=*)
-    datadir=$ac_optarg ;;
+    datadir="$ac_optarg" ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
       *) ac_optarg=yes ;;
     esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -258,47 +137,95 @@
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
+    exec_prefix="$ac_optarg" ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
+    ac_prev=host ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
+    host="$ac_optarg" ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
+    includedir="$ac_optarg" ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
+    infodir="$ac_optarg" ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
+    libdir="$ac_optarg" ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
+    libexecdir="$ac_optarg" ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
   | --localstate | --localstat | --localsta | --localst \
@@ -307,12 +234,12 @@
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
+    localstatedir="$ac_optarg" ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
+    mandir="$ac_optarg" ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
@@ -333,26 +260,26 @@
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
+    oldincludedir="$ac_optarg" ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
+    prefix="$ac_optarg" ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
+    program_prefix="$ac_optarg" ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
+    program_suffix="$ac_optarg" ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -369,7 +296,7 @@
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
+    program_transform_name="$ac_optarg" ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -379,7 +306,7 @@
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
+    sbindir="$ac_optarg" ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -390,57 +317,58 @@
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
+    sharedstatedir="$ac_optarg" ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
+    site="$ac_optarg" ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
+    srcdir="$ac_optarg" ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
+    sysconfdir="$ac_optarg" ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
+    ac_prev=target ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
+    target="$ac_optarg" ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
     ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+    case "$ac_option" in
+      *=*) ;;
       *) ac_optarg=yes ;;
     esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    eval "with_${ac_package}='$ac_optarg'" ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -451,98 +379,98 @@
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
+    x_includes="$ac_optarg" ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
+    x_libraries="$ac_optarg" ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
     ;;
 
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
-    export $ac_envvar ;;
-
   *)
-    # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-              localstatedir libdir includedir oldincludedir infodir mandir
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
 do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
   esac
 done
 
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: should be removed in autoconf 3.0.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
 
-test "$silent" = yes && exec 6>/dev/null
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=src/main.c
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
   ac_prog=$0
-  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
@@ -553,305 +481,13 @@
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
   else
-    { echo "$as_me: error: cannot find sources in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
   fi
 fi
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<EOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-EOF
-
-  cat <<EOF
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
-EOF
-
-  cat <<\EOF
-EOF
-fi
-
-if test -n "$ac_init_help"; then
-
-  cat <<\EOF
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-db=DIR           location of the Berkley DB distribution
-  --with-db-lib=DIR       location of the Berkley DB library
-  --with-db-inc=DIR       location of the Berkley DB include files
-  --with-sg-config=FILE    location of squidGuard config file
-  --with-sg-logdir=DIR     location of squidGuard log file
-  --with-sg-dbhome=DIR     location of squidGuard db dirs
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-EOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
-  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
-    cd $ac_subdir
-    # A "../" for each directory in /$ac_subdir.
-    ac_dots=`echo $ac_subdir |
-             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
-
-    case $srcdir in
-    .) # No --srcdir option.  We are building in place.
-      ac_sub_srcdir=$srcdir ;;
-    [\\/]* | ?:[\\/]* ) # Absolute path.
-      ac_sub_srcdir=$srcdir/$ac_subdir ;;
-    *) # Relative path.
-      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_sub_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_sub_srcdir/configure; then
-      echo
-      $SHELL $ac_sub_srcdir/configure  --help=recursive
-    elif test -f $ac_sub_srcdir/configure.ac ||
-           test -f $ac_sub_srcdir/configure.in; then
-      echo
-      $ac_configure --help
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
-    fi
-    cd $ac_popdir
-  done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
-  cat <<\EOF
-
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-EOF
-  exit 0
-fi
-exec 5>config.log
-cat >&5 <<EOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.52.  Invocation command line was
-
-  $ $0 $@
-
-EOF
-{
-cat <<_ASUNAME
-## ---------- ##
-## Platform.  ##
-## ---------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-PATH = $PATH
-
-_ASUNAME
-} >&5
-
-cat >&5 <<EOF
-## ------------ ##
-## Core tests.  ##
-## ------------ ##
-
-EOF
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell meta-characters.
-ac_configure_args=
-ac_sep=
-for ac_arg
-do
-  case $ac_arg in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
-    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-    ac_sep=" " ;;
-  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
-     ac_sep=" " ;;
-  esac
-  # Get rid of the leading space.
-done
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  echo >&5
-  echo "## ----------------- ##" >&5
-  echo "## Cache variables.  ##" >&5
-  echo "## ----------------- ##" >&5
-  echo >&5
-  # The following way of writing the cache mishandles newlines in values,
-{
-  (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      sed -n \
-        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
-    *)
-      sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} >&5
-  sed "/^$/d" confdefs.h >conftest.log
-  if test -s conftest.log; then
-    echo >&5
-    echo "## ------------ ##" >&5
-    echo "## confdefs.h.  ##" >&5
-    echo "## ------------ ##" >&5
-    echo >&5
-    cat conftest.log >&5
-  fi
-  (echo; echo) >&5
-  test "$ac_signal" != 0 &&
-    echo "$as_me: caught signal $ac_signal" >&5
-  echo "$as_me: exit $exit_status" >&5
-  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
-    exit $exit_status
-     ' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
-# Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
 if test -z "$CONFIG_SITE"; then
   if test "x$prefix" != xNONE; then
@@ -862,682 +498,251 @@
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:865: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    cat "$ac_site_file" >&5
+    echo "loading site script $ac_site_file"
     . "$ac_site_file"
   fi
 done
 
 if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:876: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
-    esac
-  fi
+  echo "loading cache $cache_file"
+  . $cache_file
 else
-  { echo "$as_me:884: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:900: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:904: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:910: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:912:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:914:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-        ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.  It doesn't matter if
-  # we pass some twice (in addition to the command line arguments).
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
-       ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:933: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:935: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  echo "creating cache $cache_file"
+  > $cache_file
 fi
 
 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 -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-echo "#! $SHELL" >conftest.sh
-echo  "exit 0"   >>conftest.sh
-chmod +x conftest.sh
-if { (echo "$as_me:955: PATH=\".;.\"; conftest.sh") >&5
-  (PATH=".;."; conftest.sh) 2>&5
-  ac_status=$?
-  echo "$as_me:958: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  ac_path_separator=';'
+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
+
+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
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
 else
-  ac_path_separator=:
+  ac_n= ac_c='\c' ac_t=
 fi
-PATH_SEPARATOR="$ac_path_separator"
-rm -f conftest.sh
 
-ac_config_headers="$ac_config_headers src/config.h"
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:977: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:992: found $ac_dir/$ac_word" >&5
-break
-done
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:1000: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:1003: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
+# Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:1012: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1027: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:1035: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:1038: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1051: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:542: 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
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1066: found $ac_dir/$ac_word" >&5
-break
-done
-
+  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"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:1074: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:1077: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:1086: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1101: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:1109: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:1112: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
+  echo "$ac_t""$CC" 1>&6
 else
-  CC="$ac_cv_prog_CC"
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
 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 "$as_me:1125: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:572: 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_prog_rejected=no
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-  ac_prog_rejected=yes
-  continue
-fi
-ac_cv_prog_CC="cc"
-echo "$as_me:1145: found $ac_dir/$ac_word" >&5
-break
-done
-
+  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
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
   set dummy $ac_cv_prog_CC
   shift
-  if test $# != 0; then
+  if test $# -gt 0; then
     # We chose a different compiler from the bogus one.
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    set dummy "$ac_dir/$ac_word" ${1+"$@"}
+    set dummy "$ac_dir/$ac_word" "$@"
     shift
     ac_cv_prog_CC="$@"
   fi
 fi
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:1167: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:1170: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1181: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  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:623: 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
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1196: found $ac_dir/$ac_word" >&5
-break
-done
-
+  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
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:1204: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:1207: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl
-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 "$as_me:1220: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1235: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
+  echo "$ac_t""no" 1>&6
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:1243: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:1246: result: no" >&5
-echo "${ECHO_T}no" >&6
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
-  test -n "$ac_ct_CC" && break
-done
-
-  CC=$ac_ct_CC
-fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:655: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
-fi
+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
 
-test -z "$CC" && { { echo "$as_me:1258: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:1263:" \
-     "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1266: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:1269: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:1271: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:1274: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:1276: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:1279: \$? = $ac_status" >&5
-  (exit $ac_status); }
+cat > conftest.$ac_ext << EOF
 
-cat >conftest.$ac_ext <<_ACEOF
-#line 1283 "configure"
+#line 666 "configure"
 #include "confdefs.h"
 
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:1299: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1302: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
-  ac_status=$?
-  echo "$as_me:1305: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-for ac_file in `ls a.exe conftest.exe 2>/dev/null;
-                ls a.out conftest 2>/dev/null;
-                ls a.* conftest.* 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
-    a.out ) # We found the default executable, but exeext='' is most
-            # certainly right.
-            break;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
-          export ac_cv_exeext
-          break;;
-    * ) break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:1328: error: C compiler cannot create executables" >&5
-echo "$as_me: error: C compiler cannot create executables" >&2;}
-   { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:1334: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:1339: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (eval echo "$as_me:1345: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1348: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
+main(){return(0);}
+EOF
+if { (eval echo configure:671: \"$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
+    ac_cv_prog_cc_cross=no
   else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { echo "$as_me:1355: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
+    ac_cv_prog_cc_cross=yes
   fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
 fi
-echo "$as_me:1363: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+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
 
-rm -f a.out a.exe conftest$ac_cv_exeext
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:1370: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1372: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:1375: checking for executable suffix" >&5
-echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1377: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:1380: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-          export ac_cv_exeext
-          break;;
-    * ) break;;
-  esac
-done
+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:697: 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:702: 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
-  { { echo "$as_me:1396: error: cannot compute EXEEXT: cannot compile and link" >&5
-echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:1402: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:1408: checking for object suffix" >&5
-echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1414 "configure"
-#include "confdefs.h"
+  ac_cv_prog_gcc=no
+fi
+fi
 
-int
-main ()
-{
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1426: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1429: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:1441: error: cannot compute OBJEXT: cannot compile" >&5
-echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:1448: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:1452: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1458 "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
+  GCC=
+fi
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1473: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1476: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1479: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1482: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_compiler_gnu=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:1494: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:1500: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+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:730: 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
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1506 "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1518: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1521: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1524: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1527: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
+  ac_cv_prog_cc_g=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
 fi
-echo "$as_me:1537: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
 if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
+  CFLAGS="$ac_save_CFLAGS"
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
     CFLAGS="-g -O2"
@@ -1551,343 +756,111 @@
     CFLAGS=
   fi
 fi
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1564: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1567: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1570: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1573: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   ''\
-   '#include <stdlib.h>' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1585 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1601: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1604: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1607: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-continue
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1617 "configure"
-#include "confdefs.h"
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1629: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1632: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1635: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1638: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:1670: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:762: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
   # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1691 "configure"
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 777 "configure"
 #include "confdefs.h"
 #include <assert.h>
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:1696: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:1702: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:783: \"$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 "$as_me: failed program was:" >&5
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1725 "configure"
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 794 "configure"
 #include "confdefs.h"
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:1729: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:1735: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:800: \"$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 "$as_me: failed program was:" >&5
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:1772: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1782 "configure"
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 811 "configure"
 #include "confdefs.h"
 #include <assert.h>
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:1787: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:1793: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:817: \"$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 "$as_me: failed program was:" >&5
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  # Broken: fails on valid input.
-continue
+  rm -rf conftest*
+  CPP=/lib/cpp
 fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1816 "configure"
-#include "confdefs.h"
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:1820: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:1826: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
+rm -f conftest*
 fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  # Passes both tests.
-ac_preproc_ok=:
-break
+rm -f conftest*
 fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
 else
-  { { echo "$as_me:1854: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
-   { (exit 1); exit 1; }; }
+  ac_cv_prog_CPP="$CPP"
 fi
+echo "$ac_t""$CPP" 1>&6
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-echo "$as_me:1865: checking whether ${MAKE-make} sets \${MAKE}" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:842: 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
 else
-  cat >conftest.make <<\EOF
+  cat > conftestmake <<\EOF
 all:
 	@echo 'ac_maketemp="${MAKE}"'
 EOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
 if test -n "$ac_maketemp"; then
   eval ac_cv_prog_make_${ac_make}_set=yes
 else
   eval ac_cv_prog_make_${ac_make}_set=no
 fi
-rm -f conftest.make
+rm -f conftestmake
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:1885: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  echo "$ac_t""yes" 1>&6
   SET_MAKE=
 else
-  echo "$as_me:1889: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -1901,20 +874,14 @@
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
-  elif test -f $ac_dir/shtool; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:1911: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -1923,39 +890,31 @@
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
 # 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 "$as_me:1931: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:899: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-    ac_save_IFS=$IFS; IFS=$ac_path_separator
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
   for ac_dir in $PATH; do
-    IFS=$ac_save_IFS
     # Account for people who put trailing slashes in PATH elements.
-    case $ac_dir/ in
-    / | ./ | .// | /cC/* \
-    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
-    | /usr/ucb/* ) ;;
+    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.
       # Don't use installbsd from OSF since it installs stuff as root
       # by default.
       for ac_prog in ginstall scoinst install; do
-        if $as_executable_p "$ac_dir/$ac_prog"; then
+        if test -f $ac_dir/$ac_prog; then
 	  if test $ac_prog = install &&
-            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
 	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
 	  else
 	    ac_cv_path_install="$ac_dir/$ac_prog -c"
 	    break 2
@@ -1965,369 +924,219 @@
       ;;
     esac
   done
+  IFS="$ac_save_IFS"
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
+    INSTALL="$ac_cv_path_install"
   else
     # As a last resort, use the slow shell script.  We don't cache a
     # path for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the path is relative.
-    INSTALL=$ac_install_sh
+    INSTALL="$ac_install_sh"
   fi
 fi
-echo "$as_me:1980: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+echo "$ac_t""$INSTALL" 1>&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 for ac_prog in 'bison -y' byacc
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+# Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:1995: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_YACC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:956: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_YACC="$ac_prog"
-echo "$as_me:2010: found $ac_dir/$ac_word" >&5
-break
-done
-
+  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_YACC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-YACC=$ac_cv_prog_YACC
+YACC="$ac_cv_prog_YACC"
 if test -n "$YACC"; then
-  echo "$as_me:2018: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6
+  echo "$ac_t""$YACC" 1>&6
 else
-  echo "$as_me:2021: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  test -n "$YACC" && break
+test -n "$YACC" && break
 done
 test -n "$YACC" || YACC="yacc"
 
-for ac_prog in flex lex
-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 "$as_me:2033: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LEX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Extract the first word of "flex", so it can be a program name with args.
+set dummy flex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:989: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$LEX"; then
   ac_cv_prog_LEX="$LEX" # Let the user override the test.
 else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_LEX="$ac_prog"
-echo "$as_me:2048: found $ac_dir/$ac_word" >&5
-break
-done
-
+  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_LEX="flex"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
 fi
 fi
-LEX=$ac_cv_prog_LEX
+LEX="$ac_cv_prog_LEX"
 if test -n "$LEX"; then
-  echo "$as_me:2056: result: $LEX" >&5
-echo "${ECHO_T}$LEX" >&6
+  echo "$ac_t""$LEX" 1>&6
 else
-  echo "$as_me:2059: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
-
 if test -z "$LEXLIB"
 then
-  echo "$as_me:2069: checking for yywrap in -lfl" >&5
-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 2077 "configure"
+  case "$LEX" in
+  flex*) ac_lib=fl ;;
+  *) ac_lib=l ;;
+  esac
+  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
+echo "configure:1023: checking for yywrap in -l$ac_lib" >&5
+ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-l$ac_lib  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1031 "configure"
 #include "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 yywrap ();
-int
-main ()
-{
-yywrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2096: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:2099: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:2102: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2105: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_fl_yywrap=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_fl_yywrap=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:2116: result: $ac_cv_lib_fl_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
-if test $ac_cv_lib_fl_yywrap = yes; then
-  LEXLIB="-lfl"
-else
-  echo "$as_me:2121: checking for yywrap in -ll" >&5
-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
-if test "${ac_cv_lib_l_yywrap+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ll  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 2129 "configure"
-#include "confdefs.h"
+    builtin and then its argument prototype would still apply.  */
+char yywrap();
 
-/* 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 yywrap ();
-int
-main ()
-{
-yywrap ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2148: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:2151: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:2154: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2157: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_l_yywrap=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_l_yywrap=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:2168: result: $ac_cv_lib_l_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
-if test $ac_cv_lib_l_yywrap = yes; then
-  LEXLIB="-ll"
+int main() {
+yywrap()
+; return 0; }
+EOF
+if { (eval echo configure:1042: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LEXLIB="-l$ac_lib"
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test "x$LEX" != "x:"; then
-  echo "$as_me:2179: checking lex output file root" >&5
-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_root+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # The minimal lex program is just a single line: %%.  But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-echo '%%
-%%' | $LEX
-if test -f lex.yy.c; then
-  ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
-  ac_cv_prog_lex_root=lexyy
-else
-  { { echo "$as_me:2193: error: cannot find output from $LEX; giving up" >&5
-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-fi
-echo "$as_me:2198: result: $ac_cv_prog_lex_root" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-echo "$as_me:2202: checking whether yytext is a pointer" >&5
-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS=$LIBS
-LIBS="$LIBS $LEXLIB"
-cat >conftest.$ac_ext <<_ACEOF
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2218: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:2221: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:2224: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2227: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_lex_yytext_pointer=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-rm -f "${LEX_OUTPUT_ROOT}.c"
-
-fi
-echo "$as_me:2239: result: $ac_cv_prog_lex_yytext_pointer" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-
-cat >>confdefs.h <<\EOF
-#define YYTEXT_POINTER 1
-EOF
-
 fi
 
-fi
 # Extract the first word of "lynx", so it can be a program name with args.
 set dummy lynx; ac_word=$2
-echo "$as_me:2252: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_LYNX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1067: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LYNX'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case $LYNX in
-  [\\/]* | ?:[\\/]*)
+  case "$LYNX" in
+  /*)
   ac_cv_path_LYNX="$LYNX" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_LYNX="$LYNX" # Let the user override the test with a dos path.
+  ;;
   *)
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH:/usr/bin:/usr/local/bin/:/local/bin:/local/perl/bin:/usr/local/perl/bin"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  if $as_executable_p "$ac_dir/$ac_word"; then
-   ac_cv_path_LYNX="$ac_dir/$ac_word"
-   echo "$as_me:2269: found $ac_dir/$ac_word" >&5
-   break
-fi
-done
-
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH:/usr/bin:/usr/local/bin/:/local/bin:/local/perl/bin:/usr/local/perl/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_LYNX="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
   test -z "$ac_cv_path_LYNX" && ac_cv_path_LYNX="false"
   ;;
 esac
 fi
-LYNX=$ac_cv_path_LYNX
-
+LYNX="$ac_cv_path_LYNX"
 if test -n "$LYNX"; then
-  echo "$as_me:2281: result: $LYNX" >&5
-echo "${ECHO_T}$LYNX" >&6
+  echo "$ac_t""$LYNX" 1>&6
 else
-  echo "$as_me:2284: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
-echo "$as_me:2290: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PERL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1103: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case $PERL in
-  [\\/]* | ?:[\\/]*)
+  case "$PERL" in
+  /*)
   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
+  ;;
   *)
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH:/usr/bin:/usr/local/bin/:/local/bin:/local/perl/bin:/usr/local/perl/bin"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  if $as_executable_p "$ac_dir/$ac_word"; then
-   ac_cv_path_PERL="$ac_dir/$ac_word"
-   echo "$as_me:2307: found $ac_dir/$ac_word" >&5
-   break
-fi
-done
-
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH:/usr/bin:/usr/local/bin/:/local/bin:/local/perl/bin:/usr/local/perl/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_PERL="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
   ;;
 esac
 fi
-PERL=$ac_cv_path_PERL
-
+PERL="$ac_cv_path_PERL"
 if test -n "$PERL"; then
-  echo "$as_me:2319: result: $PERL" >&5
-echo "${ECHO_T}$PERL" >&6
+  echo "$ac_t""$PERL" 1>&6
 else
-  echo "$as_me:2322: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
 if test $PERL = no; then
 	echo
 	echo "** No Perl found in the PATH. Perl is required"
 	echo "   for blocked.cgi to work "
-	echo
+	echo 
 fi
 
 dbprefix=/usr/local
@@ -2339,7 +1148,8 @@
 if test "${with_db+set}" = set; then
   withval="$with_db"
   db_distribution=$withval
-fi;
+fi
+
 
 if test -n "$db_distribution"; then
 	db_lib="-L${db_distribution}/lib"
@@ -2350,34 +1160,38 @@
 if test "${with_db_lib+set}" = set; then
   withval="$with_db_lib"
   db_lib="-L${withval}"
-fi;
+fi
 
 # Check whether --with-db_inc or --without-db_inc was given.
 if test "${with_db_inc+set}" = set; then
   withval="$with_db_inc"
   db_inc="-I${withval}"
-fi;
+fi
+
 
 # Check whether --with-sg_config or --without-sg_config was given.
 if test "${with_sg_config+set}" = set; then
   withval="$with_sg_config"
   sg_config=$withval
-fi;
+fi
+
 
 # Check whether --with-sg_logdir or --without-sg_logdir was given.
 if test "${with_sg_logdir+set}" = set; then
   withval="$with_sg_logdir"
   sg_logdir=$withval
-fi;
+fi
+
 
 # Check whether --with-sg_dbhome or --without-sg_dbhome was given.
 if test "${with_sg_dbhome+set}" = set; then
   withval="$with_sg_dbhome"
   sg_dbhome=$withval
-fi;
+fi
+
 
 if test -n "$sg_config"; then
-	cat >>confdefs.h <<\EOF
+	cat >> confdefs.h <<\EOF
 #define ACCONFIG 1
 EOF
 
@@ -2385,14 +1199,14 @@
 fi
 
 if test -n "$sg_logdir"; then
-	cat >>confdefs.h <<\EOF
+	cat >> confdefs.h <<\EOF
 #define ACLOGDIR 1
 EOF
 
 fi
 
 if test -n "$sg_dbhome"; then
-	cat >>confdefs.h <<\EOF
+	cat >> confdefs.h <<\EOF
 #define ACDBHOME 1
 EOF
 
@@ -2402,125 +1216,56 @@
 CPPFLAGS="$CPPFLAGS $db_inc"
 LDFLAGS="$LDFLAGS $db_lib"
 
-echo "$as_me:2405: checking for db_version in -ldb" >&5
-echo $ECHO_N "checking for db_version in -ldb... $ECHO_C" >&6
-if test "${ac_cv_lib_db_db_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldb  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 2413 "configure"
-#include "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 db_version ();
-int
-main ()
-{
-db_version ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2432: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:2435: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:2438: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2441: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_db_db_version=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_db_db_version=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:2452: result: $ac_cv_lib_db_db_version" >&5
-echo "${ECHO_T}$ac_cv_lib_db_db_version" >&6
-if test $ac_cv_lib_db_db_version = yes; then
-  cat >>confdefs.h <<EOF
-#define HAVE_LIBDB 1
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo db | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
 EOF
 
   LIBS="-ldb $LIBS"
 
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1279: 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
-
-	echo
-	echo "** The Berkley DB library is required for squidGuard"
-	echo "   to compile. Get it from http://www.sleepycat.com"
-	echo "   use --with-db=DIR or --with-db-lib=DIR to specify"
-	echo "   its location. (default is $dbprefix/BerkeleyDB)"
-	echo
-	exit 1
-
-fi
-
-echo "$as_me:2473: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2479 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1284 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <float.h>
-
-_ACEOF
-if { (eval echo "$as_me:2487: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:2493: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1292: \"$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
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
+  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+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 <<_ACEOF
-#line 2515 "configure"
+cat > conftest.$ac_ext <<EOF
+#line 1309 "configure"
 #include "confdefs.h"
 #include <string.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "memchr" >/dev/null 2>&1; then
   :
 else
+  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
@@ -2529,16 +1274,16 @@
 
 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 <<_ACEOF
-#line 2533 "configure"
+cat > conftest.$ac_ext <<EOF
+#line 1327 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "free" >/dev/null 2>&1; then
   :
 else
+  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
@@ -2547,115 +1292,85 @@
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
+if test "$cross_compiling" = yes; then
   :
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2554 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1348 "configure"
 #include "confdefs.h"
 #include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
-                     || ('j' <= (c) && (c) <= 'r') \
-                     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:2580: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:2583: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:2585: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2588: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   :
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_header_stdc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
 fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
 fi
-echo "$as_me:2601: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\EOF
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
 #define STDC_HEADERS 1
 EOF
 
 fi
 
-for ac_header in db.h regex.h unistd.h
+for ac_hdr in db.h regex.h unistd.h
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:2614: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2620 "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:2624: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:2630: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  eval "$as_ac_Header=yes"
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1386: 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
+#line 1391 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1396: \"$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"
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  eval "$as_ac_Header=no"
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:2649: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
 EOF
-
+ 
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
+
 if test $DB.H = no; then
 	echo
 	echo "** No db.h found"
@@ -2668,7 +1383,7 @@
 fi
 
 if test $HAVE_REGEX.H = no; then
-	echo
+	echo 
 	echo "** No regex.h found"
 	echo "   The regexp library is required for squidGuard"
 	echo "   to compile. Get it from http://www.gnu.org"
@@ -2676,955 +1391,636 @@
 	exit 1
 fi
 
-echo "$as_me:2679: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1444: 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 <<EOF
+#line 1449 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
 }
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
 }
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2736: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2739: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2742: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2745: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:2762: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
-  *)
-    echo "$as_me:2765: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-echo "$as_me:2770: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2776 "configure"
-#include "confdefs.h"
 
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset x;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-  }
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2834: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2837: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2840: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2843: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+; return 0; }
+EOF
+if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ac_cv_c_const=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_c_const=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:2853: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
 
-cat >>confdefs.h <<\EOF
-#define const
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
 EOF
 
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:2869: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:1519: 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 <<_ACEOF
-#line 2875 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1524 "configure"
 #include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2881: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2884: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2887: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2890: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:2900: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 EOF
-
-fi
-done
-
-echo "$as_me:2910: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 2916 "configure"
-#include "confdefs.h"
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
-  return 0;
-if (sizeof (size_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2931: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2934: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2937: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2940: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  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
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_type_size_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:2950: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
-  :
-else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
 
-cat >>confdefs.h <<EOF
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
 #define size_t unsigned
 EOF
 
 fi
 
-echo "$as_me:2962: checking whether struct tm is in sys/time.h or time.h" >&5
-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
-if test "${ac_cv_struct_tm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
+echo "configure:1552: 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 <<_ACEOF
-#line 2968 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1557 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
-
-int
-main ()
-{
+int main() {
 struct tm *tp; tp->tm_sec;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2982: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:2985: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2988: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:2991: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+; return 0; }
+EOF
+if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_struct_tm=sys/time.h
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tm=sys/time.h
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:3001: result: $ac_cv_struct_tm" >&5
-echo "${ECHO_T}$ac_cv_struct_tm" >&6
-if test $ac_cv_struct_tm = sys/time.h; then
 
-cat >>confdefs.h <<\EOF
+echo "$ac_t""$ac_cv_struct_tm" 1>&6
+if test $ac_cv_struct_tm = sys/time.h; then
+  cat >> confdefs.h <<\EOF
 #define TM_IN_SYS_TIME 1
 EOF
 
 fi
 
+
+
 for ac_func in regcomp
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3014: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1590: 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 <<_ACEOF
-#line 3020 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1595 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3051: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3054: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3057: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3060: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3070: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1618: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3078: error: No regcomp library function." >&5
-echo "$as_me: error: No regcomp library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No regcomp library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in regerror
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3087: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1646: 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 <<_ACEOF
-#line 3093 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1651 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3124: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3127: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3130: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3133: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3143: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1674: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3151: error: No regerror library function." >&5
-echo "$as_me: error: No regerror library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No regerror library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in regexec
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3160: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1702: 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 <<_ACEOF
-#line 3166 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1707 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3197: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3200: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3203: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3206: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3216: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1730: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3224: error: No regexec library function." >&5
-echo "$as_me: error: No regexec library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No regexec library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in strdup
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3233: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1758: 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 <<_ACEOF
-#line 3239 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1763 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3270: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3273: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3276: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3279: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3289: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1786: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3297: error: No strdup library function." >&5
-echo "$as_me: error: No strdup library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No strdup library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in strerror
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3306: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1814: 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 <<_ACEOF
-#line 3312 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1819 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3343: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3346: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3349: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3352: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3362: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1842: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3370: error: No strerror library function." >&5
-echo "$as_me: error: No strerror library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No strerror library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in vsprintf
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3379: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1870: 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 <<_ACEOF
-#line 3385 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1875 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3416: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3419: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3422: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3425: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3435: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1898: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
 else
-  { { echo "$as_me:3443: error: No vsprintf library function." >&5
-echo "$as_me: error: No vsprintf library function." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: No vsprintf library function." 1>&2; exit 1; }
 fi
 done
 
 for ac_func in sigaction
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3452: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1926: 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 <<_ACEOF
-#line 3458 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1931 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3489: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3492: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3495: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3498: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3508: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:1954: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
 for ac_func in signal
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3521: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1981: 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 <<_ACEOF
-#line 3527 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 1986 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.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 $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-f = $ac_func;
+$ac_func();
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3558: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3561: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3564: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3567: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:3577: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+; return 0; }
 EOF
+if { (eval echo configure:2009: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
+
 if test "$cross_compiling" = yes; then
   db_ok_version=no
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 3591 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 2038 "configure"
 #include "confdefs.h"
 
 	#include <db.h>
-	int main()
+	int main() 
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver >= 2.006)
 			exit (0);
 		exit (1);
-	}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3608: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3611: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:3613: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3616: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+	}	
+	
+EOF
+if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   db_ok_version=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-db_ok_version=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  db_ok_version=no
 fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
 if test $db_ok_version = no; then
 	echo
 	echo "** The Berkley DB library version 2.6.4 or newer"
@@ -3632,51 +2028,49 @@
 	echo "   use --with-db=DIR or --with-db-inc=DIR, "
 	echo "   --with-db-lib=DIR to specify its location"
 	echo "   (default is $dbprefix/BerkeleyDB)"
-	echo
+	echo 
 	exit 1;
 fi
 
 if test "$cross_compiling" = yes; then
   db_ok_version=no
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 3643 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 2088 "configure"
 #include "confdefs.h"
 
 	#include <db.h>
-	int main()
+	int main() 
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver > 2.007 && ver < 3.002)
 			exit (1);
 		exit (0);
-	}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3660: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3663: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:3665: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3668: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+	}	
+	
+EOF
+if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   db_ok_version=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-db_ok_version=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  db_ok_version=no
 fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
 if test $db_ok_version = no; then
 	echo
 	echo "** The Berkley DB library version 3.2.* or newer"
@@ -3685,53 +2079,96 @@
 	echo "   use --with-db=DIR or --with-db-inc=DIR, "
 	echo "   --with-db-lib=DIR to specify its location"
 	echo "   (default is $dbprefix/BerkeleyDB)"
-	echo
+	echo 
 	exit 1;
 fi
 
 if test "$cross_compiling" = yes; then
   dbg2_ok_version=no
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 3696 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 2139 "configure"
 #include "confdefs.h"
 
 	#include <db.h>
-	int main()
+	int main() 
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver >= 3.002)
 			exit (0);
 		exit (1);
-	}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3713: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:3716: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:3718: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:3721: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+	}	
+	
+EOF
+if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
   dbg2_ok_version=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-dbg2_ok_version=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  dbg2_ok_version=no
+fi
+rm -fr conftest*
+fi
+
+
+
+if test "$cross_compiling" = yes; then
+  dbg4_ok_version=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2179 "configure"
+#include "confdefs.h"
+
+        #include <db.h>
+        int main()
+        {
+                int major, minor, patch;
+                float ver;
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
+                ver = major + ((float) minor / 1000);
+                if (major >= 4 && minor >= 1)
+                        exit (0);
+                exit (1);
+        }
+        
+EOF
+if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  dbg4_ok_version=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  dbg4_ok_version=no
 fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
-if test $dbg2_ok_version = yes; then
-	cat >>confdefs.h <<\EOF
+
+if test $dbg4_ok_version = yes; then
+	cat >> confdefs.h <<\EOF
+#define DB_VERSION_GT4 1
+EOF
+
+elif test $dbg2_ok_version = yes; then
+	cat >> confdefs.h <<\EOF
 #define DB_VERSION_GT2 1
 EOF
 
@@ -3741,10 +2178,10 @@
 TESTDIR="`pwd`/test"
 
 if test -f /bin/csh -a -f /bin/hostname -a -f /bin/domainname; then
-	if test "`/bin/domainname`" = .ost.eltele.no -o "`/bin/domainname`" = .teledanmark.no; then
+	if test "`/bin/hostname``/bin/domainname`" = web.ost.eltele.no; then
 		FTPDIR="~ftp/pub/www/proxy/squidGuard"
 		FTPDIR=`/bin/csh -fc "test -d $FTPDIR && echo $FTPDIR" 2>/dev/null | grep -v '^~'` || FTPDIR="@FTPDIR@"
-		CGIFILE="~ftp/pub/www/proxy/squidGuard/contrib/squidGuard.cgi"
+		CGIFILE="~http/admin.ost.eltele.no/cgi/squidGuard"
 		CGIFILE=`/bin/csh -fc "test -f $CGIFILE && echo $CGIFILE" 2>/dev/null | grep -v '^~'` || CGI="@CGI@"
 		SQUIDGUARDROBOT="~proxy/filter/robot/bin/squidGuardRobot"
 		SQUIDGUARDROBOT=`/bin/csh -fc "test -f $SQUIDGUARDROBOT && echo $SQUIDGUARDROBOT" 2>/dev/null | grep -v '^~'` || SQUIDGUARDROBOT="@SQUIDGUARDROBOT@"
@@ -3755,853 +2192,397 @@
 	fi
 fi
 
-ac_config_files="$ac_config_files Makefile src/Makefile src/sg.h doc/Makefile test/Makefile test/test1.conf test/test2.conf samples/Makefile samples/sample.conf samples/squidGuard.cgi samples/squidGuard-simple.cgi contrib/Makefile contrib/squidGuardRobot/squidGuardRobot contrib/sgclean/sgclean contrib/hostbyname/hostbyname"
-cat >confcache <<\_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
 #
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
 #
-# `ac_cv_env_foo' variables (set or unset) will be overriden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
+EOF
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
 # So, don't put newlines in cache variables' values.
 # 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 | 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 \).
-      sed -n \
-        "s/'/'\\\\''/g;
-    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} |
-  sed '
-     t clear
-     : clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+(set) 2>&1 |
+  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 \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
   if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
   else
     echo "not updating unwritable cache $cache_file"
   fi
 fi
 rm -f confcache
 
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ 	]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ 	]*$//;
-}'
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
 fi
 
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
 DEFS=-DHAVE_CONFIG_H
 
+# Without the "./", some shells look in PATH for config.status.
 : ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:3838: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
 # Generated automatically by configure.
 # Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
 # Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-ac_cs_invocation="\$0 \$@"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-
-# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-as_executable_p="test -f"
-
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-# NLS nuisances.
-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
-
-exec 6>&1
-
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+# configure, is in ./config.log if it exists.
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\EOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <bug-autoconf@gnu.org>."
-EOF
-
-cat >>$CONFIG_STATUS <<EOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.52,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-EOF
-
-cat >>$CONFIG_STATUS <<\EOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
 do
-  case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    shift
-    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
-    shift
-    ;;
-  -*);;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_need_defaults=false;;
-  esac
-
-  case $1 in
-  # Handling of the options.
-EOF
-cat >>$CONFIG_STATUS <<EOF
+  case "\$ac_option" in
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
-    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-EOF
-cat >>$CONFIG_STATUS <<\EOF
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:4011: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    shift
-    CONFIG_FILES="$CONFIG_FILES $1"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $1"
-    ac_need_defaults=false;;
-
-  # This is an error.
-  -*) { { echo "$as_me:4030: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1" ;;
-
-  esac
-  shift
-done
-
-exec 5>>config.log
-cat >&5 << _ACEOF
-
-## ----------------------- ##
-## Running config.status.  ##
-## ----------------------- ##
-
-This file was extended by $as_me 2.52, executed with
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  > $ac_cs_invocation
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-
-_ACEOF
-EOF
-
-cat >>$CONFIG_STATUS <<\EOF
-for ac_config_target in $ac_config_targets
-do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-  "src/sg.h" ) CONFIG_FILES="$CONFIG_FILES src/sg.h" ;;
-  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
-  "test/test1.conf" ) CONFIG_FILES="$CONFIG_FILES test/test1.conf" ;;
-  "test/test2.conf" ) CONFIG_FILES="$CONFIG_FILES test/test2.conf" ;;
-  "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
-  "samples/sample.conf" ) CONFIG_FILES="$CONFIG_FILES samples/sample.conf" ;;
-  "samples/squidGuard.cgi" ) CONFIG_FILES="$CONFIG_FILES samples/squidGuard.cgi" ;;
-  "samples/squidGuard-simple.cgi" ) CONFIG_FILES="$CONFIG_FILES samples/squidGuard-simple.cgi" ;;
-  "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
-  "contrib/squidGuardRobot/squidGuardRobot" ) CONFIG_FILES="$CONFIG_FILES contrib/squidGuardRobot/squidGuardRobot" ;;
-  "contrib/sgclean/sgclean" ) CONFIG_FILES="$CONFIG_FILES contrib/sgclean/sgclean" ;;
-  "contrib/hostbyname/hostbyname" ) CONFIG_FILES="$CONFIG_FILES contrib/hostbyname/hostbyname" ;;
-  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
-  *) { { echo "$as_me:4081: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
+    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.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
   esac
 done
 
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/cs$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
 
+trap 'rm -fr `echo "Makefile src/Makefile src/sg.h doc/Makefile test/Makefile test/test1.conf test/test2.conf samples/Makefile samples/sample.conf samples/squidGuard.cgi samples/squidGuard-simple.cgi contrib/Makefile contrib/squidGuardRobot/squidGuardRobot contrib/sgclean/sgclean contrib/hostbyname/hostbyname src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
+cat >> $CONFIG_STATUS <<EOF
 
-cat >>$CONFIG_STATUS <<EOF
-
-#
-# CONFIG_FILES section.
-#
+# Protect against being on the right side of a sed subst in config.status.
+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
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@YACC@%$YACC%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
+s%@LYNX@%$LYNX%g
+s%@PERL@%$PERL%g
+s%@ac_n@%$ac_n%g
+s%@ac_c@%$ac_c%g
+s%@sg_config@%$sg_config%g
+s%@sg_cfgdir@%$sg_cfgdir%g
+s%@sg_logdir@%$sg_logdir%g
+s%@sg_dbhome@%$sg_dbhome%g
+s%@VERSION@%$VERSION%g
+s%@TESTDIR@%$TESTDIR%g
+s%@FTPDIR@%$FTPDIR%g
+s%@CGIFILE@%$CGIFILE%g
+s%@SQUIDGUARDROBOT@%$SQUIDGUARDROBOT%g
+s%@SQUIDGUARDROBOTUA@%$SQUIDGUARDROBOTUA%g
+s%@ROBOTEXCEPTIONS@%$ROBOTEXCEPTIONS%g
+s%@BLACKLISTS@%$BLACKLISTS%g
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@DEFS@,$DEFS,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@YACC@,$YACC,;t t
-s,@LEX@,$LEX,;t t
-s,@LEXLIB@,$LEXLIB,;t t
-s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
-s,@LYNX@,$LYNX,;t t
-s,@PERL@,$PERL,;t t
-s,@ac_n@,$ac_n,;t t
-s,@ac_c@,$ac_c,;t t
-s,@sg_config@,$sg_config,;t t
-s,@sg_cfgdir@,$sg_cfgdir,;t t
-s,@sg_logdir@,$sg_logdir,;t t
-s,@sg_dbhome@,$sg_dbhome,;t t
-s,@VERSION@,$VERSION,;t t
-s,@TESTDIR@,$TESTDIR,;t t
-s,@FTPDIR@,$FTPDIR,;t t
-s,@CGIFILE@,$CGIFILE,;t t
-s,@SQUIDGUARDROBOT@,$SQUIDGUARDROBOT,;t t
-s,@SQUIDGUARDROBOTUA@,$SQUIDGUARDROBOTUA,;t t
-s,@ROBOTEXCEPTIONS@,$ROBOTEXCEPTIONS,;t t
-s,@BLACKLISTS@,$BLACKLISTS,;t t
 CEOF
-
 EOF
 
-  cat >>$CONFIG_STATUS <<\EOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
     else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
     fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
   fi
-fi # test -n "$CONFIG_FILES"
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
 
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile src/sg.h doc/Makefile test/Makefile test/test1.conf test/test2.conf samples/Makefile samples/sample.conf samples/squidGuard.cgi samples/squidGuard-simple.cgi contrib/Makefile contrib/squidGuardRobot/squidGuardRobot contrib/sgclean/sgclean contrib/hostbyname/hostbyname"}
 EOF
-cat >>$CONFIG_STATUS <<\EOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
   esac
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    { case "$ac_dir" in
-  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
-  *)                      as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
-  case $as_mkdir_dir in
-    # Skip DOS drivespec
-    ?:) as_incr_dir=$as_mkdir_dir ;;
-    *)
-      as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
-    ;;
-  esac
-done; }
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
-    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
     # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
   else
     ac_dir_suffix= ac_dots=
   fi
 
-  case $srcdir in
-  .)  ac_srcdir=.
-      if test -z "$ac_dots"; then
-         ac_top_srcdir=.
-      else
-         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
-      fi ;;
-  [\\/]* | ?:[\\/]* )
-      ac_srcdir=$srcdir$ac_dir_suffix;
-      ac_top_srcdir=$srcdir ;;
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
   *) # Relative path.
-    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_dots$srcdir ;;
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
   esac
 
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_dots$INSTALL ;;
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
   esac
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:4308: 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 automatically by config.status.  */
-  configure_input="Generated automatically from `echo $ac_file_in |
-                                                 sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:4326: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         echo $f;;
-      *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:4339: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-EOF
-cat >>$CONFIG_STATUS <<EOF
-  sed "$ac_vpsub
-$extrasub
-EOF
-cat >>$CONFIG_STATUS <<\EOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
-
-done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
 
-#
-# CONFIG_HEADER section.
-#
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
 
 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 # NAME is the cpp macro being defined and VALUE is the value it is being given.
 #
 # ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='[ 	].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='$,\1#\2define\3'
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
 ac_uC=' '
-ac_uD=',;t'
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
 
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="src/config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:4400: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+  echo creating $ac_file
 
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:4411: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         echo $f;;
-      *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:4424: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
 
 EOF
 
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\EOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
-t end
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-EOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
 
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\EOF
-s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
 EOF
 
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # egrep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
 rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
+while :
 do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
   echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\EOF
-  # 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 automatically by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated automatically by configure.  */" >$tmp/config.h
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
   else
-    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:4541: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-        { case "$ac_dir" in
-  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
-  *)                      as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
-  case $as_mkdir_dir in
-    # Skip DOS drivespec
-    ?:) as_incr_dir=$as_mkdir_dir ;;
-    *)
-      as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
-    ;;
-  esac
-done; }
-
-      fi
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
     fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
+    rm -f $ac_file
+    mv conftest.h $ac_file
   fi
-done
+fi; done
+
 EOF
+cat >> $CONFIG_STATUS <<EOF
 
-cat >>$CONFIG_STATUS <<\EOF
+EOF
+cat >> $CONFIG_STATUS <<\EOF
 
-{ (exit 0); exit 0; }
+exit 0
 EOF
 chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
--- squidguard-1.2.0.orig/configure.in
+++ squidguard-1.2.0/configure.in
@@ -127,7 +127,13 @@
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver >= 2.006)
 			exit (0);
@@ -152,7 +158,13 @@
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver > 2.007 && ver < 3.002)
 			exit (1);
@@ -178,7 +190,13 @@
 	{
 		int major, minor, patch;
 		float ver;
-		db_version(&major, &minor, &patch);
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
 		ver = major + ((float) minor / 1000);
                 if (ver >= 3.002)
 			exit (0);
@@ -186,7 +204,30 @@
 	}	
 	], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=no)
 
-if test $dbg2_ok_version = yes; then
+
+AC_TRY_RUN([
+        #include <db.h>
+        int main()
+        {
+                int major, minor, patch;
+                float ver;
+#if DB_VERSION_MAJOR
+                major = DB_VERSION_MAJOR;
+                minor = DB_VERSION_MINOR;
+                patch = DB_VERSION_PATCH;
+#else
+                db_version(&major, &minor, &patch);
+#endif
+                ver = major + ((float) minor / 1000);
+                if (major >= 4 && minor >= 1)
+                        exit (0);
+                exit (1);
+        }
+        ], dbg4_ok_version=yes, dbg4_ok_version=no, dbg4_ok_version=no)
+
+if test $dbg4_ok_version = yes; then
+	AC_DEFINE(DB_VERSION_GT4)
+elif test $dbg2_ok_version = yes; then
 	AC_DEFINE(DB_VERSION_GT2)
 fi
 
@@ -194,10 +235,10 @@
 TESTDIR="`pwd`/test"
 
 if test -f /bin/csh -a -f /bin/hostname -a -f /bin/domainname; then
-	if test "`/bin/domainname`" = .ost.eltele.no -o "`/bin/domainname`" = .teledanmark.no; then
+	if test "`/bin/hostname``/bin/domainname`" = web.ost.eltele.no; then
 		FTPDIR="~ftp/pub/www/proxy/squidGuard"
 		FTPDIR=`/bin/csh -fc "test -d $FTPDIR && echo $FTPDIR" 2>/dev/null | grep -v '^~'` || FTPDIR="@FTPDIR@"
-		CGIFILE="~ftp/pub/www/proxy/squidGuard/contrib/squidGuard.cgi"
+		CGIFILE="~http/admin.ost.eltele.no/cgi/squidGuard"
 		CGIFILE=`/bin/csh -fc "test -f $CGIFILE && echo $CGIFILE" 2>/dev/null | grep -v '^~'` || CGI="@CGI@"
 		SQUIDGUARDROBOT="~proxy/filter/robot/bin/squidGuardRobot"
 		SQUIDGUARDROBOT=`/bin/csh -fc "test -f $SQUIDGUARDROBOT && echo $SQUIDGUARDROBOT" 2>/dev/null | grep -v '^~'` || SQUIDGUARDROBOT="@SQUIDGUARDROBOT@"
--- squidguard-1.2.0.orig/contrib/squidGuardRobot/squidGuardRobot.in
+++ squidguard-1.2.0/contrib/squidGuardRobot/squidGuardRobot.in
@@ -26,7 +26,7 @@
 # You should have received a copy of the GNU General Public License
 # (GPL) along with this program.
 
-my $VERSION = "2.3.5";
+my $VERSION = "2.2.8";
 
 my ($debug,$verbose,$quiet,$washonly,$umask,$home,$lib,$etc,$source_proxy,$link_proxy);
 my ($simultaneous_sources,$simultaneous_links,$bulk,$fake_user_agent);
@@ -35,9 +35,8 @@
 my ($links,$link_timeout,$link_retries,);
 my ($link_bouncing_ttl,$link_remember,$link_min_ttl,$link_max_ttl);
 my ($domainexceptions,$urlexceptions,$exceptions,$includes,$redirectors,$patterns);
-my ($domainlist,$domains,$domain_ttl,$urllist,$urls,$url_ttl);
+my ($domainlist,$newdomains,$domains,$domain_ttl,$urllist,$newurls,$urls,$url_ttl);
 my ($doinaddr,$dns_timeout,@nameservers);
-my ($domaindiff,@domaindiff,$urldiff,@urldiff);
 
 #
 # USER CONFIGURABLE DEFAULTS:
@@ -53,7 +52,7 @@
 
 $umask			= 0027;				# usually 0002 || 0007
 
-$home			= "/var/spool/www/hosts/proxy.teledanmark.no/filter/robot";
+$home			= "/var/spool/www/hosts/proxy.ost.eltele.no/filter/robot";
 $lib			= "$home/lib";
 $etc			= "$home/etc";
 
@@ -67,10 +66,10 @@
 $fake_user_agent	= "Mozilla/4.72 [en] (WinNT; U)";# undef||"Mozilla/4.72 [en] (WinNT; U)"
 
 $sources		= "$etc/source";		# ADD NEW SOURCES HERE; SLURPED AT STARTUP
-$source_timeout		= 60;				# SECONDS BEFORE TIMEOUT DURING "GET"
+$source_timeout		= 120;				# SECONDS BEFORE TIMEOUT DURING "GET"
 $source_retries		= 3;				# NO OF FAILURES BEFORE MARKED AS BOUNCING
 $source_bouncing_ttl	= 30;				# DAYS BEFORE RETESTING A SOURCE MARKED AS BOUNCING
-$source_remember	= 365;				# DAYS BEFORE REMOVING A SOURCE MARKED AS BOUNCING
+$source_remember	= 180;				# DAYS BEFORE REMOVING A SOURCE MARKED AS BOUNCING
 $source_min_ttl		= 2;				# MIN DAYS A SOURCE SHOULD BE LISTED AS SUCCEEDING
 $source_max_ttl		= 10;				# MAX DAYS A SOURCE SHOULD BE LISTED AS SUCCEEDING
 $candidates		= "$etc/candidate";		# SOURCE REDIRECTS ARE LOGGED HERE
@@ -99,8 +98,8 @@
 
 $domainlist		= "$etc/domains";		# THE DOMAIN LIST CREATED BY THIS PROGRAM
 $urllist		= "$etc/urls";			# THE URL LIST CREATED BY THIS PROGRAM
-$domaindiff		= "$etc/domains.%Y%m%d.diff";	# THE DOMAIN CHANGES THIS TIME; CREATED BY THIS PROGRAM
-$urldiff		= "$etc/urls.%Y%m%d.diff";	# THE URL CHANGES THIS TIME; CREATED BY THIS PROGRAM
+$newdomains		= "$etc/newdomains";		# THE DOMAIN NEWS THIS TIME; CREATED BY THIS PROGRAM
+$newurls		= "$etc/newurls";		# THE URL NEWS THIS TIME; CREATED BY THIS PROGRAM
 
 #
 # END USER CONFIGURABLE DEFAULTS
@@ -112,7 +111,6 @@
 use Getopt::Std;
 use POSIX qw(strftime);
 use DB_File;
-use Fcntl qw(:flock);
 use Net::DNS;
 use IO::Select;
 use HTTP::Request;
@@ -192,15 +190,14 @@
 sub today();
 sub export();
 sub valid($);
-sub total($);
-sub dumpkeys($$);
+sub dumpkeys($$$);
 sub end($);
 sub disconnect();
 sub reconnect();
 sub fixconnect();
 
 sub init() {
-  my (%opts, $i, $fd);
+  my (%opts, $i);
   getopts("hc:dqQvVw", \%opts) || usage(1);
   if (defined($opts{h})) {
     usage(0);
@@ -251,72 +248,42 @@
   $DB_BTREE->{compare} = \&linkmatch;
   $sourcedb = tie(%source,"DB_File","$sources.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$sources.db: $!");
-  $fd = $sourcedb->fd;
-  open(SOURCES, "+<&=$fd") || die("dup: $!");
-  flock(SOURCES, LOCK_EX|LOCK_NB) || die("$sources.db: $!");
-
+  
   $DB_BTREE->{compare} = \&linkmatch;
   $candidatedb = tie(%candidate,"DB_File","$candidates.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$candidates.db: $!");
-  $fd = $candidatedb->fd;
-  open(CANDIDATES, "+<&=$fd") || die("dup: $!");
-  flock(CANDIDATES, LOCK_EX|LOCK_NB) || die("$candidates.db: $!");
   
   $DB_BTREE->{compare} = \&linkmatch;
   $linkdb = tie(%link,"DB_File","$links.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$links.db: $!");
-  $fd = $linkdb->fd;
-  open(LINKS, "+<&=$fd") || die("dup: $!");
-  flock(LINKS, LOCK_EX|LOCK_NB) || die("$links.db: $!");
   
   $DB_BTREE->{compare} = \&domainmatch;
   $domaindb = tie(%domain,"DB_File","$domains.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$domains.db: $!");
-  $fd = $domaindb->fd;
-  open(DOMAINS, "+<&=$fd") || die("dup: $!");
-  flock(DOMAINS, LOCK_EX|LOCK_NB) || die("$domains.db: $!");
   
   $DB_BTREE->{compare} = \&urlmatch;
   $urldb = tie(%url,"DB_File","$urls.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$urls.db: $!");
-  $fd = $urldb->fd;
-  open(URLS, "+<&=$fd") || die("dup: $!");
-  flock(URLS, LOCK_EX|LOCK_NB) || die("$urls.db: $!");
   
   $DB_BTREE->{compare} = \&domainmatch;
   $domainexceptiondb = tie(%domainexception,"DB_File","$domainexceptions.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$domainexceptions.db: $!");
-  $fd = $domainexceptiondb->fd;
-  open(DOMAINEXCEPTIONS, "+<&=$fd") || die("dup: $!");
-  flock(DOMAINEXCEPTIONS, LOCK_EX|LOCK_NB) || die("$domainexceptions.db: $!");
   
   $DB_BTREE->{compare} = \&urlmatch;
   $urlexceptiondb = tie(%urlexception,"DB_File","$urlexceptions.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$urlexceptions.db: $!");
-  $fd = $urlexceptiondb->fd;
-  open(URLEXCEPTIONS, "+<&=$fd") || die("dup: $!");
-  flock(URLEXCEPTIONS, LOCK_EX|LOCK_NB) || die("$urlexceptions.db: $!");
   
   $DB_BTREE->{compare} = \&exceptionmatch;
   $exceptiondb = tie(%exception,"DB_File","$exceptions.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$exceptions.db: $!");
-  $fd = $exceptiondb->fd;
-  open(EXCEPTIONS, "+<&=$fd") || die("dup: $!");
-  flock(EXCEPTIONS, LOCK_EX|LOCK_NB) || die("$exceptions.db: $!");
   
   $DB_BTREE->{compare} = \&urlmatch;
   $includedb = tie(%include,"DB_File","$includes.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$includes.db: $!");
-  $fd = $includedb->fd;
-  open(INCLUDES, "+<&=$fd") || die("dup: $!");
-  flock(INCLUDES, LOCK_EX|LOCK_NB) || die("$includes.db: $!");
   
   $DB_BTREE->{compare} = \&domainmatch;
   $redirectordb = tie(%redirector,"DB_File","$redirectors.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$redirectors.db: $!");
-  $fd = $redirectordb->fd;
-  open(REDIRECTORS, "+<&=$fd") || die("dup: $!");
-  flock(REDIRECTORS, LOCK_EX|LOCK_NB) || die("$redirectors.db: $!");
   
   $SIG{INT} = \&end;
   $SIG{TERM} = \&end;
@@ -344,20 +311,12 @@
   $new += scalar(addnew(\%link, $links));
   $linkdb->sync();
   trunc($links);
-  @new = addnew(\%domain, $domains);
-  $new += scalar(@new);
+  $new += scalar(addnew(\%domain, $domains));
   $domaindb->sync();
   trunc($domains);
-  foreach $key (@new) {
-    push(@domaindiff,"+$key");
-  }
-  @new = addnew(\%url, $urls);
-  $new += scalar(@new);
+  $new += scalar(addnew(\%url, $urls));
   $urldb->sync();
   trunc($urls);
-  foreach $key (@new) {
-    push(@urldiff,"+$key");
-  }
   $new += scalar(addnew(\%include, $includes));
   $includedb->sync();
   trunc($includes);
@@ -391,7 +350,6 @@
 	unless(exists($include{$k})) {
 	  my %data = split(/[=;]/, $v);
 	  info("Removing obsoleted url (domainexception=%s): %s",$key,$k);
-	  push(@urldiff,"-$k");
 	  release($data{referer});
 	  $urldb->del_dup($k,$v);
 	  $urldb->sync();
@@ -404,7 +362,6 @@
 	   $k = $key, $n = $domaindb->seq($k,$v,R_CURSOR)) {
 	my %data = split(/[=;]/, $v);
 	info("Removing obsoleted domain (domainexception=%s): %s",$key,$k);
-	push(@domaindiff,"-$k");
 	release($data{referer});
 	$domaindb->del_dup($k,$v);
 	$domaindb->sync();
@@ -425,7 +382,6 @@
 	   $k = $key, $n = $urldb->seq($k,$v,R_CURSOR)) {
 	my %data = split(/[=;]/, $v);
 	info("Removing obsoleted url (urlexception=%s): %s",$key,$k);
-	push(@urldiff,"-$k");
 	release($data{referer});
 	$urldb->del_dup($k,$v);
 	$urldb->sync();
@@ -446,7 +402,6 @@
 	$k = $key;
 	$v = $url{$key};
 	$urldb->del_dup($k,$v);
-	push(@urldiff,"-$k");
 	$urldb->sync();
       }
       while(exists($domain{$key})) {
@@ -456,7 +411,6 @@
 	$k = $key;
 	$v = $domain{$key};
 	$domaindb->del_dup($k,$v);
-	push(@domaindiff,"-$k");
 	$domaindb->sync();
       }
     }
@@ -539,20 +493,19 @@
 }
 
 sub domaincmp($$) {
-  my $search = join("\0",reverse(split(/\./,lc(shift))));
-  my $found = join("\0",reverse(split(/\./,lc(shift))));
-  #debug("domaincmp(%s,%s)", $search, $found);
-  return($search . "\0" cmp $found . "\0");
+  my $search = mirror(lc(shift));
+  my $found = mirror(lc(shift));
+  return($search . "." cmp $found . ".");
 }
 
 sub linkmatch($$) {
   my $search = shift;
   my $found = shift;
+  #debug("linkmatch(%s,%s)", $search, $found);
   $search = lc($search);
   $found = lc($found);
-  #debug("linkmatch(%s,%s)", $search, $found);
-  $search =~ s@/(index\.s?html?|default\.(s?html?|asp))$@@;
-  $found =~ s@/(index\.s?html?|default\.(s?html?|asp))$@@;
+  $search =~ s@/index\.s?html?$@@;
+  $found =~ s@/index\.s?html?$@@;
   if ($search eq $found
       || $search . "/" eq $found
       || $search eq $found . "/") {
@@ -563,16 +516,19 @@
 }
 
 sub domainmatch($$) {
-  my $search = lc(shift);
-  my $found = lc(shift);
+  my $search = shift;
+  my $found = shift;
   #debug("domainmatch(%s,%s)", $search, $found);
+  $search = lc($search);
+  $found = lc($found);
   if ($search eq $found) {
     return(0);
   } else {
-    $found = join("\0",reverse(split(/\./,$found)));
-    $search = substr(join("\0",reverse(split(/\./,$search))),0,length($found));
-    #debug("domainmatch(%s,%s)", $search, $found);
-    return($search cmp $found)
+    $found = mirror(".$found");
+    $search = mirror($search);
+    $search = substr($search,0,length($found));
+    #debug("domainmatch(%s,%s)", mirror($search), mirror($found));
+    return($search cmp $found);
   }
 }
 
@@ -680,7 +636,7 @@
   $DB_BTREE->{compare} = \&domaincmp;
   $domaindb = tie(%domain,"DB_File","$domains.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$domains.db: $!");
-  $had = total($domaindb);
+  $had = scalar(keys(%domain));
   $key = $val = 0;
   for ($status = $domaindb->seq($key, $val, R_FIRST);
        $status == 0;
@@ -689,33 +645,27 @@
     #debug("Checking: %s",$key);
     if (!(exists($data{last}) && exists($data{ttl}) && exists($data{referer}))) {
       info("Removing expired domain: %s: %s", $key, $val || "undef");
-      push(@domaindiff,"-$key");
       $expired{$key} = $val;
     } elsif ($data{last} + ($domain_ttl*86400) < $now) {
       info("Removing expired domain: %s: %s", $key, $val);
-      push(@domaindiff,"-$key");
       release($data{referer});
       $expired{$key} = $val;
     } elsif (exists($domainexception{$key}) && !exists($include{$key})) {
       info("Removing obsolete domain (domainexception): %s", $key);
-      push(@domaindiff,"-$key");
       release($data{referer});
       $obsolete{$key} = $val;
     } elsif (exists($exception{$key}) && !exists($include{$key})) {
       info("Removing obsolete domain (exception): %s", $key);
-      push(@domaindiff,"-$key");
       release($data{referer});
       $obsolete{$key} = $val;
     } elsif ($key =~ /^[\d.]+$/ && $key !~ /^\d+\.\d+\.\d+\.\d+$/) {
       info("Removing bad domain (subnet): %s", $key);
-      push(@domaindiff,"-$key");
       release($data{referer});
       $bad{$key} = $val;
     } else {
       my ($host,$domain) = split(/\./, $key, 2);
       if($domain && exists($domain{$domain})) {
 	info("Removing redundant domain: %s", $key);
-	push(@domaindiff,"-$key");
 	release($data{referer});
 	$redundant{$key} = $val;
       }
@@ -737,8 +687,6 @@
     $domaindb->del_dup($key,$val);
     $domaindb->sync();
   }
-  undef($domaindb);
-  untie(%domain);
   $DB_BTREE->{compare} = \&domainmatch;
   $domaindb = tie(%domain,"DB_File","$domains.db",O_CREAT|O_RDWR,0664,$DB_BTREE)
     || error("$domains.db: $!");
@@ -752,7 +700,7 @@
 sub expireurls() {
   my ($had,$key,$val,$status,%expired,%obsolete,%redundant);
   status("Checking the url list for expired and redundant entries..");
-  $had = total($urldb);
+  $had = scalar(keys(%url));
   $key = $val = 0;
   for ($status = $urldb->seq($key, $val, R_FIRST);
        $status == 0;
@@ -761,22 +709,18 @@
     #debug("Checking: %s",$key);
     if ($data{last} + ($url_ttl*86400) < $now) {
       info("Removing expired url: %s: %s", $key, $val);
-      push(@urldiff,"-$key");
       release($data{referer});
       $expired{$key} = $val;
     } elsif (exists($domainexception{$key}) && !exists($include{$key})) {
       info("Removing obsolete url (domainexception): %s", $key);
-      push(@urldiff,"-$key");
       release($data{referer});
       $obsolete{$key} = $val;
     } elsif (exists($urlexception{$key}) && !exists($include{$key})) {
       info("Removing obsolete url (urlexception): %s", $key);
-      push(@urldiff,"-$key");
       release($data{referer});
       $obsolete{$key} = $val;
     } elsif (exists($exception{$key}) && !exists($include{$key})) {
       info("Removing obsolete url (exception): %s", $key);
-      push(@urldiff,"-$key");
       release($data{referer});
       $obsolete{$key} = $val;
     } else {
@@ -785,7 +729,6 @@
       if(exists($domain{$domain})) {
 	my %d = split(/[=;]/, $domain{$domain});
 	info("Removing redundant url: %s", $key);
-	push(@urldiff,"-$key");
 	release($data{referer}) unless(lc($data{referer}) eq lc($d{referer}));
 	$redundant{$key} = $val;
       } else {
@@ -794,7 +737,6 @@
 	if(exists($url{$k})) {
 	  my %u = split(/[=;]/, $url{$k});
 	  info("Removing redundant url: %s", $key);
-	  push(@urldiff,"-$key");
 	  release($data{referer}) unless(lc($data{referer}) eq lc($u{referer}));
 	  $redundant{$key} = $val;
 	}
@@ -826,13 +768,10 @@
 }
 
 sub washlinks() {
-  my ($key,$val,$status,$removed);
+  my ($key,$val,$removed);
   status("Washing the link list..");
   $removed = 0;
-  $key = $val = 0;
-  for ($status = $linkdb->seq($key, $val, R_FIRST);
-       $status == 0;
-       $status = $linkdb->seq($key, $val, R_NEXT)) {
+  while(($key,$val) = each(%link)) {
     my ($domain,$path,$url) = spliturl($key);
     #debug("Checking: %s",$key);
     unless($domain) {
@@ -842,7 +781,7 @@
       $removed++;
       next;
     }
-    #next if(exists($source{$key}));
+    next if(exists($source{$key}));
     unless(exists($include{$url})) {
       if(exists($domainexception{$domain})) {
 	info("Removing (domainexception): %s", $key);
@@ -868,7 +807,7 @@
     }
   }
   $now = time;
-  status("Removed %d of %d links in %s",$removed, total($linkdb), strtime($now-$checkpoint));
+  status("Removed %d of %d links in %s",$removed, scalar(keys(%link)), strtime($now-$checkpoint));
   $checkpoint = $now;
 }
 
@@ -884,23 +823,24 @@
     debug("Ignored (seen before): %s", $link);
     return(0);
   }
-  unless(exists($include{$url})) {
-    if(exists($domainexception{$domain})) {
-      debug("Ignored (domainexception): %s", $link);
-      return(0);
-    }
-    if(exists($urlexception{$url})) {
-      debug("Ignored (urlexception): %s", $link);
-      return(0);
-    }
-    if(exists($exception{$url})) {
-      debug("Ignored (exception): %s", $link);
-      return(0);
-    }
-  }
   if (exists($source{$link})) {
     my %data = split(/[=;]/, $source{$link});
     $found = $data{found} || $checkpoint;
+  } else {
+    unless(exists($include{$url})) {
+      if(exists($domainexception{$domain})) {
+	debug("Ignored (domainexception): %s", $link);
+	return(0);
+      }
+      if(exists($urlexception{$url})) {
+	debug("Ignored (urlexception): %s", $link);
+	return(0);
+      }
+      if(exists($exception{$url})) {
+	debug("Ignored (exception): %s", $link);
+	return(0);
+      }
+    }
   }
   info("Adding new link: %s (referer=%s)", $link, $referer);
   $referer =~ s/\075/%3D/g;
@@ -962,17 +902,12 @@
 
 sub extract() {
   my @requests;
-  my ($key,$val,$status);
   status("Checking the status of the sources..");
-  $key = $val = 0;
-  if (defined($sourcedb->seq($key, $val, R_FIRST))) {
-    my ($k,$v,%data,$request);
+  if (scalar(keys(%source))) {
+    my ($key,$val,$k,$v,%data,$request);
     my $retry = time-($source_bouncing_ttl*86400);
     my ($new,$succeeded,$failed,$downloads,$rest) = (0,0,0,0,0);
-    $key = $val = 0;
-    for ($status = $sourcedb->seq($key, $val, R_FIRST);
-	 $status == 0;
-	 $status = $sourcedb->seq($key, $val, R_NEXT)) {
+    while(($key,$val) = each(%source)) {
       %data = split(/[=;]/, $val || "");
       if(!exists($data{found}) || !exists($data{last})
 	 || !exists($data{ttl}) || !exists($data{retries})) {
@@ -999,7 +934,7 @@
     $sourcedb->sync();
     $now = time;
     status("Chosed %d of %d sources in %s",
-	   scalar(@requests), total($sourcedb),
+	   scalar(@requests), scalar(keys(%source)),
 	   strtime($now-$checkpoint));
     $checkpoint = $delta = $now;
     $downloads = $rest = scalar(@requests);
@@ -1043,26 +978,27 @@
       foreach (keys(%$response)) {
 	$key = $response->{$_}->{request}->{_uri};
 	%data = split(/[=;]/, $source{$key});
+	debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	$data{status} = $response->{$_}->response->code;
 	if ($response->{$_}->response->is_success) {
-	  debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	  $succeeded++;
 	  $data{last} = $checkpoint;
 	  $data{ttl} = int(rand($source_max_ttl - $source_min_ttl + 1))*86400;
 	  $data{retries} = $source_retries;
 	  $extor = HTML::LinkExtor->new(undef, $response->{$_}->response->base);
 	  $extor->parse($response->{$_}->response->content);
-	  addlink($key, $key) unless($key =~ /\?/);
+	  addlink($key, $key);
 	  foreach ($extor->links) {
 	    ($tag, %links) = @$_;
 	    foreach (keys(%links)) {
 	      $link = $links{$_};
 	      ($domain) = spliturl($link);
-	      $found++ if(addlink($link, $key));
+	      unless($domain && exists($redirector{$domain})) {
+		$found++ if(addlink($link, $key));
+	      }
 	    }
 	  }
 	} else {
-	  status("Failed %s: %s", $key, $response->{$_}->response->status_line);
 	  $failed++;
 	  $data{retries} = 0 if($data{status} == 404);
 	  if($data{retries}-- <= 0) {
@@ -1109,7 +1045,7 @@
     $now = time;
     status("Added %d new links from %d chosen sources", $new, $downloads);
     status("Downloaded and parsed %d chosen of %d sources in %s, %d succeeded and %d failed",
-	   $downloads, total($sourcedb), strtime($now-$delta),
+	   $downloads, scalar(keys(%source)), strtime($now-$delta),
 	   $succeeded, $failed);
   }
 }
@@ -1160,33 +1096,13 @@
 }
 
 sub check() {
-  my (%request,%lnk,$lnkdb,@requests);
-  my ($key,$val,$status,$links);
+  my @requests;
   status("Checking the status of the links..");
-  $key = $val = 0;
-  if (defined($linkdb->seq($key, $val, R_FIRST))) {
-    my ($k,$v,%data,$request);
+  if (scalar(keys(%link))) {
+    my ($key,$val,$k,$v,%data,$request);
     my $retry = time-($link_bouncing_ttl*86400);
     my ($new,$succeeded,$failed,$tests,$rest) = (0,0,0,0,0);
-    $DB_BTREE->{compare} = \&linkmatch;
-    $lnkdb = tie(%lnk,"DB_File",undef,O_CREAT|O_RDWR,0664,$DB_BTREE) || error("tie: $!");
-    $key = $val = 0;
-    for ($status = $linkdb->seq($key, $val, R_FIRST);
-	 $status == 0;
-	 $status = $linkdb->seq($key, $val, R_NEXT)) {
-      if(exists($lnk{$key}) || exists($request{$key})) {
-	info("INGNORING DUPLICATE: %s");
-	for (my $i = 10;
-	     $i && $linkdb->del($key) == 0;
-	     $i--) {
-	  $linkdb->sync();
-	}
-	$linkdb->sync();
-	$linkdb->put($key, $val);
-	$linkdb->sync();
-	next;
-      }
-      $links++;
+    while(($key,$val) = each(%link)) {
       next if($key =~ /^https:/); # Parallel::UserAgent can not handle 'https'-requests.
       %data = split(/[=;]/, $val);
       if (exists($source{$key})) {
@@ -1214,35 +1130,21 @@
 	  $v =~ s/\073/%3B/g;
 	  $val.="$k=$v;"
 	}
-	$lnkdb->put($key, $val);
-	$lnkdb->sync();
+	$linkdb->put($key, $val);
+	$linkdb->sync();
       }
       if(($data{used} && $data{last} > 0 && $data{last}+$data{ttl} < $now)
 	 || $data{last} == 0
 	 || $data{found} > $start
 	 || ($data{last} < 0 && -$data{last}+$data{ttl} < $retry)) {
 	debug("Prepairing: %s", $key);
-	$request{$key} = HTTP::Request->new(HEAD => $key);
-      } else {
-	debug("Skiping: %s", $key);
+	push(@requests, HTTP::Request->new(HEAD => $key));
       }
     }
-    $lnkdb->sync();
-    $key = $val = 0;
-    for ($status = $lnkdb->seq($key, $val, R_FIRST);
-	 $status == 0;
-	 $status = $lnkdb->seq($key, $val, R_NEXT)) {
-      $linkdb->del($key);
-      $linkdb->sync();
-      $linkdb->put($key, $val);
-      $linkdb->sync();
-    }
-    undef($lnkdb);
-    untie(%lnk);
-    @requests = values(%request);
+    $linkdb->sync();
     $now = time;
     status("Chosed %d of %d links in %s",
-	   scalar(@requests), $links,
+	   scalar(@requests), scalar(keys(%link)),
 	   strtime($now-$checkpoint));
     $checkpoint = $delta = $now;
     $tests = $rest = scalar(@requests);
@@ -1278,12 +1180,12 @@
       foreach (keys(%$response)) {
 	$key = $response->{$_}->{request}->{_uri};
 	%data = split(/[=;]/, $link{$key} || "");
+	debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	$data{status} = $response->{$_}->response->code;
 	$data{last} = 0 unless($data{last});
 	$data{retries} = 0 unless($data{retries});
 	$data{ttl} = 0 unless($data{ttl});
         if (success($data{status})) {
-	  debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	  $succeeded++;
 	  $data{last} = $checkpoint;
 	  $data{ttl} = int(rand($link_max_ttl - $link_min_ttl + 1))*86400;
@@ -1294,7 +1196,6 @@
 	      || $path =~ /^\057cgi(-bin)?\057/
 	      || $path =~ /\?/) {
 	    my $location = $response->{$_}->response->header("Location");
-	    debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	    $succeeded++;
 	    $found += addlink($location, $key)
 	      if($location && domain($location) ne $domain);
@@ -1311,7 +1212,6 @@
 	    }
 	    if ($ok) {
 	      my $location = $response->{$_}->response->header("Location");
-	      debug("Checking %s: %s", $key, $response->{$_}->response->status_line);
 	      $succeeded++;
 	      $found += addlink($location, $key)
 		if($location && domain($location) ne $domain);
@@ -1319,7 +1219,6 @@
 	      $data{ttl} = int(rand($link_max_ttl - $link_min_ttl + 1))*86400;
 	      $data{retries} = $link_retries;
 	    } else {
-	      status("Failed %s: %s", $key, $response->{$_}->response->status_line);
 	      $failed++;
 	      if($data{retries}-- <= 0) {
 	        $data{retries} = $link_retries;
@@ -1333,7 +1232,6 @@
 	    }
 	  }
         } else {
-	  status("Failed %s: %s", $key, $response->{$_}->response->status_line);
 	  $failed++;
 	  $data{retries} = 0 if($data{status} == 404);
 	  if($data{retries}-- <= 0) {
@@ -1374,7 +1272,7 @@
     $checkpoint = $now;
     status("Added %d new links from redirects from %d verified links",$new,$tests);
     status("Verified %d of %d chosen links in %s, %d succeeded and %d failed",
-	   $tests, $links, strtime($now-$delta),
+	   $tests, scalar(keys(%link)), strtime($now-$delta),
 	   $succeeded, $failed);
   }
 }
@@ -1412,7 +1310,6 @@
     return(0);
   }
   info("Adding new domain: %s (referer=%s)", $domain, $referer);
-  push(@domaindiff,"+$domain");
   my $id = int(rand(2147483647));
   $k = $domain;
   $v = 0;
@@ -1421,7 +1318,6 @@
        $k = $domain, $n = $urldb->seq($k,$v,R_CURSOR)) {
     my %data = split(/[=;]/, $v || "");
     info("Removing redundant url: %s", $k);
-    push(@urldiff,"-$k");
     $urldb->del_dup($k,$v);
     $domaindb->sync();
     release($data{referer}) unless(lc($data{referer}) eq lc($referer));
@@ -1433,7 +1329,6 @@
        $k = $domain, $n = $domaindb->seq($k,$v,R_CURSOR)) {
     my %data = split(/[=;]/, $v || "");
     info("Removing redundant domain: %s", $k);
-    push(@domaindiff,"-$k");
     $domaindb->del_dup($k,$v);
     $domaindb->sync();
     release($data{referer}) unless(lc($data{referer}) eq lc($referer));
@@ -1499,7 +1394,6 @@
     return(0);
   }
   info("Adding new url: %s (referer=%s)", $url, $referer);
-  push(@urldiff,"+$url");
   my $id = int(rand(2147483647));
   $k = $url;
   $v = 0;
@@ -1508,7 +1402,6 @@
        $k = $url, $n = $urldb->seq($k,$v,R_CURSOR)) {
     my %data = split(/[=;]/, $v || "");
     info("Removing redundant url: %s", $k);
-    push(@urldiff,"-$k");
     $urldb->del_dup($k,$v);
     $urldb->sync();
     release($data{referer}) unless(lc($data{referer}) eq lc($referer));
@@ -1565,7 +1458,6 @@
     #debug("Checking: %s",$key);
     if($domain && exists($domain{$domain})) {
       info("Ooops! Removing redundant domain: %s", $key);
-      push(@domaindiff,"-$key");
       release($data{referer});
       $redundant{$key} = $val;
     }
@@ -1579,7 +1471,7 @@
     || error("$domains.db: $!");
   $now = time;
   status("Removed %d redundant of %d domains in %s",
-         scalar(keys(%redundant)), total($domaindb),
+         scalar(keys(%redundant)), scalar(keys(%domain)),
 	 strtime($now-$checkpoint));
   $checkpoint = $now;
 }
@@ -1611,13 +1503,12 @@
   }
   while(($key,$val) = each(%redundant)) {
     info("Removing redundant url: %s", $key);
-    push(@urldiff,"-$key");
     $urldb->del_dup($key,$val);
     $urldb->sync();
   }
   $now = time;
   status("Removed %d redundant of %d urls in %s",
-         scalar(keys(%redundant)), total($urldb), strtime($now-$checkpoint));
+         scalar(keys(%redundant)), scalar(keys(%url)), strtime($now-$checkpoint));
   $checkpoint = $now;
 }
 
@@ -1682,20 +1573,15 @@
 
 sub compile() {
   status("Compiling..");
-  my ($resolver,$key,$val,$status,$domain,$path,$url,$host,$k,$v,$links);
+  my ($resolver,$key,$val,$domain,$path,$url,$host,$k,$v);
   my ($domains,$urls) = (0,0);
   if ($doinaddr) {
     $resolver = new Net::DNS::Resolver;
     $resolver->nameservers(@nameservers) if(@nameservers);
   }
-  $key = $val = 0;
-  for ($status = $linkdb->seq($key, $val, R_FIRST);
-       $status == 0;
-       $status = $linkdb->seq($key, $val, R_NEXT)) {
+  while(($key,$val) = each(%link)) {
     my %data = split(/[=;]/, $val || "");
     my $used = 0;
-    $links++;
-    $data{last} = 0 unless($data{last});
     $data{used} = 0 unless($data{used});
     $data{used} = 0 if($data{used} < 0);
     $data{found} = $now unless($data{found});
@@ -1766,7 +1652,7 @@
   $linkdb->sync();
   $now = time;
   status("Compiled %d links into %d domains and %d urls in %s",
-	 $links, total($domaindb), total($urldb),
+	 scalar(keys(%link)), scalar(keys(%domain)), scalar(keys(%url)),
 	 strtime($now-$checkpoint));
   status("Added %d new domains and %d new urls", $domains, $urls);
   $checkpoint = $now;
@@ -1781,13 +1667,13 @@
   my ($k,$n);
   $checkpoint = time;
   status("Dumping the domainlist..");
-  ($k,$n) = dumpkeys($domaindb, $domainlist);
+  ($k,$n) = dumpkeys($domaindb, $domainlist, "$newdomains." . today());
   $now = time;
   status("Dumped %d keys of which %d new to the domainlist in %s..",
 	 $k,$n,strtime($now-$checkpoint));
   $checkpoint = $now;
   status("Dumping the urllist..");
-  ($k,$n) = dumpkeys($urldb, $urllist);
+  ($k,$n) = dumpkeys($urldb, $urllist, "$newurls." . today());
   $now = time;
   status("Dumped %d keys of which %d new to the urllist in %s..",
 	 $k,$n,strtime($now-$checkpoint));
@@ -1808,23 +1694,11 @@
   return($n);
 }
 
-sub total($) {
-  my $db = shift;
-  my ($status, $key, $val);
-  my $n = 0;
-  $key = $val = 0;
-  for ($status = $db->seq($key, $val, R_FIRST);
-       $status == 0;
-       $status = $db->seq($key, $val, R_NEXT)) {
-    $n++;
-  }
-  return($n);
-}
-
-sub dumpkeys($$) {
-  my ($db, $list) = @_;
+sub dumpkeys($$$) {
+  my ($db, $list,$news) = @_;
   my ($status, $key, $val, %data, $k, $n);
   open(LIST, ">$list") || error("$list: $!");;
+  open(NEWS, ">>$news") || error("$news: $!");;
   print LIST "#\n";
   print LIST "# !!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!!\n";
   print LIST "#\n";
@@ -1838,7 +1712,7 @@
   printf LIST "# This list was compiled in %s on %s.\n",
   strtime(time-$start), date(time);
   printf LIST "# This list was compiled from %d link sources and %d links,\n",
-  valid($sourcedb), total($linkdb);
+  valid($sourcedb), scalar(keys(%link));
   printf LIST "# of which %d tested successfully.\n", valid($linkdb);
   print LIST "#\n";
   $key = $val = $k = $n = 0;
@@ -1850,8 +1724,10 @@
     %data = split(/[=;]/, $val || "");
     if($data{found} && $data{found} > $start) {
       $n++;
+      print NEWS "$key\n";
     }
   }
+  close(NEWS);
   close(LIST);
   return(($k,$n));
 }
@@ -1867,34 +1743,6 @@
   unless($washonly || $exit) {
     export() if($domaindb && $urldb && $linkdb);
   }
-  if(@domaindiff) {
-    my $file = strftime("$domaindiff",localtime);
-    local *DIFF;
-    if (-f $file) {
-      open(DIFF,">>$file") || die("$file: $!");
-    } else {
-      open(DIFF,">$file") || die("$file: $!");
-    }
-    foreach(@domaindiff) {
-      chomp;
-      print DIFF "$_\n";
-    }
-    close(DIFF);
-  }
-  if(@urldiff) {
-    my $file = strftime("$urldiff",localtime);
-    local *DIFF;
-    if (-f $file) {
-      open(DIFF,">>$file") || die("$file: $!");
-    } else {
-      open(DIFF,">$file") || die("$file: $!");
-    }
-    foreach(@urldiff) {
-      chomp;
-      print DIFF "$_\n";
-    }
-    close(DIFF);
-  }
   if($sourcedb) {
     undef($sourcedb);
     untie(%source);
@@ -1965,7 +1813,8 @@
     $n++;
   }
   $now = time;
-  status("Reset %d of %d links in %s", $n, total($linkdb), strtime($now-$checkpoint));
+  status("Reset %d of %d links in %s",
+         $n, scalar(keys(%link)), strtime($now-$checkpoint));
   $checkpoint = $now;
 }
 
@@ -2001,7 +1850,7 @@
   }
   $now = time;
   status("Marked %d of %d links refered from the domain list in %s",
-         $n, total($linkdb), strtime($now-$checkpoint));
+         $n, scalar(keys(%link)), strtime($now-$checkpoint));
   $checkpoint = $now;
   $key = $val = $n = 0;
   for ($status = $urldb->seq($key, $val, R_FIRST);
@@ -2032,7 +1881,7 @@
   }
   $now = time;
   status("Marked %d of %d links refered from the url list in %s",
-         $n, total($linkdb), strtime($now-$checkpoint));
+         $n, scalar(keys(%link)), strtime($now-$checkpoint));
   $checkpoint = $now;
 }
 
--- squidguard-1.2.0.orig/doc/configuration.html
+++ squidguard-1.2.0/doc/configuration.html
@@ -4,7 +4,7 @@
   <TITLE>squidGuard - Configuration</TITLE>
   <META name="keywords" lang="en" content="configuring,configuration,config,squidGuard,squidguard,squid,Squid,free,redirector,filter">
   <META name="author" content="PÃ¥l Baltzersen">
-  <META name="copyright" content="&copy; 2000 Tele Danmark InterNordia.">
+  <META name="copyright" content="&copy; 2000 ElTele Øst AS.">
  </HEAD>
 
  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
@@ -24,7 +24,7 @@
      <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
       <TR>
        <TD ALIGN=LEFT VALIGN=BOTTOM>
-	<A HREF="http://ftp.teledanmark.no/pub/www/proxy/squidGuard/"><IMG
+	<A HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/"><IMG
 	SRC="/images/squidGuard.gif" BORDER=0
 	VALIGN=TOP></A>
 	<FONT SIZE=+3>
@@ -44,7 +44,7 @@
 	 HREF="/authors/">Lars Erik HÃ¥land</A>
 	 <BR>
 	 <A HREF="/copyright/">Copyright</A> &copy; 1999-2000, <A
-	 HREF="http://www.teledanmark.no/">Tele Danmark InterNordia</A>
+	 HREF="http://www.ost.eltele.no/">ElTele Øst AS</A>
 	</FONT>
        </TH>
       </TR>
@@ -56,7 +56,7 @@
        <TH ALIGN=RIGHT>
 	<FONT SIZE=-1>
 	 <BR>
-	 This page was last modified 2001-12-18
+	 This page was last modified 2000-03-17
 	</FONT>
        </TH>
       </TR>
@@ -1054,11 +1054,11 @@
    <PRE>
      src admin within leisure-time {
 	  ip	   10.11.12.13 10.11.12.26    # The administrators home WS/PCs
-	  domain   ras.teledanmark.no	      # The RAS domain
+	  domain   ras.ost.eltele.no	      # The RAS domain
 	  user	   root administrator foo bar # The administrators login names
      } else {
 	  ip	   10.1.1.15 10.1.2.17        # The administrators office WS/PCs
-	  domain   lan.teledanmark.no	      # The LAN domain
+	  domain   lan.ost.eltele.no	      # The LAN domain
 	  user	   root administrator foo bar # The administrators login names
      }
    </PRE>
@@ -1254,7 +1254,7 @@
 
   <TT>
    <PRE>
-     dest not-business-related outside leisure-time {
+     src not-business-related outside leisure-time {
 	  domainlist	 entertainment/domains
 	  urllist	 entertainment/urls
 	  expressionlist entertainment/expressions
@@ -1377,14 +1377,14 @@
    <DD>
     the <TT>r</TT> option makes the redirection visible to the user
     with a <A
-    HREF="http://ftp.teledanmark.no/pub/networking/rfc/rfc1945.txt">HTTP
+    HREF="http://ftp.ost.eltele.no/pub/networking/rfc/rfc1945.txt">HTTP
     code <EM>302 - Moved Temporarily</EM></A> (The default is to make
     Squid silently fetch the alternate URL).
    </DD>
    <DD>
     the <TT>R</TT> option makes the redirection visible to the user
     with a <A
-    HREF="http://ftp.teledanmark.no/pub/networking/rfc/rfc1945.txt">HTTP
+    HREF="http://ftp.ost.eltele.no/pub/networking/rfc/rfc1945.txt">HTTP
     code <EM>301 - Moved Permanently</EM></A>.
    </DD>
   </DL>
@@ -1895,8 +1895,8 @@
 
   <TT>
    <PRE>
-     netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/complete_install/cc32e451.exe http://ftp.teledanmark.no/pub/www/client/windows/cc32e451.exe
-     netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/base_install/cb32e451.exe http://ftp.teledanmark.no/pub/www/client/windows/cb32e451.exe
+     netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/complete_install/cc32e451.exe http://ftp.ost.eltele.no/pub/www/client/windows/cc32e451.exe
+     netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/base_install/cb32e451.exe http://ftp.ost.eltele.no/pub/www/client/windows/cb32e451.exe
    </PRE>
   </TT>
 
@@ -2253,7 +2253,7 @@
 
   <TT>
    <PRE>
-     teledanmark.no
+     eltele.no
    </PRE>
   </TT>
 
@@ -2297,7 +2297,7 @@
 
   <TT>
    <PRE>
-     teledanmark.no
+     eltele.no
    </PRE>
   </TT>
 
@@ -2536,27 +2536,27 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.gnu.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/gnu-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/gnu-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.perl.com/pub/"><IMG
-     SRC="http://info.teledanmark.no/icons/perl-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/perl-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/solaris/"><IMG
-     SRC="http://info.teledanmark.no/icons/solaris-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/solaris-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/servers/"><IMG
-     SRC="http://info.teledanmark.no/icons/sun-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/sun-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
-     <A HREF="http://www.teledanmark.no/"><IMG
-      SRC="http://info.teledanmark.no/icons/tdi-logo.gif" BORDER=0
+     <A HREF="http://www.ost.eltele.no/"><IMG
+      SRC="http://info.ost.eltele.no/icons/eltele-logo.gif" BORDER=0
       VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -2565,17 +2565,17 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.apache.org/httpd.html"><IMG
-     SRC="http://info.teledanmark.no/icons/apache-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/apache-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squid-cache.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/squid-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/squid-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squidguard.org/"><IMG
-     SRC="http://info.teledanmark.no/freeware/squidGuard/squidGuard.gif"
+     SRC="http://info.ost.eltele.no/freeware/squidGuard/squidGuard.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -2583,8 +2583,8 @@
   <TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
    <TR>
     <TD ALIGN=CENTER>
-     <A HREF="http://info.teledanmark.no/freeware/identd/"><IMG
-     SRC="http://info.teledanmark.no/freeware/identd/identd.gif"
+     <A HREF="http://info.ost.eltele.no/freeware/identd/"><IMG
+     SRC="http://info.ost.eltele.no/freeware/identd/identd.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
--- squidguard-1.2.0.orig/doc/configuration.txt
+++ squidguard-1.2.0/doc/configuration.txt
@@ -3,8 +3,8 @@
    [2]squidGuard is an ultrafast and free filter, redirector and access
    controller for [3]Squid
    By [4]PÃ¥l Baltzersen and [5]Lars Erik HÃ¥land
-   [6]Copyright © 1999-2000, [7]Tele Danmark InterNordia
-   This page was last modified 2001-12-18
+   [6]Copyright © 1999-2000, [7]ElTele Øst AS
+   This page was last modified 2000-03-17
    
 Contents
 
@@ -67,12 +67,12 @@
     
    The recommended structure for squidGuard.conf is:
    
-     [37]Path declarations                 (i.e. logdir and dbhome)  (optional)
-     [38]Time space declarations           (i.e. time zones)         (optional)
-     [39]Source group declarations         (i.e. clients)            (optional)
-     [40]Destination group declarations    (i.e. URLs)               (optional)
-     [41]Rewrite rule group declarations                             (optional)
-     [42]Access control rule declarations                            (required)
+   [37]Path declarations  (i.e. logdir and dbhome)  (optional)
+   [38]Time space declarations  (i.e. time zones)  (optional)
+   [39]Source group declarations  (i.e. clients)  (optional)
+   [40]Destination group declarations  (i.e. URLs)  (optional)
+   [41]Rewrite rule group declarations  (optional)
+   [42]Access control rule declarations  (required)
    
    Note: No forward references are allowed! Within this strong limitation
    you may actually chose any structure you prefer.
@@ -166,18 +166,18 @@
                 where s=sun, m=mon, t =tue, w=wed, h=thu, f=fri, a=sat.
                 and dayname is one of:
                 
-                      "mon", "monday", "mondays", (synonymous)
+              "mon", "monday", "mondays", (synonymous)
                       "tue", "tuesday", "tuesdays", (synonymous)
                       "wed", etc.
                       
                 For instance for monday to friday, mornings and evenings:
                 
-                      weekly mtwhf 00:00-08:00
+              weekly mtwhf 00:00-08:00
                       weekly mtwhf 17:00-24:00
                       
                 and for saturdays and sundays:
                 
-                      weekly as
+              weekly as
                       or
                       weekly saturday
                       weekly sunday
@@ -187,7 +187,7 @@
                 which is just a special case of [47]weekly.
                 For instance:
                 
-                      weekly * 00:00-08:00
+              weekly * 00:00-08:00
                       weekly * 17:00-24:00
                       
         Dates with an optional time constraint for each date:
@@ -199,11 +199,11 @@
                 For instance for the Ascension Day and the Whit Monday of
                 1999:
                 
-                      date 1999.05.13 1999.05.24
+              date 1999.05.13 1999.05.24
                       
                 or for the Ash Wednesday afternoon of 1999:
                 
-                      date 1999.03.31 12:00-24:00
+              date 1999.03.31 12:00-24:00
                       
         Date range with an optional time constraint for each day:
                 date YYYY-MM-DD-YYYY-MM-DD [HH:MM-HH:MM ...]
@@ -211,7 +211,7 @@
                 date YYYY.MM.DD-YYYY.MM.DD [HH:MM-HH:MM ...]
                 For instance for the Easter of 1999:
                 
-                      date 1999.04.01-1999.04.05
+              date 1999.04.01-1999.04.05
                       
         Date wildcard with an optional time constraint:
                 date YYYY-MM-DD [HH:MM-HH:MM ...]
@@ -220,11 +220,11 @@
                 where YYYY, MM and DD may be an asterisk, "*".
                 For instance for the New Year's Day:
                 
-                      date *.01.01
+              date *.01.01
                       
                 and for the Christmas Eve:
                 
-                      date *.12.24 12:00-24:00
+              date *.12.24 12:00-24:00
                       
    Note1: The numeric formats are strict (I.e. 08:00 not 8:00 for HH:MM
    etc).
@@ -300,7 +300,7 @@
                 ip xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy [...]
                 where:
                 
-                      xxx.xxx.xxx.xxx is an IP address (host or net, i.e.
+              xxx.xxx.xxx.xxx is an IP address (host or net, i.e.
                       10.11.12.13 or 10.11.12.0),
                       /nn a net prefix (i.e. /23),
                       mmm.mmm.mmm.mmm is a netmask (i.e. 255.255.254.0)
@@ -312,9 +312,9 @@
                 iplist [48]filename
                 where:
                 
-                      filename is either a path relative to [49]dbhome or
-                      an absolute path (i.e. /full/path) to a
-                      [50]database file.
+              filename is either a path relative to [49]dbhome or an
+                      absolute path (i.e. /full/path) to a [50]database
+                      file.
                       the iplist file format is simply addresses and/or
                       networks separated by a newline as above but
                       without the ip keyword. Thus an iplist for all the
@@ -323,7 +323,7 @@
                       lists of WS/PC addresses primarily to reduce the
                       size of the configuration file):
                       
-                            10.0.0.0/8
+                    10.0.0.0/8
                             172.16.0.0/12
                             192.168.0.0/16
                             
@@ -331,24 +331,24 @@
                 domain foo.bar [...]  *)
                 where:
                 
-                      foo.bar is a domain (zone) the domain name (from a
-                      reverse lookup on the client addresses) belongs to
+              foo.bar is a domain (zone) the domain name (from a reverse
+                      lookup on the client addresses) belongs to
                       (directly or as a subdomain).
                       
         Users (multiple):
                 user foo [...]  **)
                 where:
                 
-                      foo is a username (from a ident/RFC-931 lookup to
-                      the client.
+              foo is a username (from a ident/RFC-931 lookup to the
+                      client.
                       
         User list (single):
                 userlist [51]filename **)
                 where:
                 
-                      filename is either a path relative to [52]dbhome or
-                      an absolute path (i.e. /full/path) to a
-                      [53]database file.
+              filename is either a path relative to [52]dbhome or an
+                      absolute path (i.e. /full/path) to a [53]database
+                      file.
                       the userlist file format is simply RFC-931
                       usernames, optionally followed by a `:' and a
                       comment (i.e. /etc/passwd or a .htpasswd file may
@@ -356,7 +356,7 @@
                       declaration but without the user keyword. Thus a
                       userlist could look something like:
                       
-                            root
+                    root
                             administrator
                             foo
                             bar
@@ -366,11 +366,11 @@
                 
           where:
           
-                filename is either a path relative to [55]logdir or an
-                absolute path (i.e. /full/path) to a logfile where
-                translation for this group should be logged. If the
-                anonymous option is specified the logged info is somewhat
-                anonymized to protect the individual.
+        filename is either a path relative to [55]logdir or an absolute
+                path (i.e. /full/path) to a logfile where translation for
+                this group should be logged. If the anonymous option is
+                specified the logged info is somewhat anonymized to
+                protect the individual.
                 
    *) The use of domain match for clientsgroups requires Squid is set up
    to do revese lookups on clients.
@@ -386,12 +386,12 @@
    Thus an administrator client group could look something like:
      src admin within leisure-time {
           ip       10.11.12.13 10.11.12.26    # The administrators home WS/PCs
-          domain   ras.teledanmark.no         # The RAS domain
+          domain   ras.ost.eltele.no          # The RAS domain
           user     root administrator foo bar # The administrators login names
      } else {
           ip       10.1.1.15 10.1.2.17        # The administrators office WS/PC
 s
-          domain   lan.teledanmark.no         # The LAN domain
+          domain   lan.ost.eltele.no          # The LAN domain
           user     root administrator foo bar # The administrators login names
      }
 
@@ -443,8 +443,8 @@
                 
           where:
           
-                filename is either a path relative to [59]dbhome or an
-                absolute path (i.e. /full/path) to a [60]database file.
+        filename is either a path relative to [59]dbhome or an absolute
+                path (i.e. /full/path) to a [60]database file.
                 
         Special destinationgroup redirect URL (single):
                 redirect [302:]url
@@ -454,11 +454,11 @@
                 
           where:
           
-                filename is either a path relative to [61]logdir or an
-                absolute path (i.e. /full/path) to a logfile where
-                redirects caused by match of this group should be logged.
-                If the anonymous option is specified the logged info is
-                somewhat anonymized to protect the individual.
+        filename is either a path relative to [61]logdir or an absolute
+                path (i.e. /full/path) to a logfile where redirects
+                caused by match of this group should be logged. If the
+                anonymous option is specified the logged info is somewhat
+                anonymized to protect the individual.
                 
    Note1: Overlaps are OK, and the groups are matched in the order they
    are listed in the pass declaration in for the actual clientgroup.
@@ -470,7 +470,7 @@
    
    Thus an entertainment destination group declaration could look
    something like:
-     dest not-business-related outside leisure-time {
+     src not-business-related outside leisure-time {
           domainlist     entertainment/domains
           urllist        entertainment/urls
           expressionlist entertainment/expressions
@@ -518,7 +518,7 @@
    
    Substitution is sed style (multiple):
    
-          s@from@to@[irR]
+   s@from@to@[irR]
           
    where:
           from is a [62]regular expression that will be replaced with the
@@ -534,11 +534,11 @@
           log|logfile [anonymous] filename
           where:
           
-                filename is either a path relative to [65]logdir or an
-                absolute path (i.e. /full/path) to a logfile where
-                succeded rewrites should be logged. If the anonymous
-                option is specified the logged info is somewhat
-                anonymized to protect the individual.
+        filename is either a path relative to [65]logdir or an absolute
+                path (i.e. /full/path) to a logfile where succeded
+                rewrites should be logged. If the anonymous option is
+                specified the logged info is somewhat anonymized to
+                protect the individual.
                 
    Note1: Sed style substitutions uses regular expressions and thus slows
    down squidGuard more than B-tree lookups.
@@ -561,20 +561,20 @@
         acl {
                 sourcegroupname [within|outside timespacename] {
                 
-                      [66]pass [!]destgroupname [...]
+              [66]pass [!]destgroupname [...]
                       [[67]rew|rewrite rewritegroupname [...]
                       [[68]redirect [301:|302:]new_url]
                       
                 }
                 sourcegroupname within|outside timespacename {
                 
-                      [69]pass [!]destgroupname [...]
+              [69]pass [!]destgroupname [...]
                       [[70]rew|rewrite rewritegroupname [...]
                       [[71]redirect [301:|302:]new_url]
                       
                 } else {
                 
-                      [72]pass [!]destgroupname [...]
+              [72]pass [!]destgroupname [...]
                       [[73]rew|rewrite rewritegroupname [...]
                       [[74]redirect [301:|302:]new_url]
                       
@@ -582,13 +582,13 @@
                 ...
                 [75]default [within|outside timespacename] {
                 
-                      [76]pass [!]destgroupname [...]
+              [76]pass [!]destgroupname [...]
                       [[77]rew|rewrite rewritegroupname [...]
                       [78]redirect [301:|302:]new_url
                       
                 }[ else {
                 
-                      [79]pass [!]destgroupname [...]
+              [79]pass [!]destgroupname [...]
                       [[80]rew|rewrite rewritegroupname [...]
                       [81]redirect [301:|302:]new_url
                       
@@ -760,11 +760,10 @@
    local distributions you can have a destination group with an urllist
    like:
      netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/complet
-e_install/cc32e451.exe http://ftp.teledanmark.no/pub/www/client/windows/cc32e45
-1.exe
+e_install/cc32e451.exe http://ftp.ost.eltele.no/pub/www/client/windows/cc32e451
+.exe
      netscape.com/pub/communicator/4.51/english/windows/windows95_or_nt/base_in
-stall/cb32e451.exe http://ftp.teledanmark.no/pub/www/client/windows/cb32e451.ex
-e
+stall/cb32e451.exe http://ftp.ost.eltele.no/pub/www/client/windows/cb32e451.exe
 
 
    and an acl with pass ... !download .... This may be a faster
@@ -803,8 +802,8 @@
    Thus a start to block possible sexual material by expression match
    could look like:
    
-          (^|[-\?+=/_])(bondage|boobs?|busty?|hardcore|porno?|sex|xxx+)([
-          -\?+=/_]|$)
+   (^|[-\?+=/_])(bondage|boobs?|busty?|hardcore|porno?|sex|xxx+)([-\?+=/_
+          ]|$)
           
    Notes:
      * Unless you build your expressions very very carefully there is a
@@ -834,7 +833,7 @@
        sites, you probably want to have some or all of these files
        protected by for instance:
        
-                chmod 640 /wherever/filter/db/dest/adult/*
+        chmod 640 /wherever/filter/db/dest/adult/*
                 chown cache_effective_user /wherever/filter/db/dest/adult
                 /*
                 chgrp cache_effective_group /wherever/filter/db/dest/adul
@@ -850,7 +849,7 @@
    To convert a domainlist or urllist from plain text file to a prebuilt
    database use:
    
-          squidGuard -C listfile
+   squidGuard -C listfile
           
    and send Squid a HUP signal to respawn squidGuard. Note: listfile is
    the absolute plain text filename or relative to dbhome.
@@ -861,13 +860,13 @@
    changes in a diff file (file.diff for file.db) with the following
    simple format:
    
-          +new
+   +new
           -old
           ...
           
    Then use:
    
-          squidGuard -u
+   squidGuard -u
           
    and remove the diff files. The changes should take effect immediately.
    
@@ -933,7 +932,7 @@
    This implies there must be a domain list file
    "[90]/usr/local/squidGuard/db/local/domains" that may simply look
    like:
-     teledanmark.no
+     eltele.no
 
 
   [arrow-green.gif] [91]Example 3 - Blocking the access for unknown or
@@ -969,7 +968,7 @@
 
    Using client domainname match implies reverse lookup is enabled
    (log_fqdn on) in squid.conf.
-     teledanmark.no
+     eltele.no
 
 
   [arrow-green.gif] [92]Example 4 - Blocking inappropriate sites:
@@ -1155,7 +1154,7 @@
                         ____________________________
    
       [102][gnu-logo.gif] [103][perl-logo.gif] [104][solaris-logo.gif]
-                  [105][sun-logo.gif] [106][tdi-logo.gif] 
+                [105][sun-logo.gif] [106][eltele-logo.gif] 
                                       
     [107][apache-logo.gif] [108][squid-logo.gif] [109][squidGuard.gif] 
                                       
@@ -1163,13 +1162,13 @@
 
 References
 
-   1. http://ftp.teledanmark.no/pub/www/proxy/squidGuard/
+   1. http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/
    2. http://www.squidguard.org/
    3. http://www.squid-cache.org/
    4. http://www.squidguard.org/authors/
    5. http://www.squidguard.org/authors/
    6. http://www.squidguard.org/copyright/
-   7. http://www.teledanmark.no/
+   7. http://www.ost.eltele.no/
    8. http://www.squidguard.org/config/#Configuration_file
    9. http://www.squidguard.org/config/#General
   10. http://www.squidguard.org/config/#Structure
@@ -1225,8 +1224,8 @@
   60. http://www.squidguard.org/config/#Lists
   61. http://www.squidguard.org/config/#Logdir
   62. http://www.squidguard.org/config/#Regular expressions
-  63. http://ftp.teledanmark.no/pub/networking/rfc/rfc1945.txt
-  64. http://ftp.teledanmark.no/pub/networking/rfc/rfc1945.txt
+  63. http://ftp.ost.eltele.no/pub/networking/rfc/rfc1945.txt
+  64. http://ftp.ost.eltele.no/pub/networking/rfc/rfc1945.txt
   65. http://www.squidguard.org/config/#Logdir
   66. http://www.squidguard.org/config/#Pass
   67. http://www.squidguard.org/config/#Rewrite
@@ -1268,8 +1267,8 @@
  103. http://www.perl.com/pub/
  104. http://www.sun.com/solaris/
  105. http://www.sun.com/servers/
- 106. http://www.teledanmark.no/
+ 106. http://www.ost.eltele.no/
  107. http://www.apache.org/httpd.html
  108. http://www.squid-cache.org/
  109. http://www.squidguard.org/
- 110. http://info.teledanmark.no/freeware/identd/
+ 110. http://info.ost.eltele.no/freeware/identd/
--- squidguard-1.2.0.orig/doc/faq.html
+++ squidguard-1.2.0/doc/faq.html
@@ -4,7 +4,7 @@
   <TITLE>squidGuard - FAQ</TITLE>
   <META name="keywords" lang="en" content="faq,squidGuard,squidguard,squid,Squid,free,redirector,filter">
   <META name="author" content="PÃ¥l Baltzersen">
-  <META name="copyright" content="&copy; 2000 Tele Danmark InterNordia.">
+  <META name="copyright" content="&copy; 2000 ElTele Øst AS.">
  </HEAD>
 
  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
@@ -24,7 +24,7 @@
      <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
       <TR>
        <TD ALIGN=LEFT VALIGN=BOTTOM>
-	<A HREF="http://ftp.teledanmark.no/pub/www/proxy/squidGuard/"><IMG
+	<A HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/"><IMG
 	SRC="/images/squidGuard.gif" BORDER=0
 	VALIGN=TOP></A>
 	<FONT SIZE=+3>
@@ -44,7 +44,7 @@
 	 HREF="/authors/">Lars Erik HÃ¥land</A>
 	 <BR>
 	 <A HREF="/copyright/">Copyright</A> &copy; 1999-2000, <A
-	 HREF="http://www.teledanmark.no/">Tele Danmark InterNordia</A>
+	 HREF="http://www.ost.eltele.no/">ElTele Øst AS</A>
 	</FONT>
        </TH>
       </TR>
@@ -56,7 +56,7 @@
        <TH ALIGN=RIGHT>
 	<FONT SIZE=-1>
 	 <BR>
-	 This page was last modified 2001-12-18
+	 This page was last modified 2000-08-23
 	</FONT>
        </TH>
       </TR>
@@ -105,7 +105,7 @@
       </B>
      </DT>
      <DD>
-      Only <A HREF="http://ftp.teledanmark.no/pub/db/">db2.x.x</A>
+      Only <A HREF="http://ftp.ost.eltele.no/pub/db/">db2.x.x</A>
       versions are supported. We are working on db3.x.x support, but
       the API has changed so it may take a while to fix.
      </DD>
@@ -362,7 +362,7 @@
      </DT>
      <DD>
       Yes, if you patch Squid &lt; 2.3 with this simple <A
-      HREF="http://ftp.teledanmark.no/pub/www/proxy/squidGuard/contrib/squid-2.2-authuser.patch">diff</A>,
+      HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/contrib/squid-2.2-authuser.patch">diff</A>,
       kindly contributed by <A
       HREF="mailto:antony@abacus.co.uk">Antony T Curtis</A>, the
       authenticated user will be passed from Squid to squidGuard. This
@@ -550,27 +550,27 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.gnu.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/gnu-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/gnu-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.perl.com/pub/"><IMG
-     SRC="http://info.teledanmark.no/icons/perl-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/perl-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/solaris/"><IMG
-     SRC="http://info.teledanmark.no/icons/solaris-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/solaris-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/servers/"><IMG
-     SRC="http://info.teledanmark.no/icons/sun-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/sun-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
-     <A HREF="http://www.teledanmark.no/"><IMG
-      SRC="http://info.teledanmark.no/icons/tdi-logo.gif" BORDER=0
+     <A HREF="http://www.ost.eltele.no/"><IMG
+      SRC="http://info.ost.eltele.no/icons/eltele-logo.gif" BORDER=0
       VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -579,17 +579,17 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.apache.org/httpd.html"><IMG
-     SRC="http://info.teledanmark.no/icons/apache-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/apache-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squid-cache.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/squid-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/squid-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squidguard.org/"><IMG
-     SRC="http://info.teledanmark.no/freeware/squidGuard/squidGuard.gif"
+     SRC="http://info.ost.eltele.no/freeware/squidGuard/squidGuard.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -597,8 +597,8 @@
   <TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
    <TR>
     <TD ALIGN=CENTER>
-     <A HREF="http://info.teledanmark.no/freeware/identd/"><IMG
-     SRC="http://info.teledanmark.no/freeware/identd/identd.gif"
+     <A HREF="http://info.ost.eltele.no/freeware/identd/"><IMG
+     SRC="http://info.ost.eltele.no/freeware/identd/identd.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
--- squidguard-1.2.0.orig/doc/faq.txt
+++ squidguard-1.2.0/doc/faq.txt
@@ -3,8 +3,8 @@
    [2]squidGuard is an ultrafast and free filter, redirector and access
    controller for [3]Squid
    By [4]PÃ¥l Baltzersen and [5]Lars Erik HÃ¥land
-   [6]Copyright © 1999-2000, [7]Tele Danmark InterNordia
-   This page was last modified 2001-12-18
+   [6]Copyright © 1999-2000, [7]ElTele Øst AS
+   This page was last modified 2000-08-23
    
 [arrow-red.gif] FAQ - Frequently Asked/Answered Questions
 
@@ -93,8 +93,8 @@
                 You can set a simulated start time with the
                 -t yyyy-mm-ddTHH:MM:SS option:
                 
-                      squidGuard -c test.conf -t 1999-12-31T23:59:30 -d <
-                      test.in>test.out 2>test.log 
+              squidGuard -c test.conf -t 1999-12-31T23:59:30 -d <test.in>
+                      test.out 2>test.log 
                       
                 With the -t option squidGuard parses the given date&time
                 and calculates an offset from the current time at startup
@@ -117,7 +117,7 @@
                       redirect_program prefix/bin/squidGuard.sh and make
                       prefix/bin/squidGuard.sh an executable shell like:
                       
-                                  #! /bin/sh -
+                          #! /bin/sh -
                                   exec prefix/bin/squidGuard -c whatever/
                                   squidGuard.conf 
                                   
@@ -283,7 +283,7 @@
                         ____________________________
    
        [17][gnu-logo.gif] [18][perl-logo.gif] [19][solaris-logo.gif]
-                   [20][sun-logo.gif] [21][tdi-logo.gif] 
+                 [20][sun-logo.gif] [21][eltele-logo.gif] 
                                       
       [22][apache-logo.gif] [23][squid-logo.gif] [24][squidGuard.gif] 
                                       
@@ -291,28 +291,28 @@
 
 References
 
-   1. http://ftp.teledanmark.no/pub/www/proxy/squidGuard/
+   1. http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/
    2. http://www.squidguard.org/
    3. http://www.squid-cache.org/
    4. http://www.squidguard.org/authors/
    5. http://www.squidguard.org/authors/
    6. http://www.squidguard.org/copyright/
-   7. http://www.teledanmark.no/
+   7. http://www.ost.eltele.no/
    8. http://www.squidguard.org/contact/
-   9. http://ftp.teledanmark.no/pub/db/
+   9. http://ftp.ost.eltele.no/pub/db/
   10. http://www.squidguard.org/config/#Expressionlists
   11. mailto:blacklist@squidguard.org
   12. http://www.squidguard.org/install/#Defaultconfigfile
   13. http://www.squidguard.org/links/#Flex
-  14. http://ftp.teledanmark.no/pub/www/proxy/squidGuard/contrib/squid-2.2-authuser.patch
+  14. http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/contrib/squid-2.2-authuser.patch
   15. mailto:antony@abacus.co.uk
   16. mailto:squidguard@squidguard.org?subject=SquidGuard%20FAQ?
   17. http://www.gnu.org/
   18. http://www.perl.com/pub/
   19. http://www.sun.com/solaris/
   20. http://www.sun.com/servers/
-  21. http://www.teledanmark.no/
+  21. http://www.ost.eltele.no/
   22. http://www.apache.org/httpd.html
   23. http://www.squid-cache.org/
   24. http://www.squidguard.org/
-  25. http://info.teledanmark.no/freeware/identd/
+  25. http://info.ost.eltele.no/freeware/identd/
--- squidguard-1.2.0.orig/doc/index.html
+++ squidguard-1.2.0/doc/index.html
@@ -4,9 +4,8 @@
   <TITLE>squidGuard - An ultrafast and free filter/redirector/access controller for Squid</TITLE>
   <META name="keywords" lang="en" content="squidGuard,squidguard,squid,Squid,free,redirector,filter">
   <META name="author" content="PÃ¥l Baltzersen">
-  <META name="copyright" content="&copy; 2000 Tele Danmark InterNordia.">
- <BASE HREF="http://www.squidguard.org/">
- </HEAD>
+  <META name="copyright" content="&copy; 2000 ElTele Øst AS.">
+ <BASE HREF="http://www.squidguard.org/"> </HEAD>
 
  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  <BODY
@@ -28,7 +27,7 @@
 	<FONT SIZE=+3>
 	 <B>Welcome to squidGuard</B>
 	</FONT>
-	<A HREF="http://ftp.teledanmark.no/pub/www/proxy/squidGuard/"><IMG
+	<A HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/"><IMG
 	SRC="/images/squidGuard.gif" BORDER=0
 	VALIGN=TOP></A>
        </TD>
@@ -43,7 +42,7 @@
 	 HREF="/authors/">Lars Erik HÃ¥land</A>
 	 <BR>
 	 <A HREF="/copyright/">Copyright</A> &copy; 1999-2000, <A
-	 HREF="http://www.teledanmark.no/">Tele Danmark InterNordia</A>
+	 HREF="http://www.ost.eltele.no/">ElTele Øst AS</A>
 	</FONT>
        </TH>
       </TR>
@@ -58,7 +57,7 @@
 	 The master version is at <A
 	 HREF="http://www.squidguard.org/">http://www.squidguard.org/</A>
 	 <BR>
-	 Last update: 2001-12-18 13:12:36 MET
+	 Last update: 2000-09-17 03:38:13 MET
 	</FONT>
        </TH>
       </TR>
@@ -70,12 +69,6 @@
   <BR>
   <BR>
 
-  <CENTER>
-   <B>Tue Dec 18 2001: squidGuard-1.2.0 has been released!</B>
-  </CENTER>
-
-  <BR>
-
   <TABLE ALIGN=CENTER WIDTH=75% CELLPADDING=3 CELLSPACING=0 BORDER=0>
    <TR VALIGN=BOTTOM>
     <TH ALIGN=CENTER>
@@ -191,22 +184,17 @@
     </TH>
    </TR>
   </TABLE>
-
-  <BR>
-  <BR>
-
- <CENTER>
- <FORM METHOD="POST" ACTION="/cgi-bin/htsearch">
- <B>Search squidGuard.org:</B>
- <INPUT TYPE="text" SIZE="30" NAME="words">
- <INPUT TYPE="submit" VALUE="Search">
- <INPUT TYPE="hidden" NAME="config" VALUE="htdig">
- <INPUT TYPE="hidden" NAME="restrict" VALUE="">
- <INPUT TYPE="hidden" NAME="exclude" VALUE="">
- <INPUT TYPE="hidden" NAME="method" VALUE="and">
- <INPUT TYPE="hidden" NAME="format" VALUE="long">
- </FORM>
- </CENTER>
-
+<center>
+<form method="post" action="/cgi-bin/htsearch">
+<b>Search squidGuard.org:</b>
+<input type="text" size="30" name="words">
+<input type="submit" value="Search">
+<input type=hidden name="config" value="htdig">
+<input type=hidden name="restrict" value="">
+<input type=hidden name="exclude" value="">
+<input type=hidden name="method" value="and">
+<input type=hidden name="format" value="long">
+</form>
+</center>
  </BODY>
 </HTML>
--- squidguard-1.2.0.orig/doc/installation.html
+++ squidguard-1.2.0/doc/installation.html
@@ -4,7 +4,7 @@
   <TITLE>squidGuard - Installation</TITLE>
   <META name="keywords" lang="en" content="installation,install,squidGuard,squidguard,squid,Squid,free,redirector,filter">
   <META name="author" content="PÃ¥l Baltzersen">
-  <META name="copyright" content="&copy; 2000 Tele Danmark InterNordia.">
+  <META name="copyright" content="&copy; 2000 ElTele Øst AS.">
  </HEAD>
 
  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
@@ -24,7 +24,7 @@
      <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
       <TR>
        <TD ALIGN=LEFT VALIGN=BOTTOM>
-	<A HREF="http://ftp.teledanmark.no/pub/www/proxy/squidGuard/"><IMG
+	<A HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/"><IMG
 	SRC="/images/squidGuard.gif" BORDER=0
 	VALIGN=TOP></A>
 	<FONT SIZE=+3>
@@ -44,7 +44,7 @@
 	 HREF="/authors/">Lars Erik HÃ¥land</A>
 	 <BR>
 	 <A HREF="/copyright/">Copyright</A> &copy; 1999-2000, <A
-	 HREF="http://www.teledanmark.no/">Tele Danmark InterNordia</A>
+	 HREF="http://www.ost.eltele.no/">ElTele Øst AS</A>
 	</FONT>
        </TH>
       </TR>
@@ -56,7 +56,7 @@
        <TH ALIGN=RIGHT>
 	<FONT SIZE=-1>
 	 <BR>
-	 This page was last modified 2001-12-18
+	 This page was last modified 2000-02-28
 	</FONT>
        </TH>
       </TR>
@@ -179,24 +179,20 @@
       </TT>
      </DD>
     </DL>
-    *) At <A HREF="http://www.teledanmark.no/">Tele Danmark</A> we
-    use:
+    *) At Eltele Øst AS we apply <A
+    HREF="http://ftp.ost.eltele.no/pub/db/db.local.diff">this little
+    patch</A> and use:
     <DL>
      <DD>
       <TT>
-       <PRE>#!/bin/sh -
-   cd build_unix
-   CC=gcc \
-   CXX=g++ \
-   CFLAGS="-O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
-   CXXFLAGS="-O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
-   ../dist/configure \
-     --verbose \
-     --target=sparc-sun-solaris \
-     --enable-dynamic \
-     --enable-compat185 \
-     --enable-rpc \
-     --prefix=/local</PRE>
+       <B>tcsh#</B>&nbsp;(setenv&nbsp;CC&nbsp;"gcc";setenv&nbsp;CFLAGS&nbsp;"-O3&nbsp;-Wall";\<BR>
+       ./configure&nbsp;--verbose&nbsp;--target=sparc-sun-solaris\
+       <DL>
+	<DD>
+	 --prefix=/local\<BR>
+	</DD>
+       </DL>
+       )
       </TT>
      </DD>
     </DL>
@@ -288,23 +284,24 @@
      </DD>
     </DL>
     <A NAME="Logdir"></A><A NAME="DBhome"></A>At <A
-    HREF="http://www.teledanmark.no/">Tele Danmark</A> we use:
+    HREF="http://www.ost.eltele.no/">ElTele Øst AS</A> we build with
+    this setup:
     <DL>
      <DD>
       <TT>
-       <PRE>#!/bin/sh -
-   CC="gcc" \
-   CFLAGS="-O3 -Wall" \
-   LIBS="-R/local/lib -lnls" \
-   ./configure \
-   --verbose \
-   --target=sparc-sun-solaris \
-   --prefix=/local/squid \
-   --with-db-lib=/local/lib \
-   --with-db-inc=/local/include \
-   --with-sg-config=/var/spool/www/hosts/proxy.teledanmark.no/filter/conf/filter.conf \
-   --with-sg-logdir=/var/spool/www/hosts/proxy.teledanmark.no/filter/logs \
-   --with-sg-dbhome=/var/spool/www/hosts/proxy.teledanmark.no/filter/db</PRE>
+       <B>tcsh#</B>&nbsp;(setenv&nbsp;CC&nbsp;"gcc";setenv&nbsp;CFLAGS&nbsp;"-O3&nbsp;-Wall";\<BR>
+       ./configure&nbsp;--verbose --target=sparc-sun-solaris\
+       <DL>
+	<DD>
+	 --prefix=/local/squid\<BR>
+	 --with-db-lib=/local/lib\<BR>
+	 --with-db-inc=/local/include\<BR>
+	 --with-sg-config=/var/spool/www/hosts/proxy.ost.eltele.no/filter/conf/filter.conf\<BR>
+	 --with-sg-logdir=/var/spool/www/hosts/proxy.ost.eltele.no/filter/logs\
+	 --with-sg-dbhome=/var/spool/www/hosts/proxy.ost.eltele.no/filter/db\
+	</DD>
+       </DL>
+       )
       </TT>
      </DD>
     </DL><BR>
@@ -377,7 +374,7 @@
     <DL>
      <DD>
       <TT>
-       http://info.teledanmark.no/freeware/squidGuard/&nbsp;10.1.2.3/pc123.teledanmark.no&nbsp;fdgh&nbsp;GET<BR>
+       http://info.ost.eltele.no/freeware/squidGuard/&nbsp;10.1.2.3/pc123.ost.eltele.no&nbsp;fdgh&nbsp;GET<BR>
        http://bad.site.com/dirty/stuff/foo.htm&nbsp;10.3.2.1/-&nbsp;-&nbsp;GET
       </TT>
      </DD>
@@ -532,27 +529,27 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.gnu.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/gnu-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/gnu-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.perl.com/pub/"><IMG
-     SRC="http://info.teledanmark.no/icons/perl-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/perl-logo.gif" BORDER=0
      VALIGN=TOP></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/solaris/"><IMG
-     SRC="http://info.teledanmark.no/icons/solaris-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/solaris-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.sun.com/servers/"><IMG
-     SRC="http://info.teledanmark.no/icons/sun-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/sun-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
-     <A HREF="http://www.teledanmark.no/"><IMG
-      SRC="http://info.teledanmark.no/icons/tdi-logo.gif" BORDER=0
+     <A HREF="http://www.ost.eltele.no/"><IMG
+      SRC="http://info.ost.eltele.no/icons/eltele-logo.gif" BORDER=0
       VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -561,17 +558,17 @@
    <TR>
     <TD ALIGN=CENTER>
      <A HREF="http://www.apache.org/httpd.html"><IMG
-     SRC="http://info.teledanmark.no/icons/apache-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/apache-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squid-cache.org/"><IMG
-     SRC="http://info.teledanmark.no/icons/squid-logo.gif" BORDER=0
+     SRC="http://info.ost.eltele.no/icons/squid-logo.gif" BORDER=0
      VALIGN=BOTTOM></A>
     </TD>
     <TD ALIGN=CENTER>
      <A HREF="http://www.squidguard.org/"><IMG
-     SRC="http://info.teledanmark.no/freeware/squidGuard/squidGuard.gif"
+     SRC="http://info.ost.eltele.no/freeware/squidGuard/squidGuard.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
@@ -579,8 +576,8 @@
   <TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
    <TR>
     <TD ALIGN=CENTER>
-     <A HREF="http://info.teledanmark.no/freeware/identd/"><IMG
-     SRC="http://info.teledanmark.no/freeware/identd/identd.gif"
+     <A HREF="http://info.ost.eltele.no/freeware/identd/"><IMG
+     SRC="http://info.ost.eltele.no/freeware/identd/identd.gif"
      BORDER=0 VALIGN=BOTTOM></A>
     </TD>
    </TR>
--- squidguard-1.2.0.orig/doc/installation.txt
+++ squidguard-1.2.0/doc/installation.txt
@@ -3,8 +3,8 @@
    [2]squidGuard is an ultrafast and free filter, redirector and access
    controller for [3]Squid
    By [4]PÃ¥l Baltzersen and [5]Lars Erik HÃ¥land
-   [6]Copyright © 1999-2000, [7]Tele Danmark InterNordia
-   This page was last modified 2001-12-18
+   [6]Copyright © 1999-2000, [7]ElTele Øst AS
+   This page was last modified 2000-02-28
    
 [arrow-red.gif] Installation instructions
 
@@ -53,7 +53,7 @@
        versions 1.85 or 1.86 please [29]report!)
        Here is a quick installation guide for the Berkeley DB library:
        
-                mkdir -p /local/src (or wherever you like)
+        mkdir -p /local/src (or wherever you like)
                 cd /local/src
                 gzip -dc /wherever/db-2.y.z.tar.gz | tar xvf -
                 cd db-2.y.z/dist
@@ -63,27 +63,20 @@
                 make install
                 make clean (optional)
                 
-       *) At [30]Tele Danmark we use:
+       *) At Eltele Øst AS we apply [30]this little patch and use:
        
-#!/bin/sh -
-   cd build_unix
-   CC=gcc \
-   CXX=g++ \
-   CFLAGS="-O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
-   CXXFLAGS="-O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
-   ../dist/configure \
-     --verbose \
-     --target=sparc-sun-solaris \
-     --enable-dynamic \
-     --enable-compat185 \
-     --enable-rpc \
-     --prefix=/local
-
+        tcsh# (setenv CC "gcc";setenv CFLAGS "-O3 -Wall";\
+                ./configure --verbose --target=sparc-sun-solaris\
+                
+              --prefix=/local\
+                      
+                )
+                
        By default the more recent versions of the Berkeley DB library
        installs itself under /usr/local/BerkeleyDB/{lib,include,bin,docs}
     3. [31]Download squidGuard and unpack the distribution with:
        
-                mkdir -p /local/src (or wherever you like)
+        mkdir -p /local/src (or wherever you like)
                 cd /local/src
                 gzip -dc /wherever/squidGuard-x.y.z.tar.gz | tar xvf -
                 cd squidGuard-x.y.z
@@ -92,31 +85,30 @@
        portability and easy compilation setup. For a default environment,
        simply run:
        
-                ./configure
+        ./configure
                 
        If you have [33]gcc you may want to force the use of gcc and
        optimize more:
        
-                csh|tcsh# (setenv CC "gcc"; setenv CFLAGS "-O3";
-                ./configure)
+        csh|tcsh# (setenv CC "gcc"; setenv CFLAGS "-O3"; ./configure)
                 
        or
        
-                sh|bash|ksh# CC="gcc" CFLAGS="-O3" ./configure
+        sh|bash|ksh# CC="gcc" CFLAGS="-O3" ./configure
                 
        depending on your shell. This will prepare Makefiles to compile
        and optionally install the squidGuard executable as
        /usr/local/bin/squidGuard. If you prefer to install squidGuard as
        for instance /local/squid/bin/squidGuard, use the option:
        
-                ./configure --prefix=/local/squid
+        ./configure --prefix=/local/squid
                 
        To avoid the need of runing squidGuard with the command line
        option "-c /wherever/filter.conf"*), you may want to change the
        default to the actual location of the configuration file at
        compile time by adding:
        
-                ./configure --with-sg-config=/wherever/filter.conf
+        ./configure --with-sg-config=/wherever/filter.conf
                 
        *)Note: squid-2.2.x up to STABLE2are broken and ignores the
        argument list silently without passing it to the redirector.
@@ -125,28 +117,28 @@
        time. Versions up to 2.1.PATCH2 do not have this problem.
        To see the full list of build configuration options run:
        
-                ./configure --help
+        ./configure --help
                 
-       At [34]Tele Danmark we use:
+       At [34]ElTele Øst AS we build with this setup:
        
-#!/bin/sh -
-   CC="gcc" \
-   CFLAGS="-O3 -Wall" \
-   LIBS="-R/local/lib -lnls" \
-   ./configure \
-   --verbose \
-   --target=sparc-sun-solaris \
-   --prefix=/local/squid \
-   --with-db-lib=/local/lib \
-   --with-db-inc=/local/include \
-   --with-sg-config=/var/spool/www/hosts/proxy.teledanmark.no/filter/conf/filte
-r.conf \
-   --with-sg-logdir=/var/spool/www/hosts/proxy.teledanmark.no/filter/logs \
-   --with-sg-dbhome=/var/spool/www/hosts/proxy.teledanmark.no/filter/db
-
+        tcsh# (setenv CC "gcc";setenv CFLAGS "-O3 -Wall";\
+                ./configure --verbose --target=sparc-sun-solaris\
+                
+              --prefix=/local/squid\
+                      --with-db-lib=/local/lib\
+                      --with-db-inc=/local/include\
+                      --with-sg-config=/var/spool/www/hosts/proxy.ost.elt
+                      ele.no/filter/conf/filter.conf\
+                      --with-sg-logdir=/var/spool/www/hosts/proxy.ost.elt
+                      ele.no/filter/logs\
+                      --with-sg-dbhome=/var/spool/www/hosts/proxy.ost.elt
+                      ele.no/filter/db\
+                      
+                )
+                
     5. Now simply run:
        
-                make
+        make
                 
        This should compile squidGuard without errors. If you compile with
        gcc -Wall you may safely ignore warnings for the machine generated
@@ -154,11 +146,11 @@
        probably investigate other warnings and errors.
     6. To test the newly built squidGuard run:
        
-                make test
+        make test
                 
     7. If all is OK run:
        
-                make install
+        make install
                 
        This will install the squidGuard executable in
        prefix/bin/squidGuard where prefix is /usr/local unless you
@@ -173,12 +165,12 @@
        test.block. (Omit test.rewrite if you don't have rewrite rules.)
        The format of these files is:
        
-                URL ip-address/fqdn ident method
+        URL ip-address/fqdn ident method
                 
        For instance:
        
-                http://info.teledanmark.no/freeware/squidGuard/ 10.1.2.3/
-                pc123.teledanmark.no fdgh GET
+        http://info.ost.eltele.no/freeware/squidGuard/ 10.1.2.3/pc123.ost
+                .eltele.no fdgh GET
                 http://bad.site.com/dirty/stuff/foo.htm 10.3.2.1/- - GET
                 
        The ip-address is mandatory, the fqdn and ident fields may be "-"
@@ -190,8 +182,8 @@
        test.block respectively. Now you are ready to simulate real
        requests. Run the three simulations:
        
-                prefix/bin/squidGuard -c /your/squidGuard.conf < test.pas
-                s > test.pass.out
+        prefix/bin/squidGuard -c /your/squidGuard.conf < test.pass > test
+                .pass.out
                 prefix/bin/squidGuard -c /your/squidGuard.conf < test.rew
                 rite > test.rewrite.out
                 prefix/bin/squidGuard -c /your/squidGuard.conf < test.blo
@@ -199,7 +191,7 @@
                 
        Check the pass output:
        
-                wc -l test.pass
+        wc -l test.pass
                 wc -l test.pass.out
                 wc -w test.pass.out
                 
@@ -208,7 +200,7 @@
        Check the rewrite/redirect output (Omit if you don't have rewrite
        rules.):
        
-                wc -l test.rewrite
+        wc -l test.rewrite
                 wc -l test.rewrite.out
                 diff test.rewrite test.rewrite.out | egrep -ic '^> ..* [0
                 -9.]+/..* ..* [a-z]+$'
@@ -219,7 +211,7 @@
        command.
        Check the block output:
        
-                wc -l test.block
+        wc -l test.block
                 wc -l test.block.out
                 diff test.block test.block.out | egrep -ic '^> ..* [0-9.]
                 +/..* ..* [a-z]+$'
@@ -237,13 +229,13 @@
    12. Tell Squid to use squidGuard as the redirector by uncommenting and
        changing the following tags in squid.conf to:
        
-                redirect_program /prefix/bin/squidGuard
+        redirect_program /prefix/bin/squidGuard
                 
        or if squidGuard's config file is somewhere else than set at
        compile time*):
        
-                redirect_program /prefix/bin/squidGuard -c /wherever/squi
-                dGuard.conf
+        redirect_program /prefix/bin/squidGuard -c /wherever/squidGuard.c
+                onf
                 
        where prefix is /usr/local unless you changed it with
        --prefix=/some/where/else.
@@ -256,7 +248,7 @@
        Also configuere the number of redirector processes you think you
        want:
        
-                redirect_children 4
+        redirect_children 4
                 
        I really don't know why one should have more than one squidGuard
        process on a single CPU system cince squidGuard never blocks
@@ -271,17 +263,17 @@
        vary with the actual configuration.
    13. Send Squid a HUP signal:
        
-                kill -HUP `cat /somewhere/squid.pid`
+        kill -HUP `cat /somewhere/squid.pid`
                 
        or
        
-                squid -k reconfigure
+        squid -k reconfigure
                 
    14. Test with a browser.
                         ____________________________
    
        [40][gnu-logo.gif] [41][perl-logo.gif] [42][solaris-logo.gif]
-                   [43][sun-logo.gif] [44][tdi-logo.gif] 
+                 [43][sun-logo.gif] [44][eltele-logo.gif] 
                                       
       [45][apache-logo.gif] [46][squid-logo.gif] [47][squidGuard.gif] 
                                       
@@ -289,13 +281,13 @@
 
 References
 
-   1. http://ftp.teledanmark.no/pub/www/proxy/squidGuard/
+   1. http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/
    2. http://www.squidguard.org/
    3. http://www.squid-cache.org/
    4. http://www.squidguard.org/authors/
    5. http://www.squidguard.org/authors/
    6. http://www.squidguard.org/copyright/
-   7. http://www.teledanmark.no/
+   7. http://www.ost.eltele.no/
    8. http://www.squid-cache.org/Versions/1.1/Release-Notes-1.1.txt
    9. http://www.squidguard.org/install/#Detailed_install_2
   10. http://www.squidguard.org/install/#Detailed_install_4
@@ -318,11 +310,11 @@
   27. http://www.squidguard.org/links/#DB
   28. http://www.squidguard.org/links/#DB
   29. mailto:squidguard@squidguard.org
-  30. http://www.teledanmark.no/
+  30. http://ftp.ost.eltele.no/pub/db/db.local.diff
   31. http://www.squidguard.org/download/
   32. http://www.gnu.org/software/autoconf/
   33. http://www.squidguard.org/links/#Gcc
-  34. http://www.teledanmark.no/
+  34. http://www.ost.eltele.no/
   35. http://www.squidguard.org/config/
   36. http://www.squidguard.org/config/#Minimal
   37. http://www.squidguard.org/config/#Lists
@@ -332,8 +324,8 @@
   41. http://www.perl.com/pub/
   42. http://www.sun.com/solaris/
   43. http://www.sun.com/servers/
-  44. http://www.teledanmark.no/
+  44. http://www.ost.eltele.no/
   45. http://www.apache.org/httpd.html
   46. http://www.squid-cache.org/
   47. http://www.squidguard.org/
-  48. http://info.teledanmark.no/freeware/identd/
+  48. http://info.ost.eltele.no/freeware/identd/
--- squidguard-1.2.0.orig/doc/Makefile.in
+++ squidguard-1.2.0/doc/Makefile.in
@@ -4,41 +4,6 @@
 
 all update::
 	@echo making $@ in `basename \`pwd\``
-	-mv -f index.html index.html.orig
-	$(LYNX) -source http://www.squidguard.org/ \
-	| sed 's@</HEAD>@<BASE HREF="http://www.squidguard.org/">\
-	 &@' >index.html \
-	|| mv -f index.html.orig index.html
-	test -s index.html || mv -f index.html.orig index.html
-	$(RM) index.html.orig
-	-mv -f installation.html installation.html.orig
-	$(LYNX) -source http://www.squidguard.org/install/ >installation.html \
-	|| mv -f installation.html.orig installation.html
-	$(RM) installation.html.orig
-	-mv -f installation.txt installation.txt.orig
-	$(LYNX) -dump http://www.squidguard.org/install/ >installation.txt \
-	|| mv -f installation.txt.orig installation.txt
-	$(RM) installation.txt.orig
-	-mv -f configuration.html configuration.html.orig
-	$(LYNX) -source http://www.squidguard.org/config/ >configuration.html \
-	|| mv -f configuration.html.orig configuration.html
-	$(RM) configuration.html.orig
-	-mv -f configuration.txt configuration.txt.orig
-	$(LYNX) -dump http://www.squidguard.org/config/ >configuration.txt \
-	|| mv -f configuration.txt.orig configuration.txt
-	$(RM) configuration.txt.orig
-	-mv -f faq.html faq.html.orig
-	$(LYNX) -source http://www.squidguard.org/faq/ >faq.html \
-	|| mv -f faq.html.orig faq.html
-	$(RM) faq.html.orig
-	-mv -f faq.txt faq.txt.orig
-	$(LYNX) -dump http://www.squidguard.org/faq/ >faq.txt \
-	|| mv -f faq.txt.orig faq.txt
-	$(RM) faq.txt.orig
-	-mv -f squidGuard.gif squidGuard.gif.orig
-	$(LYNX) -source http://www.squidguard.org/images/squidGuard.gif >squidGuard.gif \
-	|| mv -f squidGuard.gif.orig squidGuard.gif
-	$(RM) squidGuard.gif.orig
 
 clean::
 	@echo making $@ in `basename \`pwd\``
--- squidguard-1.2.0.orig/samples/sample.conf
+++ squidguard-1.2.0/samples/sample.conf
@@ -0,0 +1,83 @@
+#
+# CONFIG FILE FOR SQUIDGUARD
+#
+
+dbhome /usr/squidGuard/db
+logdir /usr/squidGuard/logs
+
+#
+# TIME RULES:
+# abbrev for weekdays: 
+# s = sun, m = mon, t =tue, w = wed, h = thu, f = fri, a = sat
+
+time workhours {
+	weekly mtwhf 08:00 - 16:30
+	date *-*-01  08:00 - 16:30
+}
+
+#
+# REWRITE RULES:
+#
+
+rew dmz {
+	s@://admin/@://admin.foo.bar.no/@i
+	s@://foo.bar.no/@://www.foo.bar.no/@i
+}
+
+#
+# SOURCE ADDRESSES:
+#
+
+src admin {
+	ip		1.2.3.4 1.2.3.5
+	user		root foo bar
+	within 		workhours
+}
+
+src foo-clients {
+	ip		172.16.2.32-172.16.2.100 172.16.2.100 172.16.2.200
+}
+
+src bar-clients {
+	ip		172.16.4.0/26
+}
+
+#
+# DESTINATION CLASSES:
+#
+
+dest good {
+}
+
+dest local {
+}
+
+dest adult {
+	domainlist	dest/adult/domains
+	urllist		dest/adult/urls
+	expressionlist	dest/adult/expressions
+	redirect 	http://admin.foo.bar.no/cgi/blocked?clientaddr=%a+clientname=%n+clientident=%i+srcclass=%s+targetclass=%t+url=%u
+}
+
+
+acl {
+	admin {
+		pass	 any
+	}
+
+	foo-clients within workhours {
+		pass	 good !in-addr !adult any
+	} else {
+		pass any
+	}
+
+	bar-clients {
+		pass	local none
+	}
+
+	default {
+		pass	 local none
+		rewrite	 dmz
+		redirect http://admin.foo.bar.no/cgi/blocked?clientaddr=%a+clientname=%n+clientident=%i+srcclass=%s+targetclass=%t+url=%u
+	}
+}
--- squidguard-1.2.0.orig/samples/squidGuard.cgi
+++ squidguard-1.2.0/samples/squidGuard.cgi
@@ -0,0 +1,900 @@
+#! /usr/bin/perl -w
+#
+# Explain to the user that the URL is blocked and by which rule set
+#
+# By PÃ¥l Baltzersen 1999 (pal.baltzersen@ost.eltele.no)
+# French texts thanks to Fabrice Prigent (fabrice.prigent@univ-tlse1.fr)
+# Dutch texts thanks to Anneke Sicherer-Roetman (sicherer@sichemsoft.nl)
+# German texts thanks to Buergernetz Pfaffenhofen (http://www.bn-paf.de/filter/)
+#
+# The last version may be found anytime at:
+#    http://ftp.your-domain/pub/www/proxy/squidGuard/contrib/
+#
+
+# By accepting this notice, you agree to be bound by the following
+# agreements:
+# 
+# This software product, squidGuard, is copyrighted (C) 1999 by ElTele
+# Øst AS, Oslo, Norway, with all rights reserved.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License (version 2) as
+# published by the Free Software Foundation.  It is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE.  See the GNU General Public License (GPL) for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# (GPL) along with this program.
+
+use strict;
+use Socket;
+#
+# GLOBAL VALUES:
+#
+my ($clientaddr,$clientname,$clientuser,$clientgroup,$targetgroup,$url);
+my ($lang,@supported,$image,$redirect,$autoinaddr,$proxy,$proxymaster);
+my (%msgconf,%title,%logo,%msg,%tab,%word);
+my ($protocol,$address,$port,$path,$refererhost,$referer);
+sub msginit();
+sub getpreferedlang(@);
+sub parsequery($);
+sub status($);
+sub redirect($);
+sub content($);
+sub expires($);
+sub title($);
+sub terminator();
+sub msg($$);
+sub table($$@);
+sub href($);
+sub gethostnames($);
+sub spliturl($);
+sub showhtml($);
+sub showimage($$$);
+sub showinaddr($$$$$);
+
+#
+# CONFIGURABLE OPTIONS:
+#
+@supported   = (							# "en", "fr", "de", "nl", "no" etc.
+		"en (English),",
+		"fr (Français),",
+		"de (Deutsch),",
+		"nl (Nederlands),",
+		"no (norsk)."
+	       );
+$image       = "/images/blocked.gif";					# RELATIVE TO DOCUMENT_ROOT
+$redirect    = "http://admin.your-domain/images/blocked.gif";		# "" TO AVOID REDIRECTION
+$proxy       = "proxy.your-domain";					#
+$proxymaster = "operator\@your-domain";				#
+$autoinaddr  = 2;			# 0|1|2;
+					# 0 TO NOT REDIRECT
+					# 1 TO AUTORESOLVE & REDIRECT IF UNIQUE
+					# 2 TO AUTORESOLVE & REDIRECT TO FIRST NAME
+#
+# CONFIGURABLE MESSAGES:
+#
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+# !!! NOTE1: ALLWAYS ESCAPE EMBEDDED VARIABLES (I.E. \$var)         !!!
+# !!!	     IF YOU DON'T YOU MAY OPEN A SECURITY HOLE	            !!!
+# !!! NOTE2: TRIPLE ESCAPE EMBEDDED `\', `"', `$', `@', `%' and `&' !!!
+# !!!	     (I.E. \\\\, \\\", \\\$, \\\@, \\\&)	            !!!
+# !!! NOTE3: ESCAPE OTHER SPECIAL INLINE CHARACTERS	            !!!
+# !!!	     (I.E. \;, \')				            !!!
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#
+sub msginit() {
+  ($clientaddr,$clientname,$clientuser,$clientgroup,$targetgroup,$url)
+    = parsequery($ENV{"QUERY_STRING"});
+  ($protocol,$address,$port,$path) = spliturl($url);
+  $lang = getpreferedlang(@supported);
+
+  %word->{"unknown"}->{"en"}		# THE WORD "unknown"
+    = "unknown";			# --------- "" ---------
+  %word->{"unknown"}->{"fr"}		# "unknown" IN FRENCH
+    = "inconnu";			# 
+  %word->{"unknown"}->{"de"}		# "unknown" IN GERMAN
+    = "unbekannt";			# 
+  %word->{"unknown"}->{"nl"}		# "unknown" IN DUTCH
+    = "onbekend";			# 
+  %word->{"unknown"}->{"no"}		# "unknown" IN NORWEGIAN
+    = "ukjent";				# 
+
+  %title->{"default"}->{"en"}		# THE DEFAULT TITLE
+    = [ "403 Forbidden" ];		# --------- "" ---------
+  %title->{"default"}->{"fr"}		# --------- "" ---------
+    = [ "403 Interdit" ];		# --------- "" ---------
+  %title->{"default"}->{"de"}		# --------- "" ---------
+    = [ "403 Verboten" ];		# --------- "" ---------
+  %title->{"default"}->{"nl"}		# --------- "" ---------
+    = [ "403 Verboden" ];		# --------- "" ---------
+  %title->{"default"}->{"no"}		# --------- "" ---------
+    = [ "403 Sperret" ];		# --------- "" ---------
+
+  %msgconf->{"default"}			# THE "default" MESSAGE CONFIG
+    					# (USED WHEN NO OTHER MSGS APPLIES):
+    = [ "msg:H1:default",		# SHOW MSG "default" AS <H1> (DEFINED BELOW)
+	"tab:R,C,L:info"		# SHOW "info" AS <TABLE> & COLUMNS ALIGNED R,C,L
+	. ":clientaddr"			# AND WITH THESE ELEMENTS (DEFINED BELOW)
+	. ":clientname"			# --------- "" --------- "" --------- 
+	. ":clientuser"			# --------- "" --------- "" --------- 
+	. ":clientgroup"		# --------- "" --------- "" --------- 
+	. ":url"			# --------- "" --------- "" --------- 
+	. ":targetgroup",		# --------- "" --------- "" --------- 
+	"msg:P:proxymaster",		# SHOW "proxymaster" AS <P> (DEFINED BELOW)
+	"msg:P:refresh"			# SHOW "refresh" AS <P> (DEFINED BELOW)
+      ];
+
+  %msgconf->{"unknown"}			# THE "unknown" CLIENT MESSAGE CONFIG:
+    = [ "msg:H1:unknown",		# SHOW "unknown" AS <H1> (DEFINED BELOW)
+	"tab:R,C,L:info"		# SHOW "info" AS <TABLE> & COLUMNS ALIGNED R,C,L
+	. ":clientaddr"			# AND WITH THESE ELEMENTS (DEFINED BELOW)
+	. ":clientname"			# --------- "" --------- "" ---------
+	. ":clientuser"			# --------- "" --------- "" ---------
+	. ":clientgroup",		# --------- "" --------- "" ---------
+	"msg:P:proxymaster",		# SHOW "proxymaster" AS <P> (DEFINED BELOW)
+	"msg:P:refresh"			# SHOW "refresh" AS <P> (DEFINED BELOW)
+      ];
+  %msgconf->{%word->{"unknown"}->{$lang}}
+    = %msgconf->{"unknown"};
+
+  %msgconf->{"in-addr"}			# THE MESSAGE CONFIG FOR THE "in-addr" DEST GROUP:
+    = [ "msg:H1:alternatives",		# SHOW "alternatives" AS <H1> (DEFINED BELOW)
+	"alternatives",			# SHOW THE ALTERNATIV DOMAIN ADDRESSES
+	"referermaster",		# SHOW "referermaster" (DEFINED BELOW)
+	"msg:P:refresh"			# SHOW "refresh" AS <P> (DEFINED BELOW)
+      ];
+  
+  %msgconf->{"noalternatives"}		# DITTO WHEN THERE ARE NO DOMAIN ADDRESS ALTERNATIVES:
+    = [ "msg:H1:in-addr",		# SHOW "in-addr" AS <H1> (DEFINED BELOW)
+	"tab:R,C,L:info"		# SHOW "info" AS <TABLE> & COLUMNS ALIGNED R,C,L
+	. ":clientaddr"			# AND WITH THESE ELEMENTS (DEFINED BELOW)
+	. ":clientname"			# --------- "" --------- "" ---------
+	. ":clientuser"			# --------- "" --------- "" ---------
+	. ":clientgroup"		# --------- "" --------- "" ---------
+	. ":domainurl"			# --------- "" --------- "" ---------
+	. ":targetgroup",		# --------- "" --------- "" ---------
+	"msg:H3:noalternatives",	# SHOW "noalternatives" AS <H3> (DEFINED BELOW)
+	"msg:P:webmaster",		# SHOW "webmaster" AS <P> (DEFINED BELOW)
+	"msg:P:refresh"			# SHOW "refresh" AS <P> (DEFINED BELOW)
+      ];
+  
+  %msg->{"default"}->{"en"}			# THE MSG TEXT "default" IN "en" (ENGLISH):
+    = [ "Access to this site is blocked" ];	#
+  %msg->{"default"}->{"fr"}			# THE MSG TEXT "default" IN "fr" (FRENCH):
+    = [ "L\'accès à ce site est bloqué" ];	#
+  %msg->{"default"}->{"de"}			# THE MSG TEXT "default" IN "de" (GERMAN):
+    = [ "Zugriff verweigert" ];			#
+  %msg->{"default"}->{"nl"}			# THE MSG TEXT "default" IN "nl" (DUTCH):
+    = [ "De toegang is geblokkeerd" ];          #
+  %msg->{"default"}->{"no"}			# THE MSG TEXT "default" IN "no" (NORWEGIAN):
+    = [ "Siden er sperret" ];			#
+
+						# THE "info" TABLE IN "en" (ENGLISH):
+  %tab->{"info"}->{"caption"}->{"en"}		# THE "info" TABLE'S TITLE:
+    = [ "Additional information:" ];		#
+  %tab->{"info"}->{"clientaddr"}->{"en"}	# THE "clientaddr" MSG OPTION:
+    = [ "Client address", "=", "\$clientaddr" ];#
+  %tab->{"info"}->{"clientname"}->{"en"}	# THE "clientname" MSG OPTION:
+    = [ "Client name", "=", "\$clientname" ];	#
+  %tab->{"info"}->{"clientuser"}->{"en"}	# THE "clientuser" MSG OPTION:
+    = [ "Client user", "=", "\$clientuser" ];	#
+  %tab->{"info"}->{"clientgroup"}->{"en"}	# THE "clientgroup" MSG OPTION:
+    = [ "Client group", "=", "\$clientgroup" ];	#
+  %tab->{"info"}->{"url"}->{"en"}		# THE "url" MSG OPTION:
+    = [ "URL", "=", "\$url" ];			#
+  %tab->{"info"}->{"domainurl"}->{"en"}		# THE "domainurl" MSG OPTION:
+    = [ "URL", "=", "\$protocol://<U>\$address</U>\$port\$path" ];
+  %tab->{"info"}->{"targetgroup"}->{"en"}	# THE "targetgroup" MSG OPTION:
+    = [ "Target group", "=", "\$targetgroup" ];	#
+
+  %tab->{"info"}->{"caption"}->{"fr"}		# DITTO IN "fr" (FRENCH):
+    = [ "Information complémentaire:" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientaddr"}->{"fr"}	# --------- "" ---------
+    = [ "Adresse de la machine", "=", "\$clientaddr" ];
+  %tab->{"info"}->{"clientname"}->{"fr"}	# --------- "" ---------
+    = [ "Nom de la machine", "=", "\$clientname" ];
+  %tab->{"info"}->{"clientuser"}->{"fr"}	# --------- "" ---------
+    = [ "Utilisateur", "=", "\$clientuser" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientgroup"}->{"fr"}	# --------- "" ---------
+    = [ "Groupe", "=", "\$clientgroup" ];	# --------- "" ---------
+  %tab->{"info"}->{"url"}->{"fr"}		# --------- "" ---------
+    = [ "URL", "=", "\$url" ];			# --------- "" ---------
+  %tab->{"info"}->{"domainurl"}->{"fr"}		# --------- "" ---------
+    = [ "URL", "=", "\$protocol://<U>\$address</U>\$port\$path" ];
+  %tab->{"info"}->{"targetgroup"}->{"fr"}	# --------- "" ---------
+    = [ "Groupe cible", "=", "\$targetgroup" ];	# --------- "" ---------
+  
+  %tab->{"info"}->{"caption"}->{"de"}		# DITTO IN "de" (GERMAN):
+    = [ "Zusatzinformationen:" ];		# --------- "" ---------
+  %tab->{"info"}->{"clientaddr"}->{"de"}	# --------- "" ---------
+    = [ "IP-Adresse", "=", "\$clientaddr" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientname"}->{"de"}	# --------- "" ---------
+    = [ "Rechnername", "=", "\$clientname" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientuser"}->{"de"}	# --------- "" ---------
+    = [ "Benutzer", "=", "\$clientuser" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientgroup"}->{"de"}	# --------- "" ---------
+    = [ "Gruppe", "=", "\$clientgroup" ];	# --------- "" ---------
+  %tab->{"info"}->{"url"}->{"de"}		# --------- "" ---------
+    = [ "URL", "=", "\$url" ];			# --------- "" ---------
+  %tab->{"info"}->{"domainurl"}->{"de"}		# --------- "" ---------
+    = [ "URL", "=", "\$protocol://<U>\$address</U>\$port\$path" ];
+  %tab->{"info"}->{"targetgroup"}->{"de"}	# --------- "" ---------
+    = [ "Klassifizierung", "=", "\$targetgroup" ];
+  
+  %tab->{"info"}->{"caption"}->{"nl"}		# DITTO IN "nl" (DUTCH):
+    = [ "Extra informatie:" ];			# --------- "" ---------
+  %tab->{"info"}->{"clientaddr"}->{"nl"}	# --------- "" ---------
+    = [ "Computeradres", "=", "\$clientaddr" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientname"}->{"nl"}	# --------- "" ---------
+    = [ "Computernaam", "=", "\$clientname" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientuser"}->{"nl"}	# --------- "" ---------
+    = [ "Gebruiker", "=", "\$clientuser" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientgroup"}->{"nl"}	# --------- "" ---------
+    = [ "Groep", "=", "\$clientgroup" ];	# --------- "" ---------
+  %tab->{"info"}->{"url"}->{"nl"}		# --------- "" ---------
+    = [ "URL", "=", "\$url" ];			# --------- "" ---------
+  %tab->{"info"}->{"domainurl"}->{"nl"}		# --------- "" ---------
+    = [ "URL", "=", "\$protocol://<U>\$address</U>\$port\$path" ];
+  %tab->{"info"}->{"targetgroup"}->{"nl"}	# --------- "" ---------
+    = [ "Doelgroep", "=", "\$targetgroup" ];	# --------- "" ---------
+
+  %tab->{"info"}->{"caption"}->{"no"}		# DITTO IN "no" (NORWEGIAN):
+    = [ "Tilleggsinformasjon:" ];		# --------- "" ---------
+  %tab->{"info"}->{"clientaddr"}->{"no"}	# --------- "" ---------
+    = [ "Klientadresse", "=", "\$clientaddr" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientname"}->{"no"}	# --------- "" ---------
+    = [ "Klientnavn", "=", "\$clientname" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientuser"}->{"no"}	# --------- "" ---------
+    = [ "Brukerident", "=", "\$clientuser" ];	# --------- "" ---------
+  %tab->{"info"}->{"clientgroup"}->{"no"}	# --------- "" ---------
+    = [ "Klientgruppe", "=", "\$clientgroup" ];	# --------- "" ---------
+  %tab->{"info"}->{"url"}->{"no"}		# --------- "" ---------
+    = [ "URL", "=", "\$url" ];			# --------- "" ---------
+  %tab->{"info"}->{"domainurl"}->{"no"}		# --------- "" ---------
+    = [ "URL", "=", "\$protocol://<U>\$address</U>\$port\$path" ];
+  %tab->{"info"}->{"targetgroup"}->{"no"}	# --------- "" ---------
+    = [ "MÃ¥lkategori", "=", "\$targetgroup" ];	# --------- "" ---------
+
+  %msg->{"proxymaster"}->{"en"}
+    = [ "If you think this is an error, send <U>this page</U> to",
+	"<A HREF=\\\"mailto:\$proxymaster\\\">\$proxymaster</A>" ];
+  %msg->{"proxymaster"}->{"fr"}
+    = [ "Si vous pensez qu\'il s\'agit d\'une erreur, envoyez <U>cette page</U> à",
+	"<A HREF=\\\"mailto:\$proxymaster\\\">\$proxymaster</A>" ];
+  %msg->{"proxymaster"}->{"de"}
+    = [ "Falls ein Fehler vorliegt schicken Sie die Adresse <U>dieser Seite</U> bitte an",
+	"<A HREF=\\\"mailto:\$proxymaster\\\">\$proxymaster</A>" ];
+  %msg->{"proxymaster"}->{"nl"}
+    = [ "Als u denkt dat dit onjuist is, zend <U>deze bladzijde</U> aan",
+	"<A HREF=\\\"mailto:\$proxymaster\\\">\$proxymaster</A>" ];
+  %msg->{"proxymaster"}->{"no"}
+    = [ "Om du mener dette er feil, så send <U>denne siden</U> til",
+	"<A HREF=\\\"mailto:\$proxymaster\\\">\$proxymaster</A>" ];
+
+  %msg->{"refresh"}->{"en"}
+    = [ "You may need to use the browser's \&lt\;Reload\&gt\; button<BR>",
+	"or even \&lt\;Keyboard Shift\&gt\;+\&lt\;Browser Reload\&gt\;<BR>",
+	"to get rid of this page after an access rule change" ];
+  %msg->{"refresh"}->{"fr"}
+    = [ "Vous avez peut-être besoin d\'utiliser le bouton \&lt\;Recharger\&gt\;<BR>",
+	"ou même \&lt\;Shift\&gt\;+\&lt\;Recharger\&gt\;<BR>",
+	"après un changement de règles" ];
+  %msg->{"refresh"}->{"de"}
+    = [ "Nach einer &Auml;nderung der Zugriffsrechte m&uuml;ssen Sie evtl. die Seite<BR>",
+	"mit dem \&lt\;Aktualisieren\&gt\; bzw. \&lt\;Neu laden\&gt\; Button<BR>",
+	"des Browsers oder sogar mit \&lt\;Strg\&gt\;+\&lt\;F5\&gt\;<BR>",
+	"erneut laden lassen." ];
+  %msg->{"refresh"}->{"nl"}
+    = [ "U moet waarschijnlijk de browser's \&lt\;Reload\&gt\; knop gebruiken<BR>",
+	"of zelfs \&lt\;Shift\&gt\;+\&lt\;Reload\&gt\;<BR>",
+	"na een verandering in de squidGuard regels" ];
+  %msg->{"refresh"}->{"no"}
+    = [ "Du kan trenge å bruke browserens \&lt\;Reload\&gt\; knapp<BR>",
+	"eller til og med",
+	"\&lt\;Tastatur Shift\&gt\;+\&lt\;Browser Reload\&gt\;<BR>",
+	"for å bli kvitt denne siden etter endring i adgangskontrollen" ];
+  
+  %msg->{"timerefresh"}->{"en"}
+    = [ "You may need to use the browser's \&lt\;Reload\&gt\; button<BR>",
+	"or even \&lt\;Keyboard Shift\&gt\;+\&lt\;Browser Reload\&gt\;<BR>",
+	"to get rid of this page after transition from<BR>",
+	"a time zone with access restrictions" ];
+  %msg->{"timerefresh"}->{"fr"}
+    = [ "Vous avez peut-être besoin d\'utiliser le bouton \&lt\;Recharger\&gt\;<BR>",
+	"ou même \&lt\;Shift\&gt\;+\&lt\;Recharger\&gt\;<BR>",
+	"après un changement de zone temporelle d\'interdiction" ];
+  %msg->{"timerefresh"}->{"de"}
+    = [ "Nach dem Wechsel in eine erlaubte Zeitperiode m&uuml;ssen Sie evtl. die Seite<BR>",
+	"mit dem \&lt\;Aktualisieren\&gt\; bzw. \&lt\;Neu laden\&gt\; Button des Browsers<BR>",
+	"oder sogar mit \&lt\;Strg\&gt\;+\&lt\;F5\&gt\; erneut laden lassen." ];
+  %msg->{"timerefresh"}->{"nl"}
+    = [ "U moet waarschijnlijk de browser's \&lt\;Reload\&gt\; knop gebruiken<BR>",
+	"of zelfs \&lt\;Shift\&gt\;+\&lt\;Reload\&gt\;<BR>",
+	"na beeindiging van een periode met beperkingen" ];
+  %msg->{"timerefresh"}->{"no"}
+    = [ "Du kan trenge å bruke browserens \&lt\;Reload\&gt\; knapp<BR>",
+	"eller til og med",
+	"\&lt\;Tastatur Shift\&gt\;+\&lt\;Browser Reload\&gt\;<BR>",
+	"for å bli kvitt denne siden ved overgang fra",
+	"et tidsrom med sperring" ];
+  
+  %msg->{"unknown"}->{"en"}
+    = [ "Access denied because<BR>",
+	"your clienten is<BR>",
+	"unknown to \$proxy"];
+  %msg->{"unknown"}->{"fr"}
+    = [ "Accès interdit car <BR>",
+	"votre client est <BR>",
+	"inconnu de \$proxy"];
+  %msg->{"unknown"}->{"de"}
+    = [ "Zugriff verweigert,<BR>",
+	"da Ihr Rechner bei<BR>",
+	"\$proxy unbekannt ist."];
+  %msg->{"unknown"}->{"nl"}
+    = [ "Toegand geweigerd omdat <BR>",
+	"uw client niet <BR>",
+	"bekend is bij \$proxy"];
+  %msg->{"unknown"}->{"no"}
+    = [ "Adgang nektes fordi<BR>",
+	"denne klienten ikke er<BR>",
+	"definert på \$proxy" ];
+  
+  %msg->{"in-addr"}->{"en"}
+    = [ "Surfing on plain <U>IP-addresses</U><BR>",
+	"is denied from this client<BR>",
+	"for security reasons" ];
+  %msg->{"in-addr"}->{"fr"}
+    = [ "Naviguer sur des <U>adresses IP</U><BR>",
+	"est refusé à cette machine<BR>",
+	"pour des raisons de sécurité" ];
+  %msg->{"in-addr"}->{"de"}
+    = [ "Die direkte Verwendung von <U>IP-Adressen</U><BR>",
+	"ist von diesem Rechner aus Sicherheitsg&uuml;nden<BR>",
+	"nicht erlaubt." ];
+  %msg->{"in-addr"}->{"nl"}
+    = [ "Surfen naar harde <U>IP adressen</U><BR>",
+	"wordt op deze client geweigerd<BR>",
+	"om veiligheidsredenen" ];
+  %msg->{"in-addr"}->{"no"}
+    = [ "Av sikkerhetsgrunner er<BR>",
+	"surfing på <U>IP-adresser</U><BR>",
+	"ikke tillatt fra denne klienten" ];
+  
+  %msg->{"alternatives"}->{"en"}
+    = [ "The following possible alternatives were found:" ];
+  %msg->{"alternatives"}->{"fr"}
+    = [ "Les alternatives suivantes sont possibles:" ];
+  %msg->{"alternatives"}->{"de"}
+    = [ "Die folgenden Alternativen wurden gefunden:" ];
+  %msg->{"alternatives"}->{"nl"}
+    = [ "De volgende alternatieven zijn mogelijk:" ];
+  %msg->{"alternatives"}->{"no"}
+    = [ "Følgende mulige alternativer ble funnet:" ];
+
+  %msg->{"noalternatives"}->{"en"}
+    = [ "No alternative domainname were found<BR>",
+	"for the server <U>\$address</U>" ];
+  %msg->{"noalternatives"}->{"fr"}
+    = [ "Aucun nom de domaine alternatif n\'a été<BR>",
+	"trouvé pour le serveur <U>\$address</U>" ];
+  %msg->{"noalternatives"}->{"de"}
+    = [ "Es konnte kein alternativer Domainname f&uuml;r den<BR>",
+	"Server <U>\$address</U> gefunden werden" ];
+  %msg->{"noalternatives"}->{"nl"}
+    = [ "Geen alternatieve domeinnaam gevonden<BR>",
+	"voor de server <U>\$address</U>" ];
+  %msg->{"noalternatives"}->{"no"}
+    = [ "Finner ingen alternative domenenavn<BR>",
+	" for serveren <U>\$address</U>" ];
+
+  %msg->{"referermaster"}->{"en"}
+    = [ "Send complaints to the",
+	"<A HREF=\\\"mailto:webmaster\@\$refererhost\\\">webmaster</A><BR>",
+	"of <A HREF=\\\"\$referer\\\">\$referer</A><BR>",
+	"and ask him to correct the link(s) that points to \$url<BR>",
+	"in <A HREF=\\\"\$referer\\\">\$referer</A>,<BR>",
+	"with the supposedly correct alternative above" ];
+  %msg->{"referermaster"}->{"fr"}
+    = [ "Envoyez les demandes au",
+	"<A HREF=\\\"mailto:webmaster\@\$refererhost\\\">webmaster</A><BR>",
+	"de <A HREF=\\\"\$referer\\\">\$referer</A><BR>",
+	"et demandez lui corriger les liens qui pointent sur \$url<BR>",
+	"dans <A HREF=\\\"\$referer\\\">\$referer</A>,<BR>",
+	"avec l\'alternative (supposée correcte) suivante" ];
+  %msg->{"referermaster"}->{"de"}
+    = [ "Benachrichtigen Sie den",
+	"<A HREF=\\\"mailto:webmaster\@\$refererhost\\\">Webmaster</A><BR>",
+	"von <A HREF=\\\"\$referer\\\">\$referer</A><BR>",
+	"und bitten Sie ihn die auf \$url verweisenden Links<BR>",
+	"in <A HREF=\\\"\$referer\\\">\$referer</A>,<BR>",
+	"auf die vermutlich korrekte oben angezeigte Alternative zu setzen." ];
+  %msg->{"referermaster"}->{"nl"}
+    = [ "Zend klachten aan",
+	"<A HREF=\\\"mailto:webmaster\@\$refererhost\\\">webmaster</A><BR>",
+	"de <A HREF=\\\"\$referer\\\">\$referer</A><BR>",
+	"en vraag deze de link te verbeteren die verwijst naar \$url<BR>",
+	"op <A HREF=\\\"\$referer\\\">\$referer</A>,<BR>",
+	"met het waarschijnlijk correcte alternatief" ];
+  %msg->{"referermaster"}->{"no"}
+    = [ "Send evt. klager til",
+	"<A HREF=\\\"mailto:webmaster\@\$refererhost\\\">webmaster</A><BR>",
+	"for <A HREF=\\\"\$referer\\\">\$referer</A><BR>",
+	"og be ham rette linken(e) som peker til \$url<BR>",
+	"i <A HREF=\\\"\$referer\\\">\$referer</A>,<BR>",
+	"med det antatt korrekte alternativet over" ];
+  
+  %msg->{"webmaster"}->{"en"}
+    = [ "Send complaints to the <U>webmaster</U>",
+	"for <U>\$protocol://\$address</U><BR>",
+	"and request for a <EM>domainname</EM> to the server" ];
+  %msg->{"webmaster"}->{"fr"}
+    = [ "Envoyez les demandes au <U>webmaster</U>",
+	"pour <U>\$protocol://\$address</U><BR>",
+	"et demandez un <EM>nom de domaine</EM> pour le serveur" ];
+  %msg->{"webmaster"}->{"de"}
+    = [ "Fragen Sie den <U>Webmaster</U>",
+	"von <U>\$protocol://\$address</U><BR>",
+	"nach einem <EM>Domainnamen</EM> f&uuml;r den Server" ];
+  %msg->{"webmaster"}->{"nl"}
+    = [ "Stuur klachten aan de <U>webmaster</U>",
+	"voor <U>\$protocol://\$address</U><BR>",
+	"en vraag om een <EM>domeinnaam</EM> voor de server" ];
+  %msg->{"webmaster"}->{"no"}
+    = [ "Send evt. klager til <U>webmaster</U>",
+	"for <U>\$protocol://\$address</U><BR>",
+	"og anmod om å få knyttet serveren til et <EM>domenenavn</EM>" ];
+  
+  %msg->{"deflang"}->{"en"}
+    = [ "This message is in English because \\\"en\\\"",
+	"is the first supported language<BR>",
+	"of those your browser is set up",
+	"to report as prefered.<BR>",
+	"Supported languages are:",
+	@supported ];
+  %msg->{"deflang"}->{"fr"}
+    = [ "Ce message est en français car \\\"fr\\\"",
+	"est la première langue supportée<BR>",
+	"parmi celles que votre navigateur signale comme",
+	"préférée.<BR>",
+	"Les langues supportées sont:",
+	@supported ];
+  %msg->{"deflang"}->{"de"}
+    = [ "Dieser Text erscheint in Deutsch, \\\"de\\\"",
+	"da Ihr Browser dies als bevorzugte<BR>",
+	"(erste) Sprache einstellt hat.<BR>",
+	"Unterst&uuml;tzte Sprachen:",
+	@supported ];
+  %msg->{"deflang"}->{"nl"}
+    = [ "Deze melding is in het Nederlands want \\\"nl\\\"",
+	"is de eerst ondersteunde taal<BR>",
+	"van de talen die uw browser ondersteunt.",
+	"<BR>",
+	"De ondersteunde talen zijn:",
+	@supported ];
+  %msg->{"deflang"}->{"no"}
+    = [ "Denne meldingen er på norsk fordi \\\"no\\\"",
+	"er det første støttede sproget<BR>",
+	"av de din nettleser er satt opp til",
+	"Ã¥ rapportere som foretrukket.<BR>",
+	"Støttede sprog er:",
+	@supported ];
+  
+  %logo->{"default"}->{"url"}
+    = "http://www.squidguard.org/images/squidGuard.gif";
+  %logo->{"default"}->{"href"}
+    = "http://www.squidguard.org/";
+
+  %logo->{"default"}->{"url"}
+    = "http://info.your-domain/images/eto.small.gif";
+  %logo->{"default"}->{"href"}
+    = "http://www.your-domain/";
+}
+#
+# END OF CONFIGURABLE OPTIONS
+#
+
+#
+# SUBROUTINES:
+#
+
+#
+# RETURN THE FIRST SUPPORTED LANGUAGE OF THE BROWSERS PREFERRED OR THE
+# DEFAULT:
+#
+sub getpreferedlang(@) {
+  my @supported = @_;
+  my @languages = split(/\s*,\s*/,$ENV{"HTTP_ACCEPT_LANGUAGE"}) if(defined($ENV{"HTTP_ACCEPT_LANGUAGE"}));
+  my $lang;
+  my $supp;
+  push(@languages,$supported[0]);
+  for $lang (@languages) {
+    $lang =~ s/\s.*//;
+    for $supp (@supported) {
+      $supp =~ s/\s.*//;
+      return($lang) if ($lang eq $supp);
+    }
+  }
+}
+
+#
+# PARSE THE QUERY_STRING FOR KNOWN KEYS:
+#
+sub parsequery($) {
+  my $query       = shift;
+  my $clientaddr  = %word->{"unknown"}->{$lang};
+  my $clientname  = %word->{"unknown"}->{$lang};
+  my $clientuser  = %word->{"unknown"}->{$lang};
+  my $clientgroup = %word->{"unknown"}->{$lang};
+  my $targetgroup = %word->{"unknown"}->{$lang};
+  my $url         = %word->{"unknown"}->{$lang};
+  if (defined($query)) {
+    while ($query =~ /^\&?([^\&=]+)=\"([^\"]*)\"(.*)/ || $query =~ /^\&?([^\&=]+)=([^\&=]*)(.*)/) {
+      my $key = $1;
+      my $value = $2;
+      $value = %word->{"unknown"}->{$lang} unless(defined($value) && $value && $value ne "unknown");
+      $query = $3;
+      if ($key =~ /^(clientaddr|clientname|clientuser|clientgroup|targetgroup|url)$/) {
+	eval "\$$key = \$value";
+      }
+      if ($query =~ /^url=(.*)/) {
+	$url = $1;
+	last;
+      }
+    }
+  }
+  return($clientaddr,$clientname,$clientuser,$clientgroup,$targetgroup,$url);
+}
+
+#
+# PRINT HTTP STATUS HEARER:
+#
+sub status($) {
+  my $status = shift;
+  print "Status: $status\n";
+}
+
+#
+# PRINT HTTP LOCATION HEARER:
+#
+sub redirect($) {
+  my $location = shift;
+  print "Location: $location\n";
+}
+
+#
+# PRINT HTTP CONTENT-TYPE HEARER:
+#
+sub content($) {
+  my $contenttype = shift;
+  print "Content-Type: $contenttype\n";
+}
+
+#
+# PRINT HTTP LAST-MODIFIED AND EXPIRES HEARER:
+#
+sub expires($) {
+  my $ttl = shift;
+  my $time = time;
+  my @day = ("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
+  my @month = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
+  my ($sec,$min,$hour,$mday,$mon,$year,$wday) = gmtime($time);
+  printf "Last-Modified: %s, %d %s %d", $day[$wday],$mday,$month[$mon],$year+1900;
+  printf " %02d:%02d:%02d GMT\n", $hour,$min,$sec;
+  ($sec,$min,$hour,$mday,$mon,$year,$wday) = gmtime($time+$ttl);
+  printf "Expires: %s, %d %s %d", $day[$wday],$mday,$month[$mon],$year+1900;
+  printf " %02d:%02d:%02d GMT\n", $hour,$min,$sec;
+}
+
+#
+# PRINT THE INITIAL HTML TAGS FOR HTML, HEAD, TITLE BODY AND H1:
+#
+sub title($) {
+  my $msgid = shift;
+  my $defl  = $supported[0];
+  my $text;
+  $defl =~ s/\s.*//;
+  print "\n<HTML>\n";
+  print " <HEAD>\n  <TITLE>\n";
+  if (defined($msg{$msgid}{$lang})) {
+    for $text (@{$title{$msgid}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "       $text\n";
+    }
+  } else {
+    for $text (@{$title{"default"}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "       $text\n";
+    }
+  }
+  print "  </TITLE>\n </HEAD>\n";
+  print " <BODY BGCOLOR=\"#FFFFFF\">\n";
+  print "  <TABLE BORDER=0 ALIGN=CENTER WIDTH=100%>\n";
+  print "   <TR>\n";
+  print "    <TD ALIGN=LEFT VALIGN=BOTTOM>\n";
+  print "     <FONT SIZE=7>\n";
+  print "      <B>\n       <U>\n";
+  if (defined($msg{$msgid}{$lang})) {
+    for $text (@{$title{$msgid}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "       $text\n";
+    }
+  } else {
+    for $text (@{$title{"default"}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "       $text\n";
+    }
+  }
+  print "       </U>\n      </B>\n";
+  print "     </FONT>\n";
+  print "    </TD>\n";
+  print "    <TD ROWSPAN=2 ALIGN=RIGHT>\n";
+  if (defined($logo{$msgid}{"url"})) {
+    print "     <A HREF=\"$logo{$msgid}{\"href\"}\"><IMG\n";
+  } else {
+    print "     <A HREF=\"$logo{\"default\"}{\"href\"}\"><IMG\n";
+  }
+  if (defined($logo{$msgid}{"url"})) {
+    print "     SRC=\"$logo{$msgid}{\"url\"}\" BORDER=0 ALIGN=TOP></A>\n";
+  } else {
+    print "     SRC=\"$logo{\"default\"}{\"url\"}\" BORDER=0 ALIGN=TOP></A>\n";
+  }
+  print "    </TD>\n";
+  print "   </TR>\n";
+  if ($lang eq $defl && defined($msg{"deflang"}{$lang})) {
+    print "   <TR><!-- \$msg{\"deflang\"}{$lang} -->\n";
+    print "    <TH ALIGN=LEFT VALIGN=TOP>\n";
+    print "     <FONT SIZE=-1>\n";
+    print "      <B>\n";
+    for $text (@{$msg{"deflang"}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "       $text\n";
+    }
+    print "      </B>\n";
+    print "     </FONT>\n";
+    print "    </TH>\n";
+    print "   </TR>\n";
+  }
+  print "  </TABLE>\n";
+}
+
+#
+# PRINT THE ENDING HTML TAGS FOR BODY AND HTML:
+#
+sub terminator() {
+  print " </BODY>\n</HTML>\n";
+}
+
+#
+# PRINT A MESSAGE WITH THE SPECIFIED TYPE (P,H1,H2,..):
+#
+sub msg($$) {
+  my ($type,$msgid) = @_;
+  my $text;
+  print "  <$type ALIGN=CENTER><!-- \$msg{$msgid}{$lang} -->\n";
+  if (defined($msg{$msgid}{$lang})) {
+    for $text (@{$msg{$msgid}{$lang}}) {
+      eval "\$text = \"$text\"";
+      print "   $text\n";
+    }
+  } else {
+    print "   <EM><B>ERROR: missing message \"$msgid\"</B></EM>\n";
+  }
+  print "  </$type>\n";
+}
+
+#
+# PRINT A TABLE WITH THE SPECIFIED FORMAT:
+#
+sub table($$@) {
+  my @format = split(/,/,shift);
+  my $table  = shift;
+  my $cols   = @format;
+  my @msgids = @_;
+  my $msgid;
+  my $text;
+  my %type;
+  %type->{"L"} = [ "<TH ALIGN=LEFT>", "</TH>" ];
+  %type->{"C"} = [ "<TH ALIGN=CENTER>", "</TH>" ];
+  %type->{"R"} = [ "<TH ALIGN=RIGHT>", "</TH>" ];
+  %type->{"l"} = [ "<TD ALIGN=LEFT>", "</TD>" ];
+  %type->{"c"} = [ "<TD ALIGN=CENTER>", "</TD>" ];
+  %type->{"r"} = [ "<TD ALIGN=RIGHT>", "</TD>" ];
+  print "  <TABLE BORDER=0 ALIGN=CENTER><!-- table(\"$table\") -->\n";
+  if (defined($tab{$table})) {
+    if (defined($tab{$table}{"caption"}{$lang})) {
+      #print "   <CAPTION ALIGN=LEFT>\n";
+      print "   <TH ALIGN=LEFT>\n";
+      print "    <FONT SIZE=+1>\n";
+      for $text (@{$tab{$table}{"caption"}{$lang}}) {
+	eval "\$text = \"$text\"";
+	print "    $text\n";
+      }
+      print "    </FONT>\n";
+      #print "   </CAPTION>\n";
+      print "   </TH>\n";
+    }
+    for $msgid (@msgids) {
+      print "   <TR>\n";
+      if (defined($tab{$table}{$msgid}{$lang})) {
+	my $i = 0;
+	for $text (@{$tab{$table}{$msgid}{$lang}}) {
+	  eval "\$text = \"$text\"";
+	  print "    $type{$format[$i]}[0]\n";
+	  print "     $text\n";
+	  print "    $type{$format[$i]}[1]\n";
+	  $i++;
+	}
+      } else {
+	print "   $type{$format[0]}[0]\n";
+	print "    <EM><B>ERROR: missing table message \"$msgid\"</B></EM>\n";
+	print "   $type{$format[0]}[1]\n";
+      }
+      print "   </TR>\n";
+    }
+  } else {
+    print "   <TR>\n";
+    print "    <TH ALIGN=CENTER>\n";
+    print "     <EM><B>ERROR: missing message \"$msgid\"</B></EM>\n";
+    print "    </TH>\n";
+    print "   </TR>\n";
+  }
+  print "  </TABLE>\n";
+}
+
+#
+# PRINT A LINK HREF:
+#
+sub href($) {
+  my $href = shift;
+  print "<A HREF=\"$href\">$href</A>";
+}
+
+#
+# REVERSE LOOKUP AND RETURN NAMES:
+#
+sub gethostnames($) {
+  my $address = shift;
+  my ($name,$aliases) = gethostbyaddr(inet_aton($address), AF_INET);
+  my @names;
+  if (defined($name)) {
+    push(@names,$name);
+    if (defined($aliases) && $aliases) {
+      for(split(/\s+/,$aliases)) {
+	next unless(/\./);
+	push(@names,$_);
+      }
+    }
+  }
+  return(@names);
+}
+
+#
+# SPLIT AN URL INTO PROTOCOL, ADDRESS, PORT AND PATH:
+#
+sub spliturl($) {
+  my $url      = shift;
+  my $protocol = "";
+  my $address  = "";
+  my $port     = "";
+  my $path     = "";
+  $url =~ /^([^\/:]+):\/\/([^\/:]+)(:\d*)?(.*)/;
+  $protocol = $1 if(defined($1));
+  $address  = $2 if(defined($2));
+  $port     = $3 if(defined($3));
+  $path     = $4 if(defined($4));
+  return($protocol,$address,$port,$path);
+}
+
+#
+# SHOW THE CONFIGURED MESSAGE AS HTML:
+#
+sub showhtml($) {
+  my $msgid = shift;
+  status("403 Forbidden");
+  content("text/html");
+  expires(0);
+  title($msgid);
+  $msgid = "default" unless(defined($msgconf{$msgid}));
+  if (defined($msgconf{$msgid})) {
+    print "  <!-- showhtml(\"$msgid\") -->\n";
+    for (@{$msgconf{$msgid}}) {
+      my @config = split(/:/);
+      my $type = shift(@config);
+      if ($type eq "msg") {
+	msg($config[0],$config[1]);
+      } elsif ($type eq "tab") {
+	table(shift(@config),shift(@config),@config);
+      }
+    }
+  } else {
+    print "  <P><EM><B>ERROR: missing msgconf for \"$msgid\"</B></EM></P>\n";
+  }
+  terminator();
+}
+
+#
+# SEND OUT AN IMAGE:
+#
+sub showimage($$$) {
+  my ($type,$file,$redirect) = @_;
+  content("image/$type");
+  expires(300);
+  redirect($redirect) if($redirect);
+  print "\n";
+  open(GIF, "$ENV{\"DOCUMENT_ROOT\"}$file");
+  print <GIF>;
+  close(GIF)
+}
+
+#
+# SHOW THE INADDR ALERNATIVES WITH OPTIONAL ATOREDIRECT:
+#
+sub showinaddr($$$$$) {
+  my ($targetgroup,$protocol,$address,$port,$path) = @_;
+  my $msgid = $targetgroup;
+  my @names = gethostnames($address);
+  if($autoinaddr == 2 && @names || $autoinaddr && @names==1) {
+    status("301 Moved Permanently");
+    redirect("$protocol://$names[0]$port$path");
+  } elsif (@names>1) {
+    status("300 Multiple Choices");
+  } elsif (@names) {
+    status("301 Moved Permanently");
+  } else {
+    status("404 Not Found");
+  }
+  if ($path =~ /\.(gif|jpg|jpeg|mp3|mpg|mpeg|avi|mov)$/i) {
+    showimage("gif",$image,$redirect);
+  } elsif (@names) {
+    content("text/html");
+    expires(0);
+    title($msgid);
+    $msgid = "in-addr" unless(defined($msgconf{$msgid}));
+    if (defined($msgconf{$msgid})) {
+      print "  <!-- showinaddr(\"$msgid\") -->\n";
+      for (@{$msgconf{$msgid}}) {
+	my @config = split(/:/);
+	my $type = shift(@config);
+	if ($type eq "msg") {
+	  msg($config[0],$config[1]);
+	} elsif ($type eq "tab") {
+	  table(shift(@config),shift(@config),@config);
+	} elsif ($type eq "alternatives") {
+	  print "  <TABLE BORDER=0 ALIGN=CENTER>\n";
+	  for (@names) {
+	    print "   <TR>\n    <TH ALIGN=LEFT>\n     <FONT SIZE=+1>";
+	    href("$protocol://$_$port$path");
+	    print "\n     </FONT>\n    </TH>\n   </TR>\n";
+	  }
+	  print "  </TABLE>\n\n";
+	  if (defined($ENV{"HTTP_REFERER"}) && $ENV{"HTTP_REFERER"} =~ /:\/\/([^\/:]+)/) {
+	    $refererhost = $1;
+	    $referer = $ENV{"HTTP_REFERER"};
+	    msg("H4","referermaster");
+	  }
+	}
+      }
+    } else {
+      print "  <P><EM><B>ERROR: missing msgconf for \"$msgid\"</B></EM></P>\n";
+    }
+    terminator();
+  } else {
+    showhtml("noalternatives");
+  }
+}
+
+#
+# NOW JUST DO IT:
+#
+msginit();
+if ($targetgroup eq "in-addr") {
+  showinaddr($targetgroup,$protocol,$address,$port,$path);
+} elsif ($url =~ /\.(gif|jpg|jpeg|mp3|mpg|mpeg|avi|mov)$/i) {
+  status("403 Forbidden");
+  showimage("gif",$image,$redirect);
+} else {
+  showhtml($clientgroup);
+}
+exit 0;
--- squidguard-1.2.0.orig/samples/squidGuard-simple.cgi
+++ squidguard-1.2.0/samples/squidGuard-simple.cgi
@@ -0,0 +1,101 @@
+#! /usr/bin/perl
+#
+# Sample CGI to explain to the user that the URL is blocked and by which rule set
+#
+# By PÃ¥l Baltzersen 1998
+#
+
+$QUERY_STRING = $ENV{'QUERY_STRING'};
+$DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'};
+
+$clientaddr = "";
+$clientname = "";
+$clientident = "";
+$srcclass = "";
+$targetclass = "";
+$url = "";
+$time = time;
+@day = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
+@month = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
+
+while ($QUERY_STRING =~ /^\&?([^&=]+)=([^&=]*)(.*)/) {
+  $key = $1;
+  $value = $2;
+  $QUERY_STRING = $3;
+  if ($key =~ /^(clientaddr|clientname|clientident|srcclass|targetclass|url)$/) {
+    eval "\$$key = \$value";
+  }
+  if ($QUERY_STRING =~ /^url=(.*)/) {
+    $url = $1;
+    $QUERY_STRING = "";
+  }
+}
+
+if ($url =~ /\.(gif|jpg|jpeg|mpg|mpeg|avi|mov)$/i) {
+  print "Content-Type: image/gif\n";
+  ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
+  printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
+  open(GIF, "$DOCUMENT_ROOT/images/blocked.gif");
+  while (<GIF>) {
+    print;
+  }
+  close(GIF)
+} else {
+  print "Content-type: text/html\n";
+  ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
+  printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
+  print "<HTML>\n\n  <HEAD>\n    <TITLE>302 Access denied</TITLE>\n  </HEAD>\n\n";
+  print "  <BODY BGCOLOR=\"#FFFFFF\">\n";
+  if ($srcclass eq "unknown") {
+    print "    <P ALIGN=RIGHT>\n";
+    print "      <A HREF=\"http://www.squidguard.org/\"><IMG SRC=\"/images/your-logo.gif\"\n";
+    print "         BORDER=0></A>\n      </P>\n\n";
+    print "    <H1 ALIGN=CENTER>Access denied because<BR>this client is not<BR>defined on the proxy</H1>\n\n";
+    print "    <TABLE BORDER=0 ALIGN=CENTER>\n";
+    print "      <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
+    print "      <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
+    print "      <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
+    print "      <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
+    print "      <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
+    print "    </TABLE>\n\n";
+    print "    <P ALIGN=CENTER>If this is wrong, contact<BR>\n";
+    print "      <A HREF=mailto:proxymaster\@foo.bar>proxymaster\@foo.bar</A>\n";
+    print "    </P>\n\n";
+  } elsif ($targetclass eq "in-addr") {
+    print "    <P ALIGN=RIGHT>\n";
+    print "      <A HREF=\"http://www.squidguard.org/\"><IMG SRC=\"/images/your-logo.gif\"\n";
+    print "         BORDER=0></A>\n      </P>\n\n";
+    print "    <H1 ALIGN=CENTER>IP address URLs<BR>are not allowed<BR>from this client</H1>\n\n";
+    print "    <TABLE BORDER=0 ALIGN=CENTER>\n";
+    print "      <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
+    print "      <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
+    print "      <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
+    print "      <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
+    print "      <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
+    print "      <TR><TH ALIGN=RIGHT>URL<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$url\n";
+    print "      <TR><TH ALIGN=RIGHT>Target class<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$targetclass\n";
+    print "    </TABLE>\n\n";
+    print "    <P ALIGN=CENTER>Contact the <B>webmaster</B> of <B>$url</B><BR>\n";
+    print "      and ask him to give the webserver a proper <U>domain name</U>\n";
+    print "    </P>\n\n";
+  } else {
+    print "    <P ALIGN=RIGHT>\n";
+    print "      <A HREF=\"http://www.squidguard.org/\"><IMG SRC=\"/images/your-logo.gif\"\n";
+    print "         BORDER=0></A>\n      </P>\n\n";
+    print "    <H1 ALIGN=CENTER>Access denied</H1>\n\n";
+    print "    <TABLE BORDER=0 ALIGN=CENTER>\n";
+    print "      <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
+    print "      <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
+    print "      <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
+    print "      <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
+    print "      <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
+    print "      <TR><TH ALIGN=RIGHT>URL<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$url\n";
+    print "      <TR><TH ALIGN=RIGHT>Target class<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$targetclass\n";
+    print "    </TABLE>\n\n";
+    print "    <P ALIGN=CENTER>If this is wrong, contact<BR>\n";
+    print "      <A HREF=mailto:proxymaster\@foo.bar>proxymaster\@foo.bar</A>\n";
+    print "    </P>\n\n";
+  }
+  print "  </BODY>\n\n</HTML>\n";
+}
+exit 0;
--- squidguard-1.2.0.orig/src/config.h.in
+++ squidguard-1.2.0/src/config.h.in
@@ -18,3 +18,6 @@
 
 /* Define if you have dbversion greater than 3.2  */
 #undef DB_VERSION_GT2
+
+/* Define if you have dbversion greater than 4.0  */
+#define DB_VERSION_GT4 1
--- squidguard-1.2.0.orig/src/lex.yy.c.flex
+++ squidguard-1.2.0/src/lex.yy.c.flex
@@ -282,52 +282,48 @@
 	*yy_cp = '\0'; \
 	yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 57
-#define YY_END_OF_BUFFER 58
-static yyconst short int yy_accept[386] =
+#define YY_NUM_RULES 49
+#define YY_END_OF_BUFFER 50
+static yyconst short int yy_accept[346] =
     {   0,
-        0,    0,    0,    0,   58,   56,   54,   55,    1,   36,
-       52,   47,   52,   52,   52,   52,   52,   52,   52,   52,
-       52,   52,   52,   52,   52,   52,   52,   52,   52,    2,
-        3,   52,   52,   52,   52,   52,   52,   51,   49,   50,
-       48,   54,    1,    1,    0,   52,   42,    0,   47,   52,
-       52,   52,   52,   52,   52,   52,   52,   40,   52,   52,
-       52,   52,   52,   52,    0,   52,   52,   52,   52,   52,
-       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
-       52,   52,   49,   48,    0,    0,   52,   42,    0,   47,
-        0,   52,   52,   52,   52,   52,   52,   52,   36,   52,
-
-       52,   34,   52,   36,   52,   52,   52,   52,    0,    0,
-       36,   52,   36,   36,   36,   52,   52,   36,   52,   52,
-       11,   52,   52,   34,    8,   52,    6,   52,    0,   52,
-       42,    0,    0,   47,    0,   52,   52,   52,   32,   52,
-       39,   52,    0,    0,   52,   52,   52,   52,   52,   52,
-       52,   22,   52,   52,    0,    0,   52,   52,   52,   52,
-       52,   52,   18,   52,   52,   52,   52,    4,   52,   52,
-       52,   10,   46,    0,   52,   52,   42,    0,    0,    0,
-       47,   44,   52,   52,   27,   52,   52,    0,    0,    0,
-        0,    0,    0,    0,   52,   52,   52,   52,   52,   52,
-
-       52,   52,   52,    0,    0,    0,    0,   52,   52,   52,
-       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
-       52,   52,   52,   52,   52,    0,    0,    0,   52,   52,
-       21,   52,    0,    0,    0,    0,    0,    0,    0,   36,
-       26,   17,   52,   52,   36,   52,   52,   52,   53,   53,
-       53,   53,   52,   52,   36,   52,   52,   52,   52,   52,
-       52,   28,   37,   12,   52,   13,   52,    7,   52,   52,
-       41,    0,    0,   52,   52,   52,   52,   36,   36,   36,
-       36,   36,   36,   36,   36,   35,   52,   36,   38,   52,
-       23,   53,   53,   53,   52,   52,   36,   52,   36,   15,
-
-       52,   52,   52,   52,    9,   43,   52,   41,    0,   52,
-       30,   52,   52,   52,    0,    0,    0,    0,    0,    0,
-        0,   25,   24,   36,   31,   36,   36,   19,   52,   52,
-       52,   43,   41,    0,   33,   52,   52,   52,    0,    0,
-        0,    0,    0,    0,    0,   36,   36,   20,   36,   52,
-       43,   45,   29,   14,   52,   36,   36,    0,   36,    0,
-        0,    0,   36,   52,   52,   36,   36,    0,   36,    0,
-       36,    0,    5,   52,   36,   36,   36,    0,   52,   36,
-       36,   36,   16,   36,    0
+        0,    0,    0,    0,   50,   48,   46,   47,    1,   29,
+       44,   48,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   44,   44,   44,   44,   44,   44,    2,    3,   44,
+       44,   44,   44,   44,   44,   43,   41,   42,   40,   46,
+        1,    1,    0,   44,   35,    0,    0,   44,   44,   44,
+       44,   44,   44,   33,   44,   44,   44,   44,   44,    0,
+       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   44,   44,   44,   44,   44,   41,   40,    0,    0,
+       44,   35,    0,    0,    0,   44,   44,   44,   44,   44,
+       29,   44,   27,   29,   44,   44,   44,   44,    0,    0,
+
+       29,   29,   29,   29,   44,   44,   29,   44,   44,   11,
+       44,   44,   27,    8,   44,    6,   44,    0,   44,   35,
+        0,    0,    0,    0,   44,   25,   44,   32,   44,    0,
+        0,   44,   44,   44,   44,   44,   21,   44,   44,    0,
+        0,   44,   44,   44,   44,   44,   18,   44,   44,   44,
+       44,    4,   44,   44,   44,   10,   39,    0,   44,   44,
+       35,    0,    0,    0,   37,   44,   44,   44,    0,    0,
+        0,    0,    0,    0,    0,   44,   44,   44,   44,   44,
+       44,   44,    0,    0,    0,    0,   44,   44,   44,   44,
+       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
+
+       44,   44,    0,    0,    0,   44,   20,   44,    0,    0,
+        0,    0,    0,    0,    0,   29,   17,   44,   29,   44,
+       44,   44,   45,   45,   45,   45,   44,   29,   44,   44,
+       44,   44,   44,   24,   30,   12,   44,   13,   44,    7,
+       44,   44,   34,    0,    0,   44,   44,   44,   29,   29,
+       29,   29,   29,   29,   29,   29,   28,   29,   31,   44,
+       22,   45,   45,   45,   44,   29,   44,   29,   15,   44,
+       44,   44,    9,   36,   44,   34,    0,   44,   44,   44,
+        0,    0,    0,    0,    0,    0,    0,   23,   29,   29,
+       29,   19,   44,   44,   36,   34,    0,   26,   44,   44,
+
+        0,    0,    0,    0,    0,    0,    0,   29,   29,   29,
+       44,   36,   38,   14,   44,   29,   29,    0,   29,    0,
+        0,    0,   29,   44,   44,   29,   29,    0,   29,    0,
+       29,    0,    5,   44,   29,   29,   29,    0,   44,   29,
+       29,   29,   16,   29,    0
     } ;
 
 static yyconst int yy_ec[256] =
@@ -344,8 +340,8 @@
         1,   17,    1,    1,    5,    1,   18,   19,   20,   21,
 
        22,   23,   24,   25,   26,   15,   27,   28,   29,   30,
-       31,   32,   33,   34,   35,   36,   37,   15,   38,   39,
-       40,   15,   41,    1,   42,    1,    1,    1,    1,    1,
+       31,   32,   15,   33,   34,   35,   36,   15,   37,   38,
+       39,   15,   40,    1,   41,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -362,267 +358,247 @@
         1,    1,    1,    1,    1
     } ;
 
-static yyconst int yy_meta[43] =
+static yyconst int yy_meta[42] =
     {   0,
         1,    1,    2,    1,    3,    1,    1,    3,    3,    3,
         3,    3,    3,    4,    3,    3,    1,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        1,    5
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    1,
+        5
     } ;
 
-static yyconst short int yy_base[393] =
+static yyconst short int yy_base[353] =
     {   0,
-        0,   25,   61,  103,  639,  640,   43,  640,    0,   40,
-       39,   43,    0,  608,  606,   26,   43,  602,  604,  602,
-      602,   50,  595,  613,  608,   59,   55,   49,   63,  640,
-      640,   67,  100,  598,  606,  109,   99,  640,  625,  640,
-        0,   54,    0,    0,   82,    0,   89,  117,  121,  595,
-      595,  111,  595,  588,  590,  595,  583,  591,  594,  587,
-      586,  579,  579,  100,  596,  576,  580,  580,  572,  586,
-      579,  584,  127,  569,  576,  578,  567,  577,  114,  563,
-      579,  569,  595,    0,  142,  142,  144,  148,  152,  156,
-      158,  566,  559,  566,  571,  574,  569,  556,  164,  555,
-
-      562,  564,  549,  170,  550,  549,  557,  548,  125,  159,
-      172,  547,  173,  176,  179,  552,  545,  182,  551,  552,
-        0,  545,  539,   92,  540,  539,    0,  550,  176,  181,
-      186,  188,  193,  207,  195,  531,  544,  529,    0,  542,
-        0,  545,  218,  564,  547,  536,  528,  536,  525,  542,
-      533,    0,  524,  531,  539,  194,  521,  536,  535,  517,
-      530,  524,   62,  527,  520,  521,  517,  519,  518,  517,
-      522,    0,  640,  210,  212,  217,  219,  223,  532,  227,
-      225,  640,  511,  509,    0,  508,  502,    0,  502,  504,
-      209,  215,  512,  531,  492,  491,  494,  501,  506,  487,
-
-      505,  503,  488,  228,  234,  241,  243,  502,  501,  481,
-      499,  501,  483,  491,  479,  480,  474,  483,  490,  481,
-      476,  473,  486,  250,  498,  232,  254,  238,  475,  468,
-      476,  468,  476,  471,  464,  469,  461,  475,  475,  262,
-        0,    0,  473,  466,  265,  471,  472,  469,  254,  257,
-      270,  285,  472,  463,  275,  470,  447,  450,  450,  453,
-      462,    0,    0,    0,  464,    0,  459,    0,  278,  294,
-      281,  471,  299,  442,  253,  452,  451,  310,  311,  313,
-      314,  320,  321,  322,  323,    0,  436,  331,    0,  439,
-        0,  310,  323,  329,  434,  440,  357,  412,  358,    0,
-
-      415,  414,  431,  412,    0,  330,  438,  350,  360,  411,
-        0,  408,  409,  412,  424,  423,  406,  420,  401,  414,
-      412,    0,    0,  366,    0,  367,  368,    0,  414,  391,
-      404,  365,  640,  367,    0,  394,  392,  397,  384,  382,
-      397,  370,  346,  340,  316,  378,  379,    0,  380,  317,
-        0,  640,    0,    0,  286,  381,  382,  280,  388,  277,
-      239,  247,  389,  187,  187,  390,  392,  163,  396,  156,
-      398,  144,    0,  123,  402,  404,  405,   86,   63,  406,
-      412,  418,    0,  419,  640,  453,  458,   83,   76,  463,
-      466,  469
-
+        0,   24,   59,  100,  596,  597,   42,  597,    0,   39,
+       38,   42,    0,  565,   25,   41,  561,  561,  561,  560,
+      554,  571,  566,   57,   49,   44,   58,  597,  597,   61,
+       64,  556,  564,   98,   62,  597,  583,  597,    0,   88,
+        0,    0,  109,    0,   85,  107,  113,  553,  548,  553,
+      547,  548,  553,  550,  553,  546,  540,  540,  102,  556,
+      537,  541,  534,  547,  540,  545,  106,  531,  537,  539,
+      529,  538,  109,  525,  540,  530,  556,    0,  124,  124,
+      126,  133,  138,  142,  144,  527,  534,  537,  532,  520,
+      141,  526,  528,  150,  516,  515,  522,  514,  144,  146,
+
+      157,  163,  165,  166,  518,  512,  167,  517,  518,    0,
+      511,  506,  154,  507,  506,    0,  516,  170,  174,  179,
+      167,  183,  193,  192,  498,    0,  510,    0,  513,  203,
+      532,  515,  498,  505,  512,  503,    0,  495,  501,  509,
+      182,  492,  506,  489,  501,  495,  492,  497,  490,  491,
+      487,  489,  488,  487,  492,    0,  597,  195,  197,  202,
+      204,  208,  502,  212,  597,  481,  479,  474,    0,  474,
+      475,  194,  197,  483,  502,  464,  467,  473,  461,  478,
+      476,  462,  211,  217,  222,  227,  475,  456,  473,  475,
+      458,  465,  456,  450,  458,  465,  456,  452,  449,  461,
+
+      234,  473,  236,  240,  242,  450,  452,  445,  452,  447,
+      441,  445,  438,  451,  451,  248,    0,  449,  254,  448,
+      449,  446,  241,  246,  259,  270,  449,  257,  448,  426,
+      429,  429,  441,    0,    0,    0,  443,    0,  438,    0,
+      266,  286,  269,  450,  281,  422,  418,  410,  297,  298,
+      299,  300,  306,  307,  308,  264,    0,  309,    0,  400,
+        0,  296,  310,  316,  395,  321,  394,  343,    0,  397,
+      413,  395,    0,  335,  420,  340,  342,  394,  393,  395,
+      407,  405,  389,  402,  385,  396,  394,    0,  353,  354,
+      355,    0,  376,  388,  347,  597,  352,    0,  378,  382,
+
+      363,  357,  374,  343,  323,  319,  297,  363,  364,  365,
+      294,    0,  597,    0,  289,  366,  367,  275,  373,  255,
+      230,  221,  374,  205,  203,  376,  377,  188,  383,  182,
+      384,  171,    0,  146,  387,  390,  391,  127,   75,  401,
+      402,  403,    0,  404,  597,  437,  442,   86,   52,  447,
+      450,  453
     } ;
 
-static yyconst short int yy_def[393] =
+static yyconst short int yy_def[353] =
     {   0,
-      385,    1,  386,  386,  385,  385,  385,  385,  387,  385,
-      388,  385,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  385,
-      385,  388,  388,  388,  388,  388,  388,  385,  385,  385,
-      389,  385,  387,  387,  385,  388,  388,  385,  385,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  390,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  385,  389,  385,  385,  388,  388,  385,  385,
-      385,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-
-      388,  388,  388,  388,  388,  388,  388,  388,  390,  390,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  385,  388,
-      388,  385,  385,  385,  385,  388,  388,  388,  388,  388,
-      388,  388,  385,  143,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  391,  392,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  385,  385,  388,  388,  388,  385,  385,  385,
-      385,  385,  388,  388,  388,  388,  388,  143,  385,  385,
-      385,  385,  385,  143,  388,  388,  388,  388,  388,  388,
-
-      388,  388,  388,  391,  391,  392,  392,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  385,  385,  385,  388,  388,
-      388,  388,  385,  385,  385,  385,  385,  385,  385,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  385,  391,
-      391,  392,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      385,  385,  385,  388,  388,  388,  388,  385,  385,  385,
-      385,  385,  385,  385,  388,  388,  388,  388,  388,  388,
-      388,  385,  391,  392,  388,  388,  388,  388,  388,  388,
-
-      388,  388,  388,  388,  388,  388,  388,  385,  385,  388,
-      388,  388,  388,  388,  385,  385,  385,  385,  385,  385,
-      385,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  385,  385,  388,  388,  388,  388,  385,  385,
-      385,  385,  385,  385,  385,  388,  388,  388,  388,  388,
-      388,  385,  388,  388,  388,  385,  385,  385,  385,  385,
-      385,  385,  388,  388,  388,  385,  385,  385,  385,  385,
-      385,  385,  388,  388,  385,  385,  385,  385,  388,  385,
-      385,  385,  388,  385,    0,  385,  385,  385,  385,  385,
-      385,  385
-
+      345,    1,  346,  346,  345,  345,  345,  345,  347,  345,
+      348,  345,  348,  348,  348,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  345,  345,  348,
+      348,  348,  348,  348,  348,  345,  345,  345,  349,  345,
+      347,  347,  345,  348,  348,  345,  345,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  348,  348,  350,
+      348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  345,  349,  345,  345,
+      348,  348,  345,  345,  345,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  348,  350,  350,
+
+      348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  345,  348,  348,
+      345,  345,  345,  345,  348,  348,  348,  348,  348,  345,
+      130,  348,  348,  348,  348,  348,  348,  348,  348,  351,
+      352,  348,  348,  348,  348,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  345,  345,  348,  348,
+      348,  345,  345,  345,  345,  348,  348,  348,  130,  345,
+      345,  345,  345,  345,  130,  348,  348,  348,  348,  348,
+      348,  348,  351,  351,  352,  352,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
+
+      348,  348,  345,  345,  345,  348,  348,  348,  345,  345,
+      345,  345,  345,  345,  345,  348,  348,  348,  348,  348,
+      348,  348,  345,  351,  351,  352,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
+      348,  348,  345,  345,  345,  348,  348,  348,  345,  345,
+      345,  345,  345,  345,  345,  348,  348,  348,  348,  348,
+      348,  345,  351,  352,  348,  348,  348,  348,  348,  348,
+      348,  348,  348,  348,  348,  345,  345,  348,  348,  348,
+      345,  345,  345,  345,  345,  345,  345,  348,  348,  348,
+      348,  348,  348,  348,  348,  345,  345,  348,  348,  348,
+
+      345,  345,  345,  345,  345,  345,  345,  348,  348,  348,
+      348,  348,  345,  348,  348,  345,  345,  345,  345,  345,
+      345,  345,  348,  348,  348,  345,  345,  345,  345,  345,
+      345,  345,  348,  348,  345,  345,  345,  345,  348,  345,
+      345,  345,  348,  345,    0,  345,  345,  345,  345,  345,
+      345,  345
     } ;
 
-static yyconst short int yy_nxt[683] =
+static yyconst short int yy_nxt[639] =
     {   0,
         6,    7,    8,    9,    6,   10,    6,    6,    6,   11,
-       12,   12,    6,    6,   13,   13,    6,   14,   13,   15,
-       16,   17,   18,   13,   19,   20,   13,   21,   22,   13,
-       23,   24,   13,   25,   26,   27,   28,   29,   13,   13,
-       30,   31,   32,   52,   42,   33,   43,   45,   45,   47,
-       47,   48,   34,   49,   49,   42,   53,   43,   35,   36,
-       37,   38,   39,   40,   38,   38,   38,   38,   38,   38,
-       54,   38,   65,   38,   38,   60,   66,   38,   84,   69,
-       61,   55,   71,   72,   73,   46,   75,   85,   74,  214,
-       67,   70,   86,   86,  215,   68,   50,   87,  383,   88,
-
-       88,   38,   38,   38,   39,   40,   38,   38,   38,   38,
-       38,   38,  169,   38,  148,   38,   38,   52,   76,   38,
-      107,   77,   65,   69,   82,  382,   66,   89,   89,   48,
-       53,   90,   90,   91,  107,   70,   94,  108,  155,   80,
-       67,  110,   81,   38,   38,   68,   95,  118,  119,  129,
-      129,  125,   85,   85,  130,  130,   87,  379,  131,  131,
-      132,  378,  133,  133,   48,  143,  134,  134,  135,  135,
-      144,  143,  156,  143,  143,  110,  144,  143,  144,  144,
-      143,  173,  144,  143,  145,  144,  174,  174,  144,  175,
-      150,  176,  176,  159,   87,  376,  177,  177,  178,  178,
-
-      109,  132,  375,  179,  179,  182,  182,  155,  157,  160,
-      207,  164,  374,  161,  180,  180,  373,  181,  181,  188,
-      173,  173,  224,  224,  144,  175,  235,  225,  225,  177,
-      177,  226,   85,  227,  227,  181,  181,  228,  228,  237,
-      189,  249,  271,  271,  205,  236,  190,  250,  273,  273,
-      205,  238,  191,  192,  251,  193,  252,  207,  269,  207,
-      270,  270,  226,  143,  272,  272,  143,  372,  144,  292,
-      249,  144,  293,  205,  311,  204,  143,  292,  371,  292,
-      293,  144,  293,  312,  206,  293,  205,  292,  306,  306,
-      293,  308,  308,  293,  370,  293,  285,  368,  251,  288,
-
-      294,  207,  269,  293,  307,  307,  309,  309,  294,  297,
-      294,  143,  143,  365,  143,  143,  144,  144,  294,  144,
-      144,  143,  143,  143,  143,  292,  144,  144,  144,  144,
-      315,  316,  143,  292,  318,  292,  249,  144,  293,  205,
-      332,  332,  251,  292,  294,  207,  293,  364,  293,  317,
-      362,  321,  294,  319,  294,  320,  293,  361,  143,  143,
-      333,  333,  294,  144,  144,  173,  360,  143,  143,  143,
-      334,  334,  144,  144,  144,  351,  351,  352,  352,  143,
-      143,  143,  143,  143,  144,  144,  144,  144,  144,  143,
-      143,  143,  327,  143,  144,  144,  144,  143,  144,  143,
-
-      346,  347,  144,  143,  144,  143,  143,  143,  144,  359,
-      144,  144,  144,  143,  363,  366,  367,  358,  144,  143,
-      143,  357,  369,  356,  144,  144,  355,  354,  353,  350,
-      349,  348,  377,  345,  344,  343,  380,  342,  381,  341,
-      340,  339,  338,  337,  336,  335,  269,  331,  330,  329,
-      328,  326,  384,   41,   41,   41,   41,   41,   44,  325,
-       44,   44,   44,  109,  109,  109,  204,  204,  204,  206,
-      206,  206,  206,  324,  323,  322,  314,  313,  310,  226,
-      305,  304,  303,  302,  301,  300,  299,  298,  296,  295,
-      291,  290,  289,  287,  286,  284,  283,  282,  281,  280,
-
-      279,  278,  277,  276,  275,  274,  175,  268,  267,  266,
-      265,  264,  263,  262,  261,  260,  259,  258,  257,  256,
-      255,  254,  253,  248,  247,  246,  245,  244,  243,  242,
-      241,  240,  194,  239,  234,  233,  232,  231,  230,  229,
-      132,  223,  222,  221,  220,  219,  218,  217,  216,  213,
-      212,  211,  210,  209,  208,  205,  203,  202,  201,  200,
-      199,  198,  197,  196,  195,  194,  187,  186,  185,  184,
-      183,  172,  171,  170,  168,  167,  166,  165,  163,  162,
-      158,  154,  153,  152,  151,  149,  148,  147,  146,  142,
-      141,  140,  139,  138,  137,  136,   83,  128,  127,  126,
-
-      124,  123,  122,  121,  120,  117,  116,  115,  114,  113,
-      112,  111,  110,  106,  105,  104,  103,  102,  101,  100,
-       99,   98,   97,   96,   93,   92,   83,   79,   78,   64,
-       63,   62,   59,   58,   57,   56,   51,   50,  385,    5,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385
+       12,   12,    6,    6,   13,   13,    6,   14,   13,   13,
+       15,   16,   17,   13,   13,   18,   13,   19,   20,   13,
+       21,   22,   23,   24,   25,   26,   27,   13,   13,   28,
+       29,   30,   49,   40,   31,   41,   43,   43,   45,   45,
+       46,   32,   47,   47,   78,   50,   33,   34,   35,   36,
+       37,   38,   36,   36,   36,   36,   36,   36,   51,   36,
+       60,   36,   36,   63,   61,   36,   65,   66,   52,   67,
+       69,   49,   70,   68,   64,   71,   63,   76,   44,   40,
+       48,   41,   62,   81,   50,   82,   82,   64,   36,   36,
+
+       36,   37,   38,   36,   36,   36,   36,   36,   36,  343,
+       36,   60,   36,   36,   79,   61,   36,   83,   83,   80,
+       80,   46,   97,   84,   84,   85,  107,  108,   74,   97,
+       75,  118,  118,   62,   79,   79,  119,  119,   98,   36,
+       36,   81,  130,  120,  120,  114,  121,  131,  122,  122,
+       46,  130,  123,  123,  124,  124,  131,  140,  130,  141,
+      100,  132,  100,  131,  130,  342,  130,  130,  130,  131,
+      135,  131,  131,  131,  153,  157,  134,  162,  162,  339,
+      158,  158,  159,  143,  160,  160,   99,   81,  338,  161,
+      161,  121,  142,  163,  163,  140,  148,  144,  186,  145,
+
+      164,  164,  165,  165,  169,  157,  157,  201,  201,  131,
+      159,  211,  202,  202,  161,  161,  203,   79,  204,  204,
+      336,  213,  205,  205,  223,  170,  335,  184,  334,  212,
+      224,  171,  214,  184,  333,  225,  172,  173,  186,  174,
+      226,  332,  241,  186,  242,  242,  243,  243,  203,  130,
+      244,  244,  245,  245,  131,  130,  262,  183,  130,  223,
+      131,  263,  184,  131,  262,  130,  262,  185,  331,  263,
+      131,  263,  330,  262,  263,  184,  274,  274,  263,  276,
+      276,  256,  263,  225,  263,  264,  186,  258,  277,  277,
+      266,  263,  328,  264,  241,  264,  275,  275,  130,  130,
+
+      130,  130,  264,  131,  131,  131,  131,  130,  130,  130,
+      130,  262,  131,  131,  131,  131,  325,  281,  282,  262,
+      284,  262,  130,  223,  324,  263,  184,  131,  262,  225,
+      322,  264,  186,  263,  283,  263,  321,  287,  285,  264,
+      286,  264,  263,  320,  130,  295,  295,  157,  264,  131,
+      296,  296,  297,  297,  130,  130,  130,  312,  312,  131,
+      131,  131,  313,  313,  130,  130,  130,  130,  130,  131,
+      131,  131,  131,  131,  130,  130,  291,  130,  130,  131,
+      131,  319,  131,  131,  130,  130,  308,  309,  130,  131,
+      131,  130,  130,  131,  318,  317,  131,  131,  323,  326,
+
+      327,  316,  130,  130,  130,  130,  329,  131,  131,  131,
+      131,  315,  314,  311,  310,  307,  306,  337,  305,  304,
+      340,  303,  302,  341,  301,  300,  299,  298,  241,  294,
+      293,  292,  290,  289,  288,  280,  344,   39,   39,   39,
+       39,   39,   42,  279,   42,   42,   42,   99,   99,   99,
+      183,  183,  183,  185,  185,  185,  185,  278,  203,  273,
+      272,  271,  270,  269,  268,  267,  265,  261,  260,  259,
+      257,  255,  254,  253,  252,  251,  250,  249,  248,  247,
+      246,  159,  240,  239,  238,  237,  236,  235,  234,  233,
+      232,  231,  230,  229,  228,  227,  222,  221,  220,  219,
+
+      218,  217,  216,  175,  215,  210,  209,  208,  207,  206,
+      121,  200,  199,  198,  197,  196,  195,  194,  193,  192,
+      191,  190,  189,  188,  187,  184,  182,  181,  180,  179,
+      178,  177,  176,  175,  168,  167,  166,  156,  155,  154,
+      152,  151,  150,  149,  147,  146,  139,  138,  137,  136,
+      134,  133,  129,  128,  127,  126,  125,   77,  117,  116,
+      115,  113,  112,  111,  110,  109,  106,  105,  104,  103,
+      102,  101,  100,   96,   95,   94,   93,   92,   91,   90,
+       89,   88,   87,   86,   77,   73,   72,   59,   58,   57,
+       56,   55,   54,   53,   48,  345,    5,  345,  345,  345,
+
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345
     } ;
 
-static yyconst short int yy_chk[683] =
+static yyconst short int yy_chk[639] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    2,   16,    7,    2,    7,   10,   10,   11,
-       11,   12,    2,   12,   12,   42,   16,   42,    2,    2,
-        2,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-       17,    3,   26,    3,    3,   22,   26,    3,  389,   27,
-       22,   17,   28,   28,   29,  388,   32,   45,   29,  163,
-       26,   27,   45,   45,  163,   26,   32,   47,  379,   47,
-
-       47,    3,    3,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,  124,    4,  124,    4,    4,   33,   33,    4,
-       64,   33,   36,   37,   37,  378,   36,   48,   48,   49,
-       33,   49,   49,   49,   79,   37,   52,   64,  109,   36,
-       36,  109,   36,    4,    4,   36,   52,   73,   73,   85,
-       85,   79,   86,   86,   87,   87,   88,  374,   88,   88,
-       89,  372,   89,   89,   90,   99,   90,   90,   91,   91,
-       99,  104,  110,  111,  113,  110,  104,  114,  111,  113,
-      115,  129,  114,  118,   99,  115,  129,  129,  118,  130,
-      104,  130,  130,  113,  131,  370,  131,  131,  132,  132,
-
-      110,  133,  368,  133,  133,  135,  135,  156,  111,  114,
-      156,  118,  365,  115,  134,  134,  364,  134,  134,  143,
-      174,  174,  175,  175,  143,  176,  191,  176,  176,  177,
-      177,  178,  180,  178,  178,  181,  181,  180,  180,  192,
-      143,  204,  226,  226,  204,  191,  143,  205,  228,  228,
-      205,  192,  143,  143,  206,  143,  207,  206,  224,  207,
-      224,  224,  227,  240,  227,  227,  245,  362,  240,  249,
-      250,  245,  250,  250,  275,  205,  255,  249,  361,  249,
-      250,  255,  250,  275,  207,  251,  251,  249,  269,  269,
-      250,  271,  271,  251,  360,  251,  240,  358,  252,  245,
-
-      252,  252,  270,  251,  270,  270,  273,  273,  252,  255,
-      252,  278,  279,  355,  280,  281,  278,  279,  252,  280,
-      281,  282,  283,  284,  285,  292,  282,  283,  284,  285,
-      278,  279,  288,  292,  281,  292,  293,  288,  293,  293,
-      306,  306,  294,  292,  294,  294,  293,  350,  293,  280,
-      345,  284,  294,  282,  294,  283,  293,  344,  297,  299,
-      308,  308,  294,  297,  299,  309,  343,  324,  326,  327,
-      309,  309,  324,  326,  327,  332,  332,  334,  334,  346,
-      347,  349,  356,  357,  346,  347,  349,  356,  357,  359,
-      363,  366,  299,  367,  359,  363,  366,  369,  367,  371,
-
-      324,  326,  369,  375,  371,  376,  377,  380,  375,  342,
-      376,  377,  380,  381,  349,  356,  357,  341,  381,  382,
-      384,  340,  359,  339,  382,  384,  338,  337,  336,  331,
-      330,  329,  371,  321,  320,  319,  375,  318,  376,  317,
-      316,  315,  314,  313,  312,  310,  307,  304,  303,  302,
-      301,  298,  382,  386,  386,  386,  386,  386,  387,  296,
-      387,  387,  387,  390,  390,  390,  391,  391,  391,  392,
-      392,  392,  392,  295,  290,  287,  277,  276,  274,  272,
-      267,  265,  261,  260,  259,  258,  257,  256,  254,  253,
-      248,  247,  246,  244,  243,  239,  238,  237,  236,  235,
-
-      234,  233,  232,  231,  230,  229,  225,  223,  222,  221,
-      220,  219,  218,  217,  216,  215,  214,  213,  212,  211,
-      210,  209,  208,  203,  202,  201,  200,  199,  198,  197,
-      196,  195,  194,  193,  190,  189,  187,  186,  184,  183,
-      179,  171,  170,  169,  168,  167,  166,  165,  164,  162,
-      161,  160,  159,  158,  157,  155,  154,  153,  151,  150,
-      149,  148,  147,  146,  145,  144,  142,  140,  138,  137,
-      136,  128,  126,  125,  123,  122,  120,  119,  117,  116,
-      112,  108,  107,  106,  105,  103,  102,  101,  100,   98,
-       97,   96,   95,   94,   93,   92,   83,   82,   81,   80,
-
-       78,   77,   76,   75,   74,   72,   71,   70,   69,   68,
-       67,   66,   65,   63,   62,   61,   60,   59,   58,   57,
-       56,   55,   54,   53,   51,   50,   39,   35,   34,   25,
-       24,   23,   21,   20,   19,   18,   15,   14,    5,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385
+        1,    2,   15,    7,    2,    7,   10,   10,   11,   11,
+       12,    2,   12,   12,  349,   15,    2,    2,    2,    3,
+        3,    3,    3,    3,    3,    3,    3,    3,   16,    3,
+       24,    3,    3,   25,   24,    3,   26,   26,   16,   27,
+       30,   31,   31,   27,   25,   31,   35,   35,  348,   40,
+       30,   40,   24,   45,   31,   45,   45,   35,    3,    3,
+
+        4,    4,    4,    4,    4,    4,    4,    4,    4,  339,
+        4,   34,    4,    4,   43,   34,    4,   46,   46,   43,
+       43,   47,   59,   47,   47,   47,   67,   67,   34,   73,
+       34,   79,   79,   34,   80,   80,   81,   81,   59,    4,
+        4,   82,   91,   82,   82,   73,   83,   91,   83,   83,
+       84,   94,   84,   84,   85,   85,   94,   99,  101,  100,
+       99,   91,  100,  101,  102,  338,  103,  104,  107,  102,
+       94,  103,  104,  107,  113,  118,  113,  121,  121,  334,
+      118,  118,  119,  102,  119,  119,  100,  120,  332,  120,
+      120,  122,  101,  122,  122,  141,  107,  103,  141,  104,
+
+      123,  123,  124,  124,  130,  158,  158,  159,  159,  130,
+      160,  172,  160,  160,  161,  161,  162,  164,  162,  162,
+      330,  173,  164,  164,  183,  130,  328,  183,  325,  172,
+      184,  130,  173,  184,  324,  185,  130,  130,  185,  130,
+      186,  322,  201,  186,  201,  201,  203,  203,  204,  216,
+      204,  204,  205,  205,  216,  219,  223,  184,  228,  224,
+      219,  224,  224,  228,  223,  256,  223,  186,  321,  224,
+      256,  224,  320,  223,  225,  225,  241,  241,  224,  243,
+      243,  216,  225,  226,  225,  226,  226,  219,  245,  245,
+      228,  225,  318,  226,  242,  226,  242,  242,  249,  250,
+
+      251,  252,  226,  249,  250,  251,  252,  253,  254,  255,
+      258,  262,  253,  254,  255,  258,  315,  249,  250,  262,
+      252,  262,  266,  263,  311,  263,  263,  266,  262,  264,
+      307,  264,  264,  263,  251,  263,  306,  255,  253,  264,
+      254,  264,  263,  305,  268,  274,  274,  277,  264,  268,
+      276,  276,  277,  277,  289,  290,  291,  295,  295,  289,
+      290,  291,  297,  297,  308,  309,  310,  316,  317,  308,
+      309,  310,  316,  317,  319,  323,  268,  326,  327,  319,
+      323,  304,  326,  327,  329,  331,  289,  290,  335,  329,
+      331,  336,  337,  335,  303,  302,  336,  337,  310,  316,
+
+      317,  301,  340,  341,  342,  344,  319,  340,  341,  342,
+      344,  300,  299,  294,  293,  287,  286,  331,  285,  284,
+      335,  283,  282,  336,  281,  280,  279,  278,  275,  272,
+      271,  270,  267,  265,  260,  248,  342,  346,  346,  346,
+      346,  346,  347,  247,  347,  347,  347,  350,  350,  350,
+      351,  351,  351,  352,  352,  352,  352,  246,  244,  239,
+      237,  233,  232,  231,  230,  229,  227,  222,  221,  220,
+      218,  215,  214,  213,  212,  211,  210,  209,  208,  207,
+      206,  202,  200,  199,  198,  197,  196,  195,  194,  193,
+      192,  191,  190,  189,  188,  187,  182,  181,  180,  179,
+
+      178,  177,  176,  175,  174,  171,  170,  168,  167,  166,
+      163,  155,  154,  153,  152,  151,  150,  149,  148,  147,
+      146,  145,  144,  143,  142,  140,  139,  138,  136,  135,
+      134,  133,  132,  131,  129,  127,  125,  117,  115,  114,
+      112,  111,  109,  108,  106,  105,   98,   97,   96,   95,
+       93,   92,   90,   89,   88,   87,   86,   77,   76,   75,
+       74,   72,   71,   70,   69,   68,   66,   65,   64,   63,
+       62,   61,   60,   58,   57,   56,   55,   54,   53,   52,
+       51,   50,   49,   48,   37,   33,   32,   23,   22,   21,
+       20,   19,   18,   17,   14,    5,  345,  345,  345,  345,
+
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -662,7 +638,7 @@
 
 #define REDIRECT_STATE 1
 
-#line 666 "lex.yy.c"
+#line 642 "lex.yy.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -819,7 +795,7 @@
 #line 37 "sg.l"
 
 
-#line 823 "lex.yy.c"
+#line 799 "lex.yy.c"
 
 	if ( yy_init )
 		{
@@ -871,13 +847,13 @@
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 386 )
+				if ( yy_current_state >= 346 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 640 );
+		while ( yy_base[yy_current_state] != 597 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1001,194 +977,154 @@
 case 20:
 YY_RULE_SETUP
 #line 58 "sg.l"
-return USERQUOTA;
+return DOMAIN;
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 59 "sg.l"
-return DOMAIN;
+return PASS;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 60 "sg.l"
-return PASS;
+return REWRITE;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 61 "sg.l"
-return REWRITE;
+{ BEGIN REDIRECT_STATE; return REDIRECT; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 62 "sg.l"
-{ BEGIN REDIRECT_STATE; return REDIRECT; }
+return WEEKLY;
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 63 "sg.l"
-return MINUTELY;
+return DATE;
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 64 "sg.l"
-return HOURLY;
+return ANONYMOUS;
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 65 "sg.l"
-return DAILY;
+return LOGFILE;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 66 "sg.l"
-return WEEKLY;
+return LOGFILE;
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 67 "sg.l"
-return CONTINIOUS;
+{yylval.string = yytext; return WEEKDAY;}
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 68 "sg.l"
-return CONTINUE;
+return WITHIN;
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 69 "sg.l"
-return SPORADIC;
+return OUTSIDE;
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 70 "sg.l"
-return DATE;
+return ELSE;
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 71 "sg.l"
-return ANONYMOUS;
+return IP;
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 72 "sg.l"
-return LOGFILE;
+{yylval.string = yytext; return IPADDR;}
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 73 "sg.l"
-return LOGFILE;
+{yylval.string = yytext;    return CIDR;}
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 74 "sg.l"
-{yylval.string = yytext; return WEEKDAY;}
+{yylval.string = yytext;    return IPCLASS;}
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 75 "sg.l"
-return WITHIN;
+{yylval.string = yytext;    return TVAL;}
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 76 "sg.l"
-return OUTSIDE;
+{yylval.string = yytext;    return DVAL;}
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 77 "sg.l"
-return ELSE;
+{yylval.string = yytext;    return DVALCRON;}
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 78 "sg.l"
-return IP;
+{ yylval.string = yytext ; BEGIN 0; return WORD;}
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 79 "sg.l"
-{yylval.string = yytext; return IPADDR;}
+;
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 80 "sg.l"
-{yylval.string = yytext; return CIDR;}
+{lineno++;}
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 81 "sg.l"
-{yylval.string = yytext; return IPCLASS;}
+{return yytext[0];}
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 82 "sg.l"
-{yylval.string = yytext; return TVAL;}
+{yylval.string = yytext ; return WORD;}
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 83 "sg.l"
-{yylval.string = yytext; return DVAL;}
+{yylval.string = yytext; return SUBST;}
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 84 "sg.l"
-{yylval.string = yytext; return DVALCRON;}
+;
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 85 "sg.l"
-{yylval.string = yytext; return NUMBER;}
+{lineno++;}
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 87 "sg.l"
-{ yylval.string = yytext ; BEGIN 0; return WORD;}
+#line 86 "sg.l"
+{return yytext[0];}
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 88 "sg.l"
-;
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
 #line 89 "sg.l"
-{lineno++;}
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 90 "sg.l"
-{return yytext[0];}
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 91 "sg.l"
-{yylval.string = yytext ; return WORD;}
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 92 "sg.l"
-{yylval.string = yytext; return SUBST;}
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 93 "sg.l"
-;
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 94 "sg.l"
-{lineno++;}
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 95 "sg.l"
-{return yytext[0];}
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 98 "sg.l"
 ECHO;
 	YY_BREAK
-#line 1192 "lex.yy.c"
+#line 1128 "lex.yy.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(REDIRECT_STATE):
 	yyterminate();
@@ -1482,7 +1418,7 @@
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 386 )
+			if ( yy_current_state >= 346 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1517,11 +1453,11 @@
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 386 )
+		if ( yy_current_state >= 346 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 385);
+	yy_is_jam = (yy_current_state == 345);
 
 	return yy_is_jam ? 0 : yy_current_state;
 	}
@@ -2077,7 +2013,7 @@
 	return 0;
 	}
 #endif
-#line 98 "sg.l"
+#line 89 "sg.l"
 
 
 
--- squidguard-1.2.0.orig/src/main.c
+++ squidguard-1.2.0/src/main.c
@@ -23,7 +23,6 @@
 
 struct Source *lastSource = NULL;
 struct Source *Source = NULL;
-struct Source *saveSource = NULL;
 
 struct Destination *lastDest = NULL;
 struct Destination *Dest = NULL;
@@ -51,8 +50,6 @@
 
 struct sgRegExp *lastRegExpDest;
 
-struct Source *lastActiveSource;
-
 char **globalArgv ;
 char **globalEnvp ;
 int globalDebugTimeDelta = 0;
@@ -178,39 +175,25 @@
 	sgLogError("error parsing squid line: %s",buf);
 	puts("");
       } else {
-	src = Source;
-	for(;;){
-	  strncpy(tmp,squidInfo.src,MAX_BUF-1);
-	  globalLogFile = NULL;
-	  src = sgFindSource(src, tmp,squidInfo.ident,squidInfo.srcDomain);
-	  acl = sgAclCheckSource(src);
-	  if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
-	    if(src == NULL || src->cont_search == 0){
-	      puts(""); 
-	      break;
-	    } else
-	      if(src->next != NULL){
-		src = src->next;
-		continue;
-	      } else {
-		puts("");
-		break;
-	      }
-	  } else {
-	    if(squidInfo.srcDomain[0] == '\0'){
-	      squidInfo.srcDomain[0] = '-';
-	      squidInfo.srcDomain[1] = '\0';
-	    }
-	    if(squidInfo.ident[0] == '\0'){
-	      squidInfo.ident[0] = '-';
-	      squidInfo.ident[1] = '\0';
-	    }
-	    fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
-		    squidInfo.srcDomain,squidInfo.ident,
-		    squidInfo.method);
-	    break;
-	  }
-	} /*for(;;)*/
+	strncpy(tmp,squidInfo.src,MAX_BUF-1);
+	globalLogFile = NULL;
+	src = sgFindSource(tmp,squidInfo.ident,squidInfo.srcDomain);
+	acl = sgAclCheckSource(src);
+	if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
+	  puts("");
+	} else {
+	  if(squidInfo.srcDomain[0] == '\0'){
+	    squidInfo.srcDomain[0] = '-';
+	    squidInfo.srcDomain[1] = '\0';
+          }
+          if(squidInfo.ident[0] == '\0'){
+	    squidInfo.ident[0] = '-';
+	    squidInfo.ident[1] = '\0';
+          }
+	  fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
+		  squidInfo.srcDomain,squidInfo.ident,
+		  squidInfo.method);
+	}
       }
       fflush(stdout);
       if(sig_hup)
--- squidguard-1.2.0.orig/src/Makefile.in
+++ squidguard-1.2.0/src/Makefile.in
@@ -97,8 +97,8 @@
 
 install.bin:: squidGuard
 	@echo making $@ in `basename \`pwd\``
-	@$(MKDIR) $(bindir) $(logdir) $(cfgdir)
-	$(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
+	@$(MKDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(logdir) $(DESTDIR)$(cfgdir)
+	$(INSTALL_PROGRAM) squidGuard $(DESTDIR)$(bindir)/squidGuard
 
 uninstall.bin::
 	@echo making $@ in `basename \`pwd\``
--- squidguard-1.2.0.orig/src/sg.h.in
+++ squidguard-1.2.0/src/sg.h.in
@@ -131,19 +131,6 @@
   struct SquidQueue *next;
 };
 
-struct UserQuotaInfo {
-  time_t time;
-  time_t last;
-  int consumed;
-  char status;
-};
-
-struct UserQuota {
-  time_t seconds;
-  int renew;
-  time_t sporadic;
-};
-
 struct SquidInfo {
   char protocol[MAX_BUF];
   char domain[MAX_BUF];
@@ -192,8 +179,10 @@
   DBC *dbcp;
   DB_ENV *dbenv;
 #ifndef DB_VERSION_GT2
+#ifndef DB_VERSION_GT4
   DB_INFO dbinfo;
 #endif
+#endif
   DBT key;
   DBT data;
   int entries;	
@@ -260,8 +249,6 @@
   struct sgDb *userDb;
   struct Time *time;
   int within;
-  int cont_search;
-  struct UserQuota userquota;
   struct LogFile *logfile;
   struct Source *next;
 };
@@ -324,7 +311,7 @@
 void   sgSourceDomain __P((char *));
 void   sgSourceIpList __P((char *));
 struct Source *sgSourceFindName __P((char *));
-struct Source *sgFindSource __P((struct Source *, char *, char *, char *));
+struct Source *sgFindSource __P((char *, char *, char *));
 void   sgSourceTime __P((char *, int));
 
 void   sgDest __P((char *));
@@ -374,9 +361,8 @@
 
 void   sgDbInit __P(());
 void   sgDbLoadTextFile __P((struct sgDb *, char *, int));
-void   sgDbUpdate __P((struct sgDb *, char *, char *, size_t));
-
-#if DB_VERSION_GT2
+void   sgDbUpdate __P((struct sgDb *, char *));
+#if DB_VERSION_GT2 || DB_VERSION_GT4
 int db_init __P((char *, DB_ENV **));
 int    domainCompare __P((const DB *, const DBT *, const DBT *));
 #else
@@ -387,9 +373,6 @@
 time_t date2sec __P((char *));
 time_t iso2sec __P((char *));
 char   *niso __P((time_t));
-struct UserQuotaInfo *setuserquota __P(());
-void sgSourceUserQuota __P((char *, char *, char *));
-
 
 void   *sgMalloc __P((size_t));
 void   *sgCalloc __P((size_t, size_t));
--- squidguard-1.2.0.orig/src/sg.l
+++ squidguard-1.2.0/src/sg.l
@@ -55,18 +55,11 @@
 iplist      return IPLIST;
 user        return USER;
 userlist    return USERLIST;
-userquota   return USERQUOTA;
 domain      return DOMAIN;
 pass        return PASS;
 rewrite     return REWRITE;
 redirect    { BEGIN REDIRECT_STATE; return REDIRECT; }
-minutely    return MINUTELY;
-hourly      return HOURLY;
-daily       return DAILY;
 weekly      return WEEKLY;
-continuous  return CONTINIOUS;
-continue    return CONTINUE;
-sporadic    return SPORADIC;
 date        return DATE;
 anonymous   return ANONYMOUS;
 log         return LOGFILE;
@@ -77,13 +70,11 @@
 else return ELSE;
 ip          return IP;
 {ip}        {yylval.string = yytext; return IPADDR;}
-[/]{d}+     {yylval.string = yytext; return CIDR;}
-[/]{ip}     {yylval.string = yytext; return IPCLASS;}
-{tval}      {yylval.string = yytext; return TVAL;}
-{dval}      {yylval.string = yytext; return DVAL;}
-{dvalcron}  {yylval.string = yytext; return DVALCRON;}
-{d}+        {yylval.string = yytext; return NUMBER;}
-
+[/]{d}+     {yylval.string = yytext;    return CIDR;}
+[/]{ip}     {yylval.string = yytext;    return IPCLASS;}
+{tval}   {yylval.string = yytext;    return TVAL;}
+{dval}   {yylval.string = yytext;    return DVAL;}
+{dvalcron} {yylval.string = yytext;    return DVALCRON;}
 <REDIRECT_STATE>[a-zA-Z3\/][a-zA-Z0-9/_\-\.\/\:\%\+\?=&]*  { yylval.string = yytext ; BEGIN 0; return WORD;}
 <REDIRECT_STATE>[ \t]+     ;
 <REDIRECT_STATE>\n        {lineno++;}
--- squidguard-1.2.0.orig/src/sg.y
+++ squidguard-1.2.0/src/sg.y
@@ -57,8 +57,6 @@
 
 extern char *globalLogDir; /* from main.c */
 
-extern struct Source *lastActiveSource;
-
 extern int globalDebugTimeDelta;
 
 static int time_switch = 0;
@@ -78,15 +76,14 @@
 
 %token WORD END START_BRACKET STOP_BRACKET WEEKDAY
 %token DESTINATION REWRITE ACL TIME TVAL DVAL DVALCRON
-%token SOURCE CIDR IPCLASS CONTINUE
+%token SOURCE CIDR IPCLASS
 %token IPADDR DBHOME DOMAINLIST URLLIST EXPRESSIONLIST IPLIST
-%token DOMAIN USER USERLIST USERQUOTA IP NL NUMBER
-%token PASS REDIRECT LOGDIR SUBST CHAR MINUTELY HOURLY DAILY WEEKLY DATE
-%token WITHIN OUTSIDE ELSE LOGFILE ANONYMOUS CONTINIOUS SPORADIC
+%token DOMAIN USER USERLIST IP NL
+%token PASS REDIRECT LOGDIR SUBST CHAR WEEKLY DATE
+%token WITHIN OUTSIDE ELSE LOGFILE ANONYMOUS
 
 %type <string> WORD 
 %type <string> WEEKDAY
-%type <string> NUMBER
 %type <tval> TVAL
 %type <string> DVAL
 %type <string> DVALCRON
@@ -164,21 +161,12 @@
 source_content:     DOMAIN domain
                     | USER user 
                     | USERLIST WORD { sgSourceUserList($2); } 
-                    | USERQUOTA NUMBER NUMBER HOURLY { 
-		      sgSourceUserQuota($2,$3,"3600");} 
-                    | USERQUOTA NUMBER NUMBER DAILY { 
-		      sgSourceUserQuota($2,$3,"86400");} 
-                    | USERQUOTA NUMBER NUMBER WEEKLY { 
-		      sgSourceUserQuota($2,$3,"604800");} 
-                    | USERQUOTA NUMBER NUMBER NUMBER { 
-		      sgSourceUserQuota($2,$3,$4);} 
                     | IP ips
                     | IPLIST WORD { sgSourceIpList($2); }
                     | WITHIN WORD { sgSourceTime($2,WITHIN); }
                     | OUTSIDE WORD { sgSourceTime($2,OUTSIDE); }
                     | LOGFILE ANONYMOUS WORD {sgLogFile(SG_BLOCK_SOURCE,1,$3);}
                     | LOGFILE WORD { sgLogFile(SG_BLOCK_SOURCE,0,$2); }
-                    | CONTINUE { lastSource->cont_search = 1; }
                     ;
 
 
@@ -478,11 +466,7 @@
   sp->domainDb=NULL;
   sp->active = 1;
   sp->within = 0;
-  sp->cont_search = 0;
   sp->time = NULL;
-  sp->userquota.seconds = 0;
-  sp->userquota.renew = 0;
-  sp->userquota.sporadic = 0;
   sp->next=NULL;
   sp->logfile = NULL;
   sp->name = (char  *) sgCalloc(1,strlen(source) + 1);
@@ -525,8 +509,7 @@
   }
   for(lc=user; *lc != '\0'; lc++) /* convert username to lowercase chars */
     *lc = tolower(*lc);
-  sgDbUpdate(sp->userDb, user, (char *) setuserquota(),
-	     sizeof(struct UserQuotaInfo));
+  sgDbUpdate(sp->userDb,user);
 }
 
 #if __STDC__
@@ -579,16 +562,14 @@
       *s = '\0';
       for(lc=line; *lc != '\0'; lc++) /* convert username to lowercase chars */
 	*lc = tolower(*lc);
-      sgDbUpdate(sp->userDb, line, (char *) setuserquota(),
-		 sizeof(struct UserQuotaInfo));
+      sgDbUpdate(sp->userDb,line);
     } else {
       do {
 	if(c != NULL && p >= c) /*find the comment */
 	  break;
 	for(lc=p; *lc != '\0'; lc++) /* convert username to lowercase chars */
 	  *lc = tolower(*lc);
-	sgDbUpdate(sp->userDb, p, (char *) setuserquota(),
-		   sizeof(struct UserQuotaInfo));
+	sgDbUpdate(sp->userDb,p);
       } while((p=strtok(NULL," \t,")) != NULL);
     }
   }
@@ -596,35 +577,6 @@
 }
 
 #if __STDC__
-void sgSourceUserQuota(char *seconds, char *sporadic, char *renew)
-#else
-void sgSourceUserQuota(seconds, sporadic, renew)
-     char *file;
-     char *sporadic;
-     char *renew;
-#endif
-{
-  int s;
-  struct UserQuota *uq;
-  struct Source *sp;
-  sp = lastSource;
-  uq = &sp->userquota;
-  s = atoi(seconds);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->seconds = s; 
-  s = atoi(sporadic);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->sporadic = s; 
-  s = atoi(renew);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->renew = s;
-}
-
-
-#if __STDC__
 void sgSourceDomain(char *domain)
 #else
 void sgSourceDomain(domain)
@@ -638,7 +590,7 @@
     sp->domainDb->type=SGDBTYPE_DOMAINLIST;
     sgDbInit(sp->domainDb,NULL);
   }
-  sgDbUpdate(sp->domainDb,domain, NULL, 0);
+  sgDbUpdate(sp->domainDb,domain);
 }
 
 #if __STDC__
@@ -753,11 +705,9 @@
  */
 
 #if __STDC__
-struct Source *sgFindSource (struct Source *bsrc, 
-			     char *net, char *ident, char *domain)
+struct Source *sgFindSource (char *net, char *ident, char *domain)
 #else
-struct Source *sgFindSource (bsrc, net, ident, domain)
-     struct Source *bsrc;
+struct Source *sgFindSource (net, ident, domain)
      char *net;
      char *ident;
      char *domain;
@@ -765,17 +715,15 @@
 {
   struct Source *s;
   struct Ip *ip;
-  int foundip, founduser, founddomain, unblockeduser;
+  int foundip, founduser, founddomain;
   unsigned long i, octet = 0, *op;
-  struct UserQuotaInfo *userquota;
   if(net != NULL){
     op = sgConvDot(net);
     if(op != NULL)
       octet = *op;
   }
-  for(s=bsrc; s != NULL; s = s->next){
+  for(s=Source; s != NULL; s = s->next){
     foundip = founduser = founddomain = 0;
-    unblockeduser = 1;
     if(s->active == 0)
       continue;
     if(s->ip != NULL){
@@ -805,53 +753,9 @@
       if(*ident == '\0')
 	founduser = 0;
       else 
-	if(defined(s->userDb, ident, (char **) &userquota) == 1){
+	if(defined(s->userDb, ident, (char **) NULL) == 1)
 	  founduser = 1;
-	  unblockeduser = 1;
-	  if(s->userquota.seconds != 0){
-	    struct UserQuotaInfo uq;
-	    time_t t = time(NULL) + globalDebugTimeDelta;
-	    //sgLogError("status %d time %d lasttime %d consumed %d", userquota->status, userquota->time, userquota->last, userquota->consumed);
-	    //sgLogError("renew %d seconds %d", s->userquota.renew, s->userquota.seconds);
-	    if(userquota->status == 0){ //first time
-	      userquota->status = 1;
-	      userquota->time = t;
-	      userquota->last = t;
-	      //sgLogError("user %s first time %d", ident, userquota->time);
-	    } else if(userquota->status == 1){
-	      //sgLogError("user %s other time %d %d",ident,userquota->time,t);
-	      if(s->userquota.sporadic > 0){
-		if(t - userquota->last  < s->userquota.sporadic){
-		  userquota->consumed += t - userquota->last;
-		  userquota->time = t;
-		}
-		if(userquota->consumed > s->userquota.seconds){
-		  userquota->status = 2; // block this user, time is up
-		  unblockeduser = 0;
-		}
-		userquota->last = t;
-		//sgLogError("user %s consumed %d %d",ident,userquota->consumed, userquota->last);
-	      } else if(userquota->time + s->userquota.seconds < t){
-		sgLogError("time is up user %s blocket", ident);
-		userquota->status = 2; // block this user, time is up
-		unblockeduser = 0;
-	      } 
-	    } else {
-	      //sgLogError("user %s blocket %d %d %d %d", ident, userquota->status, userquota->time, t, (userquota->time + s->userquota.renew) - t);
-	      if(userquota->time + s->userquota.renew < t){ // new chance
-		//sgLogError("user %s new chance", ident);
-		unblockeduser = 1;
-		userquota->status = 1;
-		userquota->time = t;
-		userquota->consumed = 0;
-	      } else 
-		unblockeduser = 0;
-	    }
-	    sgDbUpdate(s->userDb, ident, (void *) userquota, 
-		       sizeof(struct UserQuotaInfo));
-	  }
-	}
-    } else
+    }  else
       founduser = 1;
     if(s->domainDb != NULL){
       if(*domain == '\0')
@@ -862,13 +766,8 @@
       }
     } else
       founddomain = 1;
-    if(founduser && foundip && founddomain){
-      if(unblockeduser)
-	return s;
-      else {
-	lastActiveSource = s;
-	return NULL;
-      }
+    if(founduser == 1 && foundip == 1 && founddomain == 1){
+      return s;
     }
   }
   return NULL;
--- squidguard-1.2.0.orig/src/sgDb.c
+++ squidguard-1.2.0/src/sgDb.c
@@ -74,8 +74,13 @@
   /*please feel free to experiment with cacesize and pagesize */
   //Db->dbp->set_cachesize(Db->dbp, 0, 1024 * 1024,0);
   //Db->dbp->set_pagesize(Db->dbp, 1024);
+#ifdef DB_VERSION_GT4
   if(Db->type == SGDBTYPE_DOMAINLIST)
-    Db->dbp->set_bt_compare(Db->dbp, (void *) domainCompare);
+    Db->dbp->set_bt_compare(Db->dbp, (int *) domainCompare);
+#else
+  if(Db->type == SGDBTYPE_DOMAINLIST)
+    Db->dbp->set_bt_compare(Db->dbp, (int *) domainCompare);
+#endif
 #endif
 #if DB_VERSION_MAJOR == 2
   if(globalUpdate || createdb || stat(dbfile,&st)){
@@ -97,16 +102,31 @@
     flag = DB_CREATE;
     if(createdb)
       flag = flag | DB_TRUNCATE;
+#ifdef DB_VERSION_GT4
+    if ((ret = 
+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+      (void) Db->dbp->close(Db->dbp, 0);
+      sgLogFatalError("Error db_open: %s", strerror(ret));
+    }
+#else
     if ((ret = 
 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
       (void) Db->dbp->close(Db->dbp, 0);
       sgLogFatalError("Error db_open: %s", strerror(ret));
     }
+#endif
   } else {
+#ifdef DB_VERSION_GT4
+    if ((ret = 
+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+      sgLogFatalError("Error db_open: %s", strerror(ret));
+    }
+#else
     if ((ret = 
 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
       sgLogFatalError("Error db_open: %s", strerror(ret));
     }
+#endif
   }
 #endif
   if(file != NULL){
@@ -143,7 +163,7 @@
       if(dbfile == NULL){
         sgLogError("error update dbfile %s.db. file does not exists, use -C to create",file);
       } else {
-        update = (char *) sgMalloc(strlen(file) + 5);
+        update = (char *) sgMalloc(strlen(file) + 6);
         strcpy(update,file);
         strcat(update,".diff");
         if(stat(update,&st) == 0){
@@ -256,7 +276,7 @@
   }
   if(result == 1)
     if(retval != NULL && Db->data.size > 1){
-      memcpy(dbdata,Db->data.data,Db->data.size);
+      strncpy(dbdata,Db->data.data,Db->data.size);
       *(dbdata + Db->data.size) = '\0';
       *retval = dbdata;
     } 
@@ -362,35 +382,24 @@
 
 
 #if __STDC__
-void sgDbUpdate(struct sgDb *Db, char *key, char *value, size_t len)
+void sgDbUpdate(struct sgDb *Db, char *key)
 #else
 void sgDbUpdate(Db, key)
      struct sgDb *Db;
      char *key;
-     char *value;
-     int len;
 #endif
 {
   DB *dbp ;
-  u_int32_t flags = DB_NOOVERWRITE;
   char key_buf[MAX_BUF];
-  char value_buf[MAX_BUF];
   dbp = Db->dbp;
   memset(&Db->key, 0, sizeof(DBT));
   memset(&Db->data, 0, sizeof(DBT));
   strcpy(key_buf,key);
   Db->key.data = key_buf;
   Db->key.size = strlen(key) ;
-  if(value == NULL){
-    Db->data.data = "default";
-    Db->data.size = 8 ;
-  } else {
-    memcpy(value_buf,value, len);
-    Db->data.data = value_buf;
-    Db->data.size = len ;
-    flags = 0;
-  }
-  switch (errno = dbp->put(dbp, NULL, &Db->key, &Db->data, flags)) {
+  Db->data.data = "default";
+  Db->data.size = 8 ;
+  switch (errno = dbp->put(dbp, NULL, &Db->key, &Db->data, DB_NOOVERWRITE)) {
   case 0:
     break;
   case DB_KEYEXIST:
--- squidguard-1.2.0.orig/src/sgDiv.c
+++ squidguard-1.2.0/src/sgDiv.c
@@ -25,7 +25,6 @@
 extern char **globalEnvp;           
 extern struct Acl *defaultAcl;
 extern struct LogFileStat *LogFileStat;
-extern struct Source *lastActiveSource;
 
 extern struct Source *Source ;
 extern struct Destination *Dest ;
@@ -556,7 +555,6 @@
 {
   static char buf[MAX_BUF + MAX_BUF];
   char *p = redirect, *q = NULL, *t = NULL;
-  struct Source *s = lastActiveSource;
   *buf= '\0';
   if(aclpass == NULL)
     aclpass = defaultAcl->pass;
@@ -582,21 +580,6 @@
       }
       p++;
       break;
-    case 'q': /* userquota info */
-      if(s != NULL && s->userquota.seconds != 0 && strcmp(req->ident, "-")) {
-	struct UserQuotaInfo *userquota;
-	if(defined(s->userDb, req->ident, (char **) &userquota) == 1){
-	  char qbuf[150];
-	  sprintf(qbuf, "%d-%d-%d-%d-%d-%d", 
-		  s->userquota.renew, s->userquota.seconds, userquota->status,
-		  userquota->time, userquota->last, userquota->consumed);
-	  strcat(buf, qbuf);
-	} else {
-	  strcat(buf, "noquota");
-	}
-      } else {
-	strcat(buf, "noquota");
-      }
     case 'n': /* Source Domain Name */
       if (!strcmp(req->srcDomain, "-")) {
 	strcat(buf, "unknown");
@@ -751,17 +734,3 @@
   return buf;
 }
 
-#if __STDC__
-struct UserQuotaInfo *setuserquota()
-#else
-struct UserQuotaInfo *setuserquota()
-#endif
-{
-  static struct UserQuotaInfo uq;
-  uq.status = 0; 
-  uq.time = 0; 
-  uq.consumed = 0; 
-  uq.last = 0; 
-  return &uq;
-}
-
--- squidguard-1.2.0.orig/src/sgLog.c
+++ squidguard-1.2.0/src/sgLog.c
@@ -108,7 +108,8 @@
     return;
   va_end(ap);
   sgLog(globalErrorLog,"%s",msg);
-  sgEmergency();
+  //sgEmergency();
+  exit(1);
 }
 
 
--- squidguard-1.2.0.orig/src/y.tab.c.bison
+++ squidguard-1.2.0/src/y.tab.c.bison
@@ -1,25 +1,25 @@
 
 /*  A Bison parser, made from sg.y
-    by GNU Bison version 1.28  */
+ by  GNU Bison version 1.25
+  */
 
 #define YYBISON 1  /* Identify Bison output.  */
 
-#define	WORD	257
-#define	END	258
-#define	START_BRACKET	259
-#define	STOP_BRACKET	260
-#define	WEEKDAY	261
-#define	DESTINATION	262
-#define	REWRITE	263
-#define	ACL	264
-#define	TIME	265
-#define	TVAL	266
-#define	DVAL	267
-#define	DVALCRON	268
-#define	SOURCE	269
-#define	CIDR	270
-#define	IPCLASS	271
-#define	CONTINUE	272
+#define	WORD	258
+#define	END	259
+#define	START_BRACKET	260
+#define	STOP_BRACKET	261
+#define	WEEKDAY	262
+#define	DESTINATION	263
+#define	REWRITE	264
+#define	ACL	265
+#define	TIME	266
+#define	TVAL	267
+#define	DVAL	268
+#define	DVALCRON	269
+#define	SOURCE	270
+#define	CIDR	271
+#define	IPCLASS	272
 #define	IPADDR	273
 #define	DBHOME	274
 #define	DOMAINLIST	275
@@ -29,27 +29,20 @@
 #define	DOMAIN	279
 #define	USER	280
 #define	USERLIST	281
-#define	USERQUOTA	282
-#define	IP	283
-#define	NL	284
-#define	NUMBER	285
-#define	PASS	286
-#define	REDIRECT	287
-#define	LOGDIR	288
-#define	SUBST	289
-#define	CHAR	290
-#define	MINUTELY	291
-#define	HOURLY	292
-#define	DAILY	293
-#define	WEEKLY	294
-#define	DATE	295
-#define	WITHIN	296
-#define	OUTSIDE	297
-#define	ELSE	298
-#define	LOGFILE	299
-#define	ANONYMOUS	300
-#define	CONTINIOUS	301
-#define	SPORADIC	302
+#define	IP	282
+#define	NL	283
+#define	PASS	284
+#define	REDIRECT	285
+#define	LOGDIR	286
+#define	SUBST	287
+#define	CHAR	288
+#define	WEEKLY	289
+#define	DATE	290
+#define	WITHIN	291
+#define	OUTSIDE	292
+#define	ELSE	293
+#define	LOGFILE	294
+#define	ANONYMOUS	295
 
 #line 20 "sg.y"
 
@@ -92,8 +85,6 @@
 
 extern char *globalLogDir; /* from main.c */
 
-extern struct Source *lastActiveSource;
-
 extern int globalDebugTimeDelta;
 
 static int time_switch = 0;
@@ -102,7 +93,7 @@
 int numSource = 0;
 
 
-#line 71 "sg.y"
+#line 69 "sg.y"
 typedef union {
   char *string;
   char *tval;
@@ -120,24 +111,24 @@
 
 
 
-#define	YYFINAL		181
+#define	YYFINAL		173
 #define	YYFLAG		-32768
-#define	YYNTBASE	53
+#define	YYNTBASE	45
 
-#define YYTRANSLATE(x) ((unsigned)(x) <= 302 ? yytranslate[x] : 101)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 295 ? yytranslate[x] : 93)
 
 static const char yytranslate[] = {     0,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,    52,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,    51,    49,     2,     2,     2,     2,     2,
+     2,     2,    44,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,    43,    41,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,    50,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,    42,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -152,12 +143,11 @@
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
-     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-    37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-    47,    48
+     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
+     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+    36,    37,    38,    39,    40
 };
 
 #if YYDEBUG != 0
@@ -165,71 +155,69 @@
      0,     2,     5,     8,    10,    12,    15,    20,    21,    24,
     27,    30,    33,    36,    39,    43,    46,    49,    52,    55,
     58,    62,    65,    68,    73,    74,    77,    80,    83,    86,
-    91,    96,   101,   106,   109,   112,   115,   118,   122,   125,
-   127,   128,   131,   134,   135,   138,   141,   146,   147,   150,
-   152,   156,   160,   165,   166,   176,   177,   180,   183,   186,
-   189,   193,   196,   197,   200,   204,   207,   209,   211,   212,
-   215,   219,   223,   228,   231,   233,   236,   241,   242,   245,
-   247,   250,   253,   257,   260,   263,   268,   269,   272,   273,
-   274,   280,   281,   282,   288,   289,   293,   294,   300,   304,
-   307,   309,   314,   318,   321,   323,   325,   327,   329,   330,
-   333,   335,   337,   339,   341,   343,   345,   347,   349
+    89,    92,    95,    98,   102,   105,   106,   109,   112,   113,
+   116,   119,   124,   125,   128,   130,   134,   138,   143,   144,
+   154,   155,   158,   161,   164,   167,   171,   174,   175,   178,
+   182,   185,   187,   189,   190,   193,   197,   201,   206,   209,
+   211,   214,   219,   220,   223,   225,   228,   231,   235,   238,
+   241,   246,   247,   250,   251,   252,   258,   259,   260,   266,
+   267,   271,   272,   278,   282,   285,   287,   292,   296,   299,
+   301,   303,   305,   307,   308,   311,   313,   315,   317,   319,
+   321,   323,   325,   327
 };
 
-static const short yyrhs[] = {    99,
-     0,    20,     3,     0,    34,     3,     0,     5,     0,     6,
-     0,     8,     3,     0,    58,    56,    60,    57,     0,     0,
-    60,    61,     0,    21,     3,     0,    21,    49,     0,    22,
-     3,     0,    22,    49,     0,    23,    49,     0,    23,    50,
-     3,     0,    23,     3,     0,    33,     3,     0,     9,     3,
-     0,    42,     3,     0,    43,     3,     0,    45,    46,     3,
-     0,    45,     3,     0,    15,     3,     0,    62,    56,    64,
-    57,     0,     0,    64,    65,     0,    25,    66,     0,    26,
-    67,     0,    27,     3,     0,    28,    31,    31,    38,     0,
-    28,    31,    31,    39,     0,    28,    31,    31,    40,     0,
-    28,    31,    31,    31,     0,    29,    78,     0,    24,     3,
-     0,    42,     3,     0,    43,     3,     0,    45,    46,     3,
-     0,    45,     3,     0,    18,     0,     0,    66,     3,     0,
-    66,    51,     0,     0,    67,     3,     0,    67,    51,     0,
-    10,    56,    69,    57,     0,     0,    69,    71,     0,     3,
-     0,     3,    42,     3,     0,     3,    43,     3,     0,    70,
-    56,    73,    57,     0,     0,    70,    56,    73,    57,    44,
-    72,    56,    73,    57,     0,     0,    73,    74,     0,    32,
-    75,     0,     9,     3,     0,    33,     3,     0,    45,    46,
-     3,     0,    45,     3,     0,     0,    75,     3,     0,    75,
-    52,     3,     0,    75,    51,     0,    16,     0,    17,     0,
-     0,    78,    79,     0,    78,    79,    76,     0,    78,    79,
-    77,     0,    78,    79,    49,    79,     0,    78,    51,     0,
-    19,     0,     9,     3,     0,    80,    56,    82,    57,     0,
-     0,    82,    83,     0,    35,     0,    42,     3,     0,    43,
-     3,     0,    45,    46,     3,     0,    45,     3,     0,    11,
-     3,     0,    84,    56,    86,    57,     0,     0,    86,    87,
-     0,     0,     0,    40,    88,     3,    89,    93,     0,     0,
-     0,    40,    90,     7,    91,    93,     0,     0,    41,    92,
-    95,     0,     0,    93,    94,    97,    49,    97,     0,    97,
-    49,    97,     0,    96,    93,     0,    96,     0,    96,    49,
-    96,    93,     0,    96,    49,    96,     0,    98,    93,     0,
-    98,     0,    13,     0,    12,     0,    14,     0,     0,    99,
-   100,     0,    58,     0,    63,     0,    59,     0,    54,     0,
-    55,     0,    68,     0,    81,     0,    85,     0,    30,     0
+static const short yyrhs[] = {    91,
+     0,    19,     3,     0,    31,     3,     0,     5,     0,     6,
+     0,     8,     3,     0,    50,    48,    52,    49,     0,     0,
+    52,    53,     0,    20,     3,     0,    20,    41,     0,    21,
+     3,     0,    21,    41,     0,    22,    41,     0,    22,    42,
+     3,     0,    22,     3,     0,    30,     3,     0,     9,     3,
+     0,    36,     3,     0,    37,     3,     0,    39,    40,     3,
+     0,    39,     3,     0,    15,     3,     0,    54,    48,    56,
+    49,     0,     0,    56,    57,     0,    24,    58,     0,    25,
+    59,     0,    26,     3,     0,    27,    70,     0,    23,     3,
+     0,    36,     3,     0,    37,     3,     0,    39,    40,     3,
+     0,    39,     3,     0,     0,    58,     3,     0,    58,    43,
+     0,     0,    59,     3,     0,    59,    43,     0,    10,    48,
+    61,    49,     0,     0,    61,    63,     0,     3,     0,     3,
+    36,     3,     0,     3,    37,     3,     0,    62,    48,    65,
+    49,     0,     0,    62,    48,    65,    49,    38,    64,    48,
+    65,    49,     0,     0,    65,    66,     0,    29,    67,     0,
+     9,     3,     0,    30,     3,     0,    39,    40,     3,     0,
+    39,     3,     0,     0,    67,     3,     0,    67,    44,     3,
+     0,    67,    43,     0,    16,     0,    17,     0,     0,    70,
+    71,     0,    70,    71,    68,     0,    70,    71,    69,     0,
+    70,    71,    41,    71,     0,    70,    43,     0,    18,     0,
+     9,     3,     0,    72,    48,    74,    49,     0,     0,    74,
+    75,     0,    32,     0,    36,     3,     0,    37,     3,     0,
+    39,    40,     3,     0,    39,     3,     0,    11,     3,     0,
+    76,    48,    78,    49,     0,     0,    78,    79,     0,     0,
+     0,    34,    80,     3,    81,    85,     0,     0,     0,    34,
+    82,     7,    83,    85,     0,     0,    35,    84,    87,     0,
+     0,    85,    86,    89,    41,    89,     0,    89,    41,    89,
+     0,    88,    85,     0,    88,     0,    88,    41,    88,    85,
+     0,    88,    41,    88,     0,    90,    85,     0,    90,     0,
+    13,     0,    12,     0,    14,     0,     0,    91,    92,     0,
+    50,     0,    55,     0,    51,     0,    46,     0,    47,     0,
+    60,     0,    73,     0,    77,     0,    28,     0
 };
 
 #endif
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-   108,   113,   116,   119,   123,   127,   130,   134,   135,   137,
-   139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
-   149,   150,   153,   156,   159,   160,   164,   165,   166,   167,
-   169,   171,   173,   175,   176,   177,   178,   179,   180,   181,
-   185,   186,   187,   190,   191,   192,   195,   198,   199,   202,
-   203,   204,   207,   208,   210,   213,   214,   217,   218,   219,
-   220,   221,   224,   225,   226,   227,   230,   233,   235,   236,
-   237,   238,   239,   240,   243,   246,   248,   251,   252,   256,
-   257,   258,   259,   260,   264,   266,   269,   270,   274,   275,
-   276,   276,   277,   278,   278,   279,   282,   282,   283,   286,
-   287,   288,   289,   290,   291,   294,   297,   300,   303,   304,
-   307,   309,   310,   311,   312,   313,   314,   315,   316
+   105,   110,   113,   116,   120,   124,   127,   131,   132,   134,
+   136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+   146,   147,   150,   153,   156,   157,   161,   162,   163,   164,
+   165,   166,   167,   168,   169,   173,   174,   175,   178,   179,
+   180,   183,   186,   187,   190,   191,   192,   195,   196,   198,
+   201,   202,   205,   206,   207,   208,   209,   212,   213,   214,
+   215,   218,   221,   223,   224,   225,   226,   227,   228,   231,
+   234,   236,   239,   240,   244,   245,   246,   247,   248,   252,
+   254,   257,   258,   262,   263,   264,   264,   265,   266,   266,
+   267,   270,   270,   271,   274,   275,   276,   277,   278,   279,
+   282,   285,   288,   291,   292,   295,   297,   298,   299,   300,
+   301,   302,   303,   304
 };
 #endif
 
@@ -238,11 +226,10 @@
 
 static const char * const yytname[] = {   "$","error","$undefined.","WORD","END",
 "START_BRACKET","STOP_BRACKET","WEEKDAY","DESTINATION","REWRITE","ACL","TIME",
-"TVAL","DVAL","DVALCRON","SOURCE","CIDR","IPCLASS","CONTINUE","IPADDR","DBHOME",
-"DOMAINLIST","URLLIST","EXPRESSIONLIST","IPLIST","DOMAIN","USER","USERLIST",
-"USERQUOTA","IP","NL","NUMBER","PASS","REDIRECT","LOGDIR","SUBST","CHAR","MINUTELY",
-"HOURLY","DAILY","WEEKLY","DATE","WITHIN","OUTSIDE","ELSE","LOGFILE","ANONYMOUS",
-"CONTINIOUS","SPORADIC","'-'","'i'","','","'!'","start","dbhome","logdir","start_block",
+"TVAL","DVAL","DVALCRON","SOURCE","CIDR","IPCLASS","IPADDR","DBHOME","DOMAINLIST",
+"URLLIST","EXPRESSIONLIST","IPLIST","DOMAIN","USER","USERLIST","IP","NL","PASS",
+"REDIRECT","LOGDIR","SUBST","CHAR","WEEKLY","DATE","WITHIN","OUTSIDE","ELSE",
+"LOGFILE","ANONYMOUS","'-'","'i'","','","'!'","start","dbhome","logdir","start_block",
 "stop_block","destination","destination_block","destination_contents","destination_content",
 "source","source_block","source_contents","source_content","domain","user","acl_block",
 "acl_contents","acl","acl_content","@1","access_contents","access_content","access_pass",
@@ -253,139 +240,134 @@
 #endif
 
 static const short yyr1[] = {     0,
-    53,    54,    55,    56,    57,    58,    59,    60,    60,    61,
-    61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
-    61,    61,    62,    63,    64,    64,    65,    65,    65,    65,
-    65,    65,    65,    65,    65,    65,    65,    65,    65,    65,
-    66,    66,    66,    67,    67,    67,    68,    69,    69,    70,
-    70,    70,    71,    72,    71,    73,    73,    74,    74,    74,
-    74,    74,    75,    75,    75,    75,    76,    77,    78,    78,
-    78,    78,    78,    78,    79,    80,    81,    82,    82,    83,
-    83,    83,    83,    83,    84,    85,    86,    86,    88,    89,
-    87,    90,    91,    87,    92,    87,    94,    93,    93,    95,
-    95,    95,    95,    95,    95,    96,    97,    98,    99,    99,
-   100,   100,   100,   100,   100,   100,   100,   100,   100
+    45,    46,    47,    48,    49,    50,    51,    52,    52,    53,
+    53,    53,    53,    53,    53,    53,    53,    53,    53,    53,
+    53,    53,    54,    55,    56,    56,    57,    57,    57,    57,
+    57,    57,    57,    57,    57,    58,    58,    58,    59,    59,
+    59,    60,    61,    61,    62,    62,    62,    63,    64,    63,
+    65,    65,    66,    66,    66,    66,    66,    67,    67,    67,
+    67,    68,    69,    70,    70,    70,    70,    70,    70,    71,
+    72,    73,    74,    74,    75,    75,    75,    75,    75,    76,
+    77,    78,    78,    80,    81,    79,    82,    83,    79,    84,
+    79,    86,    85,    85,    87,    87,    87,    87,    87,    87,
+    88,    89,    90,    91,    91,    92,    92,    92,    92,    92,
+    92,    92,    92,    92
 };
 
 static const short yyr2[] = {     0,
      1,     2,     2,     1,     1,     2,     4,     0,     2,     2,
      2,     2,     2,     2,     3,     2,     2,     2,     2,     2,
-     3,     2,     2,     4,     0,     2,     2,     2,     2,     4,
-     4,     4,     4,     2,     2,     2,     2,     3,     2,     1,
-     0,     2,     2,     0,     2,     2,     4,     0,     2,     1,
-     3,     3,     4,     0,     9,     0,     2,     2,     2,     2,
-     3,     2,     0,     2,     3,     2,     1,     1,     0,     2,
-     3,     3,     4,     2,     1,     2,     4,     0,     2,     1,
-     2,     2,     3,     2,     2,     4,     0,     2,     0,     0,
-     5,     0,     0,     5,     0,     3,     0,     5,     3,     2,
-     1,     4,     3,     2,     1,     1,     1,     1,     0,     2,
-     1,     1,     1,     1,     1,     1,     1,     1,     1
+     3,     2,     2,     4,     0,     2,     2,     2,     2,     2,
+     2,     2,     2,     3,     2,     0,     2,     2,     0,     2,
+     2,     4,     0,     2,     1,     3,     3,     4,     0,     9,
+     0,     2,     2,     2,     2,     3,     2,     0,     2,     3,
+     2,     1,     1,     0,     2,     3,     3,     4,     2,     1,
+     2,     4,     0,     2,     1,     2,     2,     3,     2,     2,
+     4,     0,     2,     0,     0,     5,     0,     0,     5,     0,
+     3,     0,     5,     3,     2,     1,     4,     3,     2,     1,
+     1,     1,     1,     0,     2,     1,     1,     1,     1,     1,
+     1,     1,     1,     1
 };
 
-static const short yydefact[] = {   109,
-     1,     0,     0,     0,     0,     0,     0,   119,     0,   114,
-   115,   111,   113,     0,   112,   116,     0,   117,     0,   118,
-   110,     6,    76,     4,    48,    85,    23,     2,     3,     8,
-    25,    78,    87,     0,     0,     0,     0,     0,    50,     5,
-    47,     0,    49,     0,     0,     0,     0,     0,     0,     0,
-     0,     7,     9,    40,     0,    41,    44,     0,     0,    69,
-     0,     0,     0,    24,    26,    80,     0,     0,     0,    77,
-    79,    89,    95,    86,    88,     0,     0,    56,    18,    10,
-    11,    12,    13,    16,    14,     0,    17,    19,    20,    22,
-     0,    35,    27,    28,    29,     0,    34,    36,    37,    39,
-     0,    81,    82,    84,     0,     0,     0,     0,    51,    52,
-     0,    15,    21,    42,    43,    45,    46,     0,    75,    74,
-    70,    38,    83,    90,    93,   106,   108,    96,   101,   105,
-     0,    63,     0,     0,    53,    57,    33,    30,    31,    32,
-    67,    68,     0,    71,    72,     0,     0,   107,     0,   100,
-     0,   104,    59,    58,    60,    62,     0,    54,    73,    91,
-    94,   103,     0,     0,    64,    66,     0,    61,     0,   102,
-     0,    99,    65,    56,     0,     0,    98,    55,     0,     0,
-     0
+static const short yydefact[] = {   104,
+     1,     0,     0,     0,     0,     0,     0,   114,     0,   109,
+   110,   106,   108,     0,   107,   111,     0,   112,     0,   113,
+   105,     6,    71,     4,    43,    80,    23,     2,     3,     8,
+    25,    73,    82,     0,     0,     0,     0,     0,    45,     5,
+    42,     0,    44,     0,     0,     0,     0,     0,     0,     0,
+     0,     7,     9,     0,    36,    39,     0,    64,     0,     0,
+     0,    24,    26,    75,     0,     0,     0,    72,    74,    84,
+    90,    81,    83,     0,     0,    51,    18,    10,    11,    12,
+    13,    16,    14,     0,    17,    19,    20,    22,     0,    31,
+    27,    28,    29,    30,    32,    33,    35,     0,    76,    77,
+    79,     0,     0,     0,     0,    46,    47,     0,    15,    21,
+    37,    38,    40,    41,    70,    69,    65,    34,    78,    85,
+    88,   101,   103,    91,    96,   100,     0,    58,     0,     0,
+    48,    52,    62,    63,     0,    66,    67,     0,     0,   102,
+     0,    95,     0,    99,    54,    53,    55,    57,     0,    49,
+    68,    86,    89,    98,     0,     0,    59,    61,     0,    56,
+     0,    97,     0,    94,    60,    51,     0,     0,    93,    50,
+     0,     0,     0
 };
 
-static const short yydefgoto[] = {   179,
+static const short yydefgoto[] = {   171,
     10,    11,    25,    41,    12,    13,    35,    53,    14,    15,
-    36,    65,    93,    94,    16,    34,    42,    43,   169,   111,
-   136,   154,   144,   145,    97,   121,    17,    18,    37,    71,
-    19,    20,    38,    75,   106,   146,   107,   147,   108,   150,
-   163,   128,   129,   151,   130,     1,    21
+    36,    63,    91,    92,    16,    34,    42,    43,   161,   108,
+   132,   146,   136,   137,    94,   117,    17,    18,    37,    69,
+    19,    20,    38,    73,   103,   138,   104,   139,   105,   142,
+   155,   124,   125,   143,   126,     1,    21
 };
 
 static const short yypact[] = {-32768,
-    86,    19,    39,    40,    41,    43,    44,-32768,    82,-32768,
--32768,    40,-32768,    40,-32768,-32768,    40,-32768,    40,-32768,
+    91,     3,    22,    68,    28,    71,    74,-32768,    76,-32768,
+-32768,    68,-32768,    68,-32768,-32768,    68,-32768,    68,-32768,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,    20,    60,    47,    35,    73,    -5,-32768,
--32768,    40,-32768,    83,    11,    12,     9,    84,    85,    88,
-    10,-32768,-32768,-32768,    95,-32768,-32768,    96,    76,-32768,
-   101,   105,    16,-32768,-32768,-32768,   106,   107,    17,-32768,
--32768,   104,-32768,-32768,-32768,   109,   112,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,   114,-32768,-32768,-32768,-32768,
-   115,-32768,     0,     1,-32768,    90,    49,-32768,-32768,-32768,
-   116,-32768,-32768,-32768,   119,   120,   117,    26,-32768,-32768,
-    22,-32768,-32768,-32768,-32768,-32768,-32768,    -4,-32768,-32768,
-     8,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    -6,   113,
-   123,-32768,   124,    18,    87,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,   110,-32768,-32768,   113,   113,-32768,   121,   118,
-    79,   118,-32768,    -2,-32768,-32768,   129,-32768,-32768,   118,
-   118,   113,   113,   113,-32768,-32768,   130,-32768,    40,   118,
-    89,-32768,-32768,-32768,   113,    22,-32768,-32768,   135,   136,
--32768
+-32768,-32768,-32768,    18,    39,    10,    26,    60,   -14,-32768,
+-32768,    68,-32768,    77,    11,    12,     9,    81,    82,    83,
+    14,-32768,-32768,    86,-32768,-32768,    87,-32768,    88,    89,
+    15,-32768,-32768,-32768,    90,   100,    16,-32768,-32768,    97,
+-32768,-32768,-32768,   102,   104,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,   105,-32768,-32768,-32768,-32768,   106,-32768,
+     0,     1,-32768,    -5,-32768,-32768,-32768,   108,-32768,-32768,
+-32768,   109,   110,   107,    13,-32768,-32768,    58,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,    55,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,    27,   103,   113,-32768,   114,    17,
+    80,-32768,-32768,-32768,   111,-32768,-32768,   103,   103,-32768,
+   112,   115,    79,   115,-32768,    -2,-32768,-32768,   118,-32768,
+-32768,   115,   115,   103,   103,   103,-32768,-32768,   120,-32768,
+    68,   115,    85,-32768,-32768,-32768,   103,    58,-32768,-32768,
+   124,   128,-32768
 };
 
 static const short yypgoto[] = {-32768,
 -32768,-32768,   -12,   -27,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -37,
--32768,-32768,-32768,-32768,-32768,    -3,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -114,
--32768,-32768,   -10,  -146,-32768,-32768,-32768
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -36,
+-32768,-32768,-32768,-32768,-32768,    -4,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -56,
+-32768,-32768,    -9,  -127,-32768,-32768,-32768
 };
 
 
-#define	YYLAST		157
+#define	YYLAST		149
 
 
 static const short yytable[] = {    30,
-   165,    31,   114,   116,    32,   148,    33,    52,    64,    70,
-    74,    84,    90,    80,    82,   152,   171,   172,   100,   104,
-   156,    22,    39,   141,   142,    40,   137,    40,   177,    78,
-   131,   160,   161,   138,   139,   140,    76,    77,   126,   127,
-    40,    23,   149,    26,    24,    27,    28,   170,   166,   167,
-   115,   117,    40,   132,   133,    91,   143,    85,    86,    81,
-    83,   101,   105,   157,    54,    40,   134,   119,    44,    66,
-    55,    56,    57,    58,    59,    60,    67,    68,    40,    69,
-    45,    46,    47,   135,    29,    79,    87,    88,    61,    62,
-    89,    63,    48,     2,     3,     4,     5,    92,    95,   120,
-     6,    49,    50,    98,    51,     7,    96,    99,   102,   103,
-   -92,   109,    72,    73,   110,     8,   112,   113,   122,     9,
-   118,   123,   124,   125,   148,   153,   155,   164,   119,   -97,
-   158,   168,   173,   126,   180,   181,   176,   175,   162,   159,
-     0,     0,     0,     0,     0,     0,     0,     0,   178,     0,
-     0,     0,     0,     0,     0,     0,   174
+   157,    31,   111,   113,    32,    22,    33,    52,    62,    68,
+    72,    82,   115,    78,    80,    40,    88,    97,   101,   148,
+    39,    74,    75,    40,    23,   122,   123,   163,   164,    76,
+    26,    40,    54,    55,    56,    57,    58,   116,   140,   169,
+   158,   159,   112,   114,    40,    59,    60,    44,    61,    83,
+    84,    79,    81,    89,    98,   102,   149,    64,    45,    46,
+    47,    65,    66,    40,    67,    40,   127,   141,    48,   144,
+   133,   134,    24,    27,    49,    50,    28,    51,    29,    77,
+   131,   152,   153,    85,    86,    87,   128,   129,    90,    93,
+    95,    96,    99,    70,    71,   135,   130,   162,     2,     3,
+     4,     5,   100,   -87,   106,     6,   107,   109,   110,     7,
+   118,   119,   120,   121,   140,   145,   147,   150,     8,   156,
+   160,     9,   165,   172,   122,   167,   -92,   173,   115,   168,
+   151,   154,     0,     0,     0,     0,     0,     0,     0,     0,
+   170,     0,     0,     0,     0,     0,     0,     0,   166
 };
 
 static const short yycheck[] = {    12,
-     3,    14,     3,     3,    17,    12,    19,    35,    36,    37,
-    38,     3,     3,     3,     3,   130,   163,   164,     3,     3,
-     3,     3,     3,    16,    17,     6,    31,     6,   175,    42,
-     9,   146,   147,    38,    39,    40,    42,    43,    13,    14,
-     6,     3,    49,     3,     5,     3,     3,   162,    51,    52,
-    51,    51,     6,    32,    33,    46,    49,    49,    50,    49,
-    49,    46,    46,    46,    18,     6,    45,    19,     9,    35,
-    24,    25,    26,    27,    28,    29,    42,    43,     6,    45,
-    21,    22,    23,   111,     3,     3,     3,     3,    42,    43,
-     3,    45,    33,     8,     9,    10,    11,     3,     3,    51,
-    15,    42,    43,     3,    45,    20,    31,     3,     3,     3,
-     7,     3,    40,    41,     3,    30,     3,     3,     3,    34,
-    31,     3,     3,     7,    12,     3,     3,    49,    19,    12,
-    44,     3,     3,    13,     0,     0,   174,    49,   149,   143,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   169
+     3,    14,     3,     3,    17,     3,    19,    35,    36,    37,
+    38,     3,    18,     3,     3,     6,     3,     3,     3,     3,
+     3,    36,    37,     6,     3,    13,    14,   155,   156,    42,
+     3,     6,    23,    24,    25,    26,    27,    43,    12,   167,
+    43,    44,    43,    43,     6,    36,    37,     9,    39,    41,
+    42,    41,    41,    40,    40,    40,    40,    32,    20,    21,
+    22,    36,    37,     6,    39,     6,     9,    41,    30,   126,
+    16,    17,     5,     3,    36,    37,     3,    39,     3,     3,
+   108,   138,   139,     3,     3,     3,    29,    30,     3,     3,
+     3,     3,     3,    34,    35,    41,    39,   154,     8,     9,
+    10,    11,     3,     7,     3,    15,     3,     3,     3,    19,
+     3,     3,     3,     7,    12,     3,     3,    38,    28,    41,
+     3,    31,     3,     0,    13,    41,    12,     0,    18,   166,
+   135,   141,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+   168,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   161
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/local/share/bison.simple"
-/* This file comes from bison-1.28.  */
 
 /* Skeleton output parser for bison,
    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -402,66 +384,46 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
    This special exception was added by the Free Software Foundation
    in version 1.24 of Bison.  */
 
-/* This is the parser code that is written into each bison parser
-  when the %semantic_parser declaration is not specified in the grammar.
-  It was written by Richard Stallman by simplifying the hairy parser
-  used when %semantic_parser is specified.  */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
+#ifndef alloca
 #ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
 #define alloca __builtin_alloca
 #else /* not GNU C.  */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
 #include <alloca.h>
 #else /* not sparc */
-/* We think this test detects Watcom and Microsoft C.  */
-/* This used to test MSDOS, but that is a bad idea
-   since that symbol is in the user namespace.  */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
-	 instead, just don't use alloca.  */
+#if defined (MSDOS) && !defined (__TURBOC__)
 #include <malloc.h>
-#endif
 #else /* not MSDOS, or __TURBOC__ */
 #if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
-   So I turned it off.   rms, 2 May 1997.  */
-/* #include <malloc.h>  */
+#include <malloc.h>
  #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
-		 and on HPUX 10.  Eventually we can turn this on.  */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
+#else /* not MSDOS, __TURBOC__, or _AIX */
+#ifdef __hpux
+#ifdef __cplusplus
+extern "C" {
+void *alloca (unsigned int);
+};
+#else /* not __cplusplus */
+void *alloca ();
+#endif /* not __cplusplus */
 #endif /* __hpux */
-#endif
 #endif /* not _AIX */
 #endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
+#endif /* not sparc.  */
+#endif /* not GNU C.  */
+#endif /* alloca not defined.  */
 
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
 
 /* Note: there must be only one dollar sign in this file.
    It is replaced by the list of actions, each action
@@ -471,8 +433,8 @@
 #define yyclearin	(yychar = YYEMPTY)
 #define YYEMPTY		-2
 #define YYEOF		0
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT 	goto yyabortlab
+#define YYACCEPT	return(0)
+#define YYABORT 	return(1)
 #define YYERROR		goto yyerrlab1
 /* Like YYERROR except do call yyerror.
    This remains here temporarily to ease the
@@ -553,12 +515,12 @@
 #ifndef YYMAXDEPTH
 #define YYMAXDEPTH 10000
 #endif
-
-/* Define __yy_memcpy.  Note that the size argument
-   should be passed with type unsigned int, because that is what the non-GCC
-   definitions require.  With GCC, __builtin_memcpy takes an arg
-   of type size_t, but it can handle unsigned int.  */
 
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+int yyparse (void);
+#endif
+
 #if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
 #define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
 #else				/* not GNU C or C++ */
@@ -570,7 +532,7 @@
 __yy_memcpy (to, from, count)
      char *to;
      char *from;
-     unsigned int count;
+     int count;
 {
   register char *f = from;
   register char *t = to;
@@ -585,10 +547,10 @@
 /* This is the most reliable way to avoid incompatibilities
    in available built-in functions on various systems.  */
 static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+__yy_memcpy (char *to, char *from, int count)
 {
-  register char *t = to;
   register char *f = from;
+  register char *t = to;
   register int i = count;
 
   while (i-- > 0)
@@ -598,7 +560,7 @@
 #endif
 #endif
 
-#line 217 "/local/share/bison.simple"
+#line 196 "/local/share/bison.simple"
 
 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
    into yyparse.  The argument should have type void *.
@@ -619,15 +581,6 @@
 #define YYPARSE_PARAM_DECL
 #endif /* not YYPARSE_PARAM */
 
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
 int
 yyparse(YYPARSE_PARAM_ARG)
      YYPARSE_PARAM_DECL
@@ -656,7 +609,6 @@
 #endif
 
   int yystacksize = YYINITDEPTH;
-  int yyfree_stacks = 0;
 
 #ifdef YYPURE
   int yychar;
@@ -741,32 +693,18 @@
       if (yystacksize >= YYMAXDEPTH)
 	{
 	  yyerror("parser stack overflow");
-	  if (yyfree_stacks)
-	    {
-	      free (yyss);
-	      free (yyvs);
-#ifdef YYLSP_NEEDED
-	      free (yyls);
-#endif
-	    }
 	  return 2;
 	}
       yystacksize *= 2;
       if (yystacksize > YYMAXDEPTH)
 	yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
-      yyfree_stacks = 1;
-#endif
-      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
-      __yy_memcpy ((char *)yyss, (char *)yyss1,
-		   size * (unsigned int) sizeof (*yyssp));
-      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
-      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
-		   size * (unsigned int) sizeof (*yyvsp));
+      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
+      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
 #ifdef YYLSP_NEEDED
-      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
-      __yy_memcpy ((char *)yyls, (char *)yyls1,
-		   size * (unsigned int) sizeof (*yylsp));
+      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
 #endif
 #endif /* no yyoverflow */
 
@@ -927,280 +865,256 @@
   switch (yyn) {
 
 case 2:
-#line 113 "sg.y"
+#line 110 "sg.y"
 { sgSetting("dbhome",yyvsp[0].string); ;
     break;}
 case 3:
-#line 116 "sg.y"
+#line 113 "sg.y"
 { sgSetting("logdir",yyvsp[0].string); ;
     break;}
 case 6:
-#line 127 "sg.y"
+#line 124 "sg.y"
 { sgDest(yyvsp[0].string); ;
     break;}
 case 7:
-#line 131 "sg.y"
+#line 128 "sg.y"
 { sgDestEnd();;
     break;}
 case 10:
-#line 138 "sg.y"
+#line 135 "sg.y"
 { sgDestDomainList(yyvsp[0].string); ;
     break;}
 case 11:
-#line 139 "sg.y"
+#line 136 "sg.y"
 { sgDestDomainList(NULL); ;
     break;}
 case 12:
-#line 140 "sg.y"
+#line 137 "sg.y"
 { sgDestUrlList(yyvsp[0].string); ;
     break;}
 case 13:
-#line 141 "sg.y"
+#line 138 "sg.y"
 { sgDestUrlList(NULL); ;
     break;}
 case 14:
-#line 142 "sg.y"
+#line 139 "sg.y"
 { sgDestExpressionList(NULL,NULL); ;
     break;}
 case 15:
-#line 143 "sg.y"
+#line 140 "sg.y"
 { sgDestExpressionList(yyvsp[0].string,"i"); ;
     break;}
 case 16:
-#line 144 "sg.y"
+#line 141 "sg.y"
 { sgDestExpressionList(yyvsp[0].string,"n"); ;
     break;}
 case 17:
-#line 145 "sg.y"
+#line 142 "sg.y"
 {sgDestRedirect(yyvsp[0].string); ;
     break;}
 case 18:
-#line 146 "sg.y"
+#line 143 "sg.y"
 {sgDestRewrite(yyvsp[0].string); ;
     break;}
 case 19:
-#line 147 "sg.y"
+#line 144 "sg.y"
 { sgDestTime(yyvsp[0].string,WITHIN); ;
     break;}
 case 20:
-#line 148 "sg.y"
+#line 145 "sg.y"
 { sgDestTime(yyvsp[0].string,OUTSIDE); ;
     break;}
 case 21:
-#line 149 "sg.y"
+#line 146 "sg.y"
 { sgLogFile(SG_BLOCK_DESTINATION,1,yyvsp[0].string); ;
     break;}
 case 22:
-#line 150 "sg.y"
+#line 147 "sg.y"
 { sgLogFile(SG_BLOCK_DESTINATION,0,yyvsp[0].string); ;
     break;}
 case 23:
-#line 153 "sg.y"
+#line 150 "sg.y"
 { sgSource(yyvsp[0].string); ;
     break;}
 case 24:
-#line 156 "sg.y"
+#line 153 "sg.y"
 {sgSourceEnd();;
     break;}
 case 29:
-#line 166 "sg.y"
+#line 163 "sg.y"
 { sgSourceUserList(yyvsp[0].string); ;
     break;}
-case 30:
-#line 167 "sg.y"
-{ 
-		      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"3600");;
-    break;}
 case 31:
-#line 169 "sg.y"
-{ 
-		      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"86400");;
-    break;}
-case 32:
-#line 171 "sg.y"
-{ 
-		      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"604800");;
-    break;}
-case 33:
-#line 173 "sg.y"
-{ 
-		      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,yyvsp[0].string);;
-    break;}
-case 35:
-#line 176 "sg.y"
+#line 165 "sg.y"
 { sgSourceIpList(yyvsp[0].string); ;
     break;}
-case 36:
-#line 177 "sg.y"
+case 32:
+#line 166 "sg.y"
 { sgSourceTime(yyvsp[0].string,WITHIN); ;
     break;}
-case 37:
-#line 178 "sg.y"
+case 33:
+#line 167 "sg.y"
 { sgSourceTime(yyvsp[0].string,OUTSIDE); ;
     break;}
-case 38:
-#line 179 "sg.y"
+case 34:
+#line 168 "sg.y"
 {sgLogFile(SG_BLOCK_SOURCE,1,yyvsp[0].string);;
     break;}
-case 39:
-#line 180 "sg.y"
+case 35:
+#line 169 "sg.y"
 { sgLogFile(SG_BLOCK_SOURCE,0,yyvsp[0].string); ;
     break;}
-case 40:
-#line 181 "sg.y"
-{ lastSource->cont_search = 1; ;
-    break;}
-case 42:
-#line 186 "sg.y"
+case 37:
+#line 174 "sg.y"
 { sgSourceDomain(yyvsp[0].string); ;
     break;}
-case 45:
-#line 191 "sg.y"
+case 40:
+#line 179 "sg.y"
 { sgSourceUser(yyvsp[0].string); ;
     break;}
-case 50:
-#line 202 "sg.y"
+case 45:
+#line 190 "sg.y"
 {sgAcl(yyvsp[0].string,NULL,0);;
     break;}
-case 51:
-#line 203 "sg.y"
+case 46:
+#line 191 "sg.y"
 {sgAcl(yyvsp[-2].string,yyvsp[0].string,WITHIN);;
     break;}
-case 52:
-#line 204 "sg.y"
+case 47:
+#line 192 "sg.y"
 { sgAcl(yyvsp[-2].string,yyvsp[0].string,OUTSIDE); ;
     break;}
-case 54:
-#line 209 "sg.y"
+case 49:
+#line 197 "sg.y"
 {sgAcl(NULL,NULL,ELSE);;
     break;}
-case 58:
-#line 217 "sg.y"
+case 53:
+#line 205 "sg.y"
 { ;
     break;}
-case 59:
-#line 218 "sg.y"
+case 54:
+#line 206 "sg.y"
 { sgAclSetValue("rewrite",yyvsp[0].string,0); ;
     break;}
-case 60:
-#line 219 "sg.y"
+case 55:
+#line 207 "sg.y"
 { sgAclSetValue("redirect",yyvsp[0].string,0); ;
     break;}
-case 61:
-#line 220 "sg.y"
+case 56:
+#line 208 "sg.y"
 {sgLogFile(SG_BLOCK_ACL,1,yyvsp[0].string);;
     break;}
-case 62:
-#line 221 "sg.y"
+case 57:
+#line 209 "sg.y"
 { sgLogFile(SG_BLOCK_ACL,0,yyvsp[0].string); ;
     break;}
-case 64:
-#line 225 "sg.y"
+case 59:
+#line 213 "sg.y"
 { sgAclSetValue("pass",yyvsp[0].string,1);;
     break;}
-case 65:
-#line 226 "sg.y"
+case 60:
+#line 214 "sg.y"
 { sgAclSetValue("pass",yyvsp[0].string,0);;
     break;}
-case 67:
-#line 230 "sg.y"
+case 62:
+#line 218 "sg.y"
 { sgIp(yyvsp[0].string); ;
     break;}
-case 68:
-#line 233 "sg.y"
+case 63:
+#line 221 "sg.y"
 { sgIp(yyvsp[0].string); ;
     break;}
-case 70:
-#line 236 "sg.y"
+case 65:
+#line 224 "sg.y"
 { sgIp("255.255.255.255") ; sgSetIpType(SG_IPTYPE_HOST,NULL,0); ;
     break;}
-case 71:
-#line 237 "sg.y"
+case 66:
+#line 225 "sg.y"
 { sgSetIpType(SG_IPTYPE_CIDR,NULL,0); ;
     break;}
-case 72:
-#line 238 "sg.y"
+case 67:
+#line 226 "sg.y"
 { sgSetIpType(SG_IPTYPE_CLASS,NULL,0); ;
     break;}
-case 73:
-#line 239 "sg.y"
+case 68:
+#line 227 "sg.y"
 { sgSetIpType(SG_IPTYPE_RANGE,NULL,0); ;
     break;}
-case 75:
-#line 243 "sg.y"
+case 70:
+#line 231 "sg.y"
 { sgIp(yyvsp[0].string);;
     break;}
-case 76:
-#line 246 "sg.y"
+case 71:
+#line 234 "sg.y"
 { sgRewrite(yyvsp[0].string); ;
     break;}
-case 80:
-#line 256 "sg.y"
+case 75:
+#line 244 "sg.y"
 { sgRewriteSubstitute(yyvsp[0].string); ;
     break;}
-case 81:
-#line 257 "sg.y"
+case 76:
+#line 245 "sg.y"
 { sgRewriteTime(yyvsp[0].string,WITHIN); ;
     break;}
-case 82:
-#line 258 "sg.y"
+case 77:
+#line 246 "sg.y"
 { sgRewriteTime(yyvsp[0].string,OUTSIDE); ;
     break;}
-case 83:
-#line 259 "sg.y"
+case 78:
+#line 247 "sg.y"
 { sgLogFile(SG_BLOCK_REWRITE,1,yyvsp[0].string); ;
     break;}
-case 84:
-#line 260 "sg.y"
+case 79:
+#line 248 "sg.y"
 { sgLogFile(SG_BLOCK_REWRITE,0,yyvsp[0].string); ;
     break;}
-case 85:
-#line 264 "sg.y"
+case 80:
+#line 252 "sg.y"
 { sgTime(yyvsp[0].string); ;
     break;}
-case 89:
-#line 274 "sg.y"
+case 84:
+#line 262 "sg.y"
 {sgTimeElementInit();;
     break;}
-case 90:
-#line 275 "sg.y"
+case 85:
+#line 263 "sg.y"
 {sgTimeElementAdd(yyvsp[0].string,T_WEEKLY);;
     break;}
-case 92:
-#line 276 "sg.y"
+case 87:
+#line 264 "sg.y"
 {sgTimeElementInit();;
     break;}
-case 93:
-#line 277 "sg.y"
+case 88:
+#line 265 "sg.y"
 {sgTimeElementAdd(yyvsp[0].string,T_WEEKDAY);;
     break;}
-case 95:
-#line 278 "sg.y"
+case 90:
+#line 266 "sg.y"
 {sgTimeElementInit();;
     break;}
-case 96:
-#line 279 "sg.y"
+case 91:
+#line 267 "sg.y"
 {sgTimeElementEnd();;
     break;}
-case 97:
-#line 282 "sg.y"
+case 92:
+#line 270 "sg.y"
 { sgTimeElementClone(); ;
     break;}
-case 106:
-#line 294 "sg.y"
+case 101:
+#line 282 "sg.y"
 { sgTimeElementAdd(yyvsp[0].string,T_DVAL);;
     break;}
-case 107:
-#line 297 "sg.y"
+case 102:
+#line 285 "sg.y"
 { sgTimeElementAdd(yyvsp[0].tval,T_TVAL);;
     break;}
-case 108:
-#line 300 "sg.y"
+case 103:
+#line 288 "sg.y"
 { sgTimeElementAdd(yyvsp[0].string,T_DVALCRON);;
     break;}
 }
    /* the action file gets copied in in place of this dollarsign */
-#line 543 "/local/share/bison.simple"
+#line 498 "/local/share/bison.simple"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -1395,32 +1309,8 @@
 
   yystate = yyn;
   goto yynewstate;
-
- yyacceptlab:
-  /* YYACCEPT comes here.  */
-  if (yyfree_stacks)
-    {
-      free (yyss);
-      free (yyvs);
-#ifdef YYLSP_NEEDED
-      free (yyls);
-#endif
-    }
-  return 0;
-
- yyabortlab:
-  /* YYABORT comes here.  */
-  if (yyfree_stacks)
-    {
-      free (yyss);
-      free (yyvs);
-#ifdef YYLSP_NEEDED
-      free (yyls);
-#endif
-    }
-  return 1;
 }
-#line 319 "sg.y"
+#line 307 "sg.y"
 
 
 #if __STDC__
@@ -1583,11 +1473,7 @@
   sp->domainDb=NULL;
   sp->active = 1;
   sp->within = 0;
-  sp->cont_search = 0;
   sp->time = NULL;
-  sp->userquota.seconds = 0;
-  sp->userquota.renew = 0;
-  sp->userquota.sporadic = 0;
   sp->next=NULL;
   sp->logfile = NULL;
   sp->name = (char  *) sgCalloc(1,strlen(source) + 1);
@@ -1630,8 +1516,7 @@
   }
   for(lc=user; *lc != '\0'; lc++) /* convert username to lowercase chars */
     *lc = tolower(*lc);
-  sgDbUpdate(sp->userDb, user, (char *) setuserquota(),
-	     sizeof(struct UserQuotaInfo));
+  sgDbUpdate(sp->userDb,user);
 }
 
 #if __STDC__
@@ -1684,16 +1569,14 @@
       *s = '\0';
       for(lc=line; *lc != '\0'; lc++) /* convert username to lowercase chars */
 	*lc = tolower(*lc);
-      sgDbUpdate(sp->userDb, line, (char *) setuserquota(),
-		 sizeof(struct UserQuotaInfo));
+      sgDbUpdate(sp->userDb,line);
     } else {
       do {
 	if(c != NULL && p >= c) /*find the comment */
 	  break;
 	for(lc=p; *lc != '\0'; lc++) /* convert username to lowercase chars */
 	  *lc = tolower(*lc);
-	sgDbUpdate(sp->userDb, p, (char *) setuserquota(),
-		   sizeof(struct UserQuotaInfo));
+	sgDbUpdate(sp->userDb,p);
       } while((p=strtok(NULL," \t,")) != NULL);
     }
   }
@@ -1701,35 +1584,6 @@
 }
 
 #if __STDC__
-void sgSourceUserQuota(char *seconds, char *sporadic, char *renew)
-#else
-void sgSourceUserQuota(seconds, sporadic, renew)
-     char *file;
-     char *sporadic;
-     char *renew;
-#endif
-{
-  int s;
-  struct UserQuota *uq;
-  struct Source *sp;
-  sp = lastSource;
-  uq = &sp->userquota;
-  s = atoi(seconds);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->seconds = s; 
-  s = atoi(sporadic);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->sporadic = s; 
-  s = atoi(renew);
-  if(s <= 0)
-    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
-  uq->renew = s;
-}
-
-
-#if __STDC__
 void sgSourceDomain(char *domain)
 #else
 void sgSourceDomain(domain)
@@ -1743,7 +1597,7 @@
     sp->domainDb->type=SGDBTYPE_DOMAINLIST;
     sgDbInit(sp->domainDb,NULL);
   }
-  sgDbUpdate(sp->domainDb,domain, NULL, 0);
+  sgDbUpdate(sp->domainDb,domain);
 }
 
 #if __STDC__
@@ -1858,11 +1712,9 @@
  */
 
 #if __STDC__
-struct Source *sgFindSource (struct Source *bsrc, 
-			     char *net, char *ident, char *domain)
+struct Source *sgFindSource (char *net, char *ident, char *domain)
 #else
-struct Source *sgFindSource (bsrc, net, ident, domain)
-     struct Source *bsrc;
+struct Source *sgFindSource (net, ident, domain)
      char *net;
      char *ident;
      char *domain;
@@ -1870,17 +1722,15 @@
 {
   struct Source *s;
   struct Ip *ip;
-  int foundip, founduser, founddomain, unblockeduser;
+  int foundip, founduser, founddomain;
   unsigned long i, octet = 0, *op;
-  struct UserQuotaInfo *userquota;
   if(net != NULL){
     op = sgConvDot(net);
     if(op != NULL)
       octet = *op;
   }
-  for(s=bsrc; s != NULL; s = s->next){
+  for(s=Source; s != NULL; s = s->next){
     foundip = founduser = founddomain = 0;
-    unblockeduser = 1;
     if(s->active == 0)
       continue;
     if(s->ip != NULL){
@@ -1910,53 +1760,9 @@
       if(*ident == '\0')
 	founduser = 0;
       else 
-	if(defined(s->userDb, ident, (char **) &userquota) == 1){
+	if(defined(s->userDb, ident, (char **) NULL) == 1)
 	  founduser = 1;
-	  unblockeduser = 1;
-	  if(s->userquota.seconds != 0){
-	    struct UserQuotaInfo uq;
-	    time_t t = time(NULL) + globalDebugTimeDelta;
-	    //sgLogError("status %d time %d lasttime %d consumed %d", userquota->status, userquota->time, userquota->last, userquota->consumed);
-	    //sgLogError("renew %d seconds %d", s->userquota.renew, s->userquota.seconds);
-	    if(userquota->status == 0){ //first time
-	      userquota->status = 1;
-	      userquota->time = t;
-	      userquota->last = t;
-	      //sgLogError("user %s first time %d", ident, userquota->time);
-	    } else if(userquota->status == 1){
-	      //sgLogError("user %s other time %d %d",ident,userquota->time,t);
-	      if(s->userquota.sporadic > 0){
-		if(t - userquota->last  < s->userquota.sporadic){
-		  userquota->consumed += t - userquota->last;
-		  userquota->time = t;
-		}
-		if(userquota->consumed > s->userquota.seconds){
-		  userquota->status = 2; // block this user, time is up
-		  unblockeduser = 0;
-		}
-		userquota->last = t;
-		//sgLogError("user %s consumed %d %d",ident,userquota->consumed, userquota->last);
-	      } else if(userquota->time + s->userquota.seconds < t){
-		sgLogError("time is up user %s blocket", ident);
-		userquota->status = 2; // block this user, time is up
-		unblockeduser = 0;
-	      } 
-	    } else {
-	      //sgLogError("user %s blocket %d %d %d %d", ident, userquota->status, userquota->time, t, (userquota->time + s->userquota.renew) - t);
-	      if(userquota->time + s->userquota.renew < t){ // new chance
-		//sgLogError("user %s new chance", ident);
-		unblockeduser = 1;
-		userquota->status = 1;
-		userquota->time = t;
-		userquota->consumed = 0;
-	      } else 
-		unblockeduser = 0;
-	    }
-	    sgDbUpdate(s->userDb, ident, (void *) userquota, 
-		       sizeof(struct UserQuotaInfo));
-	  }
-	}
-    } else
+    }  else
       founduser = 1;
     if(s->domainDb != NULL){
       if(*domain == '\0')
@@ -1967,13 +1773,8 @@
       }
     } else
       founddomain = 1;
-    if(founduser && foundip && founddomain){
-      if(unblockeduser)
-	return s;
-      else {
-	lastActiveSource = s;
-	return NULL;
-      }
+    if(founduser == 1 && foundip == 1 && founddomain == 1){
+      return s;
     }
   }
   return NULL;
@@ -2068,7 +1869,7 @@
   sp->domainlistDb->type=SGDBTYPE_DOMAINLIST;
   sgLogError("init domainlist %s",sp->domainlist);
   sgDbInit(sp->domainlistDb,sp->domainlist);
-  if(sp->domainlistDb->entries == 0) { /* empty database */
+  if(sp->domainlistDb->dbenv == NULL) { /* empty database */
     sgLogError("domainlist empty, removed from memory");
     sgFree(sp->domainlistDb);
     sp->domainlistDb = NULL;
@@ -2112,7 +1913,7 @@
   sp->urllistDb->type=SGDBTYPE_URLLIST;
   sgLogError("init urllist %s",sp->urllist);
   sgDbInit(sp->urllistDb,sp->urllist);
-  if(sp->urllistDb->entries == 0) { /* empty database */
+  if(sp->urllistDb->dbenv == NULL) { /* empty database */
     sgLogError("urllist empty, removed from memory");
     sgFree(sp->urllistDb);
     sp->urllistDb = NULL;
--- squidguard-1.2.0.orig/src/y.tab.h.bison
+++ squidguard-1.2.0/src/y.tab.h.bison
@@ -5,22 +5,21 @@
   char *dvalcron;
   int  *integer;
 } YYSTYPE;
-#define	WORD	257
-#define	END	258
-#define	START_BRACKET	259
-#define	STOP_BRACKET	260
-#define	WEEKDAY	261
-#define	DESTINATION	262
-#define	REWRITE	263
-#define	ACL	264
-#define	TIME	265
-#define	TVAL	266
-#define	DVAL	267
-#define	DVALCRON	268
-#define	SOURCE	269
-#define	CIDR	270
-#define	IPCLASS	271
-#define	CONTINUE	272
+#define	WORD	258
+#define	END	259
+#define	START_BRACKET	260
+#define	STOP_BRACKET	261
+#define	WEEKDAY	262
+#define	DESTINATION	263
+#define	REWRITE	264
+#define	ACL	265
+#define	TIME	266
+#define	TVAL	267
+#define	DVAL	268
+#define	DVALCRON	269
+#define	SOURCE	270
+#define	CIDR	271
+#define	IPCLASS	272
 #define	IPADDR	273
 #define	DBHOME	274
 #define	DOMAINLIST	275
@@ -30,27 +29,20 @@
 #define	DOMAIN	279
 #define	USER	280
 #define	USERLIST	281
-#define	USERQUOTA	282
-#define	IP	283
-#define	NL	284
-#define	NUMBER	285
-#define	PASS	286
-#define	REDIRECT	287
-#define	LOGDIR	288
-#define	SUBST	289
-#define	CHAR	290
-#define	MINUTELY	291
-#define	HOURLY	292
-#define	DAILY	293
-#define	WEEKLY	294
-#define	DATE	295
-#define	WITHIN	296
-#define	OUTSIDE	297
-#define	ELSE	298
-#define	LOGFILE	299
-#define	ANONYMOUS	300
-#define	CONTINIOUS	301
-#define	SPORADIC	302
+#define	IP	282
+#define	NL	283
+#define	PASS	284
+#define	REDIRECT	285
+#define	LOGDIR	286
+#define	SUBST	287
+#define	CHAR	288
+#define	WEEKLY	289
+#define	DATE	290
+#define	WITHIN	291
+#define	OUTSIDE	292
+#define	ELSE	293
+#define	LOGFILE	294
+#define	ANONYMOUS	295
 
 
 extern YYSTYPE yylval;
--- squidguard-1.2.0.orig/src/hei
+++ squidguard-1.2.0/src/hei
@@ -0,0 +1,51 @@
+execve("./squidGuard", ["./squidGuard"], [/* 35 vars */]) = 0
+uname({sys="Linux", node="master.enkaros.no", ...}) = 0
+brk(0)                                  = 0x808beec
+old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
+open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
+open("/home/leh/src/db-4.1.24/build_unix/.libs/i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
+stat64("/home/leh/src/db-4.1.24/build_unix/.libs/i686/mmx", 0xbfffeadc) = -1 ENOENT (No such file or directory)
+open("/home/leh/src/db-4.1.24/build_unix/.libs/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
+stat64("/home/leh/src/db-4.1.24/build_unix/.libs/i686", 0xbfffeadc) = -1 ENOENT (No such file or directory)
+open("/home/leh/src/db-4.1.24/build_unix/.libs/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
+stat64("/home/leh/src/db-4.1.24/build_unix/.libs/mmx", 0xbfffeadc) = -1 ENOENT (No such file or directory)
+open("/home/leh/src/db-4.1.24/build_unix/.libs/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
+stat64("/home/leh/src/db-4.1.24/build_unix/.libs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
+open("/etc/ld.so.cache", O_RDONLY)      = 3
+fstat64(3, {st_mode=S_IFREG|0644, st_size=84951, ...}) = 0
+old_mmap(NULL, 84951, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
+close(3)                                = 0
+open("/lib/i686/libc.so.6", O_RDONLY)   = 3
+read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\307\1"..., 1024) = 1024
+fstat64(3, {st_mode=S_IFREG|0755, st_size=5790505, ...}) = 0
+old_mmap(NULL, 1293384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
+mprotect(0x40160000, 35912, PROT_NONE)  = 0
+old_mmap(0x40160000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x132000) = 0x40160000
+old_mmap(0x40165000, 15432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40165000
+close(3)                                = 0
+munmap(0x40018000, 84951)               = 0
+gettimeofday({1034673383, 592650}, NULL) = 0
+getpid()                                = 30047
+brk(0)                                  = 0x808beec
+brk(0x808c06c)                          = 0x808c06c
+brk(0x808d000)                          = 0x808d000
+open("/usr/local/squidGuard/log/squidGuard.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = -1 ENOENT (No such file or directory)
+time(NULL)                              = 1034673383
+open("/etc/localtime", O_RDONLY)        = 3
+fstat64(3, {st_mode=S_IFREG|0644, st_size=806, ...}) = 0
+mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
+read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"..., 4096) = 806
+close(3)                                = 0
+munmap(0x40018000, 4096)                = 0
+write(2, "2002-10-15 11:16:23 [30047] ./sq"..., 1062002-10-15 11:16:23 [30047] ./squidGuard: can't write to logfile /usr/local/squidGuard/log/squidGuard.log
+) = 106
+open("/usr/local/squidGuard/squidGuard.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
+time(NULL)                              = 1034673383
+write(2, "2002-10-15 11:16:23 [30047] ./sq"..., 1032002-10-15 11:16:23 [30047] ./squidGuard: can't open configfile  /usr/local/squidGuard/squidGuard.conf
+) = 103
+time(NULL)                              = 1034673383
+write(2, "2002-10-15 11:16:23 [30047] goin"..., 542002-10-15 11:16:23 [30047] going into emergency mode
+) = 54
+fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
+mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
+read(0,  <unfinished ...>
--- squidguard-1.2.0.orig/test/Makefile
+++ squidguard-1.2.0/test/Makefile
@@ -0,0 +1,97 @@
+# Generated automatically from Makefile.in by configure.
+SHELL=/bin/sh
+.SUFFIXES:
+.SUFFIXES: .c .o .pl .pm .pod .html .man
+
+PERL = /usr/bin/perl
+
+CC = gcc
+CFLAGS = -g -O2 -I/usr/include
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+LDFLAGS =  -L/usr/lib
+LIBS = -ldb 
+
+RM = rm -f
+
+prefix = /usr
+exec_prefix = ${prefix}
+bindir = $(exec_prefix)/bin
+infodir = $(prefix)/info
+
+all::
+	@echo making $@ in `basename \`pwd\``
+
+all::	test1.conf test2.conf
+	@echo making $@ in `basename \`pwd\``
+
+test::	test1 test2 benchmark
+
+test1 test2::	test1.conf test2.conf ../src/squidGuard requests
+	@echo $@..
+	@$(RM) squidGuard.log
+	@echo Database size:
+	@if [ $@ = test1 ];\
+	then\
+	    wc -l blacklist/domains blacklist/urls;\
+	else\
+	    wc -l blacklist/domains blacklist/urls blacklist/expressions;\
+	fi
+	@wc -l<requests | awk '{printf "Running $@ with %d requests..",$$1}'
+	@-cat requests | ../src/squidGuard -c $@.conf>$@.output; exit 0
+	@echo .Done
+	@echo -n "Checking number of output lines.."
+	@test `wc -l<requests` -eq `wc -l<$@.output`
+	@echo .OK
+	@echo -n "Checking the output against the expected.."
+	@cmp -s $@.output $@.expected
+	@echo .OK
+	@lines=`wc -l<requests`;\
+	awk -F'[()]' '/ squidGuard.+started \([0-9]+\.[0-9]+\)$$/ {start=$$(NF-1)};\
+		       / squidGuard ready for requests \([0-9]+\.[0-9]+\)$$/ {ready=$$(NF-1)};\
+		       / squidGuard stopped \([0-9]+\.[0-9]+\)$$/ {stop=$$(NF-1)};\
+		       END {printf "squidGuard initialization took %.3f seconds\n",ready-start;\
+			    printf "squidGuard handled %d requests in %.3f seconds\n",\
+			    '"$$lines"',stop-ready}' \
+		squidGuard.log
+	@echo ""
+
+benchmark::	test1.conf ../src/squidGuard requests
+	@echo $@..
+	@$(RM) squidGuard.log
+	@echo Database size:
+	@wc -l blacklist/domains blacklist/urls
+	@wc -l<requests | awk '{printf "Running $@ test with %d requests..",$$1*100}'
+	@-i=100; while [ $$i -gt 0 ]; do cat requests; i=`expr $$i - 1`;done \
+	| ../src/squidGuard -c test1.conf>/dev/null; exit 0
+	@echo .Done
+	@lines=`wc -l<requests`;\
+	awk -F'[()]' '/ squidGuard.+started \([0-9]+\.[0-9]+\)$$/ {start=$$(NF-1)};\
+		       / squidGuard ready for requests \([0-9]+\.[0-9]+\)$$/ {ready=$$(NF-1)};\
+		       / squidGuard stopped \([0-9]+\.[0-9]+\)$$/ {stop=$$(NF-1)};\
+		       END {printf "squidGuard initialization took %.3f seconds\n",ready-start;\
+			    printf "squidGuard handled %d requests in %.3f seconds\n",\
+			    '"$$lines"'*100,stop-ready}' \
+		squidGuard.log
+
+../src/squidGuard:
+	@echo making $@ in `basename \`pwd\``
+	(cd ../src; make squidGuard)
+
+update::
+	@echo making $@ in `basename \`pwd\``
+
+clean::
+	@echo making $@ in `basename \`pwd\``
+	$(RM) *~ *.bak core *.log *.error
+	$(RM) blacklist/*~ blacklist/*.bak blacklist/core
+	$(RM) squidGuard.log squidGuard.log test1.output test2.output
+
+realclean:: clean
+	@echo making $@ in `basename \`pwd\``
+	$(RM) TAGS *.orig
+
+distclean:: realclean
+	@echo making $@ in `basename \`pwd\``
+	$(RM) Makefile test1.conf test2.conf
--- squidguard-1.2.0.orig/test/test1.conf
+++ squidguard-1.2.0/test/test1.conf
@@ -0,0 +1,32 @@
+logdir /home/rkrusty/build/squidguard-1.2.0/test
+dbhome /home/rkrusty/build/squidguard-1.2.0/test
+
+src grownups {
+    ip	   10.0.0.0/24	  # range 10.0.0.0  - 10.0.0.255
+			  # AND
+    user   foo bar	  # ident foo or bar
+}
+
+src kids {
+    ip	   10.0.0.0/22	  # range 10.0.0.0 - 10.0.3.255
+}
+
+dest blacklist {
+    domainlist blacklist/domains
+    urllist    blacklist/urls
+}
+
+acl {
+    grownups {
+	pass all
+    }
+
+    kids {
+	pass !blacklist all
+    }
+
+    default {
+	pass none
+	redirect http://info.foo.bar/cgi/blocked?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
+    }
+}
--- squidguard-1.2.0.orig/test/test2.conf
+++ squidguard-1.2.0/test/test2.conf
@@ -0,0 +1,33 @@
+logdir /home/rkrusty/build/squidguard-1.2.0/test
+dbhome /home/rkrusty/build/squidguard-1.2.0/test
+
+src grownups {
+    ip	   10.0.0.0/24	  # range 10.0.0.0  - 10.0.0.255
+			  # AND
+    user   foo bar	  # ident foo or bar
+}
+
+src kids {
+    ip	   10.0.0.0/22	  # range 10.0.0.0 - 10.0.3.255
+}
+
+dest blacklist {
+    domainlist     blacklist/domains
+    urllist        blacklist/urls
+    expressionlist blacklist/expressions
+}
+
+acl {
+    grownups {
+	pass all
+    }
+
+    kids {
+	pass !blacklist all
+    }
+
+    default {
+	pass none
+	redirect http://info.foo.bar/cgi/blocked?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
+    }
+}
--- squidguard-1.2.0.orig/confdefs.h
+++ squidguard-1.2.0/confdefs.h
@@ -0,0 +1,4 @@
+
+#define ACCONFIG 1
+#define ACLOGDIR 1
+#define ACDBHOME 1