#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --with-includes=DIR    site header files for readline, etc in DIR"
ac_help="$ac_help
  --with-libraries=DIR   site library directories for readline, etc in DIR"
ac_help="$ac_help
  --with-configdir=DIR   runtime config files in DIR [sysconfdir/amanda]"
ac_help="$ac_help
  --with-indexdir        deprecated, use indexdir in amanda.conf"
ac_help="$ac_help
  --with-dbdir           deprecated, use infofile in amanda.conf"
ac_help="$ac_help
  --with-logdir          deprecated, use logfile in amanda.conf"
ac_help="$ac_help
  --with-suffixes        install binaries with version string appended to name"
ac_help="$ac_help
  --with-client-only     deprecated, use --without-server"
ac_help="$ac_help
  --with-server-only     deprecated, use --without-client"
ac_help="$ac_help
  --without-server       do not build server stuff"
ac_help="$ac_help
  --without-client       do not build client stuff"
ac_help="$ac_help
  --without-restore      do not build amrestore nor amidxtaped"
ac_help="$ac_help
  --without-amrecover    do not build amrecover"
ac_help="$ac_help
  --with-index-server=HOST default amanda index server [`uname -n`]"
ac_help="$ac_help
  --without-force-uid    do not force the uid to --with-user"
ac_help="$ac_help
  --with-user=USER       force execution to USER on client systems [required]"
ac_help="$ac_help
  --with-group=GROUP     group allowed to execute setuid-root programs [required]"
ac_help="$ac_help
  --with-rundump         use rundump (setuid-root) to invoke dump"
ac_help="$ac_help
  --with-config=CONFIG   default configuration [DailySet1]"
ac_help="$ac_help
  --with-tape-server=HOST default restoring tape server is HOST [same as --with-index-server]"
ac_help="$ac_help
  --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive"
ac_help="$ac_help
  --with-rew-tape        deprecated, use --with-tape-device"
ac_help="$ac_help
  --with-norew-tape=ARG  deprecated, use --with-tape-device"
ac_help="$ac_help
  --with-changer-device=ARG default tape changer device [/dev/ch0 if it exists]"
ac_help="$ac_help
  --with-fqdn            use FQDN's to backup multiple networks"
ac_help="$ac_help
  --with-gnutar=PROG      use PROG as GNU tar executable [default: looks for one]"
ac_help="$ac_help
  --with-smbclient[=PATH] Compile in Samba PC backup support, where PATH is the location of smbclient"
ac_help="$ac_help
    --with-samba-user=USER User for smbclient ["backup"]"
ac_help="$ac_help
  --with-gnutar-listdir=DIR  gnutar directory lists go in DIR [localstatedir/amanda/gnutar-lists]"
ac_help="$ac_help
  --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir"
ac_help="$ac_help
  --without-bsd-security do not use BSD rsh/rlogin style security"
ac_help="$ac_help
  --with-amandahosts     use .amandahosts instead of .rhosts"
ac_help="$ac_help
  --with-krb4-security=DIR   Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]"
ac_help="$ac_help
    --with-server-principal=ARG    server host principal  ["amanda"]"
ac_help="$ac_help
    --with-server-instance=ARG     server host instance   ["amanda"]"
ac_help="$ac_help
    --with-server-keyfile=ARG      server host key file   ["/.amanda"]"
ac_help="$ac_help
    --with-client-principal=ARG    client host principal  ["rcmd"]"
ac_help="$ac_help
    --with-client-instance=ARG     client host instance   [HOSTNAME_INSTANCE]"
ac_help="$ac_help
    --with-client-keyfile=ARG      client host key file   [KEYFILE]"
ac_help="$ac_help
    --with-ticket-lifetime=ARG     ticket lifetime        [128]"
ac_help="$ac_help
  --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [text]"
ac_help="$ac_help
  --with-mmap            force use of mmap instead of shared memory support"
ac_help="$ac_help
  --with-buffered-dump   buffer the dumping sockets on the server for speed"
ac_help="$ac_help
  --with-assertions      compile assertions into code"
ac_help="$ac_help
  --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [/tmp/amanda]"
ac_help="$ac_help
  --with-pid-debug-files append pid's to program's debugging filenames"
ac_help="$ac_help
  --with-testing[=suffix] use alternate service names"
ac_help="$ac_help
  --disable-libtool       build static libraries only, without libtool"
ac_help="$ac_help
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
  --enable-shared         build shared libraries [default=yes]"
ac_help="$ac_help
  --enable-static         build static libraries [default=yes]"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# 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"
    ac_prev=
    continue
  fi

  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

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    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" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    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=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -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 ;;
  -host=* | --host=* | --hos=* | --ho=*)
    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" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    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" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    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-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-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    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" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.12"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    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.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    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-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" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    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
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

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

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
  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

# 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

# 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

# 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=common-src/amanda.h

# 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%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  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-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

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_n= ac_c='\c' ac_t=
fi


ac_aux_dir=
for ac_dir in config $srcdir/config; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 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.


# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:671: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`$ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:692: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`$ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:710: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:743: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in ginstall installbsd scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    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"
  fi
fi
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_DATA" && INSTALL_DATA='${INSTALL} -m 644'


test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:796: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftestfile`
   fi
   if test "$*" != "X $srcdir/configure conftestfile" \
      && test "$*" != "X conftestfile $srcdir/configure"; then

      # If neither matched, then we have a broken ls.  This can happen
      # if, for instance, CONFIG_SHELL is bash and it inherits a
      # broken ls alias from the environment.  This has actually
      # happened.  Such a system could not be considered "sane".
      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
   fi

   test "$2" = conftestfile
   )
then
   # Ok.
   :
else
   { echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:853: 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 > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
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 conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi


PACKAGE=amanda

VERSION=2.4.0

if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
fi
cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF



missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:899: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
   ACLOCAL=aclocal
   echo "$ac_t""found" 1>&6
else
   ACLOCAL="$missing_dir/missing aclocal"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:912: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
   AUTOCONF=autoconf
   echo "$ac_t""found" 1>&6
else
   AUTOCONF="$missing_dir/missing autoconf"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:925: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (automake --version) < /dev/null > /dev/null 2>&1; then
   AUTOMAKE=automake
   echo "$ac_t""found" 1>&6
else
   AUTOMAKE="$missing_dir/missing automake"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:938: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
   AUTOHEADER=autoheader
   echo "$ac_t""found" 1>&6
else
   AUTOHEADER="$missing_dir/missing autoheader"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:951: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
   MAKEINFO=makeinfo
   echo "$ac_t""found" 1>&6
else
   MAKEINFO="$missing_dir/missing makeinfo"
   echo "$ac_t""missing" 1>&6
fi






			
if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"


if test -f config.local; then
    echo "running local script ./config.local"
    . ./config.local
fi


VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'`
VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'`
VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\"


VERSION_SUFFIX="$VERSION"






SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
LOCPATH=`(
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
    eval echo "$libexecdir:$PATH:/usr/local/bin"
)`
SYSLOCPATH="$SYSPATH:$LOCPATH"
LOCSYSPATH="$LOCPATH:$SYSPATH"

# Check whether --with-includes or --without-includes was given.
if test "${with_includes+set}" = set; then
  withval="$with_includes"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-includes option." 1>&2; exit 1; }
	  ;;
	esac
	INCLUDE_DIRS="$withval"
    
fi


if test "$INCLUDE_DIRS"; then
	for dir in $INCLUDE_DIRS; do
	    if test -d "$dir"; then
		AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS -I$dir"
	    else
		echo "configure: warning: *** Include directory $dir does not exist." 1>&2
	    fi
	done
fi

# Check whether --with-libraries or --without-libraries was given.
if test "${with_libraries+set}" = set; then
  withval="$with_libraries"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-libraries option." 1>&2; exit 1; }
	  ;;
	esac
	LIBRARY_DIRS="$withval"
    
fi


if test "$LIBRARY_DIRS"; then
	for dir in $withval; do
	    if test -d "$dir"; then
		AMANDA_LDFLAGS="$AMANDA_LDFLAGS -L$dir"
	    else
		echo "configure: warning: *** Library directory $dir does not exist." 1>&2
	    fi
	done
fi

# Check whether --with-configdir or --without-configdir was given.
if test "${with_configdir+set}" = set; then
  withval="$with_configdir"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-configdir option." 1>&2; exit 1; }
	  ;;
	*) CONFIG_DIR="$withval"
	  ;;
	esac
    
else
  : ${CONFIG_DIR=$sysconfdir/amanda}

fi

CONFIG_DIR=`(
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
    eval echo "$CONFIG_DIR"
)`
cat >> confdefs.h <<EOF
#define CONFIG_DIR "$CONFIG_DIR"
EOF



# Check whether --with-indexdir or --without-indexdir was given.
if test "${with_indexdir+set}" = set; then
  withval="$with_indexdir"
     { echo "configure: error: *** --with-indexdir is deprecated, use indexdir in amanda.conf instead." 1>&2; exit 1; }
    
fi


# Check whether --with-dbdir or --without-dbdir was given.
if test "${with_dbdir+set}" = set; then
  withval="$with_dbdir"
     { echo "configure: error: *** --with-dbdir is deprecated, use infofile in amanda.conf instead." 1>&2; exit 1; }
    
fi


# Check whether --with-logdir or --without-logdir was given.
if test "${with_logdir+set}" = set; then
  withval="$with_logdir"
     { echo "configure: error: *** --with-logdir is deprecated, use logdir in amanda.conf instead." 1>&2; exit 1; }
    
fi


# Check whether --with-suffixes or --without-suffixes was given.
if test "${with_suffixes+set}" = set; then
  withval="$with_suffixes"
  USE_VERSION_SUFFIXES=$withval
else
  : ${USE_VERSION_SUFFIXES=no}

fi

case "$USE_VERSION_SUFFIXES" in
y | ye | yes)
    cat >> confdefs.h <<\EOF
#define USE_VERSION_SUFFIXES 1
EOF


    program_suffix="-$VERSION"
    # This is from the output of configure.in.
    if test "$program_transform_name" = s,x,x,; then
	program_transform_name=
    else
	# Double any \ or $.  echo might interpret backslashes.
	cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
	program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
	rm -f conftestsed
    fi
    test "$program_prefix" != NONE &&
	program_transform_name="s,^,${program_prefix},; $program_transform_name"
    # Use a double $ so make ignores it.
    test "$program_suffix" != NONE &&
	program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

    # sed with no file args requires a program.
    test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  ;;
n | no) USE_VERSION_SUFFIXES=no
  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-suffixes option." 1>&2; exit 1; }
  ;;
esac


BUILD_COMMON_LIB="libamanda.a libamnolog.a"
BUILD_COMMON_LTLIB="libamanda.la libamnolog.la"

BUILD_CLIENT_PROGS_LIBEXEC="amandad calcsize rundump runtar selfcheck sendbackup sendsize"
BUILD_CLIENT_SCRIPTS_LIBEXEC="patch-system"
BUILD_CLIENT_LIB="libamclient.a"
BUILD_CLIENT_LTLIB="libamclient.la"
AMCLIENT_EXTRA_OBJS=

BUILD_RECOVER_PROGS_SBIN="amrecover"

BUILD_CHANGER_PROGS_LIBEXEC="chg-chio"
BUILD_CHANGER_SCRIPTS_LIBEXEC="chg-manual chg-multi chg-mtx chg-rth chg-chs"

BUILD_TAPE_LIB="libamtape.a"
BUILD_TAPE_LTLIB="libamtape.la"

BUILD_SERVER_PROGS_SBIN="amadmin amcheck amflush amlabel amtape"
BUILD_SERVER_PROGS_LIBEXEC="amindexd amtrmidx driver dumper getconf planner reporter taper"
BUILD_SERVER_SCRIPTS_SBIN="amcheckdb amcleanup amdump amoverview amrmtape amtoc amverify"
BUILD_SERVER_LIB="libamserver.a"
BUILD_SERVER_LTLIB="libamserver.la"

BUILD_RESTORE_PROGS_SBIN="amrestore"
BUILD_RESTORE_PROGS_LIBEXEC="amidxtaped"

case "$target" in
    *-hp-*)
	BUILD_CLIENT_SCRIPTS_SBIN=amhpfixdevs
	;;
    *-sni-sysv4)
	BUILD_CLIENT_SCRIPTS_SBIN=amsinixfixdevs
	;;
    *)
	BUILD_CLIENT_SCRIPTS_SBIN=
	;;
esac
























# Check whether --with-client-only or --without-client-only was given.
if test "${with_client_only+set}" = set; then
  withval="$with_client_only"
     { echo "configure: error: *** --with-client-only is deprecated, use --without-server instead." 1>&2; exit 1; }
    
fi

# Check whether --with-server-only or --without-server-only was given.
if test "${with_server_only+set}" = set; then
  withval="$with_server_only"
     { echo "configure: error: *** --with-server-only is deprecated, use --without-client instead." 1>&2; exit 1; }
    
fi

# Check whether --with-server or --without-server was given.
if test "${with_server+set}" = set; then
  withval="$with_server"
  
	case "$withval" in
	y | ye | yes) NO_SERVER_MODE=false ;;
	n | no) NO_SERVER_MODE=true;;
	*)
	    { echo "configure: error: *** You must not supply an argument to --with-server option.  Maybe you meant --with-index-server=$withval" 1>&2; exit 1; }
	  ;;
	esac
    

fi


# Check whether --with-client or --without-client was given.
if test "${with_client+set}" = set; then
  withval="$with_client"
  
	case "$withval" in
	y | ye | yes) NO_CLIENT_MODE=false;;
	n | no) NO_CLIENT_MODE=true;;
	*)
	    { echo "configure: error: *** You must not supply an argument to --with-client option." 1>&2; exit 1; }
	  ;;
	esac
    

fi


# Check whether --with-restore or --without-restore was given.
if test "${with_restore+set}" = set; then
  withval="$with_restore"
  
	case "$withval" in
	y | ye | yes) NO_RESTORE_MODE=false;;
	n | no) NO_RESTORE_MODE=true;;
	*)
	    { echo "configure: error: *** You must not supply an argument to --with-restore option." 1>&2; exit 1; }
	  ;;
	esac
    

fi


# Check whether --with-amrecover or --without-amrecover was given.
if test "${with_amrecover+set}" = set; then
  withval="$with_amrecover"
  
	case "$withval" in
	y | ye | yes)
	    if ${NO_CLIENT_MODE-false}; then
		{ echo "configure: error: *** --without-client and --with-amrecover are incompatible" 1>&2; exit 1; }
	    fi
	    NO_RECOVER_MODE=true;;
	n | no) NO_RECOVER_MODE=false;;
	*)
	    { echo "configure: error: *** You must not supply an argument to --with-amrecover option." 1>&2; exit 1; }
	  ;;
	esac
    

fi


# Check whether --with-index-server or --without-index-server was given.
if test "${with_index_server+set}" = set; then
  withval="$with_index_server"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-index-server option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_SERVER="$withval"
	  ;;
	esac
   
else
  : ${DEFAULT_SERVER=`uname -n`}

fi

cat >> confdefs.h <<EOF
#define DEFAULT_SERVER "$DEFAULT_SERVER"
EOF



# Check whether --with-force-uid or --without-force-uid was given.
if test "${with_force_uid+set}" = set; then
  withval="$with_force_uid"
  FORCE_USERID="$withval"
else
  : ${FORCE_USERID=yes}

fi

case "$FORCE_USERID" in
y | ye | yes) cat >> confdefs.h <<\EOF
#define FORCE_USERID 1
EOF

  ;;
n | no) :
  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-force-uid option." 1>&2; exit 1; }
esac

# Check whether --with-user or --without-user was given.
if test "${with_user+set}" = set; then
  withval="$with_user"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-user option." 1>&2; exit 1; }
	  ;;
	*) CLIENT_LOGIN="$withval"
	  ;;
	esac
    

fi

if test "x${CLIENT_LOGIN+set}" != xset; then
    { echo "configure: error: *** --with-user=USER is missing" 1>&2; exit 1; }
fi
cat >> confdefs.h <<EOF
#define CLIENT_LOGIN "$CLIENT_LOGIN"
EOF



# Check whether --with-group or --without-group was given.
if test "${with_group+set}" = set; then
  withval="$with_group"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-group option." 1>&2; exit 1; }
	  ;;
	*) SETUID_GROUP="$withval"
	  ;;
	esac
    

fi

if test "x${SETUID_GROUP+set}" != xset; then
    { echo "configure: error: *** --with-group=GROUP is missing" 1>&2; exit 1; }
fi


# Check whether --with-rundump or --without-rundump was given.
if test "${with_rundump+set}" = set; then
  withval="$with_rundump"
  
    case "$withval" in
	n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";;
	*) { echo "configure: error: *** You must not supply an argument to --with-rundump option." 1>&2; exit 1; };;
    esac
    

fi


# Check whether --with-config or --without-config was given.
if test "${with_config+set}" = set; then
  withval="$with_config"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-config option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_CONFIG="$withval"
	  ;;
	esac
   
else
  : ${DEFAULT_CONFIG=DailySet1}

fi

cat >> confdefs.h <<EOF
#define DEFAULT_CONFIG "$DEFAULT_CONFIG"
EOF



# Check whether --with-tape-server or --without-tape-server was given.
if test "${with_tape_server+set}" = set; then
  withval="$with_tape_server"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-tape-server option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_TAPE_SERVER="$withval"
	  ;;
	esac
    
else
  : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}

fi

cat >> confdefs.h <<EOF
#define DEFAULT_TAPE_SERVER "$DEFAULT_TAPE_SERVER"
EOF



# Check whether --with-tape-device or --without-tape-device was given.
if test "${with_tape_device+set}" = set; then
  withval="$with_tape_device"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-tape-device option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_TAPE_DEVICE="$withval"
	  ;;
	esac
    
else
  
	if test -z "$DEFAULT_TAPE_DEVICE"; then
	    echo $ac_n "checking for non-rewinding tape device""... $ac_c" 1>&6
echo "configure:1466: checking for non-rewinding tape device" >&5
	    	    	    	    	    	    	    	    tape_dev=/dev/null
	    nr_tape_dev=/dev/null
	    if test -d /dev/rmt; then

										
		for num in 9 8 7 6 5 4 3 2 1 0; do
		    td=/dev/rmt/${num}b
		    ntd=/dev/rmt/${num}bn
		    if test -r $td -a -r $ntd; then
			tape_dev=$td
			nr_tape_dev=$ntd
		    fi
		done
	    else
				for num in 9 8 7 6 5 4 3 2 1 0; do
		    td=/dev/rst${num}
		    ntd=/dev/nrst${num}
		    if test -r $td -a -r $ntd; then
			tape_dev=$td
			nr_tape_dev=$ntd
		    fi
		done
	    fi
	    DEFAULT_TAPE_DEVICE=$nr_tape_dev
	    echo "$ac_t""$DEFAULT_TAPE_DEVICE" 1>&6
	fi
    

fi


if test -z "$DEFAULT_TAPE_DEVICE"; then
    DEFAULT_TAPE_DEVICE=/dev/null
fi

cat >> confdefs.h <<EOF
#define DEFAULT_TAPE_DEVICE "$DEFAULT_TAPE_DEVICE"
EOF



# Check whether --with-rew-tape or --without-rew-tape was given.
if test "${with_rew_tape+set}" = set; then
  withval="$with_rew_tape"
     { echo "configure: error: *** --with-rew-tape is deprecated, use --with-tape-device instead." 1>&2; exit 1; }
    
fi


# Check whether --with-norew-tape or --without-norew-tape was given.
if test "${with_norew_tape+set}" = set; then
  withval="$with_norew_tape"
     { echo "configure: error: *** --with-norew-tape is deprecated, use --with-tape-device instead." 1>&2; exit 1; }
    
fi


# Check whether --with-changer-device or --without-changer-device was given.
if test "${with_changer_device+set}" = set; then
  withval="$with_changer_device"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-changer-device option." 1>&2; exit 1; }
	  ;;
	*) DEFAULT_CHANGER_DEVICE="$withval"
	  ;;
	esac
    
else
  
	if test -z "$DEFAULT_CHANGER_DEVICE" &&
	   test -f /dev/ch0; then
	    DEFAULT_CHANGER_DEVICE=/dev/ch0
	fi
    

fi


if test -z "$DEFAULT_CHANGER_DEVICE"; then
    DEFAULT_CHANGER_DEVICE=/dev/null
fi

cat >> confdefs.h <<EOF
#define DEFAULT_CHANGER_DEVICE "$DEFAULT_CHANGER_DEVICE"
EOF



# Check whether --with-fqdn or --without-fqdn was given.
if test "${with_fqdn+set}" = set; then
  withval="$with_fqdn"
  USE_FQDN=$withval
else
  : ${USE_FQDN=no}

fi

case "$USE_FQDN" in
n | no) : ;;
y |  ye | yes) cat >> confdefs.h <<\EOF
#define USE_FQDN 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-fqdn option." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-gnutar or --without-gnutar was given.
if test "${with_gnutar+set}" = set; then
  withval="$with_gnutar"
  
	case "$withval" in
	    /*)	GNUTAR="$withval";;
	    *)  { echo "configure: error: *** You must supply a full pathname to --with-gnutar" 1>&2; exit 1; };;
	esac
    

fi


# Check whether --with-smbclient or --without-smbclient was given.
if test "${with_smbclient+set}" = set; then
  withval="$with_smbclient"
  
	case "$withval" in
	y | ye | yes)
	    for ac_prog in smbclient
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1601: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SAMBA_CLIENT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$SAMBA_CLIENT" in
  /*)
  ac_cv_path_SAMBA_CLIENT="$SAMBA_CLIENT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SAMBA_CLIENT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
SAMBA_CLIENT="$ac_cv_path_SAMBA_CLIENT"
if test -n "$SAMBA_CLIENT"; then
  echo "$ac_t""$SAMBA_CLIENT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$SAMBA_CLIENT" && break
done

	    if test -z "$SAMBA_CLIENT"; then
		{ echo "configure: error: *** please specify --with-smbclient=/some/dir/smbclient" 1>&2; exit 1; }
	    fi
	  ;;
	n | no) unset SAMBA_CLIENT
	  ;;
	*) SAMBA_CLIENT="$withval"
	  ;;
	esac
    

fi

if test "$SAMBA_CLIENT"; then
    LIBSRCS_CLIENT="$LIBSRCS_CLIENT findpass.c"
    LIBOBJS_CLIENT="$LIBOBJS_CLIENT findpass.o"
    cat >> confdefs.h <<EOF
#define SAMBA_CLIENT "$SAMBA_CLIENT"
EOF

fi

# Check whether --with-samba-user or --without-samba-user was given.
if test "${with_samba_user+set}" = set; then
  withval="$with_samba_user"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply a user to the --with-samba-user option." 1>&2; exit 1; }
	  ;;
	*) SAMBA_USER="$withval"
	  ;;
	esac
    
else
  : ${SAMBA_USER="backup"}

fi

cat >> confdefs.h <<EOF
#define SAMBA_USER "$SAMBA_USER"
EOF


# Check whether --with-gnutar-listdir or --without-gnutar-listdir was given.
if test "${with_gnutar_listdir+set}" = set; then
  withval="$with_gnutar_listdir"
  
	case "$withval" in
	    n | no)		unset GNUTAR_LISTDIR ;;
	    y | ye | yes)	: ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
	    /*)			GNUTAR_LISTDIR="$withval" ;;
	    *)			{ echo "configure: error: *** You must supply a full pathname to --with-gnutar-listdir" 1>&2; exit 1; }
	esac
    
else
  : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists}

fi

if test "$GNUTAR_LISTDIR"; then
    GNUTAR_LISTDIR=`(
        test "x$prefix" = xNONE && prefix=$ac_default_prefix
        eval echo "$GNUTAR_LISTDIR"
    )`
    cat >> confdefs.h <<EOF
#define GNUTAR_LISTED_INCREMENTAL_DIR "$GNUTAR_LISTDIR"
EOF

fi

# Check whether --with-gnutar-listed-incremental or --without-gnutar-listed-incremental was given.
if test "${with_gnutar_listed_incremental+set}" = set; then
  withval="$with_gnutar_listed_incremental"
      { echo "configure: error: *** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead" 1>&2; exit 1; }
   

fi


# Check whether --with-bsd-security or --without-bsd-security was given.
if test "${with_bsd_security+set}" = set; then
  withval="$with_bsd_security"
  BSD_SECURITY=$withval
else
  : ${BSD_SECURITY=yes}

fi

case "$BSD_SECURITY" in
n | no) : ;;
y |  ye | yes) cat >> confdefs.h <<\EOF
#define BSD_SECURITY 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-bsd-security option." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-amandahosts or --without-amandahosts was given.
if test "${with_amandahosts+set}" = set; then
  withval="$with_amandahosts"
  USE_AMANDAHOSTS=$withval
else
  : ${USE_AMANDAHOSTS=no}

fi

case "$USE_AMANDAHOSTS" in
n | no) : ;;
y |  ye | yes) :
  case "$BSD_SECURITY" in
  n | no) echo "configure: warning: *** --with-amandahosts implies --with-bsd-security, so turning that on." 1>&2
    ;;
  esac
  cat >> confdefs.h <<\EOF
#define BSD_SECURITY 1
EOF

  cat >> confdefs.h <<\EOF
#define USE_AMANDAHOSTS 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-amandahosts option." 1>&2; exit 1; }
  ;;
esac


: ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}

# Check whether --with-krb4-security or --without-krb4-security was given.
if test "${with_krb4_security+set}" = set; then
  withval="$with_krb4_security"
  KRB4_SECURITY="$withval"
else
  : ${KRB4_SECURITY=no}

fi


case "$KRB4_SECURITY" in
n | no) KRB4_SECURITY=no ;;
y | ye | yes) : ;;
*) KRB4_SPOTS="$KRB4_SECURITY"
   KRB4_SECURITY=yes
   ;;
esac

echo $ac_n "checking for Kerberos and Amanda kerberos4 bits""... $ac_c" 1>&6
echo "configure:1783: checking for Kerberos and Amanda kerberos4 bits" >&5
if test "${KRB4_SECURITY}" = yes -a -f common-src/krb4-security.c ; then
    for dir in $KRB4_SPOTS; do
	if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
	    #
	    # This is the original Kerberos 4.
	    #
	    echo "$ac_t""found in $dir" 1>&6
	    KRB4_SECURITY=yes
	    cat >> confdefs.h <<\EOF
#define KRB4_SECURITY 1
EOF

	    KRB4INCLUDES=-I$dir/include
	    KRB4LDFLAGS=-L$dir/lib
	    KRB4LIBS="-lkrb -ldes"
	    break
	elif test -f ${dir}/lib/libkrb4.a \
		  -a -f ${dir}/lib/libcrypto.a \
		  -a -f ${dir}/lib/libdes425.a ; then
	    #
	    # This is Kerberos 5 with Kerberos 4 back-support.
	    #
	    echo "$ac_t""found in $dir" 1>&6
	    KRB4_SECURITY=yes
	    cat >> confdefs.h <<\EOF
#define KRB4_SECURITY 1
EOF

	    KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
	    KRB4LDFLAGS=-L$dir/lib
	    KRB4LIBS="-lkrb4 -lcrypto -ldes425"
	    break
	fi
    done

    if test "$KRB4LDFLAGS" = "" ; then
	echo "$ac_t""no libraries found" 1>&6
    fi
else
    echo "$ac_t""no" 1>&6
fi

# Check whether --with-server-principal or --without-server-principal was given.
if test "${with_server_principal+set}" = set; then
  withval="$with_server_principal"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-server-principal option." 1>&2; exit 1; }
	  ;;
	*)
	    SERVER_HOST_PRINCIPLE="$withval"
	  ;;
	esac
    
else
  : ${SERVER_HOST_PRINCIPLE="amanda"}

fi

cat >> confdefs.h <<EOF
#define SERVER_HOST_PRINCIPLE "$SERVER_HOST_PRINCIPLE"
EOF


# Check whether --with-server-instance or --without-server-instance was given.
if test "${with_server_instance+set}" = set; then
  withval="$with_server_instance"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-server-instance option." 1>&2; exit 1; }
	  ;;
	*) SERVER_HOST_INSTANCE="$withval"
	  ;;
	esac
    
else
  : ${SERVER_HOST_INSTANCE="amanda"}

fi

cat >> confdefs.h <<EOF
#define SERVER_HOST_INSTANCE "$SERVER_HOST_INSTANCE"
EOF


# Check whether --with-server-keyfile or --without-server-keyfile was given.
if test "${with_server_keyfile+set}" = set; then
  withval="$with_server_keyfile"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-server-keyfile option." 1>&2; exit 1; }
	  ;;
	*) SERVER_HOST_KEY_FILE="$withval"
	  ;;
	esac
    
else
  : ${SERVER_HOST_KEY_FILE="/.amanda"}

fi

cat >> confdefs.h <<EOF
#define SERVER_HOST_KEY_FILE "$SERVER_HOST_KEY_FILE"
EOF


# Check whether --with-client-principal or --without-client-principal was given.
if test "${with_client_principal+set}" = set; then
  withval="$with_client_principal"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-client-principal option." 1>&2; exit 1; }
	  ;;
	*) CLIENT_HOST_PRINCIPLE="$withval"
	  ;;
	esac
    
else
  : ${CLIENT_HOST_PRINCIPLE="rcmd"}

fi

cat >> confdefs.h <<EOF
#define CLIENT_HOST_PRINCIPLE "$CLIENT_HOST_PRINCIPLE"
EOF


# Check whether --with-client-instance or --without-client-instance was given.
if test "${with_client_instance+set}" = set; then
  withval="$with_client_instance"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-client-instance option." 1>&2; exit 1; }
	  ;;
	*) CLIENT_HOST_INSTANCE="$withval"
	  ;;
	esac
    
else
  : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}

fi

cat >> confdefs.h <<EOF
#define CLIENT_HOST_INSTANCE $CLIENT_HOST_INSTANCE
EOF


# Check whether --with-client-keyfile or --without-client-keyfile was given.
if test "${with_client_keyfile+set}" = set; then
  withval="$with_client_keyfile"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-client-keyfile option." 1>&2; exit 1; }
	  ;;
	*) CLIENT_HOST_KEY_FILE="$withval"
	  ;;
	esac
    
else
  : ${CLIENT_HOST_KEY_FILE=KEYFILE}

fi

cat >> confdefs.h <<EOF
#define CLIENT_HOST_KEY_FILE $CLIENT_HOST_KEY_FILE
EOF


# Check whether --with-ticket-lifetime or --without-ticket-lifetime was given.
if test "${with_ticket_lifetime+set}" = set; then
  withval="$with_ticket_lifetime"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-ticket-lifetime option." 1>&2; exit 1; }
	  ;;
	*) TICKET_LIFETIME="$withval"
	  ;;
	esac
    
else
  : ${TICKET_LIFETIME=128}

fi

cat >> confdefs.h <<EOF
#define TICKET_LIFETIME $TICKET_LIFETIME
EOF


# Check whether --with-db or --without-db was given.
if test "${with_db+set}" = set; then
  withval="$with_db"
  
	case "$withval" in
	"" | y | ye | yes | n | no)
	    { echo "configure: error: *** You must supply an argument to the --with-db option." 1>&2; exit 1; }
	  ;;
	*) DB_STYLE="$withval"
	  ;;
	esac
    

fi

if test "$DB_STYLE"; then
    case "$DB_STYLE" in
	db | dbm | gdbm | ndbm | text)	;;
	*)
	    { echo "configure: error: *** Unknown argument $DB_STYLE given to --with-db.  Choose from db, dbm, gdbm, ndbm, text." 1>&2; exit 1; }
	    DB_STYLE=
	    ;;
    esac
fi

# Check whether --with-mmap or --without-mmap was given.
if test "${with_mmap+set}" = set; then
  withval="$with_mmap"
  FORCE_MMAP=$withval
else
  : ${FORCE_MMAP=no}

fi

case "$FORCE_MMAP" in
y | ye | yes | n | no) : ;;
*) { echo "configure: error: *** You must not supply an argument to --with-mmap." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-buffered-dump or --without-buffered-dump was given.
if test "${with_buffered_dump+set}" = set; then
  withval="$with_buffered_dump"
  DUMPER_SOCKET_BUFFERING=$withval
else
  : ${DUMPER_SOCKET_BUFFERING=no}

fi

case "$DUMPER_SOCKET_BUFFERING" in
n | no) :
  ;;
y | ye | yes) cat >> confdefs.h <<\EOF
#define DUMPER_SOCKET_BUFFERING 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-buffered-dump." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-assertions or --without-assertions was given.
if test "${with_assertions+set}" = set; then
  withval="$with_assertions"
  ASSERTIONS="$withval"
else
  : ${ASSERTIONS=no}

fi

case "$ASSERTIONS" in
n | no) : ;;
y |  ye | yes) cat >> confdefs.h <<\EOF
#define ASSERTIONS 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-assertions option." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-debugging or --without-debugging was given.
if test "${with_debugging+set}" = set; then
  withval="$with_debugging"
  DEBUGGING="$withval"
else
  : ${DEBUGGING=yes}

fi

DEBUGGING=`(
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
    eval echo "$DEBUGGING"
)`
case "$DEBUGGING" in
n | no) DEBUG_DIR="";;
y |  ye | yes)
	DEBUG_DIR="/tmp/amanda"
	cat >> confdefs.h <<\EOF
#define DEBUG_CODE 1
EOF

  ;;
/*)
	DEBUG_DIR="$DEBUGGING"
	cat >> confdefs.h <<\EOF
#define DEBUG_CODE 1
EOF

  ;;
*) { echo "configure: error: *** You must supply a full pathname to --with-debugging option." 1>&2; exit 1; }
  ;;
esac
case "$DEBUG_DIR" in
"") :;;
*) cat >> confdefs.h <<EOF
#define DEBUG_DIR "$DEBUG_DIR"
EOF

   ;;
esac

# Check whether --with-pid-debug-files or --without-pid-debug-files was given.
if test "${with_pid_debug_files+set}" = set; then
  withval="$with_pid_debug_files"
  DEBUG_FILE_WITH_PID="$withval"
else
  : ${DEBUG_FILE_WITH_PID=no}

fi

case "$DEBUG_FILE_WITH_PID" in
n | no) : ;;
y |  ye | yes) cat >> confdefs.h <<\EOF
#define DEBUG_FILE_WITH_PID 1
EOF

  ;;
*) { echo "configure: error: *** You must not supply an argument to --with-pid-debug-files option." 1>&2; exit 1; }
  ;;
esac

# Check whether --with-testing or --without-testing was given.
if test "${with_testing+set}" = set; then
  withval="$with_testing"
  TESTING="$withval"
else
  : ${TESTING=no}

fi

case "$TESTING" in
n | no) SERVICE_SUFFIX="";;
y |  ye | yes) SERVICE_SUFFIX="-test";;
*) SERVICE_SUFFIX="-$TESTING";;
esac
AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"

cat >> confdefs.h <<EOF
#define SERVICE_SUFFIX "$SERVICE_SUFFIX"
EOF

cat >> confdefs.h <<EOF
#define AMANDA_SERVICE_NAME "$AMANDA_SERVICE_NAME"
EOF

cat >> confdefs.h <<EOF
#define KAMANDA_SERVICE_NAME "$KAMANDA_SERVICE_NAME"
EOF


# Check whether --enable-libtool or --disable-libtool was given.
if test "${enable_libtool+set}" = set; then
  enableval="$enable_libtool"
  USE_LIBTOOL="$enableval"
else
  : ${USE_LIBTOOL=yes}

fi

case "$USE_LIBTOOL" in
n | no)
    LIB_EXTENSION="a"
    OBJ_EXTENSION="o"
    BUILD_COMMON_LTLIB=
    BUILD_CLIENT_LTLIB=
    BUILD_SERVER_LTLIB=
    BUILD_TAPE_LTLIB=
    libtool_enable_shared=no
    libtool_enable_static=yes
  ;;
y |  ye | yes)
    LIB_EXTENSION="la"
    OBJ_EXTENSION="lo"
    BUILD_COMMON_LIB=
    BUILD_CLIENT_LIB=
    BUILD_SERVER_LIB=
    BUILD_TAPE_LIB=
  ;;
*) { echo "configure: error: *** You must not supply an argument to --enable-libtool" 1>&2; exit 1; }
esac




(
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}

    tmp=`eval echo "$bindir"`
    cat >> confdefs.h <<EOF
#define bindir "$tmp"
EOF


    tmp=`eval echo "$sbindir"`
    cat >> confdefs.h <<EOF
#define sbindir "$tmp"
EOF


    tmp=`eval echo "$libexecdir"`
    cat >> confdefs.h <<EOF
#define libexecdir "$tmp"
EOF


    tmp=`eval echo $mandir`
    cat >> confdefs.h <<EOF
#define mandir "$tmp"
EOF

)

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2220: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    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"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2249: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; 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 $# -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" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

DUMP_PROGRAMS="ufsdump dump backup"

case "$target" in
    *-dec-osf*)
			cat >> confdefs.h <<\EOF
#define STATFS_OSF1 1
EOF

			;;
    *-dg-*)
			DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
			: ${USE_RUNDUMP=yes}
			cat >> confdefs.h <<\EOF
#define DUMP_RETURNS_1 1
EOF

			;;
    *-netbsd*)
			;;
    *-freebsd*)
			;;
    *-hp-*)
			MT_FILE_FLAG="-t"
			case "$CC" in
			    *gcc*)
				;;
			    *cc*)
				AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
				;;
			esac
			;;
  *-ibm-aix*)
			DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
			cat >> confdefs.h <<\EOF
#define AIX_TAPEIO 1
EOF

			cat >> confdefs.h <<\EOF
#define AIX_BACKUP 1
EOF

			;;
  m88k-motorola-sysv4)
			;;
  *-nextstep3)
			;;
  *-pc-bsdi*)
			;;
  *-pc-linux-*)
			;;
  alpha-*-linux-*)
			;;
  *-sgi-irix3*)
						CC=gcc
			;;
  *-sgi-irix4*)
			;;
  *-sgi-irix5*)
			;;
  *-sgi-irix6*)
			;;
  *-solaris2*)
						case "$target" in
			    *solaris2.[6789]*)
				amanda_cv_max_file_size=1000000000
				;;
			esac
			;;
  *-sun-sunos4.1*)
			;;
  *-ultrix*)
			: ${USE_RUNDUMP=yes}
			cat >> confdefs.h <<\EOF
#define STATFS_ULTRIX 1
EOF

			cat >> confdefs.h <<\EOF
#define DUMP_RETURNS_1 1
EOF

			;;
  *-sysv4.2uw2*)
			cat >> confdefs.h <<\EOF
#define UWARE_TAPEIO 1
EOF

			;;
  *-sco3.2v5*)
			cat >> confdefs.h <<\EOF
#define XENIX_TAPEIO 1
EOF

			cat >> confdefs.h <<\EOF
#define STATFS_SCO_OS5 1
EOF

			;;
  i386-pc-isc4*)
			cat >> confdefs.h <<\EOF
#define XENIX_TAPEIO 1
EOF

			;;
  *-sni-sysv4)
			;;
  *)
			cat <<END

*****
This machine, target type $target, is not known
to be fully supported by this configure script.  If the
installation of Amanda on this system succeeds or needed
any patches, please email amanda-hackers@amanda.org with
the patches or an indication of the sucess or failure of
the Amanda installation on your system.
*****

END
		;;
esac

if test "x" = "x$CFLAGS"; then
    CFLAGS=-g
fi
OLD_CFLAGS="$CFLAGS"
AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES"
AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES"
AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS"
CFLAGS="$CFLAGS $AMANDA_CPPFLAGS $AMANDA_CFLAGS"
CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"



: ${MT_FILE_FLAG="-f"}

cat >> confdefs.h <<EOF
#define MT_FILE_FLAG "$MT_FILE_FLAG"
EOF


echo $ac_n "checking whether aclocal can find libtool macros""... $ac_c" 1>&6
echo "configure:2438: checking whether aclocal can find libtool macros" >&5
if eval "test \"`echo '$''{'amanda_cv_libtool_macros'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    rm -rf .test-libtool
	    mkdir .test-libtool
	    cd .test-libtool
	    cat >configure.in <<EOF
AM_PROG_LIBTOOL
EOF
	    aclocal >/dev/null 2>/dev/null
	    if grep LIBTOOL aclocal.m4 >/dev/null 2>&1; then
		amanda_cv_libtool_macros=yes
	    else
		amanda_cv_libtool_macros=no
	    fi
	    cd ..
	    rm -rf .test-libtool
	

fi

echo "$ac_t""$amanda_cv_libtool_macros" 1>&6
if test "$amanda_cv_libtool_macros" = yes; then
    LIBTOOL_M4=
    LIBTOOL_M4_MACRO_DIR=
else
    LIBTOOL_M4='$(top_srcdir)/config/libtool/libtool.m4'
    LIBTOOL_M4_MACRO_DIR='-I $(top_srcdir)/config/libtool'
fi



for ac_prog in ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2477: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AR" in
  /*)
  ac_cv_path_AR="$AR" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
AR="$ac_cv_path_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AR" && break
done


BUILD_AMPLOT_SBIN="amplot"
BUILD_AMPLOT_LIBEXEC="amcat.awk amplot.awk amplot.g amplot.gp"



for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2519: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ac_t""$AWK" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AWK" && break
done


	
	echo $ac_n "checking for $AWK command line variable assignment""... $ac_c" 1>&6
echo "configure:2550: checking for $AWK command line variable assignment" >&5
if eval "test \"`echo '$''{'amanda_cv_awk_var_assignment'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		echo 'BEGIN{print i; exit}' > conftest.awk
		result=`$AWK -f conftest.awk i=xx | wc -c`
		if test "$result" -le 1; then
		    result=`$AWK -f conftest.awk -v i=xx | wc -c`
		    if test "$result" -le 1; then
			amanda_cv_awk_var_assignment=no
		    else
			amanda_cv_awk_var_assignment="yes with -v"
		    fi
		else
		    amanda_cv_awk_var_assignment="yes"
		fi
		rm -fr conftest.awk
	    
	
fi

echo "$ac_t""$amanda_cv_awk_var_assignment" 1>&6
	AWK_VAR_ASSIGNMENT_OPT=
	case "$amanda_cv_awk_var_assignment" in
	    no)
		HAVE_AWK_WITH_VAR=no
		;;
	    yes)
		HAVE_AWK_WITH_VAR=yes
		;;
	    "yes with -v")
		HAVE_AWK_WITH_VAR=yes
		AWK_VAR_ASSIGNMENT_OPT=-v
		;;
	esac
	
    

if test "$amanda_cv_awk_var_assignment" = no; then
    BUILD_AMPLOT_SBIN=
    BUILD_AMPLOT_LIBEXEC=
    echo "configure: warning: *** Your $awk cannot do command line variable assignment.  Amplot will not be installed." 1>&2
fi

for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2600: 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
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; 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"
if test -n "$YACC"; then
  echo "$ac_t""$YACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

for ac_prog in cat
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2634: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CAT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CAT" in
  /*)
  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CAT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CAT="$ac_cv_path_CAT"
if test -n "$CAT"; then
  echo "$ac_t""$CAT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CAT" && break
done

if test -z "$CAT"; then
    CAT=cat
fi
for ac_prog in compress
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2673: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$COMPRESS" in
  /*)
  ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_COMPRESS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
COMPRESS="$ac_cv_path_COMPRESS"
if test -n "$COMPRESS"; then
  echo "$ac_t""$COMPRESS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$COMPRESS" && break
done

for ac_prog in dd
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2709: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DD" in
  /*)
  ac_cv_path_DD="$DD" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DD="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
DD="$ac_cv_path_DD"
if test -n "$DD"; then
  echo "$ac_t""$DD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$DD" && break
done

for ac_prog in egrep
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2745: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_EGREP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$EGREP" in
  /*)
  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_EGREP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
EGREP="$ac_cv_path_EGREP"
if test -n "$EGREP"; then
  echo "$ac_t""$EGREP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$EGREP" && break
done

for ac_prog in getconf
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2781: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GETCONF'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GETCONF" in
  /*)
  ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GETCONF="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GETCONF="$ac_cv_path_GETCONF"
if test -n "$GETCONF"; then
  echo "$ac_t""$GETCONF" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GETCONF" && break
done


for ac_prog in gnuplot
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2818: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNUPLOT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GNUPLOT" in
  /*)
  ac_cv_path_GNUPLOT="$GNUPLOT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GNUPLOT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GNUPLOT="$ac_cv_path_GNUPLOT"
if test -n "$GNUPLOT"; then
  echo "$ac_t""$GNUPLOT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GNUPLOT" && break
done

if test -z "$GNUPLOT"; then
    BUILD_AMPLOT_SBIN=
    BUILD_AMPLOT_LIBEXEC=
    echo "configure: warning: *** You do not have gnuplot.  Amplot will not be installed." 1>&2
fi

for ac_prog in grep
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2860: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GREP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GREP" in
  /*)
  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GREP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GREP="$ac_cv_path_GREP"
if test -n "$GREP"; then
  echo "$ac_t""$GREP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GREP" && break
done

if test -z "$GREP"; then
    GREP=grep
fi
cat >> confdefs.h <<EOF
#define GREP "$GREP"
EOF


for ac_prog in gtar gnutar tar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2904: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNUTAR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GNUTAR" in
  /*)
  ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GNUTAR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GNUTAR="$ac_cv_path_GNUTAR"
if test -n "$GNUTAR"; then
  echo "$ac_t""$GNUTAR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GNUTAR" && break
done

if test "$GNUTAR"; then
  case "`\"$GNUTAR\" --version 2>&1`" in
   *GNU*tar*)
		cat >> confdefs.h <<EOF
#define GNUTAR "$GNUTAR"
EOF

		;;
   *)
		echo "configure: warning: *** $GNUTAR is not GNU tar, so it will not be used." 1>&2
		GNUTAR=
		;;
  esac
fi

for ac_prog in gzip
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2955: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GZIP" in
  /*)
  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GZIP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GZIP="$ac_cv_path_GZIP"
if test -n "$GZIP"; then
  echo "$ac_t""$GZIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GZIP" && break
done

if test "$GZIP"; then
    cat >> confdefs.h <<\EOF
#define HAVE_GZIP 1
EOF

    cat >> confdefs.h <<EOF
#define COMPRESS_PATH "$GZIP"
EOF

    cat >> confdefs.h <<EOF
#define COMPRESS_SUFFIX ".gz"
EOF

    cat >> confdefs.h <<EOF
#define COMPRESS_FAST_OPT "--fast"
EOF

    cat >> confdefs.h <<EOF
#define COMPRESS_BEST_OPT "--best"
EOF

    cat >> confdefs.h <<EOF
#define UNCOMPRESS_PATH "$GZIP"
EOF

    cat >> confdefs.h <<EOF
#define UNCOMPRESS_OPT "-dc"
EOF

else
    if test "$COMPRESS"; then
	cat >> confdefs.h <<EOF
#define COMPRESS_PATH "$COMPRESS"
EOF

	cat >> confdefs.h <<EOF
#define COMPRESS_SUFFIX ".Z"
EOF

	cat >> confdefs.h <<EOF
#define COMPRESS_FAST_OPT "-f"
EOF

	cat >> confdefs.h <<EOF
#define COMPRESS_BEST_OPT "-f"
EOF

	cat >> confdefs.h <<EOF
#define UNCOMPRESS_PATH "$COMPRESS"
EOF

	cat >> confdefs.h <<EOF
#define UNCOMPRESS_OPT "-dc"
EOF

    else
				echo "configure: warning: *** Cannot find either gzip or compress.  Using cat. ***" 1>&2
	cat >> confdefs.h <<EOF
#define COMPRESS_PATH "$CAT"
EOF

	cat >> confdefs.h <<EOF
#define COMPRESS_SUFFIX ""
EOF

	cat >> confdefs.h <<EOF
#define UNCOMPRESS_PATH "$CAT"
EOF

    fi
fi

for ac_prog in Mail mailx
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3063: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAILER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MAILER" in
  /*)
  ac_cv_path_MAILER="$MAILER" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_MAILER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MAILER="$ac_cv_path_MAILER"
if test -n "$MAILER"; then
  echo "$ac_t""$MAILER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MAILER" && break
done

if test "$MAILER"; then
    cat >> confdefs.h <<EOF
#define MAILER "$MAILER"
EOF

fi

for ac_prog in mt
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3106: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MT" in
  /*)
  ac_cv_path_MT="$MT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_MT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MT="$ac_cv_path_MT"
if test -n "$MT"; then
  echo "$ac_t""$MT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MT" && break
done


for ac_prog in chs
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3143: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CHS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CHS" in
  /*)
  ac_cv_path_CHS="$CHS" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CHS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CHS="$ac_cv_path_CHS"
if test -n "$CHS"; then
  echo "$ac_t""$CHS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CHS" && break
done

if test "$CHS"; then
    CHS=chs
fi

for ac_prog in mtx
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3183: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MTX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MTX" in
  /*)
  ac_cv_path_MTX="$MTX" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_MTX="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MTX="$ac_cv_path_MTX"
if test -n "$MTX"; then
  echo "$ac_t""$MTX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MTX" && break
done

if test "$MTX"; then
    MTX=mtx
fi

for ac_prog in pcat
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3223: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PCAT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PCAT" in
  /*)
  ac_cv_path_PCAT="$PCAT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PCAT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PCAT="$ac_cv_path_PCAT"
if test -n "$PCAT"; then
  echo "$ac_t""$PCAT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$PCAT" && break
done

for ac_prog in perl5 perl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3259: 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
  /*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$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"
  ;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
  echo "$ac_t""$PERL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$PERL" && break
done


# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3294: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


SHELL=
for ac_prog in sh
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3327: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$SHELL" in
  /*)
  ac_cv_path_SHELL="$SHELL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $LOCSYSPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SHELL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
SHELL="$ac_cv_path_SHELL"
if test -n "$SHELL"; then
  echo "$ac_t""$SHELL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$SHELL" && break
done


for ac_prog in $DUMP_PROGRAMS
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3364: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DUMP" in
  /*)
  ac_cv_path_DUMP="$DUMP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DUMP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
DUMP="$ac_cv_path_DUMP"
if test -n "$DUMP"; then
  echo "$ac_t""$DUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$DUMP" && break
done

if test "$DUMP"; then
    cat >> confdefs.h <<EOF
#define DUMP "$DUMP"
EOF

    echo $ac_n "checking whether $DUMP supports -E for estimates""... $ac_c" 1>&6
echo "configure:3401: checking whether $DUMP supports -E for estimates" >&5
if eval "test \"`echo '$''{'amanda_cv_dump_estimate'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    case "$DUMP" in
	    *dump)
		$DUMP 9Ef /dev/null /dev/null/invalid/fs >conftest.d-E 2>&1
		$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1 |
		    $EGREP -v 'Dumping|Date of' >conftest.d
		if diff conftest.d-E conftest.d >/dev/null 2>&1; then
		    amanda_cv_dump_estimate=yes
		else
		    amanda_cv_dump_estimate=no
		fi
		rm -f conftest.d conftest.d-E
	      ;;
	    *) amanda_cv_dump_estimate=no
	      ;;
	    esac
	
fi

echo "$ac_t""$amanda_cv_dump_estimate" 1>&6
    if test "$amanda_cv_dump_estimate" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_DUMP_ESTIMATE 1
EOF

    fi
fi

for ac_prog in ufsrestore restore
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3438: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RESTORE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$RESTORE" in
  /*)
  ac_cv_path_RESTORE="$RESTORE" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_RESTORE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
RESTORE="$ac_cv_path_RESTORE"
if test -n "$RESTORE"; then
  echo "$ac_t""$RESTORE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$RESTORE" && break
done

if test "$RESTORE"; then
    cat >> confdefs.h <<EOF
#define RESTORE "$RESTORE"
EOF

fi

for ac_prog in xfsdump
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3481: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XFSDUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$XFSDUMP" in
  /*)
  ac_cv_path_XFSDUMP="$XFSDUMP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_XFSDUMP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
XFSDUMP="$ac_cv_path_XFSDUMP"
if test -n "$XFSDUMP"; then
  echo "$ac_t""$XFSDUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$XFSDUMP" && break
done

if test "$XFSDUMP"; then
    cat >> confdefs.h <<EOF
#define XFSDUMP "$XFSDUMP"
EOF

    echo "configure: warning: *** xfsdump causes the setuid-root rundump program to be enabled" 1>&2
    echo "configure: warning: *** to disable it, just #undef XFSDUMP in config/config.h" 1>&2
fi
for ac_prog in xfsrestore
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3525: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XFSRESTORE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$XFSRESTORE" in
  /*)
  ac_cv_path_XFSRESTORE="$XFSRESTORE" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_XFSRESTORE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
XFSRESTORE="$ac_cv_path_XFSRESTORE"
if test -n "$XFSRESTORE"; then
  echo "$ac_t""$XFSRESTORE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$XFSRESTORE" && break
done

if test "$XFSRESTORE"; then
    cat >> confdefs.h <<EOF
#define XFSRESTORE "$XFSRESTORE"
EOF

fi

for ac_prog in vxdump
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3568: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_VXDUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$VXDUMP" in
  /*)
  ac_cv_path_VXDUMP="$VXDUMP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_VXDUMP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
VXDUMP="$ac_cv_path_VXDUMP"
if test -n "$VXDUMP"; then
  echo "$ac_t""$VXDUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$VXDUMP" && break
done

if test "$VXDUMP"; then
    cat >> confdefs.h <<EOF
#define VXDUMP "$VXDUMP"
EOF

fi
for ac_prog in vxrestore
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3610: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_VXRESTORE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$VXRESTORE" in
  /*)
  ac_cv_path_VXRESTORE="$VXRESTORE" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_VXRESTORE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
VXRESTORE="$ac_cv_path_VXRESTORE"
if test -n "$VXRESTORE"; then
  echo "$ac_t""$VXRESTORE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$VXRESTORE" && break
done

if test "$VXRESTORE"; then
    cat >> confdefs.h <<EOF
#define VXRESTORE "$VXRESTORE"
EOF

fi

for ac_prog in vdump
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3653: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_VDUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$VDUMP" in
  /*)
  ac_cv_path_VDUMP="$VDUMP" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_VDUMP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
VDUMP="$ac_cv_path_VDUMP"
if test -n "$VDUMP"; then
  echo "$ac_t""$VDUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$VDUMP" && break
done

if test "$VDUMP"; then
    cat >> confdefs.h <<EOF
#define VDUMP "$VDUMP"
EOF

fi

for ac_prog in vrestore
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3696: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_VRESTORE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$VRESTORE" in
  /*)
  ac_cv_path_VRESTORE="$VRESTORE" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $SYSLOCPATH$ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_VRESTORE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
VRESTORE="$ac_cv_path_VRESTORE"
if test -n "$VRESTORE"; then
  echo "$ac_t""$VRESTORE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$VRESTORE" && break
done

if test "$VRESTORE"; then
    cat >> confdefs.h <<EOF
#define VRESTORE "$VRESTORE"
EOF

fi
  
if test "$PCAT"; then
    AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
else
    AMPLOT_CAT_PACK=
fi
if test "$COMPRESS"; then
    AMPLOT_COMPRESS=$COMPRESS
    AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
else
    AMPLOT_CAT_COMPRESS=
fi
if test "$GZIP"; then
    AMPLOT_COMPRESS=$GZIP
    AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
else
    AMPLOT_CAT_GZIP=
fi





GZIP=

echo $ac_n "checking for large file compilation CFLAGS""... $ac_c" 1>&6
echo "configure:3759: checking for large file compilation CFLAGS" >&5
if eval "test \"`echo '$''{'amanda_cv_LFS_CFLAGS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	amanda_cv_LFS_CFLAGS=
	if test "$GETCONF"; then
	    if $GETCONF LFS_CFLAGS >/dev/null 2>&1; then
		amanda_cv_LFS_CFLAGS=`$GETCONF LFS_CFLAGS 2>/dev/null`
	    fi
	fi
    

fi

echo "$ac_t""$amanda_cv_LFS_CFLAGS" 1>&6
echo $ac_n "checking for large file compilation LDFLAGS""... $ac_c" 1>&6
echo "configure:3776: checking for large file compilation LDFLAGS" >&5
if eval "test \"`echo '$''{'amanda_cv_LFS_LDFLAGS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	amanda_cv_LFS_LDFLAGS=
	if test "$GETCONF"; then
	    if $GETCONF LFS_LDFLAGS >/dev/null 2>&1; then
		amanda_cv_LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS 2>/dev/null`
	    fi
	fi
    

fi

echo "$ac_t""$amanda_cv_LFS_LDFLAGS" 1>&6
echo $ac_n "checking for large file compilation LIBS""... $ac_c" 1>&6
echo "configure:3793: checking for large file compilation LIBS" >&5
if eval "test \"`echo '$''{'amanda_cv_LFS_LIBS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	amanda_cv_LFS_LIBS=
	if test "$GETCONF"; then
	    if $GETCONF LFS_LIBS >/dev/null 2>&1; then
		amanda_cv_LFS_LIBS=`$GETCONF LFS_LIBS 2>/dev/null`
	    fi
	fi
    

fi

echo "$ac_t""$amanda_cv_LFS_LIBS" 1>&6
CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
CPPFLAGS="$amanda_cv_LFS_CFLAGS $CPPFLAGS"
LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
LIBS="$amanda_cv_LFS_LIBS $LIBS"

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3817: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    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"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3846: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; 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 $# -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" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:3894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
#line 3904 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    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
rm -fr conftest*

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:3928: 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:3933: 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
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:3957: 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
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
  withval="$with_gnu_ld"
  test "$withval" = no || with_gnu_ld=yes
else
  with_gnu_ld=no
fi


ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:3997: checking for ld used by GCC" >&5
  ac_prog=`($CC -print-prog-name=ld) 2>&5`
  case "$ac_prog" in
  # Accept absolute paths.
  /*)
    test -z "$LD" && LD="$ac_prog"
    ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:4015: checking for GNU ld" >&5
else
  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:4018: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -z "$LD"; then
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog"; then
      ac_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
	test "$with_gnu_ld" != no && break
      else
        test "$with_gnu_ld" != yes && break
      fi
    fi
  done
  IFS="$ac_save_ifs"
else
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi

LD="$ac_cv_path_LD"
if test -n "$LD"; then
  echo "$ac_t""$LD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }

echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:4054: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  ac_cv_prog_gnu_ld=yes
else
  ac_cv_prog_gnu_ld=no
fi
fi

echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6


echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:4070: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NM" in
/*)
  ac_cv_path_NM="$NM" # Let the user override the test with a path.
  ;;
*)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
    test -z "$ac_dir" && dir=.
    if test -f $ac_dir/nm; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
        ac_cv_path_NM="$ac_dir/nm -B"
      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
        ac_cv_path_NM="$ac_dir/nm -p"
      else
        ac_cv_path_NM="$ac_dir/nm"
      fi
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
  ;;
esac
fi

NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6


echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:4107: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi








# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'


# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  if test "$enableval" = no; then
  libtool_enable_shared=no
else
  libtool_enable_shared=yes
fi
fi

test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
libtool_shared=
test "$enable_shared" = no && libtool_shared=" --disable-shared"

# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  if test "$enableval" = no; then
  libtool_enable_static=no
else
  libtool_enable_static=yes
fi
fi

test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
libtool_static=
test "$enable_static" = no && libtool_static=" --disable-static"

libtool_flags="$libtool_shared$libtool_static"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$host" in
*-*-irix*)
  # Find out which ABI we are using.
  echo '#line 4176 "configure"' > conftest.$ac_ext
  if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    case "`/usr/bin/file conftest.o`" in
    *32-bit*)
      LD="${LD-ld} -32"
      ;;
    *N32*)
      LD="${LD-ld} -n32"
      ;;
    *64-bit*)
      LD="${LD-ld} -64"
      ;;
    esac
  fi
  rm -rf conftest*
  ;;

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  CFLAGS="$CFLAGS -belf"
  ;;
esac

# Actually configure libtool.  ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4209: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    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"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4238: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; 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 $# -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" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:4286: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
#line 4296 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    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
rm -fr conftest*

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:4320: 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:4325: 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
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:4349: 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
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:4377: 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 eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # 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.
  cat > conftest.$ac_ext <<EOF
#line 4392 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 4409 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

if test $ac_cv_prog_gcc = yes; then
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:4439: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    ac_pattern="Autoconf.*'x'"
  cat > conftest.$ac_ext <<EOF
#line 4445 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
else
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*


  if test $ac_cv_prog_gcc_traditional = no; then
    cat > conftest.$ac_ext <<EOF
#line 4463 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*

  fi
fi

echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:4485: 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 4490 "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;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

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


	echo $ac_n "checking for working volatile""... $ac_c" 1>&6
echo "configure:4561: checking for working volatile" >&5
if eval "test \"`echo '$''{'amanda_cv_c_volatile'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		cat > conftest.$ac_ext <<EOF
#line 4567 "configure"
#include "confdefs.h"

int main() {

			volatile int aaa = 0;
		    
; return 0; }
EOF
if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  amanda_cv_c_volatile=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  amanda_cv_c_volatile=no
		
fi
rm -f conftest*
	    
	
fi

echo "$ac_t""$amanda_cv_c_volatile" 1>&6
	if test $amanda_cv_c_volatile = no; then
	    cat >> confdefs.h <<\EOF
#define volatile 
EOF

	fi
    


	echo $ac_n "checking for working unsigned long constants""... $ac_c" 1>&6
echo "configure:4602: checking for working unsigned long constants" >&5
if eval "test \"`echo '$''{'amanda_cv_c_unsigned_long_constants'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		cat > conftest.$ac_ext <<EOF
#line 4608 "configure"
#include "confdefs.h"

		    
int main() {

			long l = 1ul;
		    
; return 0; }
EOF
if { (eval echo configure:4618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  amanda_cv_c_unsigned_long_constants=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  amanda_cv_c_unsigned_long_constants=no
		
fi
rm -f conftest*
	    
	
fi

echo "$ac_t""$amanda_cv_c_unsigned_long_constants" 1>&6
	if test "$amanda_cv_c_unsigned_long_constants" = yes; then
	    cat >> confdefs.h <<\EOF
#define HAVE_UNSIGNED_LONG_CONSTANTS 1
EOF

	fi
    

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:4643: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4648 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  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*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4673 "configure"
#include "confdefs.h"
#include <string.h>
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*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4691 "configure"
#include "confdefs.h"
#include <stdlib.h>
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*

fi

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
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4712 "configure"
#include "confdefs.h"
#include <ctype.h>
#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); }

EOF
if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

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

echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:4747: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4752 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.h <<\EOF
#define off_t long
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:4780: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4785 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:4813: 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 <<EOF
#line 4818 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

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 $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:4846: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4851 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_type_uid_t" 1>&6
if test $ac_cv_type_uid_t = no; then
  cat >> confdefs.h <<\EOF
#define uid_t int
EOF

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:4880: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4885 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF


echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:4921: 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 <<EOF
#line 4926 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:4934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
  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*
fi

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_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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4959: 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
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
LEX="$ac_cv_prog_LEX"
if test -n "$LEX"; then
  echo "$ac_t""$LEX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$LEX" && break
done
test -n "$LEX" || LEX=""$missing_dir/missing flex""

# 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:4991: 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
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; 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"
if test -n "$LEX"; then
  echo "$ac_t""$LEX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$LEXLIB"
then
  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:5024: 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 5032 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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; }
EOF
if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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

fi

echo $ac_n "checking lex output file root""... $ac_c" 1>&6
echo "configure:5066: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
fi
fi

echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root

echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
echo "configure:5087: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&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 <<EOF
#line 5099 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {

; return 0; }
EOF
if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_cv_prog_lex_yytext_pointer=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"

fi

echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
if test $ac_cv_prog_lex_yytext_pointer = yes; then
  cat >> confdefs.h <<\EOF
#define YYTEXT_POINTER 1
EOF

fi


echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:5129: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5134 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  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*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 5159 "configure"
#include "confdefs.h"
#include <string.h>
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*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 5177 "configure"
#include "confdefs.h"
#include <stdlib.h>
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*

fi

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
  :
else
  cat > conftest.$ac_ext <<EOF
#line 5198 "configure"
#include "confdefs.h"
#include <ctype.h>
#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); }

EOF
if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

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

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:5237: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5242 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$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
 ac_header_dirent=$ac_hdr; break
else
  echo "$ac_t""no" 1>&6
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:5275: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | 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="-ldir  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5283 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="$LIBS -ldir"
else
  echo "$ac_t""no" 1>&6
fi

else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:5316: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | 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="-lx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5324 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="$LIBS -lx"
else
  echo "$ac_t""no" 1>&6
fi

fi


for ac_hdr in wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5362: 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 5367 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
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

for ac_hdr in sys/wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5402: 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 5407 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
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

cf_decl="#include <sys/types.h>
"
if test $ac_cv_header_sys_wait_h = yes; then
cf_decl="$cf_decl
#include <sys/wait.h>
"
elif test $ac_cv_header_wait_h = yes; then
cf_decl="$cf_decl
#include <wait.h>
"
fi
echo $ac_n "checking union wait declared""... $ac_c" 1>&6
echo "configure:5450: checking union wait declared" >&5
if eval "test \"`echo '$''{'cf_cv_decl_union_wait'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        cat > conftest.$ac_ext <<EOF
#line 5456 "configure"
#include "confdefs.h"
$cf_decl
int main() {
union wait x
; return 0; }
EOF
if { (eval echo configure:5463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_decl_union_wait=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_decl_union_wait=no
fi
rm -f conftest*
        
fi

echo "$ac_t""$cf_cv_decl_union_wait" 1>&6

if test $cf_cv_decl_union_wait = yes; then
        echo $ac_n "checking union wait used as wait-arg""... $ac_c" 1>&6
echo "configure:5480: checking union wait used as wait-arg" >&5
        if eval "test \"`echo '$''{'cf_cv_arg_union_wait'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
                cat > conftest.$ac_ext <<EOF
#line 5486 "configure"
#include "confdefs.h"
$cf_decl
int main() {
union wait x; int i; wait(&x); i = WIFEXITED(x)
; return 0; }
EOF
if { (eval echo configure:5493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cf_cv_arg_union_wait=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cf_cv_arg_union_wait=no
fi
rm -f conftest*
                
fi

        echo "$ac_t""$cf_cv_arg_union_wait" 1>&6
        test $cf_cv_arg_union_wait = yes && cat >> confdefs.h <<\EOF
#define WAIT_USES_UNION 1
EOF

fi

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:5514: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5519 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:5528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi

for ac_hdr in \
	arpa/inet.h \
	chio.h \
	sys/chio.h \
	db.h \
	dbm.h \
	fcntl.h \
	fstab.h \
	grp.h \
	history.h \
	libc.h \
	limits.h \
	mntent.h \
	mnttab.h \
	ndbm.h \
	netdb.h \
	netinet/in_systm.h \
	netinet/ip.h \
	readline.h \
	readline/history.h \
	readline/readline.h \
	stdlib.h \
	string.h \
	strings.h \
	sys/fcntl.h \
	sys/file.h \
	sys/ioctl.h \
	sys/ipc.h \
	sys/mman.h \
	sys/mntent.h \
	sys/mount.h \
	sys/param.h \
	sys/select.h \
	sys/shm.h \
	sys/stat.h \
	sys/statfs.h \
	sys/statvfs.h \
	sys/time.h \
	sys/types.h \
	sys/vfs.h \
	sys/vfstab.h \
	syslog.h \
	unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5594: 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 5599 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
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


echo $ac_n "checking for main in -lcur_colr""... $ac_c" 1>&6
echo "configure:5632: checking for main in -lcur_colr" >&5
ac_lib_var=`echo cur_colr'_'main | 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="-lcur_colr  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5640 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo cur_colr | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcur_colr $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for main in -lintl""... $ac_c" 1>&6
echo "configure:5676: checking for main in -lintl" >&5
ac_lib_var=`echo intl'_'main | 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="-lintl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5684 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lintl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


case "$target" in
    *sgi-irix*)
			echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
echo "configure:5722: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | 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="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

			;;
    *)
			echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
echo "configure:5767: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | 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="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5775 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lnsl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

			echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
echo "configure:5810: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | 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="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5818 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

			echo $ac_n "checking for main in -lsun""... $ac_c" 1>&6
echo "configure:5853: checking for main in -lsun" >&5
ac_lib_var=`echo sun'_'main | 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="-lsun  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5861 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsun $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

			;;
esac

echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
echo "configure:5899: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | 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="-ltermcap  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5907 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char tgetent();

int main() {
tgetent()
; return 0; }
EOF
if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ltermcap $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

if test "$ac_cv_lib_termcap_tgetent" != yes; then
    echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
echo "configure:5947: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | 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="-lcurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5955 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char tgetent();

int main() {
tgetent()
; return 0; }
EOF
if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcurses $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    if test "$ac_cv_lib_curses_tgetent" != yes; then
	echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
echo "configure:5995: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | 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="-lncurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6003 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char tgetent();

int main() {
tgetent()
; return 0; }
EOF
if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lncurses $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    fi
fi
if test "$ac_cv_lib_termcap_tgetent" = yes ||
   test "$ac_cv_lib_curses_tgetent" = yes ||
   test "$ac_cv_lib_ncurses_tgetent" = yes; then
    echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
echo "configure:6047: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | 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="-lreadline  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6055 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lreadline $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    if test "$ac_cv_lib_readline_readline" != yes; then
	echo "configure: warning: *** No readline library, no history and command line editing in amrecover!" 1>&2
    fi
else
    echo "configure: warning: *** No terminal library, no history and command line editing in amrecover!" 1>&2
fi

echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6
echo "configure:6101: checking for modf in -lm" >&5
ac_lib_var=`echo m'_'modf | 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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6109 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char modf();

int main() {
modf()
; return 0; }
EOF
if { (eval echo configure:6120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi



DB_HEADER=
DB_LIB=

save_LIBS="$LIBS"
echo $ac_n "checking for dbm_open in -lc""... $ac_c" 1>&6
echo "configure:6154: checking for dbm_open in -lc" >&5
ac_lib_var=`echo c'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6162 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lc $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

LIBS="$save_LIBS"

case "$DB_STYLE" in
    db)
	if test "$ac_cv_header_db_h" = yes; then
	    echo $ac_n "checking for main in -ldb""... $ac_c" 1>&6
echo "configure:6206: checking for main in -ldb" >&5
ac_lib_var=`echo db'_'main | 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="-ldb  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6214 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:6221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    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"

else
  echo "$ac_t""no" 1>&6
fi

	    if test "$ac_cv_lib_db_main" = yes; then
		echo $ac_n "checking for dbm_open in -ldb""... $ac_c" 1>&6
echo "configure:6250: checking for dbm_open in -ldb" >&5
ac_lib_var=`echo db'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldb  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6258 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:6269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    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"

else
  echo "$ac_t""no" 1>&6
fi

		if test "$ac_cv_lib_db_dbm_open" = yes; then
		    DB_HEADER=db.h
		    DB_LIB=db
		else
		    DB_STYLE=
		    echo "configure: warning: *** db database library requested but dbm_open not found in -ldb." 1>&2
		fi
	    else
		if test "$ac_cv_lib_c_dbm_open" = yes; then
		    DB_HEADER=db.h
		    DB_LIB=c
		else
		    DB_STYLE=
		    echo "configure: warning: *** db library requested but -ldb doesn't exist and dbm_open cannot be found." 1>&2
		fi
	    fi
	else
	    DB_STYLE=
	    echo "configure: warning: *** db database library requested but db.h not found." 1>&2
	fi
	;;

    dbm)
	if test "$ac_cv_header_dbm_h" = yes; then
	    echo $ac_n "checking for main in -ldbm""... $ac_c" 1>&6
echo "configure:6321: checking for main in -ldbm" >&5
ac_lib_var=`echo dbm'_'main | 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="-ldbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6329 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo dbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ldbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

	    if test "$ac_cv_lib_dbm_main" = yes; then
		echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
echo "configure:6365: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6373 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo dbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ldbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

		if test "$ac_cv_lib_dbm_dbm_open" = yes; then
		    DB_HEADER=dbm.h
		    DB_LIB=dbm
		else
		    DB_STYLE=
		    echo "configure: warning: *** dbm database library requested but dbm_open not found in -ldbm." 1>&2
		fi
	    else
		if test "$ac_cv_lib_c_dbm_open" = yes; then
		    DB_HEADER=dbm.h
		    DB_LIB=c
		else
		    DB_STYLE=
		    echo "configure: warning: *** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found." 1>&2
		fi
	    fi
	else
	    DB_STYLE=
	    echo "configure: warning: *** dbm database library requested but dbm.h not found." 1>&2
	fi
	;;

    gdbm)
	if test "$ac_cv_header_ndbm_h" = yes; then
	    echo $ac_n "checking for main in -lgdbm""... $ac_c" 1>&6
echo "configure:6436: checking for main in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'main | 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="-lgdbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6444 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo gdbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lgdbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

	    if test "$ac_cv_lib_gdbm_main" = yes; then
		echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
echo "configure:6480: checking for dbm_open in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgdbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6488 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:6499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo gdbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lgdbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

		if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
		    DB_HEADER=ndbm.h
		    DB_LIB=gdbm
		else
		    DB_STYLE=
		    echo "configure: warning: *** gdbm database library requested but -lgdbm not found." 1>&2
		fi
	    else
		if test "$ac_cv_lib_c_dbm_open" = yes; then
		    DB_HEADER=ndbm.h
		    DB_LIB=c
		else
		    DB_STYLE=
		    echo "configure: warning: *** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found." 1>&2
		fi
	    fi
	else
	    DB_STYLE=
	    echo "configure: warning: *** gdbm database library requested but ndbm.h not found." 1>&2
	fi
	;;

    ndbm)
	if test "$ac_cv_header_ndbm_h" = yes; then
	    echo $ac_n "checking for main in -lndbm""... $ac_c" 1>&6
echo "configure:6551: checking for main in -lndbm" >&5
ac_lib_var=`echo ndbm'_'main | 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="-lndbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6559 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lndbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

	    if test "$ac_cv_lib_ndbm_main" = yes; then
		echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
echo "configure:6595: checking for dbm_open in -lndbm" >&5
ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lndbm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6603 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dbm_open();

int main() {
dbm_open()
; return 0; }
EOF
if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
    ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lndbm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

		if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
		    DB_HEADER=ndbm.h
		    DB_LIB=ndbm
		else
		    DB_STYLE=
		    echo "configure: warning: *** ndbm database library requested but -lndbm not found." 1>&2
		fi
	    else
		if test "$ac_cv_lib_c_dbm_open" = yes; then
		    DB_HEADER=ndbm.h
		    DB_LIB=c
		else
		    DB_STYLE=
		    echo "configure: warning: *** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found." 1>&2
		fi
	    fi
	else
	    DB_STYLE=
	    echo "configure: warning: *** ndbm database library requested but ndbm.h not found." 1>&2
	fi
	;;
    text)
	DB_HEADER=
	DB_LIB=
	;;
esac


if test -z "$DB_STYLE"; then
    DB_STYLE=text
    DB_HEADER=
    DB_LIB=
fi


if test "$DB_STYLE" = text; then
    cat >> confdefs.h <<\EOF
#define TEXTDB 1
EOF

else
    echo $ac_n "checking for database""... $ac_c" 1>&6
echo "configure:6683: checking for database" >&5
    echo "$ac_t""header is $DB_HEADER, linking against -l$DB_LIB" 1>&6
    case "$DB_STYLE" in
	db)	cat >> confdefs.h <<\EOF
#define USE_DB_H 1
EOF
   ;;
	dbm)	cat >> confdefs.h <<\EOF
#define USE_DBM_H 1
EOF
  ;;
	gdbm)	cat >> confdefs.h <<\EOF
#define USE_NDBM_H 1
EOF
 ;;
	ndbm)	cat >> confdefs.h <<\EOF
#define USE_NDBM_H 1
EOF
 ;;
    esac

    echo $ac_n "checking for struct datum declared in header files""... $ac_c" 1>&6
echo "configure:6705: checking for struct datum declared in header files" >&5
if eval "test \"`echo '$''{'amanda_cv_struct_datum'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    cat > conftest.$ac_ext <<EOF
#line 6711 "configure"
#include "confdefs.h"

#if defined(USE_DB_H)
#  include <db.h>
#else
#  if defined(USE_DBM_H)
#    include <dbm.h>
#  else
#    if defined(USE_NDBM_H)
#      include <ndbm.h>
#    endif
#  endif
#endif
		
int main() {

		    datum a;
		
; return 0; }
EOF
if { (eval echo configure:6732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  amanda_cv_struct_datum=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  amanda_cv_struct_datum=no
	    
fi
rm -f conftest*
	
fi

echo "$ac_t""$amanda_cv_struct_datum" 1>&6
    if test "$amanda_cv_struct_datum" = yes; then
	cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_DATUM 1
EOF

    fi
fi

case "$DB_STYLE" in
    db) DB_EXT=.db;;
    gdbm) DB_EXT='""';;
    dbm | ndbm) DB_EXT=".dir .pag";;
    text) DB_EXT='""';;
    *) DB_EXT=;;
esac


echo $ac_n "checking whether _POSIX2_RE_DUP_MAX is defined""... $ac_c" 1>&6
echo "configure:6765: checking whether _POSIX2_RE_DUP_MAX is defined" >&5
if eval "test \"`echo '$''{'amanda_cv_have__posix2_re_dup_max'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6770 "configure"
#include "confdefs.h"

#include <limits.h>
#ifdef _POSIX2_RE_DUP_MAX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  amanda_cv_have__posix2_re_dup_max=yes
else
  rm -rf conftest*
  amanda_cv_have__posix2_re_dup_max=no
fi
rm -f conftest*

fi

echo "$ac_t""$amanda_cv_have__posix2_re_dup_max" 1>&6
if test "$amanda_cv_have__posix2_re_dup_max" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE__POSIX2_RE_DUP_MAX 1
EOF

fi

echo $ac_n "checking whether CHAR_MIN is defined""... $ac_c" 1>&6
echo "configure:6800: checking whether CHAR_MIN is defined" >&5
if eval "test \"`echo '$''{'amanda_cv_have_char_min'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6805 "configure"
#include "confdefs.h"

#include <limits.h>
#ifdef CHAR_MIN
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  amanda_cv_have_char_min=yes
else
  rm -rf conftest*
  amanda_cv_have_char_min=no
fi
rm -f conftest*

fi

echo "$ac_t""$amanda_cv_have_char_min" 1>&6
if test "$amanda_cv_have_char_min" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_CHAR_MIN 1
EOF

fi

echo $ac_n "checking whether CHAR_MAX is defined""... $ac_c" 1>&6
echo "configure:6835: checking whether CHAR_MAX is defined" >&5
if eval "test \"`echo '$''{'amanda_cv_have_char_max'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6840 "configure"
#include "confdefs.h"

#include <limits.h>
#ifdef CHAR_MAX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  amanda_cv_have_char_max=yes
else
  rm -rf conftest*
  amanda_cv_have_char_max=no
fi
rm -f conftest*

fi

echo "$ac_t""$amanda_cv_have_char_max" 1>&6
if test "$amanda_cv_have_char_max" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_CHAR_MAX 1
EOF

fi

echo $ac_n "checking whether CHAR_BIT is defined""... $ac_c" 1>&6
echo "configure:6870: checking whether CHAR_BIT is defined" >&5
if eval "test \"`echo '$''{'amanda_cv_have_char_bit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6875 "configure"
#include "confdefs.h"

#include <limits.h>
#ifdef CHAR_BIT
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  amanda_cv_have_char_bit=yes
else
  rm -rf conftest*
  amanda_cv_have_char_bit=no
fi
rm -f conftest*

fi

echo "$ac_t""$amanda_cv_have_char_bit" 1>&6
if test "$amanda_cv_have_char_bit" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_CHAR_BIT 1
EOF

fi


ice_tr=`echo accept | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_accept=no
for ac_func in accept
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6912: 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 <<EOF
#line 6917 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_accept=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_accept}" = yes; then
echo $ac_n "checking for accept declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:6966: checking for accept declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_accept_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_accept_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 6977 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}accept[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_accept_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_accept_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 6993 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}accept[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_accept_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_accept_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_accept_decl" 1>&6
if test "$ice_cv_have_accept_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:7023: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7028 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
EOF

fi

echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:7056: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7061 "configure"
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
#  include <alloca.h>
# else
#  ifdef _AIX
 #pragma alloca
#  else
#   ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#   endif
#  endif
# endif
#endif

int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_cv_func_alloca_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.o
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:7116: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7121 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_os_cray=yes
else
  rm -rf conftest*
  ac_cv_os_cray=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7146: 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 <<EOF
#line 7151 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

  break
else
  echo "$ac_t""no" 1>&6
fi

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:7201: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat > conftest.$ac_ext <<EOF
#line 7209 "configure"
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi

for ac_func in atexit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7252: 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 <<EOF
#line 7257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo atof | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_atof=no
for ac_func in atof
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7312: 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 <<EOF
#line 7317 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_atof=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_atof}" = yes; then
echo $ac_n "checking for atof declaration in stdlib.h""... $ac_c" 1>&6
echo "configure:7366: checking for atof declaration in stdlib.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_atof_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_atof_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 7377 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}atof[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_atof_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_atof_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 7393 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}atof[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_atof_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_atof_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_atof_decl" 1>&6
if test "$ice_cv_have_atof_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in basename
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7423: 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 <<EOF
#line 7428 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo bind | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_bind=no
for ac_func in bind
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7483: 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 <<EOF
#line 7488 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_bind=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_bind}" = yes; then
echo $ac_n "checking for bind declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:7537: checking for bind declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_bind_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_bind_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 7548 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bind[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bind_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bind_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 7564 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bind[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bind_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bind_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_bind_decl" 1>&6
if test "$ice_cv_have_bind_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo bcopy | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_bcopy=no
for ac_func in bcopy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7599: 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 <<EOF
#line 7604 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_bcopy=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_bcopy}" = yes; then
echo $ac_n "checking for bcopy declaration in string.h strings.h""... $ac_c" 1>&6
echo "configure:7653: checking for bcopy declaration in string.h strings.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_bcopy_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_bcopy_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h strings.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 7664 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bcopy[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bcopy_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bcopy_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 7680 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bcopy[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bcopy_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bcopy_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_bcopy_decl" 1>&6
if test "$ice_cv_have_bcopy_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo bzero | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_bzero=no
for ac_func in bzero
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7715: 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 <<EOF
#line 7720 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_bzero=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_bzero}" = yes; then
echo $ac_n "checking for bzero declaration in string.h strings.h""... $ac_c" 1>&6
echo "configure:7769: checking for bzero declaration in string.h strings.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_bzero_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_bzero_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h strings.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 7780 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bzero[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bzero_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bzero_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 7796 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}bzero[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_bzero_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_bzero_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_bzero_decl" 1>&6
if test "$ice_cv_have_bzero_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
echo "configure:7824: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_closedir_void=yes
else
  cat > conftest.$ac_ext <<EOF
#line 7832 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
if { (eval echo configure:7838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_closedir_void=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_closedir_void=yes
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
if test $ac_cv_func_closedir_void = yes; then
  cat >> confdefs.h <<\EOF
#define CLOSEDIR_VOID 1
EOF

fi


ice_tr=`echo closelog | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_closelog=no
for ac_func in closelog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7868: 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 <<EOF
#line 7873 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_closelog=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_closelog}" = yes; then
echo $ac_n "checking for closelog declaration in syslog.h""... $ac_c" 1>&6
echo "configure:7922: checking for closelog declaration in syslog.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_closelog_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_closelog_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in syslog.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 7933 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}closelog[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_closelog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_closelog_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 7949 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}closelog[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_closelog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_closelog_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_closelog_decl" 1>&6
if test "$ice_cv_have_closelog_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo connect | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_connect=no
for ac_func in connect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7984: 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 <<EOF
#line 7989 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_connect=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_connect}" = yes; then
echo $ac_n "checking for connect declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:8038: checking for connect declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_connect_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_connect_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8049 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}connect[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_connect_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_connect_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8065 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}connect[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_connect_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_connect_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_connect_decl" 1>&6
if test "$ice_cv_have_connect_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo dbm_open | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_dbm_open=no
for ac_func in dbm_open
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8100: 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 <<EOF
#line 8105 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_dbm_open=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_dbm_open}" = yes; then
echo $ac_n "checking for dbm_open declaration in ${DB_HEADER-no/db/header/file}""... $ac_c" 1>&6
echo "configure:8154: checking for dbm_open declaration in ${DB_HEADER-no/db/header/file}" >&5
if eval "test \"`echo '$''{'ice_cv_have_dbm_open_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_dbm_open_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in ${DB_HEADER-no/db/header/file}; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8165 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}dbm_open[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_dbm_open_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_dbm_open_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8181 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}dbm_open[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_dbm_open_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_dbm_open_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_dbm_open_decl" 1>&6
if test "$ice_cv_have_dbm_open_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fclose | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fclose=no
for ac_func in fclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8216: 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 <<EOF
#line 8221 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fclose=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fclose}" = yes; then
echo $ac_n "checking for fclose declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8270: checking for fclose declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fclose_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fclose_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8281 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fclose[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fclose_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fclose_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8297 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fclose[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fclose_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fclose_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fclose_decl" 1>&6
if test "$ice_cv_have_fclose_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fflush | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fflush=no
for ac_func in fflush
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8332: 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 <<EOF
#line 8337 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fflush=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fflush}" = yes; then
echo $ac_n "checking for fflush declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8386: checking for fflush declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fflush_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fflush_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8397 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fflush[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fflush_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fflush_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8413 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fflush[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fflush_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fflush_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fflush_decl" 1>&6
if test "$ice_cv_have_fflush_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo flock | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_flock=no
for ac_func in flock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8448: 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 <<EOF
#line 8453 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_flock=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_flock}" = yes; then
echo $ac_n "checking for flock declaration in sys/file.h""... $ac_c" 1>&6
echo "configure:8502: checking for flock declaration in sys/file.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_flock_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_flock_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/file.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8513 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}flock[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_flock_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_flock_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8529 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}flock[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_flock_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_flock_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_flock_decl" 1>&6
if test "$ice_cv_have_flock_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fprintf=no
for ac_func in fprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8564: 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 <<EOF
#line 8569 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fprintf}" = yes; then
echo $ac_n "checking for fprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8618: checking for fprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8629 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8645 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fprintf_decl" 1>&6
if test "$ice_cv_have_fprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fputc | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fputc=no
for ac_func in fputc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8680: 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 <<EOF
#line 8685 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fputc=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fputc}" = yes; then
echo $ac_n "checking for fputc declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8734: checking for fputc declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fputc_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fputc_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8745 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fputc[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fputc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fputc_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8761 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fputc[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fputc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fputc_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fputc_decl" 1>&6
if test "$ice_cv_have_fputc_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fputs | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fputs=no
for ac_func in fputs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8796: 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 <<EOF
#line 8801 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fputs=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fputs}" = yes; then
echo $ac_n "checking for fputs declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8850: checking for fputs declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fputs_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fputs_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8861 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fputs[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fputs_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fputs_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8877 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fputs[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fputs_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fputs_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fputs_decl" 1>&6
if test "$ice_cv_have_fputs_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fread | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fread=no
for ac_func in fread
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:8912: 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 <<EOF
#line 8917 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fread=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fread}" = yes; then
echo $ac_n "checking for fread declaration in stdio.h""... $ac_c" 1>&6
echo "configure:8966: checking for fread declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fread_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fread_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 8977 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fread[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fread_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fread_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 8993 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fread[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fread_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fread_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fread_decl" 1>&6
if test "$ice_cv_have_fread_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fseek | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fseek=no
for ac_func in fseek
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9028: 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 <<EOF
#line 9033 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fseek=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fseek}" = yes; then
echo $ac_n "checking for fseek declaration in stdio.h""... $ac_c" 1>&6
echo "configure:9082: checking for fseek declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fseek_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fseek_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9093 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fseek[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fseek_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fseek_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9109 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fseek[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fseek_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fseek_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fseek_decl" 1>&6
if test "$ice_cv_have_fseek_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo fwrite | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_fwrite=no
for ac_func in fwrite
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9144: 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 <<EOF
#line 9149 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_fwrite=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_fwrite}" = yes; then
echo $ac_n "checking for fwrite declaration in stdio.h""... $ac_c" 1>&6
echo "configure:9198: checking for fwrite declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_fwrite_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_fwrite_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9209 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fwrite[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fwrite_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fwrite_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9225 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}fwrite[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_fwrite_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_fwrite_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_fwrite_decl" 1>&6
if test "$ice_cv_have_fwrite_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9255: 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 <<EOF
#line 9260 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done


for ac_func in getfsent
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9312: 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 <<EOF
#line 9317 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo gethostname | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_gethostname=no
for ac_func in gethostname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9372: 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 <<EOF
#line 9377 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_gethostname=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_gethostname}" = yes; then
echo $ac_n "checking for gethostname declaration in unistd.h""... $ac_c" 1>&6
echo "configure:9426: checking for gethostname declaration in unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_gethostname_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_gethostname_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9437 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}gethostname[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_gethostname_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_gethostname_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9453 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}gethostname[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_gethostname_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_gethostname_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_gethostname_decl" 1>&6
if test "$ice_cv_have_gethostname_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
echo "configure:9482: checking for getmntent in -lsun" >&5
ac_lib_var=`echo sun'_'getmntent | 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="-lsun  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9490 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

int main() {
getmntent()
; return 0; }
EOF
if { (eval echo configure:9501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="-lsun $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
echo "configure:9520: checking for getmntent in -lseq" >&5
ac_lib_var=`echo seq'_'getmntent | 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="-lseq  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9528 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

int main() {
getmntent()
; return 0; }
EOF
if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="-lseq $LIBS"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
echo "configure:9558: checking for getmntent in -lgen" >&5
ac_lib_var=`echo gen'_'getmntent | 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="-lgen  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9566 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

int main() {
getmntent()
; return 0; }
EOF
if { (eval echo configure:9577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LIBS="-lgen $LIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

fi

echo $ac_n "checking for getmntent""... $ac_c" 1>&6
echo "configure:9602: checking for getmntent" >&5
if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9607 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getmntent(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getmntent();

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_getmntent) || defined (__stub___getmntent)
choke me
#else
getmntent();
#endif

; return 0; }
EOF
if { (eval echo configure:9630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_getmntent=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_getmntent=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GETMNTENT 1
EOF

else
  echo "$ac_t""no" 1>&6
fi


ice_tr=`echo getopt | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_getopt=no
for ac_func in getopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9660: 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 <<EOF
#line 9665 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_getopt=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_getopt}" = yes; then
echo $ac_n "checking for getopt declaration in stdlib.h unistd.h libc.h""... $ac_c" 1>&6
echo "configure:9714: checking for getopt declaration in stdlib.h unistd.h libc.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_getopt_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_getopt_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h unistd.h libc.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9725 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getopt[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getopt_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9741 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getopt[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getopt_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_getopt_decl" 1>&6
if test "$ice_cv_have_getopt_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo getpeername | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_getpeername=no
for ac_func in getpeername
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9776: 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 <<EOF
#line 9781 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_getpeername=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_getpeername}" = yes; then
echo $ac_n "checking for getpeername declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:9830: checking for getpeername declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_getpeername_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_getpeername_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9841 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getpeername[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getpeername_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getpeername_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9857 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getpeername[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getpeername_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getpeername_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_getpeername_decl" 1>&6
if test "$ice_cv_have_getpeername_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo getsockname | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_getsockname=no
for ac_func in getsockname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:9892: 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 <<EOF
#line 9897 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_getsockname=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_getsockname}" = yes; then
echo $ac_n "checking for getsockname declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:9946: checking for getsockname declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_getsockname_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_getsockname_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 9957 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getsockname[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getsockname_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getsockname_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 9973 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getsockname[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getsockname_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getsockname_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_getsockname_decl" 1>&6
if test "$ice_cv_have_getsockname_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo getsockopt | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_getsockopt=no
for ac_func in getsockopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10008: 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 <<EOF
#line 10013 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_getsockopt=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_getsockopt}" = yes; then
echo $ac_n "checking for getsockopt declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:10062: checking for getsockopt declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_getsockopt_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_getsockopt_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10073 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getsockopt[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getsockopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getsockopt_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10089 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}getsockopt[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_getsockopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_getsockopt_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_getsockopt_decl" 1>&6
if test "$ice_cv_have_getsockopt_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo gettimeofday | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_gettimeofday=no
for ac_func in gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10124: 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 <<EOF
#line 10129 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_gettimeofday=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_gettimeofday}" = yes; then
echo $ac_n "checking for gettimeofday declaration in time.h sys/time.h""... $ac_c" 1>&6
echo "configure:10178: checking for gettimeofday declaration in time.h sys/time.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_gettimeofday_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_gettimeofday_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in time.h sys/time.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10189 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}gettimeofday[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_gettimeofday_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_gettimeofday_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10205 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}gettimeofday[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_gettimeofday_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_gettimeofday_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_gettimeofday_decl" 1>&6
if test "$ice_cv_have_gettimeofday_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


	
	echo $ac_n "checking for gettimeofday number of arguments""... $ac_c" 1>&6
echo "configure:10235: checking for gettimeofday number of arguments" >&5
if eval "test \"`echo '$''{'amanda_cv_gettimeofday_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		cat > conftest.$ac_ext <<EOF
#line 10241 "configure"
#include "confdefs.h"

#ifdef TIME_WITH_SYS_TIME
#  include <sys/time.h>
#  include <time.h>
#else
#  ifdef HAVE_SYS_TIME_H
#    include <sys/time.h>
#  else
#    include <time.h>
#  endif
#endif
		    
int main() {

			struct timeval val;
			struct timezone zone;
			gettimeofday(&val, &zone);
		    
; return 0; }
EOF
if { (eval echo configure:10263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  amanda_cv_gettimeofday_args=2
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  amanda_cv_gettimeofday_args=1
		
fi
rm -f conftest*
	    
	
fi

echo "$ac_t""$amanda_cv_gettimeofday_args" 1>&6
	if test "$amanda_cv_gettimeofday_args" = 2; then
	    cat >> confdefs.h <<\EOF
#define HAVE_TWO_ARG_GETTIMEOFDAY 1
EOF

	fi
    

for ac_func in getvfsent isascii
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10290: 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 <<EOF
#line 10295 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo initgroups | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_initgroups=no
for ac_func in initgroups
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10350: 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 <<EOF
#line 10355 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_initgroups=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_initgroups}" = yes; then
echo $ac_n "checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h""... $ac_c" 1>&6
echo "configure:10404: checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_initgroups_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_initgroups_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in grp.h sys/types.h unistd.h libc.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10415 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}initgroups[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_initgroups_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_initgroups_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10431 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}initgroups[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_initgroups_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_initgroups_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_initgroups_decl" 1>&6
if test "$ice_cv_have_initgroups_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo ioctl | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_ioctl=no
for ac_func in ioctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10466: 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 <<EOF
#line 10471 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_ioctl=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_ioctl}" = yes; then
echo $ac_n "checking for ioctl declaration in sys/ioctl.h unistd.h libc.h""... $ac_c" 1>&6
echo "configure:10520: checking for ioctl declaration in sys/ioctl.h unistd.h libc.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_ioctl_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_ioctl_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/ioctl.h unistd.h libc.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10531 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ioctl[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ioctl_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ioctl_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10547 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ioctl[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ioctl_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ioctl_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_ioctl_decl" 1>&6
if test "$ice_cv_have_ioctl_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo listen | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_listen=no
for ac_func in listen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10582: 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 <<EOF
#line 10587 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_listen=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_listen}" = yes; then
echo $ac_n "checking for listen declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:10636: checking for listen declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_listen_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_listen_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10647 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}listen[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_listen_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_listen_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10663 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}listen[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_listen_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_listen_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_listen_decl" 1>&6
if test "$ice_cv_have_listen_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo lstat | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_lstat=no
for ac_func in lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10698: 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 <<EOF
#line 10703 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_lstat=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_lstat}" = yes; then
echo $ac_n "checking for lstat declaration in sys/types.h sys/stat.h""... $ac_c" 1>&6
echo "configure:10752: checking for lstat declaration in sys/types.h sys/stat.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_lstat_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_lstat_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/stat.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10763 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}lstat[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_lstat_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_lstat_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10779 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}lstat[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_lstat_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_lstat_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_lstat_decl" 1>&6
if test "$ice_cv_have_lstat_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo malloc | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_malloc=no
for ac_func in malloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10814: 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 <<EOF
#line 10819 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_malloc=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_malloc}" = yes; then
echo $ac_n "checking for malloc declaration in stdlib.h""... $ac_c" 1>&6
echo "configure:10868: checking for malloc declaration in stdlib.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_malloc_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_malloc_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 10879 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}malloc[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_malloc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_malloc_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 10895 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}malloc[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_malloc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_malloc_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_malloc_decl" 1>&6
if test "$ice_cv_have_malloc_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10925: 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 <<EOF
#line 10930 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo memmove | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_memmove=no
for ac_func in memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10987: 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 <<EOF
#line 10992 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_memmove=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_memmove}" = yes; then
echo $ac_n "checking for memmove declaration in string.h""... $ac_c" 1>&6
echo "configure:11041: checking for memmove declaration in string.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_memmove_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_memmove_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 11052 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}memmove[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_memmove_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_memmove_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 11068 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}memmove[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_memmove_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_memmove_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_memmove_decl" 1>&6
if test "$ice_cv_have_memmove_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo memset | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_memset=no
for ac_func in memset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11103: 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 <<EOF
#line 11108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_memset=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_memset}" = yes; then
echo $ac_n "checking for memset declaration in string.h""... $ac_c" 1>&6
echo "configure:11157: checking for memset declaration in string.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_memset_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_memset_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 11168 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}memset[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_memset_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_memset_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 11184 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}memset[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_memset_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_memset_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_memset_decl" 1>&6
if test "$ice_cv_have_memset_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in mkdir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11214: 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 <<EOF
#line 11219 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo mktemp | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_mktemp=no
for ac_func in mktemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11274: 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 <<EOF
#line 11279 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_mktemp=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_mktemp}" = yes; then
echo $ac_n "checking for mktemp declaration in stdlib.h""... $ac_c" 1>&6
echo "configure:11328: checking for mktemp declaration in stdlib.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_mktemp_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_mktemp_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 11339 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}mktemp[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_mktemp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_mktemp_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 11355 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}mktemp[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_mktemp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_mktemp_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_mktemp_decl" 1>&6
if test "$ice_cv_have_mktemp_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in mktime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11385: 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 <<EOF
#line 11390 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo mktime | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_mktime=no
for ac_func in mktime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11447: 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 <<EOF
#line 11452 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_mktime=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_mktime}" = yes; then
echo $ac_n "checking for mktime declaration in time.h sys/time.h""... $ac_c" 1>&6
echo "configure:11501: checking for mktime declaration in time.h sys/time.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_mktime_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_mktime_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in time.h sys/time.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 11512 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}mktime[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_mktime_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_mktime_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 11528 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}mktime[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_mktime_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_mktime_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_mktime_decl" 1>&6
if test "$ice_cv_have_mktime_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:11559: 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 11564 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:11569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
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

for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11598: 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 <<EOF
#line 11603 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:11651: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat > conftest.$ac_ext <<EOF
#line 11659 "configure"
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
	data2 = malloc(2 * pagesize);
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
	data3 = malloc(pagesize);
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
}

EOF
if { (eval echo configure:11799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF

fi

for ac_func in on_exit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11824: 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 <<EOF
#line 11829 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo openlog | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_openlog=no
for ac_func in openlog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11884: 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 <<EOF
#line 11889 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_openlog=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_openlog}" = yes; then
echo $ac_n "checking for openlog declaration in syslog.h""... $ac_c" 1>&6
echo "configure:11938: checking for openlog declaration in syslog.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_openlog_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_openlog_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in syslog.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 11949 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}openlog[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_openlog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_openlog_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 11965 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}openlog[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_openlog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_openlog_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_openlog_decl" 1>&6
if test "$ice_cv_have_openlog_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo pclose | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_pclose=no
for ac_func in pclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12000: 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 <<EOF
#line 12005 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_pclose=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_pclose}" = yes; then
echo $ac_n "checking for pclose declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12054: checking for pclose declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_pclose_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_pclose_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12065 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}pclose[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_pclose_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_pclose_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12081 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}pclose[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_pclose_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_pclose_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_pclose_decl" 1>&6
if test "$ice_cv_have_pclose_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo perror | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_perror=no
for ac_func in perror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12116: 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 <<EOF
#line 12121 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_perror=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_perror}" = yes; then
echo $ac_n "checking for perror declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12170: checking for perror declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_perror_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_perror_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12181 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}perror[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_perror_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_perror_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12197 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}perror[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_perror_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_perror_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_perror_decl" 1>&6
if test "$ice_cv_have_perror_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo printf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_printf=no
for ac_func in printf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12232: 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 <<EOF
#line 12237 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_printf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_printf}" = yes; then
echo $ac_n "checking for printf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12286: checking for printf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_printf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_printf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12297 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}printf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_printf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_printf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12313 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}printf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_printf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_printf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_printf_decl" 1>&6
if test "$ice_cv_have_printf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12343: 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 <<EOF
#line 12348 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo puts | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_puts=no
for ac_func in puts
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12403: 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 <<EOF
#line 12408 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_puts=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_puts}" = yes; then
echo $ac_n "checking for puts declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12457: checking for puts declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_puts_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_puts_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12468 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}puts[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_puts_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_puts_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12484 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}puts[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_puts_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_puts_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_puts_decl" 1>&6
if test "$ice_cv_have_puts_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo realloc | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_realloc=no
for ac_func in realloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12519: 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 <<EOF
#line 12524 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_realloc=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_realloc}" = yes; then
echo $ac_n "checking for realloc declaration in stdlib.h""... $ac_c" 1>&6
echo "configure:12573: checking for realloc declaration in stdlib.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_realloc_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_realloc_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12584 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}realloc[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_realloc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_realloc_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12600 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}realloc[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_realloc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_realloc_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_realloc_decl" 1>&6
if test "$ice_cv_have_realloc_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo recvfrom | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_recvfrom=no
for ac_func in recvfrom
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12635: 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 <<EOF
#line 12640 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_recvfrom=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_recvfrom}" = yes; then
echo $ac_n "checking for recvfrom declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:12689: checking for recvfrom declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_recvfrom_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_recvfrom_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12700 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}recvfrom[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_recvfrom_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_recvfrom_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12716 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}recvfrom[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_recvfrom_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_recvfrom_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_recvfrom_decl" 1>&6
if test "$ice_cv_have_recvfrom_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo remove | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_remove=no
for ac_func in remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12751: 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 <<EOF
#line 12756 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_remove=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_remove}" = yes; then
echo $ac_n "checking for remove declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12805: checking for remove declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_remove_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_remove_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12816 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}remove[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_remove_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_remove_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12832 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}remove[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_remove_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_remove_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_remove_decl" 1>&6
if test "$ice_cv_have_remove_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo rename | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_rename=no
for ac_func in rename
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12867: 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 <<EOF
#line 12872 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_rename=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_rename}" = yes; then
echo $ac_n "checking for rename declaration in stdio.h""... $ac_c" 1>&6
echo "configure:12921: checking for rename declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_rename_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_rename_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 12932 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}rename[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_rename_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_rename_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 12948 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}rename[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_rename_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_rename_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_rename_decl" 1>&6
if test "$ice_cv_have_rename_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo rewind | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_rewind=no
for ac_func in rewind
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12983: 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 <<EOF
#line 12988 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_rewind=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_rewind}" = yes; then
echo $ac_n "checking for rewind declaration in stdio.h""... $ac_c" 1>&6
echo "configure:13037: checking for rewind declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_rewind_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_rewind_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13048 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}rewind[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_rewind_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_rewind_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13064 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}rewind[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_rewind_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_rewind_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_rewind_decl" 1>&6
if test "$ice_cv_have_rewind_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in rmdir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13094: 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 <<EOF
#line 13099 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo ruserok | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_ruserok=no
for ac_func in ruserok
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13154: 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 <<EOF
#line 13159 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_ruserok=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_ruserok}" = yes; then
echo $ac_n "checking for ruserok declaration in netdb.h sys/socket.h libc.h""... $ac_c" 1>&6
echo "configure:13208: checking for ruserok declaration in netdb.h sys/socket.h libc.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_ruserok_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_ruserok_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in netdb.h sys/socket.h libc.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13219 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ruserok[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ruserok_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ruserok_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13235 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ruserok[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ruserok_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ruserok_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_ruserok_decl" 1>&6
if test "$ice_cv_have_ruserok_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo select | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_select=no
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13270: 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 <<EOF
#line 13275 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_select=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_select}" = yes; then
echo $ac_n "checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h""... $ac_c" 1>&6
echo "configure:13324: checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_select_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_select_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h sys/select.h time.h sys/time.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13335 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}select[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_select_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_select_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13351 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}select[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_select_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_select_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_select_decl" 1>&6
if test "$ice_cv_have_select_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


	echo $ac_n "checking for select() argument type""... $ac_c" 1>&6
echo "configure:13380: checking for select() argument type" >&5
if eval "test \"`echo '$''{'amanda_cv_select_arg_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		rm -f conftest.c
		cat <<EOF >conftest.$ac_ext
#include "confdefs.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#  include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#  include <sys/socket.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

int main()
{
#ifdef FD_SET_POINTER
	(void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0);
#else
	(void)select(0, (int *) 0, (int *) 0, (int *) 0, 0);
#endif
	return 0;
}
EOF

																amanda_cv_select_arg_type=no
		select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS"
		$select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1
		if test $? -ne 0; then
		    amanda_cv_select_arg_type=int
		fi
		if test "$amanda_cv_select_arg_type" = no; then
		    $select_compile conftest.$ac_ext 1>conftest.int 2>&1
		    if test $? -ne 0; then
			amanda_cv_select_arg_type=fd_set
		    fi
		fi
		if test "$amanda_cv_select_arg_type" = no; then
		    wc_fdset=`wc -l <conftest.fd_set`
		    wc_int=`wc -l <conftest.int`
		    if test "$wc_fdset" -le "$wc_int"; then
			amanda_cv_select_arg_type=fd_set
		    else
			amanda_cv_select_arg_type=int
		    fi
		fi
		rm -f conftest*
	    
	
fi

echo "$ac_t""$amanda_cv_select_arg_type" 1>&6
	cat >> confdefs.h <<EOF
#define SELECT_ARG_TYPE $amanda_cv_select_arg_type
EOF

    


ice_tr=`echo sendto | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_sendto=no
for ac_func in sendto
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13456: 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 <<EOF
#line 13461 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_sendto=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_sendto}" = yes; then
echo $ac_n "checking for sendto declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:13510: checking for sendto declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_sendto_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_sendto_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13521 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}sendto[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_sendto_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_sendto_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13537 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}sendto[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_sendto_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_sendto_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_sendto_decl" 1>&6
if test "$ice_cv_have_sendto_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo setegid | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setegid=no
for ac_func in setegid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13572: 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 <<EOF
#line 13577 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setegid=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setegid}" = yes; then
echo $ac_n "checking for setegid declaration in unistd.h""... $ac_c" 1>&6
echo "configure:13626: checking for setegid declaration in unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setegid_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setegid_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13637 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setegid[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setegid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setegid_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13653 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setegid[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setegid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setegid_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setegid_decl" 1>&6
if test "$ice_cv_have_setegid_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo seteuid | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_seteuid=no
for ac_func in seteuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13688: 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 <<EOF
#line 13693 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_seteuid=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_seteuid}" = yes; then
echo $ac_n "checking for seteuid declaration in unistd.h""... $ac_c" 1>&6
echo "configure:13742: checking for seteuid declaration in unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_seteuid_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_seteuid_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13753 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}seteuid[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_seteuid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_seteuid_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13769 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}seteuid[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_seteuid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_seteuid_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_seteuid_decl" 1>&6
if test "$ice_cv_have_seteuid_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi



ice_tr=`echo setresgid | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setresgid=no
for ac_func in setresgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13805: 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 <<EOF
#line 13810 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setresgid=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setresgid}" = yes; then
echo $ac_n "checking for setresgid declaration in unistd.h""... $ac_c" 1>&6
echo "configure:13859: checking for setresgid declaration in unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setresgid_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setresgid_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13870 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setresgid[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setresgid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setresgid_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 13886 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setresgid[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setresgid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setresgid_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setresgid_decl" 1>&6
if test "$ice_cv_have_setresgid_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo setresuid | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setresuid=no
for ac_func in setresuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:13921: 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 <<EOF
#line 13926 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:13949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setresuid=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setresuid}" = yes; then
echo $ac_n "checking for setresuid declaration in unistd.h""... $ac_c" 1>&6
echo "configure:13975: checking for setresuid declaration in unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setresuid_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setresuid_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 13986 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setresuid[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setresuid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setresuid_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14002 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setresuid[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setresuid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setresuid_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setresuid_decl" 1>&6
if test "$ice_cv_have_setresuid_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


echo $ac_n "checking for setpgid""... $ac_c" 1>&6
echo "configure:14031: checking for setpgid" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgid'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 14036 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char setpgid(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char setpgid();

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_setpgid) || defined (__stub___setpgid)
choke me
#else
setpgid();
#endif

; return 0; }
EOF
if { (eval echo configure:14059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_setpgid=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_setpgid=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'setpgid`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
	cat >> confdefs.h <<\EOF
#define HAVE_SETPGID 1
EOF

	
ice_tr=`echo setpgid | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setpgid=no
for ac_func in setpgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14086: 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 <<EOF
#line 14091 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setpgid=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setpgid}" = yes; then
echo $ac_n "checking for setpgid declaration in sys/types.h unistd.h""... $ac_c" 1>&6
echo "configure:14140: checking for setpgid declaration in sys/types.h unistd.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setpgid_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setpgid_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h unistd.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14151 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setpgid[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setpgid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setpgid_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14167 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setpgid[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setpgid_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setpgid_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setpgid_decl" 1>&6
if test "$ice_cv_have_setpgid_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
echo "configure:14200: checking for setpgrp" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 14205 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char setpgrp(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char setpgrp();

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_setpgrp) || defined (__stub___setpgrp)
choke me
#else
setpgrp();
#endif

; return 0; }
EOF
if { (eval echo configure:14228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_setpgrp=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_setpgrp=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:14243: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 14251 "configure"
#include "confdefs.h"

/*
 * If this system has a BSD-style setpgrp, which takes arguments, exit
 * successfully.
 */
main()
{
    if (setpgrp(1,1) == -1)
	exit(0);
    else
	exit(1);
}

EOF
if { (eval echo configure:14267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_setpgrp_void=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_setpgrp_void=yes
fi
rm -fr conftest*
fi


fi

echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
if test $ac_cv_func_setpgrp_void = yes; then
  cat >> confdefs.h <<\EOF
#define SETPGRP_VOID 1
EOF

fi

else
  echo "$ac_t""no" 1>&6
fi


ice_tr=`echo setpgrp | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setpgrp=no
for ac_func in setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14302: 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 <<EOF
#line 14307 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setpgrp=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setpgrp}" = yes; then
echo $ac_n "checking for setpgrp declaration in sys/types.h unistd.h libc.h""... $ac_c" 1>&6
echo "configure:14356: checking for setpgrp declaration in sys/types.h unistd.h libc.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setpgrp_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setpgrp_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h unistd.h libc.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14367 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setpgrp[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setpgrp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setpgrp_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14383 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setpgrp[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setpgrp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setpgrp_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setpgrp_decl" 1>&6
if test "$ice_cv_have_setpgrp_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi



ice_tr=`echo setsockopt | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_setsockopt=no
for ac_func in setsockopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14419: 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 <<EOF
#line 14424 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_setsockopt=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_setsockopt}" = yes; then
echo $ac_n "checking for setsockopt declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:14473: checking for setsockopt declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_setsockopt_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_setsockopt_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14484 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setsockopt[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setsockopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setsockopt_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14500 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}setsockopt[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_setsockopt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_setsockopt_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_setsockopt_decl" 1>&6
if test "$ice_cv_have_setsockopt_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


for ac_func in shmget
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14531: 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 <<EOF
#line 14536 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 
	
	echo $ac_n "checking for shmdt() argument type""... $ac_c" 1>&6
echo "configure:14580: checking for shmdt() argument type" >&5
if eval "test \"`echo '$''{'amanda_cv_shmdt_arg_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		if test "$ac_cv_func_shmget" = yes; then
		    cat <<EOF >conftest.$ac_ext
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_IPC_H
# include <sys/ipc.h>
#endif
#ifdef HAVE_SYS_SHM_H
# include <sys/shm.h>
#endif

#ifdef __cplusplus
extern "C" void *shmat(int, void *, int);
#else
void *shmat();
#endif

int main()
{
    int i;
    return 0;
}
EOF
		    ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >/dev/null 2>/dev/null
		    if test $? = 0; then
			amanda_cv_shmdt_arg_type=void
		    else
			amanda_cv_shmdt_arg_type=char
		    fi
		    rm -f conftest*
		else
		    amanda_cv_shmdt_arg_type=nothing
		fi
	    
	
fi

echo "$ac_t""$amanda_cv_shmdt_arg_type" 1>&6
	cat >> confdefs.h <<EOF
#define SHM_ARG_TYPE $amanda_cv_shmdt_arg_type
EOF

    

	case "$FORCE_MMAP" in
	n | no)
	    cat >> confdefs.h <<\EOF
#define HAVE_SYSVSHM 1
EOF

	  ;;
	esac
    

else
  echo "$ac_t""no" 1>&6
fi
done


ice_tr=`echo shmat | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_shmat=no
for ac_func in shmat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14654: 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 <<EOF
#line 14659 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_shmat=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_shmat}" = yes; then
echo $ac_n "checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h""... $ac_c" 1>&6
echo "configure:14708: checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_shmat_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_shmat_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/ipc.h sys/shm.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14719 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmat[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmat_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmat_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14735 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmat[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmat_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmat_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_shmat_decl" 1>&6
if test "$ice_cv_have_shmat_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo shmctl | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_shmctl=no
for ac_func in shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14770: 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 <<EOF
#line 14775 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_shmctl=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_shmctl}" = yes; then
echo $ac_n "checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h""... $ac_c" 1>&6
echo "configure:14824: checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_shmctl_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_shmctl_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/ipc.h sys/shm.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14835 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmctl[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmctl_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmctl_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14851 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmctl[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmctl_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmctl_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_shmctl_decl" 1>&6
if test "$ice_cv_have_shmctl_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo shmdt | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_shmdt=no
for ac_func in shmdt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14886: 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 <<EOF
#line 14891 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:14914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_shmdt=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_shmdt}" = yes; then
echo $ac_n "checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h""... $ac_c" 1>&6
echo "configure:14940: checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_shmdt_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_shmdt_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/ipc.h sys/shm.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 14951 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmdt[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmdt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmdt_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 14967 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmdt[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmdt_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmdt_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_shmdt_decl" 1>&6
if test "$ice_cv_have_shmdt_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo shmget | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_shmget=no
for ac_func in shmget
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15002: 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 <<EOF
#line 15007 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_shmget=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_shmget}" = yes; then
echo $ac_n "checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h""... $ac_c" 1>&6
echo "configure:15056: checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_shmget_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_shmget_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/ipc.h sys/shm.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15067 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmget[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmget_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmget_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15083 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}shmget[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_shmget_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_shmget_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_shmget_decl" 1>&6
if test "$ice_cv_have_shmget_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
    case "$FORCE_MMAP" in
    n | no)
	if test "$ac_cv_func_shmget" != yes; then
	    echo "configure: warning: *** Neither shmget() nor mmap() found!" 1>&2
	    echo "configure: warning: *** This system will not support the Amanda server." 1>&2
	    NO_SERVER_MODE=true
	fi
      ;;
    y | ye | yes)
	echo "configure: warning: *** --with-mmap used on a system with no mmap() support!" 1>&2
	echo "configure: warning: *** This system will not support the Amanda server." 1>&2
	NO_SERVER_MODE=true
      ;;
    esac
fi


ice_tr=`echo snprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_snprintf=no
for ac_func in snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15136: 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 <<EOF
#line 15141 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_snprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_snprintf}" = yes; then
echo $ac_n "checking for snprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:15190: checking for snprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_snprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_snprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15201 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}snprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_snprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_snprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15217 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}snprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_snprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_snprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_snprintf_decl" 1>&6
if test "$ice_cv_have_snprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo vsnprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_vsnprintf=no
for ac_func in vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15252: 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 <<EOF
#line 15257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_vsnprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_vsnprintf}" = yes; then
echo $ac_n "checking for vsnprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:15306: checking for vsnprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_vsnprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_vsnprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15317 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vsnprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vsnprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vsnprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15333 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vsnprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vsnprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vsnprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_vsnprintf_decl" 1>&6
if test "$ice_cv_have_vsnprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

if test $ice_have_snprintf = no || test $ice_have_vsnprintf = no; then
    LIBOBJS="$LIBOBJS snprintf.o"
fi

for ac_func in sigaction sigemptyset sigvec
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15367: 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 <<EOF
#line 15372 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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


ice_tr=`echo socket | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_socket=no
for ac_func in socket
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15427: 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 <<EOF
#line 15432 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_socket=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_socket}" = yes; then
echo $ac_n "checking for socket declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:15481: checking for socket declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_socket_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_socket_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15492 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}socket[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_socket_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_socket_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15508 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}socket[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_socket_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_socket_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_socket_decl" 1>&6
if test "$ice_cv_have_socket_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo socketpair | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_socketpair=no
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15543: 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 <<EOF
#line 15548 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_socketpair=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_socketpair}" = yes; then
echo $ac_n "checking for socketpair declaration in sys/types.h sys/socket.h""... $ac_c" 1>&6
echo "configure:15597: checking for socketpair declaration in sys/types.h sys/socket.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_socketpair_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_socketpair_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in sys/types.h sys/socket.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15608 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}socketpair[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_socketpair_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_socketpair_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15624 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}socketpair[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_socketpair_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_socketpair_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_socketpair_decl" 1>&6
if test "$ice_cv_have_socketpair_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo sscanf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_sscanf=no
for ac_func in sscanf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15659: 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 <<EOF
#line 15664 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_sscanf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_sscanf}" = yes; then
echo $ac_n "checking for sscanf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:15713: checking for sscanf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_sscanf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_sscanf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15724 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}sscanf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_sscanf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_sscanf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15740 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}sscanf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_sscanf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_sscanf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_sscanf_decl" 1>&6
if test "$ice_cv_have_sscanf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in statfs statvfs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15770: 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 <<EOF
#line 15775 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15825: 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 <<EOF
#line 15830 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo strerror | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_strerror=no
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15887: 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 <<EOF
#line 15892 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:15915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_strerror=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_strerror}" = yes; then
echo $ac_n "checking for strerror declaration in string.h""... $ac_c" 1>&6
echo "configure:15941: checking for strerror declaration in string.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_strerror_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_strerror_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 15952 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strerror[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strerror_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strerror_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 15968 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strerror[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strerror_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strerror_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_strerror_decl" 1>&6
if test "$ice_cv_have_strerror_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

echo $ac_n "checking for strftime""... $ac_c" 1>&6
echo "configure:15996: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 16001 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strftime(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char strftime();

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_strftime) || defined (__stub___strftime)
choke me
#else
strftime();
#endif

; return 0; }
EOF
if { (eval echo configure:16024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_strftime=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_strftime=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRFTIME 1
EOF

else
  echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
echo "configure:16046: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | 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="-lintl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 16054 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char strftime();

int main() {
strftime()
; return 0; }
EOF
if { (eval echo configure:16065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  cat >> confdefs.h <<\EOF
#define HAVE_STRFTIME 1
EOF

LIBS="-lintl $LIBS"
else
  echo "$ac_t""no" 1>&6
fi

fi

for ac_func in strftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16094: 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 <<EOF
#line 16099 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo strftime | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_strftime=no
for ac_func in strftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16156: 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 <<EOF
#line 16161 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_strftime=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_strftime}" = yes; then
echo $ac_n "checking for strftime declaration in time.h sys/time.h""... $ac_c" 1>&6
echo "configure:16210: checking for strftime declaration in time.h sys/time.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_strftime_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_strftime_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in time.h sys/time.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16221 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strftime[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strftime_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strftime_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16237 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strftime[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strftime_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strftime_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_strftime_decl" 1>&6
if test "$ice_cv_have_strftime_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16267: 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 <<EOF
#line 16272 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo strncasecmp | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_strncasecmp=no
for ac_func in strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16329: 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 <<EOF
#line 16334 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_strncasecmp=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_strncasecmp}" = yes; then
echo $ac_n "checking for strncasecmp declaration in string.h""... $ac_c" 1>&6
echo "configure:16383: checking for strncasecmp declaration in string.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_strncasecmp_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_strncasecmp_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in string.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16394 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strncasecmp[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strncasecmp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strncasecmp_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16410 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}strncasecmp[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_strncasecmp_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_strncasecmp_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_strncasecmp_decl" 1>&6
if test "$ice_cv_have_strncasecmp_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

for ac_func in strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16440: 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 <<EOF
#line 16445 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



ice_tr=`echo syslog | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_syslog=no
for ac_func in syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16502: 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 <<EOF
#line 16507 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_syslog=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_syslog}" = yes; then
echo $ac_n "checking for syslog declaration in syslog.h""... $ac_c" 1>&6
echo "configure:16556: checking for syslog declaration in syslog.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_syslog_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_syslog_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in syslog.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16567 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}syslog[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_syslog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_syslog_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16583 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}syslog[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_syslog_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_syslog_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_syslog_decl" 1>&6
if test "$ice_cv_have_syslog_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo system | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_system=no
for ac_func in system
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16618: 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 <<EOF
#line 16623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_system=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_system}" = yes; then
echo $ac_n "checking for system declaration in stdlib.h""... $ac_c" 1>&6
echo "configure:16672: checking for system declaration in stdlib.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_system_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_system_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdlib.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16683 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}system[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_system_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_system_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16699 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}system[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_system_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_system_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_system_decl" 1>&6
if test "$ice_cv_have_system_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo time | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_time=no
for ac_func in time
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16734: 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 <<EOF
#line 16739 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_time=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_time}" = yes; then
echo $ac_n "checking for time declaration in time.h sys/time.h""... $ac_c" 1>&6
echo "configure:16788: checking for time declaration in time.h sys/time.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_time_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_time_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in time.h sys/time.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16799 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}time[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_time_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_time_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16815 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}time[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_time_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_time_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_time_decl" 1>&6
if test "$ice_cv_have_time_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo tolower | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_tolower=no
for ac_func in tolower
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16850: 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 <<EOF
#line 16855 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_tolower=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_tolower}" = yes; then
echo $ac_n "checking for tolower declaration in ctype.h""... $ac_c" 1>&6
echo "configure:16904: checking for tolower declaration in ctype.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_tolower_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_tolower_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in ctype.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 16915 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}tolower[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_tolower_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_tolower_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 16931 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}tolower[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_tolower_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_tolower_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_tolower_decl" 1>&6
if test "$ice_cv_have_tolower_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo toupper | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_toupper=no
for ac_func in toupper
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:16966: 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 <<EOF
#line 16971 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:16994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_toupper=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_toupper}" = yes; then
echo $ac_n "checking for toupper declaration in ctype.h""... $ac_c" 1>&6
echo "configure:17020: checking for toupper declaration in ctype.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_toupper_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_toupper_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in ctype.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 17031 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}toupper[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_toupper_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_toupper_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 17047 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}toupper[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_toupper_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_toupper_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_toupper_decl" 1>&6
if test "$ice_cv_have_toupper_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo ungetc | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_ungetc=no
for ac_func in ungetc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17082: 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 <<EOF
#line 17087 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:17110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_ungetc=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_ungetc}" = yes; then
echo $ac_n "checking for ungetc declaration in stdio.h""... $ac_c" 1>&6
echo "configure:17136: checking for ungetc declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_ungetc_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_ungetc_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 17147 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ungetc[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ungetc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ungetc_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 17163 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}ungetc[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_ungetc_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_ungetc_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_ungetc_decl" 1>&6
if test "$ice_cv_have_ungetc_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:17191: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 17196 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char vprintf();

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_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif

; return 0; }
EOF
if { (eval echo configure:17219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:17243: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 17248 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _doprnt();

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__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif

; return 0; }
EOF
if { (eval echo configure:17271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

fi


ice_tr=`echo vfprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_vfprintf=no
for ac_func in vfprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17303: 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 <<EOF
#line 17308 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:17331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_vfprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_vfprintf}" = yes; then
echo $ac_n "checking for vfprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:17357: checking for vfprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_vfprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_vfprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 17368 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vfprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vfprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vfprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 17384 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vfprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vfprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vfprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_vfprintf_decl" 1>&6
if test "$ice_cv_have_vfprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo vprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_vprintf=no
for ac_func in vprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17419: 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 <<EOF
#line 17424 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:17447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_vprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_vprintf}" = yes; then
echo $ac_n "checking for vprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:17473: checking for vprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_vprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_vprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 17484 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 17500 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_vprintf_decl" 1>&6
if test "$ice_cv_have_vprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi


ice_tr=`echo vsprintf | tr '[a-z]' '[A-Z]'`
ice_have_tr=HAVE_$ice_tr
ice_have_decl_tr=${ice_have_tr}_DECL
ice_have_vsprintf=no
for ac_func in vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17535: 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 <<EOF
#line 17540 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
 ice_have_vsprintf=yes
else
  echo "$ac_t""no" 1>&6
fi
done

if test "${ice_have_vsprintf}" = yes; then
echo $ac_n "checking for vsprintf declaration in stdio.h""... $ac_c" 1>&6
echo "configure:17589: checking for vsprintf declaration in stdio.h" >&5
if eval "test \"`echo '$''{'ice_cv_have_vsprintf_decl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
ice_cv_have_vsprintf_decl=no
ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
ice_re_word='(^|[^a-zA-Z0-9_])'
for header in stdio.h; do
# Check for ordinary declaration
cat > conftest.$ac_ext <<EOF
#line 17600 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vsprintf[ 	]*\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vsprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vsprintf_decl" = yes; then
	break
fi
# Check for "fixed" declaration like "getpid _PARAMS((int))"
cat > conftest.$ac_ext <<EOF
#line 17616 "configure"
#include "confdefs.h"
#include <$header>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "${ice_re_word}vsprintf[ 	]*$ice_re_params\(\(" >/dev/null 2>&1; then
  rm -rf conftest*
  ice_cv_have_vsprintf_decl=yes
fi
rm -f conftest*

if test "$ice_cv_have_vsprintf_decl" = yes; then
	break
fi
done

fi

echo "$ac_t""$ice_cv_have_vsprintf_decl" 1>&6
if test "$ice_cv_have_vsprintf_decl" = yes; then
cat >> confdefs.h <<EOF
#define ${ice_have_decl_tr} 1
EOF

fi
fi

echo $ac_n "checking for wait4""... $ac_c" 1>&6
echo "configure:17644: checking for wait4" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait4'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 17649 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char wait4(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char wait4();

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_wait4) || defined (__stub___wait4)
choke me
#else
wait4();
#endif

; return 0; }
EOF
if { (eval echo configure:17672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_wait4=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_wait4=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'wait4`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

for ac_func in waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17694: 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 <<EOF
#line 17699 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* 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();

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
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:17722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
done



echo $ac_n "checking disk device prefixes""... $ac_c" 1>&6
echo "configure:17750: checking disk device prefixes" >&5
dfline=`(
    df | while read line; do
	set -- $line
	while test $# -gt 0; do
	    if test "$1" = "/"; then
		echo $line
		break 2
	    fi
	    shift
	done
    done
) | sed 's/(//' | sed 's/)//' `

mount=`(
    set -- $dfline
    while test $# -gt 0; do
	if expr "$1" : '.*dev' >/dev/null 2>&1; then
	    echo $1
	    break
	fi
	shift
    done
)`

if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
    echo "$ac_t""(predefined) $DEV_PREFIX - $RDEV_PREFIX" 1>&6
else
    if test -d /dev/dsk; then
	DEV_PREFIX=/dev/dsk/
	if test -d /dev/rdsk; then
	    RDEV_PREFIX=/dev/rdsk/
	else
	    RDEV_PREFIX=/dev/dsk/
	fi
    elif test -d /dev; then
	case "$target" in
	    *-sni-sysv4)
		dev_prefix=/dev/dsk/
	        rdev_prefix=/dev/rdsk/
		echo "configure: warning: "*** Run amsinixfixdevs on Sinix systems using VxFS."" 1>&2
	        ;;

            *)
		DEV_PREFIX=/dev/
		# Some systems, notably Linux, do not have raw disk devices
		# names.  Check this by trying to see if a raw disk device name
		# exists using the normal raw device path prepended to the
		# mount point of the root filesystem.
		if test "$mount"; then
		    dev_name="/dev/r`basename $mount`"
		    if test -b $dev_name -o -c $dev_name; then
			RDEV_PREFIX=/dev/r
		    else
			RDEV_PREFIX=/dev/
		    fi
		else
		    RDEV_PREFIX=/dev/r
		fi
	        ;;
	esac
    else
	DEV_PREFIX=/
	RDEV_PREFIX=/
    fi
    echo "$ac_t""$DEV_PREFIX - $RDEV_PREFIX" 1>&6
fi

cat >> confdefs.h <<EOF
#define DEV_PREFIX "${DEV_PREFIX}"
EOF

cat >> confdefs.h <<EOF
#define RDEV_PREFIX "${RDEV_PREFIX}"
EOF


case $mount in
    /dev/vg*)
	echo "configure: warning: "*** Run amhpfixdevs on HP-UX systems using /dev/vg??."" 1>&2
	;;
esac

echo $ac_n "checking maximum file size""... $ac_c" 1>&6
echo "configure:17834: checking maximum file size" >&5
if eval "test \"`echo '$''{'amanda_cv_max_file_size'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	amanda_cv_max_file_size=0
	outfile=/tmp/maxsize.$$
	if test "$cross_compiling" = yes; then
  
	echo "configure: warning: "cannot perform this test if cross-compiling"" 1>&2

else
  cat > conftest.$ac_ext <<EOF
#line 17847 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <limits.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <sys/uio.h>

int main()
{
    struct iovec test;
    unsigned long compare = 0, last = 0;
    FILE *f = fopen("$outfile", "w");

    if (!f) return 1;

    test.iov_len = 1;
    while ((test.iov_len > 0) && (test.iov_len > last)) {
	if ((last = test.iov_len) > compare)
	    compare = test.iov_len;
	test.iov_len = (test.iov_len << 1) | 0x01;
    }
    fprintf(f, "%ld\n", compare / 1024);
    return 0;
}

EOF
if { (eval echo configure:17876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
	amanda_cv_max_file_size=`cat $outfile`

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  

fi
rm -fr conftest*
fi

	rm -f $outfile

fi

echo "$ac_t""$amanda_cv_max_file_size" 1>&6
if test "$amanda_cv_max_file_size" -gt 0; then
    cat >> confdefs.h <<EOF
#define MAXFILESIZE $amanda_cv_max_file_size
EOF

fi

echo $ac_n "checking whether posix fcntl locking works""... $ac_c" 1>&6
echo "configure:17904: checking whether posix fcntl locking works" >&5
if eval "test \"`echo '$''{'amanda_cv_posix_filelocking'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	if test "$cross_compiling" = yes; then
  
	amanda_cv_posix_filelocking="no (cannot run test)"

else
  cat > conftest.$ac_ext <<EOF
#line 17915 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_POSIX_FCNTL
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:17924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
	amanda_cv_posix_filelocking=yes

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
	amanda_cv_posix_filelocking="no"

fi
rm -fr conftest*
fi

    rm -f /tmp/conftest.lock

fi

echo "$ac_t""$amanda_cv_posix_filelocking" 1>&6
if test "$amanda_cv_posix_filelocking" = yes; then
    cat >> confdefs.h <<\EOF
#define USE_POSIX_FCNTL 1
EOF

    HAS_WORKING_FILE_LOCK=1
fi

if test -z "$HAS_WORKING_FILE_LOCK"; then
    echo $ac_n "checking whether flock locking works""... $ac_c" 1>&6
echo "configure:17955: checking whether flock locking works" >&5
if eval "test \"`echo '$''{'amanda_cv_flock_filelocking'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    if test "$cross_compiling" = yes; then
  
		    amanda_cv_flock_filelocking="no (cannot run test)"

else
  cat > conftest.$ac_ext <<EOF
#line 17966 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_FLOCK
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:17975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
		    amanda_cv_flock_filelocking="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
		    amanda_cv_flock_filelocking="no"

fi
rm -fr conftest*
fi

	rm -f /tmp/conftest.lock

fi

echo "$ac_t""$amanda_cv_flock_filelocking" 1>&6
    if test "$amanda_cv_flock_filelocking" = yes; then
	cat >> confdefs.h <<\EOF
#define USE_FLOCK 1
EOF

	HAS_WORKING_FILE_LOCK=1
    fi
fi

if test -z "$HAS_WORKING_FILE_LOCK"; then
    echo $ac_n "checking whether lockf locking works""... $ac_c" 1>&6
echo "configure:18007: checking whether lockf locking works" >&5
if eval "test \"`echo '$''{'amanda_cv_lockf_filelocking'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    if test "$cross_compiling" = yes; then
  
		    amanda_cv_lockf_filelocking="no (cannot run test)"

else
  cat > conftest.$ac_ext <<EOF
#line 18018 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_LOCKF
#include "${srcdir-.}/common-src/amflock.c"

EOF
if { (eval echo configure:18027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
		    amanda_cv_lockf_filelocking="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
		    amanda_cv_lockf_filelocking="no"

fi
rm -fr conftest*
fi

	rm -f /tmp/conftest.lock

fi

echo "$ac_t""$amanda_cv_lockf_filelocking" 1>&6
    if test "$amanda_cv_lockf_filelocking" = yes; then
	cat >> confdefs.h <<\EOF
#define USE_LOCKF 1
EOF

	HAS_WORKING_FILE_LOCK=1
    fi
fi

if test -z "$HAS_WORKING_FILE_LOCK"; then
    echo $ac_n "checking whether lnlock locking works""... $ac_c" 1>&6
echo "configure:18059: checking whether lnlock locking works" >&5
if eval "test \"`echo '$''{'amanda_cv_lnlock_filelocking'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    if test "$cross_compiling" = yes; then
  
		    amanda_cv_lnlock_filelocking="no (cannot run test)"

else
  cat > conftest.$ac_ext <<EOF
#line 18070 "configure"
#include "confdefs.h"

#undef  ASSERTIONS
#define CONFIGURE_TEST
#define USE_LNLOCK
#include "${srcdir-.}/common-src/amflock.c"
#include "${srcdir-.}/common-src/alloc.c"
#include "${srcdir-.}/common-src/error.c"
#include "${srcdir-.}/common-src/snprintf.c"
#include "${srcdir-.}/common-src/nolog.c"
char *pname = "lnlock-test";

EOF
if { (eval echo configure:18084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  
		    amanda_cv_lnlock_filelocking="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
		    amanda_cv_lnlock_filelocking="no"

fi
rm -fr conftest*
fi

	rm -f /tmp/conftest.lock

fi

echo "$ac_t""$amanda_cv_lnlock_filelocking" 1>&6
    if test "$amanda_cv_lnlock_filelocking" = yes; then
	cat >> confdefs.h <<\EOF
#define USE_LNLOCK 1
EOF

	HAS_WORKING_FILE_LOCK=1
    fi
fi

if test -z "$HAS_WORKING_FILE_LOCK"; then
    echo "configure: warning: *** No working file locking capability found!" 1>&2
    echo "configure: warning: *** Be VERY VERY careful." 1>&2
fi

CFLAGS="$OLD_CFLAGS"
LIBS="$LIBS $KRB4LIBS"






if ${NO_SERVER_MODE-false}; then
    BUILD_CHANGER_PROGS_LIBEXEC=
    BUILD_CHANGER_SCRIPTS_LIBEXEC=
    BUILD_SERVER_PROGS_SBIN=
    BUILD_SERVER_PROGS_LIBEXEC=
    BUILD_SERVER_SCRIPTS_SBIN=
    BUILD_SERVER_LIB=
    BUILD_SERVER_LTLIB=
    BUILD_AMPLOT_SBIN=
    BUILD_AMPLOT_LIBEXEC=
fi

if ${NO_CLIENT_MODE-false}; then
    BUILD_CLIENT_PROGS_LIBEXEC=
    BUILD_CLIENT_SCRIPTS_LIBEXEC=
    BUILD_CLIENT_LIB=
    BUILD_CLIENT_LTLIB=
    BUILD_RECOVER_PROGS_SBIN=
fi

if ${NO_RESTORE_MODE-false}; then
    BUILD_RESTORE_PROGS_SBIN=
    BUILD_RESTORE_PROGS_LIBEXEC=
    if ${NO_SERVER_MODE-false}; then
	BUILD_TAPE_LIB=
	BUILD_TAPE_LTLIB=
    fi
fi

if ${NO_RECOVER_MODE-false}; then
    BUILD_RECOVER_PROGS_SBIN=
fi

case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
y |  ye | yes) cat >> confdefs.h <<\EOF
#define USE_RUNDUMP 1
EOF
;;
esac

LIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.$(OBJ_EXTENSION)/g'`
LIBOBJS_CLIENT=`echo "$LIBOBJS_CLIENT" | sed 's/\.o/\.$(OBJ_EXTENSION)/g'`
ALLOCA=`echo "$ALLOCA" | sed 's/\.o/\.$(OBJ_EXTENSION)/g'`

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.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# 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.
#
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) 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
    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}'

# 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[ 	]*=[^:]*$/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}

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.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "\
	amplot/amcat.awk		amplot/amplot.sh		\
	amplot/Makefile							\
									\
	changer-src/chg-manual.sh	changer-src/chg-multi.sh	\
	changer-src/chg-mtx.sh		changer-src/chg-chs.sh		\
	changer-src/chg-rth.pl		changer-src/Makefile		\
									\
	client-src/patch-system.sh	client-src/Makefile		\
									\
	common-src/versuff.c		common-src/Makefile		\
									\
	example/amanda.conf		example/Makefile		\
									\
	man/amadmin.8			man/amanda.8			\
	man/amcheck.8			man/amcheckdb.8			\
	man/amcleanup.8			man/amdump.8			\
	man/amflush.8			man/amlabel.8			\
	man/amoverview.8		man/amrecover.8			\
	man/amrmtape.8			man/amtoc.8			\
	man/amverify.8			man/Makefile			\
									\
	recover-src/Makefile						\
									\
	restore-src/Makefile						\
									\
	server-src/amcheckdb.sh		server-src/amcleanup.sh		\
	server-src/amdump.sh		server-src/amfreetapes.sh	\
	server-src/amoverview.pl	server-src/amrmtape.sh		\
	server-src/amtoc.pl		server-src/amverify.sh		\
	server-src/Makefile						\
									\
	tape-src/Makefile						\
									\
	config/Makefile			Makefile config/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# 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%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%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%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@VERSION_MAJOR@%$VERSION_MAJOR%g
s%@VERSION_MINOR@%$VERSION_MINOR%g
s%@VERSION_PATCH@%$VERSION_PATCH%g
s%@VERSION_COMMENT@%$VERSION_COMMENT%g
s%@VERSION_SUFFIX@%$VERSION_SUFFIX%g
s%@CONFIG_DIR@%$CONFIG_DIR%g
s%@USE_VERSION_SUFFIXES@%$USE_VERSION_SUFFIXES%g
s%@BUILD_COMMON_LIB@%$BUILD_COMMON_LIB%g
s%@BUILD_COMMON_LTLIB@%$BUILD_COMMON_LTLIB%g
s%@BUILD_CLIENT_SCRIPTS_SBIN@%$BUILD_CLIENT_SCRIPTS_SBIN%g
s%@BUILD_CLIENT_PROGS_LIBEXEC@%$BUILD_CLIENT_PROGS_LIBEXEC%g
s%@BUILD_CLIENT_SCRIPTS_LIBEXEC@%$BUILD_CLIENT_SCRIPTS_LIBEXEC%g
s%@BUILD_CLIENT_LIB@%$BUILD_CLIENT_LIB%g
s%@BUILD_CLIENT_LTLIB@%$BUILD_CLIENT_LTLIB%g
s%@LIBSRCS_CLIENT@%$LIBSRCS_CLIENT%g
s%@LIBOBJS_CLIENT@%$LIBOBJS_CLIENT%g
s%@AMCLIENT_EXTRA_OBJS@%$AMCLIENT_EXTRA_OBJS%g
s%@BUILD_RECOVER_PROGS_SBIN@%$BUILD_RECOVER_PROGS_SBIN%g
s%@BUILD_CHANGER_PROGS_LIBEXEC@%$BUILD_CHANGER_PROGS_LIBEXEC%g
s%@BUILD_CHANGER_SCRIPTS_LIBEXEC@%$BUILD_CHANGER_SCRIPTS_LIBEXEC%g
s%@BUILD_TAPE_LIB@%$BUILD_TAPE_LIB%g
s%@BUILD_TAPE_LTLIB@%$BUILD_TAPE_LTLIB%g
s%@BUILD_SERVER_PROGS_SBIN@%$BUILD_SERVER_PROGS_SBIN%g
s%@BUILD_SERVER_PROGS_LIBEXEC@%$BUILD_SERVER_PROGS_LIBEXEC%g
s%@BUILD_SERVER_SCRIPTS_SBIN@%$BUILD_SERVER_SCRIPTS_SBIN%g
s%@BUILD_SERVER_LIB@%$BUILD_SERVER_LIB%g
s%@BUILD_SERVER_LTLIB@%$BUILD_SERVER_LTLIB%g
s%@BUILD_RESTORE_PROGS_SBIN@%$BUILD_RESTORE_PROGS_SBIN%g
s%@BUILD_RESTORE_PROGS_LIBEXEC@%$BUILD_RESTORE_PROGS_LIBEXEC%g
s%@DEFAULT_SERVER@%$DEFAULT_SERVER%g
s%@CLIENT_LOGIN@%$CLIENT_LOGIN%g
s%@SETUID_GROUP@%$SETUID_GROUP%g
s%@DEFAULT_CONFIG@%$DEFAULT_CONFIG%g
s%@DEFAULT_TAPE_SERVER@%$DEFAULT_TAPE_SERVER%g
s%@DEFAULT_TAPE_DEVICE@%$DEFAULT_TAPE_DEVICE%g
s%@DEFAULT_CHANGER_DEVICE@%$DEFAULT_CHANGER_DEVICE%g
s%@SAMBA_CLIENT@%$SAMBA_CLIENT%g
s%@DEBUG_DIR@%$DEBUG_DIR%g
s%@SERVICE_SUFFIX@%$SERVICE_SUFFIX%g
s%@LIBRARIES_TARGET@%$LIBRARIES_TARGET%g
s%@LIB_EXTENSION@%$LIB_EXTENSION%g
s%@OBJ_EXTENSION@%$OBJ_EXTENSION%g
s%@CC@%$CC%g
s%@AMANDA_CFLAGS@%$AMANDA_CFLAGS%g
s%@MT_FILE_FLAG@%$MT_FILE_FLAG%g
s%@LIBTOOL_M4@%$LIBTOOL_M4%g
s%@LIBTOOL_M4_MACRO_DIR@%$LIBTOOL_M4_MACRO_DIR%g
s%@AR@%$AR%g
s%@BUILD_AMPLOT_SBIN@%$BUILD_AMPLOT_SBIN%g
s%@BUILD_AMPLOT_LIBEXEC@%$BUILD_AMPLOT_LIBEXEC%g
s%@AWK@%$AWK%g
s%@AWK_VAR_ASSIGNMENT_OPT@%$AWK_VAR_ASSIGNMENT_OPT%g
s%@YACC@%$YACC%g
s%@CAT@%$CAT%g
s%@COMPRESS@%$COMPRESS%g
s%@DD@%$DD%g
s%@EGREP@%$EGREP%g
s%@GETCONF@%$GETCONF%g
s%@GNUPLOT@%$GNUPLOT%g
s%@GREP@%$GREP%g
s%@GNUTAR@%$GNUTAR%g
s%@GZIP@%$GZIP%g
s%@MAILER@%$MAILER%g
s%@MT@%$MT%g
s%@CHS@%$CHS%g
s%@MTX@%$MTX%g
s%@PCAT@%$PCAT%g
s%@PERL@%$PERL%g
s%@RANLIB@%$RANLIB%g
s%@SHELL@%$SHELL%g
s%@DUMP@%$DUMP%g
s%@RESTORE@%$RESTORE%g
s%@XFSDUMP@%$XFSDUMP%g
s%@XFSRESTORE@%$XFSRESTORE%g
s%@VXDUMP@%$VXDUMP%g
s%@VXRESTORE@%$VXRESTORE%g
s%@VDUMP@%$VDUMP%g
s%@VRESTORE@%$VRESTORE%g
s%@AMPLOT_COMPRESS@%$AMPLOT_COMPRESS%g
s%@AMPLOT_CAT_GZIP@%$AMPLOT_CAT_GZIP%g
s%@AMPLOT_CAT_COMPRESS@%$AMPLOT_CAT_COMPRESS%g
s%@AMPLOT_CAT_PACK@%$AMPLOT_CAT_PACK%g
s%@LD@%$LD%g
s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CPP@%$CPP%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
s%@DB_EXT@%$DB_EXT%g
s%@ALLOCA@%$ALLOCA%g
s%@LIBOBJS@%$LIBOBJS%g
s%@ac_n@%$ac_n%g
s%@ac_c@%$ac_c%g

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_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
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"\
	amplot/amcat.awk		amplot/amplot.sh		\
	amplot/Makefile							\
									\
	changer-src/chg-manual.sh	changer-src/chg-multi.sh	\
	changer-src/chg-mtx.sh		changer-src/chg-chs.sh		\
	changer-src/chg-rth.pl		changer-src/Makefile		\
									\
	client-src/patch-system.sh	client-src/Makefile		\
									\
	common-src/versuff.c		common-src/Makefile		\
									\
	example/amanda.conf		example/Makefile		\
									\
	man/amadmin.8			man/amanda.8			\
	man/amcheck.8			man/amcheckdb.8			\
	man/amcleanup.8			man/amdump.8			\
	man/amflush.8			man/amlabel.8			\
	man/amoverview.8		man/amrecover.8			\
	man/amrmtape.8			man/amtoc.8			\
	man/amverify.8			man/Makefile			\
									\
	recover-src/Makefile						\
									\
	restore-src/Makefile						\
									\
	server-src/amcheckdb.sh		server-src/amcleanup.sh		\
	server-src/amdump.sh		server-src/amfreetapes.sh	\
	server-src/amoverview.pl	server-src/amrmtape.sh		\
	server-src/amtoc.pl		server-src/amverify.sh		\
	server-src/Makefile						\
									\
	tape-src/Makefile						\
									\
	config/Makefile			Makefile"}
EOF
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
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # 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'`
  else
    ac_dir_suffix= ac_dots=
  fi

  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.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  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

  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='\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='\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'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="config/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
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  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 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.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# 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 :
do
  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 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
    # 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"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF


EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > config/stamp-h

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

